private bool DoMercilessLiftImport(bool dataChanged) { var projectFolder = Cache.ProjectId.ProjectFolder; var liftProjectDir = GetLiftRepositoryFolderFromFwProjectFolder(projectFolder); if (dataChanged) { if (ImportLiftCommon(FlexLiftMerger.MergeStyle.MsKeepOnlyNew)) { LiftImportFailureServices.ClearImportFailure(_liftPathname); } else { LiftImportFailureServices.RegisterStandardImportFailure(_parentForm, liftProjectDir); return(false); } /* TODO: What to do with Lift conflicts? * var conflictOccurred = DetectConflicts(projectFolder, savedState); * var app = (LexTextApp)m_mediator.PropertyTable.GetValue("App"); * var newAppWindow = RefreshCacheWindowAndAll(app, m_liftPathname); * * if (conflictOccurred) * { * // TODO: send a message for the reopened instance to display the conflict report, we have been disposed by now * // TODO: Need a new message for Lift conflicts. * // TODO: Even more importantly, the URLs in the lift notes files aren't compatible with what comes in for regular FW conflict reports * //newAppWindow.Mediator.SendMessage("ShowConflictReport", null); * } */ } return(true); }
/// <summary> /// Reregisters an inport failure, if needed, otherwise clears the token. /// </summary> /// <returns>'true' if the import failure continues, otherwise 'false'.</returns> private bool RepeatPriorFailedImportIfNeeded() { var projectFolder = Cache.ProjectId.ProjectFolder; var liftProjectDir = GetLiftRepositoryFolderFromFwProjectFolder(projectFolder); if (!Directory.Exists(liftProjectDir)) { return(false); } _liftPathname = GetLiftPathname(liftProjectDir); if (_liftPathname == null) { return(false); } var previousImportStatus = LiftImportFailureServices.GetFailureStatus(liftProjectDir); switch (previousImportStatus) { case ImportFailureStatus.BasicImportNeeded: if (ImportLiftCommon(FlexLiftMerger.MergeStyle.MsKeepBoth)) { LiftImportFailureServices.ClearImportFailure(_liftPathname); } else { LiftImportFailureServices.RegisterBasicImportFailure(_parentForm, liftProjectDir); return(true); } break; case ImportFailureStatus.StandardImportNeeded: if (ImportLiftCommon(FlexLiftMerger.MergeStyle.MsKeepOnlyNew)) { LiftImportFailureServices.ClearImportFailure(_liftPathname); } else { LiftImportFailureServices.RegisterStandardImportFailure(_parentForm, liftProjectDir); return(true); } break; case ImportFailureStatus.NoImportNeeded: // Nothing to do. :-) break; } return(false); }