handle src dir inside task dir
[idea/community.git] / python / educational-core / course-creator / src / com / jetbrains / edu / coursecreator / handlers / CCLessonRenameHandler.java
index 0efe1110a8cac4d8de0582a605c3b81e9cef8612..ba817b6288611126896bbdb8ab3e23c4bed8f129 100644 (file)
@@ -2,6 +2,7 @@ package com.jetbrains.edu.coursecreator.handlers;
 
 import com.intellij.ide.TitledHandler;
 import com.intellij.openapi.project.Project;
+import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiDirectory;
 import com.jetbrains.edu.learning.core.EduNames;
 import com.jetbrains.edu.learning.courseFormat.Course;
@@ -10,8 +11,8 @@ import org.jetbrains.annotations.NotNull;
 
 public class CCLessonRenameHandler extends CCRenameHandler implements TitledHandler {
   @Override
-  protected boolean isAvailable(String name) {
-    return name.contains(EduNames.LESSON);
+  protected boolean isAvailable(VirtualFile dir) {
+    return dir.getName().contains(EduNames.LESSON);
   }
 
   @Override