Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Encouragement from Immediate Window #20

Merged
merged 1 commit into from
Jul 18, 2014
Merged

Remove Encouragement from Immediate Window #20

merged 1 commit into from
Jul 18, 2014

Conversation

jaredpar
Copy link
Collaborator

Encouragement was using the presence of an ITextDocument as the
predicate for whether or not a given ITextView is eligible for
encouragement tips Having an ITextDocument means a given ITextView is
backed by a physical file and saving such an item should be encouraged.

The problem is windows like the 'Immediate Window' are backed by
physical files (esp with Roslyn). These files are implementation
details though and saving them has no benefit to the user. In these
cases the save operation isn't even directly surfaced to the user. It
happens as a consequence of a non-save like action (in the case of the
'Immediate Window', it happens on every key stroke). This causes
Encouragement to be displayed at unexpected times

This change fixes this problem by changing the predicate slightly. We
now check for ITextDocument (has ITextView has a physical backing file)
and the Document role (this ITextView is being displayed as a document).

closes #19

Encouragement was using the presence of an ITextDocument as the
predicate for whether or not a given ITextView is eligible for
encouragement tips  Having an ITextDocument means a given ITextView is
backed by a physical file and saving such an item should be encouraged.

The problem is windows like the 'Immediate Window' are backed by
physical files (esp with Roslyn).  These files are implementation
details though and saving them has no benefit to the user.  In these
cases the save operation isn't even directly surfaced to the user.  It
happens as a consequence of a non-save like action (in the case of the
'Immediate Window', it happens on every key stroke).  This causes
Encouragement to be displayed at unexpected times

This change fixes this problem by changing the predicate slightly.  We
now check for ITextDocument (has ITextView has a physical backing file)
and the Document role (this ITextView is being displayed as a document).
haacked added a commit that referenced this pull request Jul 18, 2014
Remove Encouragement from Immediate Window
@haacked haacked merged commit cc244b3 into master Jul 18, 2014
@haacked haacked deleted the fixes-19 branch July 18, 2014 22:47
@haacked
Copy link
Owner

haacked commented Jul 18, 2014

@haacked
Copy link
Owner

haacked commented Jul 18, 2014

Just released this as 1.0.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Encouragements are taking over my immediate window
2 participants