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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/SourceFileElementImpl.java

Issue 12194031: open dart files in packages directory as read only, dartbug.com/8101 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartEditor.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/SourceFileElementImpl.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/SourceFileElementImpl.java (revision 18051)
+++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/model/SourceFileElementImpl.java (working copy)
@@ -15,6 +15,7 @@
import com.google.dart.compiler.DartSource;
import com.google.dart.compiler.util.DartSourceString;
+import com.google.dart.tools.core.DartCore;
import com.google.dart.tools.core.buffer.Buffer;
import com.google.dart.tools.core.internal.buffer.DocumentAdapter;
import com.google.dart.tools.core.internal.util.CharOperation;
@@ -205,7 +206,7 @@
@Override
public boolean isReadOnly() {
- return file.isReadOnly();
+ return file.isReadOnly() || DartCore.isPackagesResource(file);
}
@Override
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartEditor.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698