dart-archive / eclipse3

DEPRECATED - NO LONGER maintained/supported - Eclipse plugins and Dart Editor
8 stars 6 forks source link

Autocompletion not working in seperate files #82

Open PrudiiArca opened 8 years ago

PrudiiArca commented 8 years ago

Hello everyone. This is my first post on GitHub, so please apologize if I did anything wrong...

I recently started to learn Dart with the Eclipse plugin and recognized some (strange) behaviour of the autocompletion triggered with CTRL + SPACE: I have a file main.dart with the main method and some global variables and methods. This file is marked as " library test; " and contains the instruction " part 'other.dart'; ". Moreover the other.dart is marked as " part of test; ". I noticed that Eclipse does not recognize the imports, global variables and methods of the main.dart file within the other.dart file though I can access them when writing them out by hand. This is quite annoying to me because the completion tool is very handy and I use it alot. Please dont get me wrong: You did an awesome job with this plugin! Btw I didnt find anything in the web about this strange behaviour so I decided to post it here...

Have a nice day, Prudii

PrudiiArca commented 8 years ago

This is weird. I created a new dart file "file.dart" which is part of the library as well and added the " part file.dart" in the main file. When writing some code in this file i noticed that suddenly autocompletion worked for some time but a few moments later it was gone again. I tested this out:

  1. I created a new file, wrote down all the references (in the new and the main) file and autocompletion worked perfectly fine. I could save my new file and continue editing it without loosing this feature. In the moment I saved the main.dart file it was gone.
  2. I deleted the new file but kept the reference to it in the main file. Then I created the file again and tried autocomplete aaaaaaaand .... it didnt work.
  3. Going on I removed the reference in the main file and pasted it in again, but did not save. At this moment the autocompletion started to work again in the other file

Hence I assume that the problem lies within saving the reference to other files in the main library file, maybe because these references are removed from main memory in this process...

To give you some more information: I did not make any changes in the Eclipse settings after installing the Dart plugin. Moreover every time I save the Console tells me "Build completed successfully". I assume this is normal.

PrudiiArca commented 8 years ago

Sorry if this a bit spammy, but I try to explain this problem as well as I can: I just noticed that autocompletion isnt working at all in the case described above! Neither global variables / methods nor local ones (defined anywhere within the new file) can be accessed by the autocompletion when the reference to the file is saved...