Minor Rearrange code
authorValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Tue, 2 Aug 2016 11:00:30 +0000 (14:00 +0300)
committerValentina Kiryushkina <valentina.kiryushkina@jetbrains.com>
Wed, 3 Aug 2016 15:58:55 +0000 (18:58 +0300)
python/educational-core/student/src/com/jetbrains/edu/learning/courseGeneration/StudyProjectGenerator.java
python/educational-core/student/src/com/jetbrains/edu/learning/ui/StudyNewProjectPanel.java

index 02249eab36883c103d2b1fea0f0e71ff660c6282..5c11ea5aad1332042daa3e5af1555e5613e02344 100644 (file)
@@ -144,7 +144,8 @@ public class StudyProjectGenerator {
     Reader reader = null;
     try {
       reader = new InputStreamReader(new FileInputStream(courseFile), "UTF-8");
-      Gson gson = new GsonBuilder().registerTypeAdapter(Course.class, new StudySerializationUtils.Json.CourseTypeAdapter(courseFile)).create();
+      Gson gson =
+        new GsonBuilder().registerTypeAdapter(Course.class, new StudySerializationUtils.Json.CourseTypeAdapter(courseFile)).create();
       final Course course = gson.fromJson(reader, Course.class);
       course.initCourse(isAdaptive);
       return course;
@@ -385,7 +386,7 @@ public class StudyProjectGenerator {
     return myCourses;
   }
 
- @NotNull
 @NotNull
   public List<CourseInfo> getCoursesUnderProgress(boolean force, @NotNull final String progressTitle, @NotNull final Project project) {
     try {
       return ProgressManager.getInstance()
index 62e3d1ee22a36359082bd0bf23629690bbe37340..f013d0343bef3aec72995585e06817cf6fa701d5 100644 (file)
@@ -75,7 +75,6 @@ public class StudyNewProjectPanel extends JPanel implements PanelWithAnchor {
   private void layoutPanel() {
     myCoursesComboBox = new ComboBox<CourseInfo>();
 
-    final JPanel coursesPanel = new JPanel(new BorderLayout());
     final LabeledComponent<ComboBox> coursesCombo = LabeledComponent.create(myCoursesComboBox, "Courses:", BorderLayout.WEST);
 
     myRefreshButton = new FixedSizeButton(coursesCombo);
@@ -83,10 +82,10 @@ public class StudyNewProjectPanel extends JPanel implements PanelWithAnchor {
     myBrowseButton = new FixedSizeButton(coursesCombo);
 
     final JPanel comboPanel = new JPanel(new BorderLayout());
-
     comboPanel.add(coursesCombo, BorderLayout.CENTER);
     comboPanel.add(myRefreshButton, BorderLayout.EAST);
 
+    final JPanel coursesPanel = new JPanel(new BorderLayout());
     coursesPanel.add(comboPanel, BorderLayout.CENTER);
     coursesPanel.add(myBrowseButton, BorderLayout.EAST);