import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
+import java.io.File;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.HashMap;
private Main() {
this(null);
}
-
+
private Main(String configFilename) {
if (configFilename != null) {
configuration = new Configuration(configFilename);
JOptionPane.showMessageDialog(wizard, MessageFormat.format(I18n.getMessage("jsite.about.message"), Version.getVersion()), null, JOptionPane.INFORMATION_MESSAGE, jSiteIcon);
}
};
-
+
I18nContainer.getInstance().registerRunnable(new Runnable() {
public void run() {
manageNodeAction.putValue(Action.NAME, I18n.getMessage("jsite.menu.nodes.manage-nodes"));
final JMenu helpMenu = new JMenu(I18n.getMessage("jsite.menu.help"));
menuBar.add(helpMenu);
helpMenu.add(aboutAction);
-
+
I18nContainer.getInstance().registerRunnable(new Runnable() {
public void run() {
languageMenu.setText(I18n.getMessage("jsite.menu.languages"));
}
}
});
-
+
return menuBar;
}
if (JOptionPane.showConfirmDialog(wizard, I18n.getMessage("jsite.project-files.empty-index"), null, JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) != JOptionPane.OK_OPTION) {
return;
}
+ } else {
+ File indexFile = new File(project.getLocalPath(), project.getIndexFile());
+ if (!indexFile.exists()) {
+ JOptionPane.showMessageDialog(wizard, I18n.getMessage("jsite.project-files.index-missing"), null, JOptionPane.ERROR_MESSAGE);
+ return;
+ }
}
if (!project.getFileOption(project.getIndexFile()).getContainer().equals("")) {
if (JOptionPane.showConfirmDialog(wizard, I18n.getMessage("jsite.project-files.container-index"), null, JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE) != JOptionPane.OK_OPTION) {
System.out.println("--debug\tenables some debug output");
System.out.println("--config-file <file>\tuse specified configuration file");
}
-
+
}