Skip to content

Commit

Permalink
#547 #523 #528 #486 - Removed "tracked & ignored" feature
Browse files Browse the repository at this point in the history
  • Loading branch information
hsz committed May 7, 2019
1 parent 572962b commit 075ba17
Show file tree
Hide file tree
Showing 18 changed files with 11 additions and 904 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Change Log
- .gcloudignore (Google Cloud) support [\#577](https://github.com/hsz/idea-gitignore/issues/577)
- .nuxtignore (Nuxt.js) support [\#576](https://github.com/hsz/idea-gitignore/issues/576)
- Fixed deprecation warnings [\#567](https://github.com/hsz/idea-gitignore/issues/567)
- Removed "tracked & ignored" feature [\#547](https://github.com/hsz/idea-gitignore/issues/547) [\#523](https://github.com/hsz/idea-gitignore/issues/523) [\#528](https://github.com/hsz/idea-gitignore/issues/528) [\#486](https://github.com/hsz/idea-gitignore/issues/486)

**Fixed bugs:**

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Changelog
- .gcloudignore (Google Cloud) support [\#577](https://github.com/hsz/idea-gitignore/issues/577)
- .nuxtignore (Nuxt.js) support [\#576](https://github.com/hsz/idea-gitignore/issues/576)
- Fixed deprecation warnings [\#567](https://github.com/hsz/idea-gitignore/issues/567)
- Removed "tracked & ignored" feature [\#547](https://github.com/hsz/idea-gitignore/issues/547) [\#523](https://github.com/hsz/idea-gitignore/issues/523) [\#528](https://github.com/hsz/idea-gitignore/issues/528) [\#486](https://github.com/hsz/idea-gitignore/issues/486)

**Fixed bugs:**

Expand Down
9 changes: 1 addition & 8 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
<li>.gcloudignore (Google Cloud) support (<a href="https://github.com/hsz/idea-gitignore/issues/577">577</a>)</li>
<li>.nuxtignore (Nuxt.js) support (<a href="https://github.com/hsz/idea-gitignore/issues/576">576</a>)</li>
<li>Fixed deprecation warnings (<a href="https://github.com/hsz/idea-gitignore/issues/567">567</a>)</li>
<li>Removed "tracked & ignored" feature (<a href="https://github.com/hsz/idea-gitignore/issues/547">547</a>, <a href="https://github.com/hsz/idea-gitignore/issues/523">523</a>, <a href="https://github.com/hsz/idea-gitignore/issues/528">528</a>, <a href="https://github.com/hsz/idea-gitignore/issues/486">486</a>)</li>
</ul>
<i>Fixed bugs:</i>
Expand Down Expand Up @@ -547,10 +548,6 @@
<component>
<implementation-class>mobi.hsz.idea.gitignore.IgnoreUpdateComponent</implementation-class>
</component>
<component>
<implementation-class>mobi.hsz.idea.gitignore.TrackedIgnoredFilesComponent</implementation-class>
<loadForDefaultProject/>
</component>
<component>
<implementation-class>mobi.hsz.idea.gitignore.IgnoreFileBasedIndexProjectHandler</implementation-class>
</component>
Expand Down Expand Up @@ -590,9 +587,5 @@
<action id="HideIgnoredFiles" class="mobi.hsz.idea.gitignore.actions.HideIgnoredFilesAction">
<add-to-group group-id="ProjectViewPopupMenu"/>
</action>

<action id="HandleTrackedIgnoredFiles" class="mobi.hsz.idea.gitignore.actions.HandleTrackedIgnoredFilesAction">
<add-to-group group-id="ProjectViewPopupMenu"/>
</action>
</actions>
</idea-plugin>
5 changes: 1 addition & 4 deletions resources/messages/IgnoreBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ settings.general.outerIgnoreRules=Show &outer ignore rules in editor (Git only)
settings.general.insertAtCursor=Insert new ignore entries at cursor &position
settings.general.addUnversionedFiles=Suggest to add &unversioned files (Git only)
settings.general.unignoreFiles=Enable unignore files group (add entries prefixed with !)
settings.general.informTrackedIgnored=Inform about ignored files that are still tracked (Git only)
settings.general.notifyIgnoredEditing=Inform about editing ignored file
settings.general.donate=Donate me with:
settings.userTemplates=User templates
Expand Down Expand Up @@ -151,16 +150,14 @@ action.importTemplates.error=User templates import failed.

notification.group=.ignore plugin
notification.group.update=.ignore plugin update information
notification.untrack.title=Ignored files found that are tracked
notification.untrack.content=<b>.ignore</b> plugin found some files that are tracked with Git \
which are also listed in .gitignore file. <a href="#">Show details</a> <a href="#disable">Don't show</a>
notification.update.title=<b>.ignore</b> plugin updated to v{0}
notification.update.content=<br/>\
Helpful? <b><a href="https://www.paypal.me/hsz">Donate with PayPal</a> or <a href="https://opencollective.com/ignore">OpenCollective!</a></b><br/><br/>\
Implemented enhancements:<br/>\
- .gcloudignore (Google Cloud) support (#577)<br/>\
- .nuxtignore (Nuxt.js) support (#576)<br/>\
- Fixed deprecation warnings (#567)<br/>\
- Removed "tracked & ignored" feature (#547 #523, #528, #486)<br/>\
Fixes:<br/>\
- Adding 2+ templates without new line in between (#561)<br/>\
<br/>\
Expand Down
18 changes: 2 additions & 16 deletions src/mobi/hsz/idea/gitignore/IgnoreManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@ public static void associateFileType(@NotNull final String fileName, @NotNull fi
* @return file is ignored and tracked
*/
public boolean isFileTracked(@NotNull final VirtualFile file) {
return settings.isInformTrackedIgnored() && !notConfirmedIgnoredFiles.contains(file) &&
!confirmedIgnoredFiles.isEmpty() && confirmedIgnoredFiles.containsKey(file);
return !notConfirmedIgnoredFiles.contains(file) && !confirmedIgnoredFiles.isEmpty() &&
confirmedIgnoredFiles.containsKey(file);
}

/**
Expand Down Expand Up @@ -560,16 +560,6 @@ private void toggle(@NotNull Boolean enable) {
}
}

/**
* Returns tracked and ignored files stored in {@link #confirmedIgnoredFiles}.
*
* @return tracked and ignored files map
*/
@NotNull
public ConcurrentMap<VirtualFile, VcsRoot> getConfirmedIgnoredFiles() {
return confirmedIgnoredFiles;
}

/** {@link Runnable} implementation to rebuild {@link #confirmedIgnoredFiles}. */
class RefreshTrackedIgnoredRunnable implements Runnable, IgnoreManager.RefreshTrackedIgnoredListener {
/** Default {@link Runnable} run method that invokes rebuilding with bus event propagating. */
Expand All @@ -590,10 +580,6 @@ public void refresh() {
* @param silent propagate {@link IgnoreManager.TrackedIgnoredListener#TRACKED_IGNORED} event
*/
public void run(boolean silent) {
if (!settings.isInformTrackedIgnored()) {
return;
}

final ConcurrentMap<VirtualFile, VcsRoot> result = ContainerUtil.newConcurrentMap();
for (VcsRoot vcsRoot : vcsRoots) {
if (!(vcsRoot.getVcs() instanceof GitVcs) || vcsRoot.getPath() == null) {
Expand Down
130 changes: 0 additions & 130 deletions src/mobi/hsz/idea/gitignore/TrackedIgnoredFilesComponent.java

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions src/mobi/hsz/idea/gitignore/indexing/IgnoreFilesIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,18 +194,6 @@ public boolean acceptInput(@NotNull VirtualFile file) {
IgnoreManager.FILE_TYPES_ASSOCIATION_QUEUE.containsKey(file.getName());
}

/**
* Returns collection of indexed {@link IgnoreFileTypeKey} for given {@link Project}.
*
* @param project current project
* @return {@link IgnoreFileTypeKey} collection
*/
@NotNull
public static Collection<IgnoreFileType> getKeys(@NotNull Project project) {
Collection<IgnoreFileTypeKey> keys = FileBasedIndex.getInstance().getAllKeys(KEY, project);
return ContainerUtil.map(keys, IgnoreFileTypeKey::getType);
}

/**
* Returns collection of indexed {@link IgnoreEntryOccurrence} for given {@link Project} and {@link IgnoreFileType}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void decorate(ProjectViewNode node, PresentationData data) {
return;
}

if (ignoreSettings.isInformTrackedIgnored() && manager.isFileTracked(file) && manager.isFileIgnored(file)) {
if (manager.isFileTracked(file) && manager.isFileIgnored(file)) {
Utils.addColoredText(
data,
IgnoreBundle.message("projectView.tracked"),
Expand Down
Loading

3 comments on commit 075ba17

@kenrachynski
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feature removed instead of improved? I'm disappointed as I use this feature all the time to help clean up old repositories.

@hsz
Copy link
Member Author

@hsz hsz commented on 075ba17 May 13, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kenrachynski Sorry for that, but keeping this feature was a bit problematic:
#486 (comment)

@OrangeDog
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found this very useful. Is it possible to have it back as a default-off option?

Please sign in to comment.