0

I just downloaded the Dart Eclipse plugin and am trying to figure out how to run pub get from inside my new project (to resolve dependencies).

  1. I installed the plugin via Help >> Install New Software
  2. I went to Window >> Preferences >> Dart and installed the latest SDK
  3. Restarted Eclipse
  4. I created a new Java Project (seeing that I will use Dart/dart2js for all my client code and Java for all my server code)
  5. Added a pubspec.yaml in a config directory (see below)

I was expecting to be able to right-click my project and see an option like Dart >> Pub Get, or Build Path >> Add Libraries >> Add Dart Pub-Managed Library, or something obvious. But I'm not seeing anything.

Did I don anything wrong in my steps above? How do I run pub from inside my Eclipse project?

halfer
  • 19,824
  • 17
  • 99
  • 186
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756

1 Answers1

0

It looks like you can't use a lot of the Dart SDK features if you create something other than a Dart Project in Eclipse. Since I created a Java Project, these features were disabled. As soon as I created a Dart Project, if you right-click the project, you'll see a Dart menu item that then has several submenu items; one of them is Pub Get.

One more note: I'm on Linux and had to chmod the pub binary that downloaded with the SDK that Eclipse installed for me. Otherwise I was getting Permission denied errors when running Dart >> Pub Get. Just FYI to future Dartisans.

A little disappointing, but understandable. So it looks like I'll have to have 1 project (Dart Project) for my client-side, and another project (Java Project) for my server-side.

IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756