OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012, the Dart project authors. | 2 * Copyright (c) 2012, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 /** | 97 /** |
98 * Return the manager for VM libraries | 98 * Return the manager for VM libraries |
99 */ | 99 */ |
100 public static EditorLibraryManager getVmLibraryManager() { | 100 public static EditorLibraryManager getVmLibraryManager() { |
101 synchronized (lock) { | 101 synchronized (lock) { |
102 if (VM_LIBRARY_MANAGER == null) { | 102 if (VM_LIBRARY_MANAGER == null) { |
103 VM_LIBRARY_MANAGER = new EditorLibraryManager() { | 103 VM_LIBRARY_MANAGER = new EditorLibraryManager() { |
104 | 104 |
105 @Override | |
106 protected String getPlatformName() { | |
107 return "runtime"; | |
108 } | |
109 | |
110 /** | 105 /** |
111 * Return the SDK "lib" directory | 106 * Return the SDK "lib" directory |
112 */ | 107 */ |
113 @Override | 108 @Override |
114 File getLibrariesDir() { | 109 public File getLibrariesDir() { |
115 DartSdk sdk = DartSdk.getInstance(); | 110 DartSdk sdk = DartSdk.getInstance(); |
116 if (sdk == null) { | 111 if (sdk == null) { |
117 DartCore.logError("Missing SDK"); | 112 DartCore.logError("Missing SDK"); |
118 } | 113 } |
119 File libDir = sdk.getLibraryDirectory(); | 114 File libDir = sdk.getLibraryDirectory(); |
120 if (!libDir.exists()) { | 115 if (!libDir.exists()) { |
121 DartCore.logError("Missing libraries directory: " + libDir); | 116 DartCore.logError("Missing libraries directory: " + libDir); |
122 } | 117 } |
123 File librariesDir = libDir; | 118 File librariesDir = libDir; |
124 if (DartCoreDebug.DARTLIB) { | 119 if (DartCoreDebug.DARTLIB) { |
125 DartCore.logInformation("Reading bundled libraries from " + librar
iesDir); | 120 DartCore.logInformation("Reading bundled libraries from " + librar
iesDir); |
126 } | 121 } |
127 return librariesDir; | 122 return librariesDir; |
128 } | 123 } |
| 124 |
| 125 @Override |
| 126 protected String getPlatformName() { |
| 127 return "runtime"; |
| 128 } |
129 }; | 129 }; |
130 } | 130 } |
131 } | 131 } |
132 return VM_LIBRARY_MANAGER; | 132 return VM_LIBRARY_MANAGER; |
133 } | 133 } |
134 | 134 |
135 /** | 135 /** |
136 * Stop any active analysis servers | 136 * Stop any active analysis servers |
137 */ | 137 */ |
138 public static void stop() { | 138 public static void stop() { |
139 synchronized (lock) { | 139 synchronized (lock) { |
140 if (defaultAnalysisServer != null) { | 140 if (defaultAnalysisServer != null) { |
141 //defaultAnalysisChangeListener.stop(); | 141 //defaultAnalysisChangeListener.stop(); |
142 //defaultAnalysisChangeListener = null; | 142 //defaultAnalysisChangeListener = null; |
143 defaultAnalysisServer.stop(); | 143 defaultAnalysisServer.stop(); |
144 defaultAnalysisServer = null; | 144 defaultAnalysisServer = null; |
145 } | 145 } |
146 } | 146 } |
147 } | 147 } |
148 } | 148 } |
OLD | NEW |