Commit 0cce6570 authored by Benjamin Aaron Degenhart's avatar Benjamin Aaron Degenhart
Browse files

Change remigration menu item to remigrate and open

parent e020cbeb
......@@ -98,6 +98,7 @@ ProjectView.txtpnAttributesfile.text=attributesfile
ProjectView.mntmLanguageChoiceMenu.text=Set language
ProjectView.mntmEnglishLocale.text=English
ProjectView.mntmGermanLocale.text=German
ProjectView.mntmReapplyMigration.text=Remigrate project and open...
SaveBeforeClosing.text=Do you want to save the current project before closing?
SaveBeforeClosing.unsavedChanges.text=Unsaved changes:
......
......@@ -98,6 +98,7 @@ ProjectView.txtpnAttributesfile.text=Attributsdatei
ProjectView.mntmLanguageChoiceMenu.text=Sprache \u00E4ndern
ProjectView.mntmEnglishLocale.text=Englisch
ProjectView.mntmGermanLocale.text=Deutsch
ProjectView.mntmReapplyMigration.text=Projekt remigrieren und \u00F6ffnen...
SaveBeforeClosing.text=Aktuelles Projekt vor dem Beenden speichern?
SaveBeforeClosing.unsavedChanges.text=Ungespeicherte \u00c4nderungen:
......
......@@ -31,6 +31,10 @@ public class ActionLoadProject extends AbstractAction {
@Override
public void actionPerformed(final ActionEvent event) {
loadProject(false);
}
public void loadProject(boolean isRemigrationLoading) {
try {
// 1. ask for save project if it has changed
if (!ActionAbstractSaveProject.askSaveUnlessUserCancels(model)) {
......@@ -41,6 +45,11 @@ public class ActionLoadProject extends AbstractAction {
String projectFilePath = VDialogManager.loadProjectDialog();
if (projectFilePath != null) {
if (isRemigrationLoading) {
MigrationAssistant.setReapplyLatestMigrationFlag();
}
// 3. load project
loadProjectByPath(model, projectFilePath);
} else {
......
......@@ -393,11 +393,10 @@ public class ProjectView extends JFrame implements ProjectFinishedListener, Sing
else
mntmEnglishLocale.setSelected(true);
JMenuItem mntmReapplyMigration = new JMenuItem(new AbstractAction("Reapply latest version-migration") {
JMenuItem mntmReapplyMigration = new JMenuItem(new AbstractAction(Messages.getString("ProjectView.mntmReapplyMigration.text")) {
@Override
public void actionPerformed(ActionEvent e) {
MigrationAssistant.setReapplyLatestMigrationFlag();
ActionLoadProject.loadProjectByPath(model, model.getCurrentProjectPath());
(new ActionLoadProject(Messages.getString("ProjectView.mntmLoadTestProject.text"), model)).loadProject(true);
}
});
mnHelp.add(mntmReapplyMigration);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment