/** The “add project” action. */
private I18nAction addProjectAction;
+ /** The “insert project” actions. */
+ private Map<Project, I18nAction> insertProjectActions = new HashMap<Project, I18nAction>();
+
/** The “clone project” actions. */
private Map<Project, I18nAction> cloneProjectActions = new HashMap<Project, I18nAction>();
}
/**
+ * Returns the “insert project” action for the given project.
+ *
+ * @param project
+ * The project to get the “insert project” action for
+ * @return The “insert project” action
+ */
+ I18nAction getInsertProjectAction(Project project) {
+ return insertProjectActions.get(project);
+ }
+
+ /**
* Returns the “clone project” action for the given project.
*
* @param project
}
};
List<Locale> availableLanguages = I18n.findAvailableLanguages();
- for (final Locale locale: availableLanguages) {
+ for (final Locale locale : availableLanguages) {
String language = locale.getLanguage();
I18nAction languageAction = new I18nAction("general.language." + language, IconLoader.loadIcon("/flag-" + language + ".png")) {
* The action that triggered the change
*/
private void changeLanguage(Locale newLocale, I18nAction languageAction) {
- for (I18nAction i18nAction: languageActions) {
+ for (I18nAction i18nAction : languageActions) {
i18nAction.setEnabled(i18nAction != languageAction);
}
I18n.setLocale(newLocale);
*/
public void loadingProjectsDone(String directory) {
mainWindow.setStatusBarText(I18n.get("mainWindow.statusBar.projectLoadingDone"));
- for (Project project: core.getProjects()) {
+ for (Project project : core.getProjects()) {
projectAdded(project, false);
}
}