Skip to content

Conversation

@devoncarew
Copy link
Contributor

  • show analysis status (Analyzing...) in the status line when the analysis server is busy
  • default showing todos to true (fix Default to showing TODOs; reanalyze when config changes #39)
  • reanalyze sources when the setting for showing todos changes
  • don't call serverShutdown - if I understand correctly it's basically a no-op
  • fix an issue w/ tooltips where some elements (string constants) would show a small, no content tooltip
  • only send overlays for files that the analysis server needs to be aware of

@DanTup, it's a grab bag of work. Probably it for this weekend! I'm excited that Dart's getting a plugin for vscode :)

private handleErrors(notification: as.AnalysisErrorsNotification) {
let errors = notification.errors;
if (!getConfig('showTodos'))
if (!getConfig<boolean>('showTodos'))
Copy link
Member

Choose a reason for hiding this comment

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

I can't remember why, I tried to standardise on double quotes for strings. I seemed to be randomly mixing them and it kinda bugged me. Maybe I thought I'd be putting apostrophes in English strings more and I guess they're also slightly more distinguishable from template-strings (backticks).

You don't have to worry about changing this but I thought it worth mentioning (or maybe there's a reason I should switch!?)

Copy link
Member

Choose a reason for hiding this comment

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

I'd also been putting config names into constants; though currently they're littered around the place and probably should go together somewhere; I'll probably pull them all together soon into a strongly-typed class.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll probably pull them all together soon into a strongly-typed class.

Sounds great - I have the same string literal (showTodos) in 2-3 places now; having a class for the pref name would be more robust.

Copy link
Member

Choose a reason for hiding this comment

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

Yep; just working on this now.. Looks something like this:

import { config } from "./config";

if (config.showTodos)

:)

Copy link
Member

Choose a reason for hiding this comment

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

Sorted.

I also moved verbose to config (hidden). This way you can turn on and off without a recompile, it applies immediately. It's off by default (since hiddens don't have defaults) but that seems reasonable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it applies immediately

ah, that's very nice. the analysis server output can be very useful but high volume. It's great to be able to toggle it live.

@DanTup
Copy link
Member

DanTup commented Aug 7, 2016

Looks great! I've added a couple of minor comments. If I get some enough time today I might merge this in and tweak those things myself; would be nice to get another build out with all the changes!

Minor nitpick: I tend to prefer smaller individual commits for functionally different things (easier to describe them in the commit message and to attribute them to different issues). Don't feel that strongly about it (esp for such small changesets) but thought it worth noting. Maybe I'll add some notes to the contributing file.

Thanks again; really appreciate the effort (and it's great to have an experienced Dart dev's input, I'm still a Dart noob). I'm also really keen on a good IDE integration; I've really not got on with the other IDEs (and bad IDE support was actually one of the big factors in us not adopting Dart at work).. I was sad when CDE was abandoned (I still am a little, since Code won't run on ChromeOS!).

@DanTup DanTup added this to the v0.6 milestone Aug 7, 2016
@DanTup DanTup changed the title show analysis status Show analysis status in status bar (+ other tweaks) Aug 7, 2016
@DanTup DanTup merged commit 55ac506 into Dart-Code:master Aug 7, 2016
@devoncarew
Copy link
Contributor Author

Minor nitpick: I tend to prefer smaller individual commits for functionally different things (easier to describe them in the commit message and to attribute them to different issues).

Totally makes sense. I generally try and be hygienic w/ my PRs and just send one per topic. Easy enough to do going forward :)

@DanTup
Copy link
Member

DanTup commented Aug 7, 2016

Thanks :)

I've tweaked some stuff based on my comments above, believe everything mentioned has been done in this PR. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default to showing TODOs; reanalyze when config changes

2 participants