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

Flutter doctor detect intellij on Linux #6227

Merged
merged 6 commits into from
Oct 5, 2016

Conversation

danrubel
Copy link
Contributor

@danrubel danrubel commented Oct 5, 2016

This enhances flutter doctor on Linux so that it can detect IntelliJ product installations and ensure that the needed plugins are installed.

Future work:

  • Detect IntelliJ products on Mac and Windows
  • Support alternate plugin locations

For each IntelliJ product installation, you'll see something like this in flutter doctor output:

[-] IntelliJ IDEA Community Edition (version 2016.2)
    • Dart plugin installed
    • Flutter plugin not installed; this adds Flutter specific functionality.
    • For information about managing plugins, see
      https://www.jetbrains.com/help/idea/2016.2/managing-plugins.html

The "managing plugins" will only appear if one or more plugins are missing.

If Atom is installed, you'll also see something like this in the output:

[-] Atom - a lightweight development environment for Flutter
    • flutter plugin not installed; this adds Flutter specific functionality to Atom.
      Install the plugin from Atom or run 'apm install flutter'.
    • dartlang plugin version 0.6.34

If no supported IDEs are installed, you'll see:

[x] Flutter IDE Support (No supported IDEs installed)
    • Atom - https://atom.io/
    • IntelliJ - https://www.jetbrains.com/idea/

Partially addresses #5875
@devoncarew

@danrubel danrubel changed the title Flutter doctor detect intellij Flutter doctor detect intellij on Linux Oct 5, 2016
@Hixie
Copy link
Contributor

Hixie commented Oct 5, 2016

Neat.


@override
Future<ValidationResult> validate() async {
// TODO(danrubel) do not show Atom once IntelliJ support is complete
Copy link
Contributor

Choose a reason for hiding this comment

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

why? wouldn't we want to support as many IDEs as people write plugins for?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Atom is deprecated... only critical fixes from the Dart team; it will bit rot until it reaches some point where it is badly broken. IntelliJ is now preferred and once IntelliJ support is on par with Atom, then Atom support will be discontinued. I'm not planning to remove Atom support from flutter doctor any time soon, but will eventually. If the Flutter team chooses to supply resources to support Atom, then this comment does not apply and should be removed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, ok. Didn't realise we'd stopped supporting that plugin.

Copy link
Member

Choose a reason for hiding this comment

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

Once the IntelliJ plugin is available (and at ~parity with the Atom plugin), we'll retire the flutter atom plugin, and the dart atom plugin will move to being community supported.

final String version;
final String pluginsPath;

IntellijValidator(String title, {this.version, this.pluginsPath}) : super(title);
Copy link
Contributor

Choose a reason for hiding this comment

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

constructor first

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah! Analyzer did not complain so I missed it. Good eyes. Fixed.

}
}
} else if (Platform.isMacOS) {
// TODO(danrubel) add support for Mac
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: missing colon (// TODO(username): ...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

if (_validateHasPackage(messages, 'Flutter', 'Flutter'))
installCount++;

if (installCount < 2)
Copy link
Contributor

Choose a reason for hiding this comment

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

braces around multiline ifs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

return new ValidationResult(
installCount == 2 ? ValidationType.installed : ValidationType.partial,
messages,
statusInfo: 'version $version');
Copy link
Contributor

Choose a reason for hiding this comment

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

unbalanced paren whitespace (add newline before trailing ))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@Hixie
Copy link
Contributor

Hixie commented Oct 5, 2016

LGTM

@danrubel danrubel merged commit 3136620 into flutter:master Oct 5, 2016
@danrubel danrubel deleted the flutter-doctor-detect-intellij branch October 5, 2016 22:00
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants