dart-archive / eclipse3

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

Plugins looking for libraries.dart file #17

Open keertip opened 9 years ago

keertip commented 9 years ago

Now that the plugins is using the Analysis Server, it no longer needs to look into the sdk and pharse the dart: libraries. Throws this exception if the libraries.dart file is not present in the old location

java.io.FileNotFoundException: /usr/local/google/eclipse45_keertip/stable/dart-sdk/lib/_internal/libraries.dart (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:138) at java.io.FileReader.(FileReader.java:72) at com.google.dart.engine.utilities.io.FileUtilities.getContents(FileUtilities.java:62) at com.google.dart.engine.sdk.DirectoryBasedDartSdk.initialLibraryMap(DirectoryBasedDartSdk.java:577) at com.google.dart.engine.sdk.DirectoryBasedDartSdk.(DirectoryBasedDartSdk.java:268) at com.google.dart.engine.sdk.DirectoryBasedDartSdk.(DirectoryBasedDartSdk.java:256) at com.google.dart.tools.core.model.DartSdkManager.initSdk(DartSdkManager.java:400) at com.google.dart.tools.core.model.DartSdkManager.(DartSdkManager.java:176) at com.google.dart.tools.core.model.DartSdkManager.(DartSdkManager.java:104) at com.google.dart.tools.core.DartCore.start(DartCore.java:1994) at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:771) at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:764) at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:721) at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941) at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318) at org.eclipse.osgi.container.Module.doStart(Module.java:571)

danrubel commented 9 years ago

I tried to recreate the problem with HEAD and a new SDK and could not. I renamed the old library.dart file and Dart Plugins (running from source at HEAD) worked as expected. Reading over the DirectoryBasedDartSdk.initialLibraryMap method, it appears that the method has been modified to look for the libraries.dart file in the new location, and if it does not exist, then look for it in the old location.

Can you provide instructions for recreating the exception? Or is it just that this code is legacy and should be removed completely?

keertip commented 9 years ago

@danrubel, we should remove the code that looks for libraries.dart. it is no longer needed, as we use the analysis server for analysis and all other related functionality. The DirectoryBasedDartSdk should only be used to get to the executables in the sdk.