EDU-226 Rename Playground to Sandbox
authorLiana Bakradze <liana.bakradze@jetbrains.com>
Tue, 21 Oct 2014 08:06:53 +0000 (12:06 +0400)
committerLiana Bakradze <liana.bakradze@jetbrains.com>
Tue, 21 Oct 2014 08:06:53 +0000 (12:06 +0400)
python/edu/learn-python/gen/icons/StudyIcons.java
python/edu/learn-python/resources/icons/com/jetbrains/python/edu/Sandbox.png [moved from python/edu/learn-python/resources/icons/com/jetbrains/python/edu/Playground.png with 100% similarity]
python/edu/learn-python/resources/icons/com/jetbrains/python/edu/Sandbox@2x.png [moved from python/edu/learn-python/resources/icons/com/jetbrains/python/edu/Playground@2x.png with 100% similarity]
python/edu/learn-python/src/com/jetbrains/python/edu/course/Course.java
python/edu/learn-python/src/com/jetbrains/python/edu/projectView/StudyDirectoryNode.java
python/edu/learn-python/src/com/jetbrains/python/edu/projectView/StudyTreeStructureProvider.java

index 04ae98da1672769296cfded7cff2bff742d85598..d5a48ba4adfb7edbda9940940514f365f7109bf8 100644 (file)
@@ -16,9 +16,9 @@ public class StudyIcons {
   public static final Icon EducationalProjectType = load("/icons/com/jetbrains/python/edu/EducationalProjectType.png"); // 32x32
   public static final Icon Lesson = load("/icons/com/jetbrains/python/edu/Lesson.png"); // 16x16
   public static final Icon LessonCompl = load("/icons/com/jetbrains/python/edu/LessonCompl.png"); // 16x16
-  public static final Icon Playground = load("/icons/com/jetbrains/python/edu/Playground.png"); // 16x16
   public static final Icon Prev = load("/icons/com/jetbrains/python/edu/prev.png"); // 16x16
   public static final Icon Resolve = load("/icons/com/jetbrains/python/edu/resolve.png"); // 16x16
+  public static final Icon Sandbox = load("/icons/com/jetbrains/python/edu/Sandbox.png"); // 16x16
   public static final Icon ShowHint = load("/icons/com/jetbrains/python/edu/showHint.png"); // 24x24
   public static final Icon Task = load("/icons/com/jetbrains/python/edu/Task.png"); // 16x16
   public static final Icon TaskCompl = load("/icons/com/jetbrains/python/edu/TaskCompl.png"); // 16x16
index 89613ac7918faf894406325ea7497abe7b429466..b5c0f8992b8417f9df4dd5352ab57bd105e3df13 100644 (file)
@@ -15,7 +15,7 @@ import java.util.List;
 public class Course {
 
   private static final Logger LOG = Logger.getInstance(Course.class.getName());
-  public static final String PLAYGROUND_DIR = "Playground";
+  public static final String SANDBOX_DIR = "Sandbox";
   public List<Lesson> lessons = new ArrayList<Lesson>();
   public String description;
   public String name;
@@ -62,7 +62,7 @@ public class Course {
                   lesson.setIndex(i);
                   lesson.create(baseDir, resourceRoot);
                 }
-                baseDir.createChildDirectory(this, PLAYGROUND_DIR);
+                baseDir.createChildDirectory(this, SANDBOX_DIR);
                 File[] files = resourceRoot.listFiles(new FilenameFilter() {
                   @Override
                   public boolean accept(File dir, String name) {
index 43056fea6eba6146c56d8345a385c7914a7fa0a2..bb23f5e918fcf58924446fe3666c6589c8810ebc 100644 (file)
@@ -68,11 +68,11 @@ public class StudyDirectoryNode extends PsiDirectoryNode {
       setStudyAttributes(lesson, data, lesson.getName());
     }
 
-    if (valueName.contains(Course.PLAYGROUND_DIR)) {
+    if (valueName.contains(Course.SANDBOX_DIR)) {
       if (myValue.getParent() != null) {
-        if (!myValue.getParent().getName().contains(Course.PLAYGROUND_DIR)) {
-          data.setPresentableText(Course.PLAYGROUND_DIR);
-          data.setIcon(StudyIcons.Playground);
+        if (!myValue.getParent().getName().contains(Course.SANDBOX_DIR)) {
+          data.setPresentableText(Course.SANDBOX_DIR);
+          data.setIcon(StudyIcons.Sandbox);
           return;
         }
       }
@@ -87,7 +87,7 @@ public class StudyDirectoryNode extends PsiDirectoryNode {
       String logicalName = name.contains(Lesson.LESSON_DIR) ? Lesson.LESSON_DIR : Task.TASK_DIR;
       return StudyUtils.getIndex(name, logicalName) + 1;
     }
-    return name.contains(Course.PLAYGROUND_DIR) ? 0 : 3;
+    return name.contains(Course.SANDBOX_DIR) ? 0 : 3;
   }
 
   private static void setStudyAttributes(Stateful stateful, PresentationData data, String additionalName) {
index e301bc3e626b186f22ed71e373b62367291e7c5a..29b328a5da45740f9aa31b23d65aeb9fae6a13da 100644 (file)
@@ -52,7 +52,7 @@ public class StudyTreeStructureProvider implements TreeStructureProvider, DumbAw
               }
               String parentName = parent.getName();
               if (parentName != null) {
-                if (parentName.equals(Course.PLAYGROUND_DIR)) {
+                if (parentName.equals(Course.SANDBOX_DIR)) {
                   nodes.add(node);
                 }
               }