+ if (switchToProject) {
+ projectPane.setSelectedIndex(newTabIndex);
+ while (project.getBasePath().length() == 0) {
+ JOptionPane.showMessageDialog(this, I18n.get("mainWindow.information.changeProjectBasePath.message"), I18n.get("mainWindow.information.changeProjectBasePath.title"), JOptionPane.INFORMATION_MESSAGE);
+ projectPanel.changeBasePath();
+ }
+ }
+ }
+
+ /**
+ * Removes the pane containing the given project.
+ *
+ * @param project
+ * The project whose pane to remove
+ */
+ void removeProject(Project project) {
+ int projectIndex = getProjectIndex(project);
+ projectPane.remove(projectIndex);
+ }
+
+ /**
+ * @param project
+ */
+ void projectInsertStarted(Project project) {
+ int projectIndex = getProjectIndex(project);
+ if (projectIndex == -1) {
+ return;
+ }
+ projectPane.setTitleAt(projectIndex, I18n.get("projectPanel.title.starting", project.getName()));
+ }
+
+ /**
+ * @param project
+ * @param totalBlocks
+ * @param requiredBlocks
+ * @param successfulBlocks
+ * @param failedBlocks
+ * @param fatallyFailedBlocks
+ * @param finalizedTotal
+ */
+ void projectInsertProgressed(Project project, int totalBlocks, int requiredBlocks, int successfulBlocks, int failedBlocks, int fatallyFailedBlocks, boolean finalizedTotal) {
+ int projectIndex = getProjectIndex(project);
+ if (projectIndex == -1) {
+ return;
+ }
+ projectPane.setTitleAt(projectIndex, I18n.get("projectPanel.title.progress", project.getName(), requiredBlocks / (double) successfulBlocks));
+ }
+
+ /**
+ * @param project
+ */
+ void projectInsertGeneratedURI(Project project) {
+ /* TODO - update panel. */
+ }
+
+ /**
+ * @param project
+ * @param success
+ */
+ void projectInsertFinished(Project project, boolean success) {
+ int projectIndex = getProjectIndex(project);
+ if (projectIndex == -1) {
+ return;
+ }
+ projectPane.setTitleAt(projectIndex, project.getName());