Как я могу исключить некоторые папки из своего проекта Eclipse?

Используя ваш код, я получаю ожидаемый результат:

x = np.zeros((10,))

x[:3] += 1

x
array([1., 1., 1., 0., 0., 0., 0., 0., 0., 0.])

x[2:] += x[:-2]

x
array([1., 1., 2., 1., 1., 0., 0., 0., 0., 0.])
85
задан Community 23 May 2017 в 12:09
поделиться

4 ответа

Фильтры скрывают ресурсы от просмотра, но они все еще находятся в проекте. Если вы создаете проект в другом месте, вы можете создать связанных ресурсов в папках, которые хотите включить в свой проект.

Для справки я опубликовал еще один ответ, в котором описывается, как использовать связанные ресурсы в подробнее .

15
ответ дан 24 November 2019 в 08:13
поделиться

Если Вы хотите добавить фильтры непосредственно в файл .project , это некоторые правила:

    <type>6</type> <!-- exclude all, files -->
    <type>5</type> <!-- include only, files -->
    <type>13</type> <!-- include only, files and folders -->
    <type>26</type><!-- exclude all, folders, all children -->

    <arguments>1.0-name-matches-false-false-xyz</arguments> <!-- case sensitive=false, regular expression=false, something named=xyz -->
    <arguments>1.0-name-matches-true-false-EEE</arguments> <!-- case sensitive = true, regular expression = false, something named=EEE -->
    <arguments>1.0-name-matches-false-false-www</arguments> <!--case sensitive=false, regular expression = false, something named=www -->

Один раздел фильтра .project, например:

    <filteredResources>
        <filter>
            <id>1567020347706</id>
            <name></name>
            <type>6</type> <!-- exclude all, files -->
            <matcher>
                <id>org.eclipse.ui.ide.multiFilter</id>
                <arguments>1.0-name-matches-false-false-abc</arguments>
            </matcher>
        </filter>
        <filter>
            <id>1567020347708</id>
            <name></name>
            <type>5</type> <!-- include only, files -->
            <matcher>
                <id>org.eclipse.ui.ide.multiFilter</id>
                <arguments>1.0-name-matches-false-false-xyz</arguments> <!-- case sensitive=false, regular expression=false -->
            </matcher>
        </filter>
        <filter>
            <id>1567020347711</id>
            <name></name>
            <type>13</type>
            <matcher>
                <id>org.eclipse.ui.ide.multiFilter</id>
                <arguments>1.0-name-matches-false-false-mno</arguments>
            </matcher>
        </filter>
        <filter>
            <id>1567020347713</id>
            <name></name>
            <type>26</type><!-- exclude all, folders, all children -->
            <matcher>
                <id>org.eclipse.ui.ide.multiFilter</id>
                <arguments>1.0-name-matches-true-false-EEE</arguments> <!-- case sensitive = true, regular expression = false -->
            </matcher>
        </filter>
        <filter>
            <id>1567020347716</id>
            <name></name>
            <type>26</type> <!-- exclude all, folders, all children -->
            <matcher>
                <id>org.eclipse.ui.ide.multiFilter</id>
                <arguments>1.0-name-matches-false-false-www</arguments> <!-- case sensitive = false, regular expression = false -->
            </matcher>
        </filter>
    </filteredResources>
0
ответ дан 24 November 2019 в 08:13
поделиться

Yes, you may place a custom filter on your project. In your project explorer view, there should be a white, downwards pointing arrow near the top of the panel by the Package Explorer tab. Click it, and go to Filters. From there, you can specify certain folder patterns you do not want detected by checking the box next to Name Filter Patterns. In this case, I would put the name of the 3rd party library.

6
ответ дан 24 November 2019 в 08:13
поделиться

The way I've always done it is to explicitly check out projects as peers. e.g:

~/myworkspace/goodproject
~/myworkspace/3rdparty

then import only "goodproject" into eclipse. If "3rdparty" is a subdirectory of goodproject, you can fake it out... Say for example your svn project looks like this:

project/
       src/
          main/
          3rdparty/

You can locally create project/src/ then checkout only the "main" directory, and have eclipse rely on a packaged version (e.g. point to the jar if your project is java).

1
ответ дан 24 November 2019 в 08:13
поделиться
Другие вопросы по тегам:

Похожие вопросы: