Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/pub/PubspecModel.java

Issue 11735003: show package version information in Files View (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/pub/PubspecModel.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/pub/PubspecModel.java (revision 16570)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/pub/PubspecModel.java (working copy)
@@ -14,7 +14,7 @@
package com.google.dart.tools.core.pub;
import com.google.dart.tools.core.utilities.yaml.PubYamlObject;
-import com.google.dart.tools.core.utilities.yaml.SnakeYamlUtils;
+import com.google.dart.tools.core.utilities.yaml.PubYamlUtils;
import java.util.ArrayList;
import java.util.Arrays;
@@ -80,7 +80,7 @@
*/
public String getContents() {
// append comments at end of pubspec
- return SnakeYamlUtils.buildYamlString(convertModelToObject()) + comments;
+ return PubYamlUtils.buildYamlString(convertModelToObject()) + comments;
}
public Object[] getDependecies() {
@@ -107,10 +107,10 @@
* Clear and initialize the model with the values in the yaml string
*/
public void initialize(String yamlString) {
+ clearModelFields();
if (yamlString != null) {
- clearModelFields();
comments = getComments(yamlString);
- setValuesFromObject(SnakeYamlUtils.parsePubspecYamlToObject(yamlString));
+ setValuesFromObject(PubYamlUtils.parsePubspecYamlToObject(yamlString));
}
}

Powered by Google App Engine
This is Rietveld 408576698