Commit efa0357e authored by John van Groningen's avatar John van Groningen

use function GetFromProject instead of AccProject

parent 4b4c6478
......@@ -138,7 +138,7 @@ ed_open_cont pathName cont ps
# modname = GetModuleName pathName
# isDefMod = IsDefPathname pathName
# isImpMod = IsImpPathname pathName
# (inf,ps) = accProject (\l->(PR_GetModuleInfo modname l,l)) ps
# (inf,ps) = getFromProject (PR_GetModuleInfo modname) ps
# (prefs,ps) = getPrefs ps
# defaultFontdef= prefs.edwinfont
# fontdef = defaultFontdef
......
......@@ -8,8 +8,6 @@ import projwin, targetui, ioutil, edfiles
import UtilNewlinesFile
import ExtListBox
//--
pm_menu_add :: .Pathname !*(PSt *General) -> *PSt *General;
pm_menu_add path ps
# (mPrRecId,ps) = getPMR ps
......@@ -284,7 +282,7 @@ where
tryopen (h :! t) ps
# ps = ed_open_path h ps
= tryopen t ps
pm_shut :: !*(PSt *General) -> *PSt *General;
pm_shut ps
# (lbId,ps) = getPWI ps
......@@ -303,7 +301,7 @@ close_all_project_windows cont ps
| not prefs.switch_close
= cont ps
# (windows,ps) = accPIO getWindowsStack ps
# (project,ps) = accProject (\l->(l,l)) ps
# (project,ps) = getFromProject (\l->l) ps
# modules = PR_GetModuleStuff project
# modules = massage (StrictListToList modules)
= doall windows modules ps
......
......@@ -426,7 +426,7 @@ pm_update_project_window ps
= pm_update_project_window_interactive ps
getProjwinPaths ps
# (prjpaths,ps) = accProject (\l->(PR_GetPaths l,l)) ps
# (prjpaths,ps) = getFromProject PR_GetPaths ps
# (syspaths,ps) = getCurrentPaths ps
# (fstate,ps) = getFstate ps
# srcpaths = Map (\d -> lookup d fstate) (AppendLists prjpaths syspaths)
......@@ -447,7 +447,7 @@ where
update d u [e=:(_,d`):fs]
| d == d` = [(u,d):fs]
= [e:update d u fs]
//import dodebug
pm_update_project_window_interactive :: !*(PSt *General) -> *PSt *General
pm_update_project_window_interactive ps
# (lbId,ps) = getPWI ps
......@@ -455,28 +455,24 @@ pm_update_project_window_interactive ps
# (mmId,ps) = getPWM ps
# (prefs,ps) = getPrefs ps
# (modules,ps) = accProject (\l->(PR_GetModuleStuff l,l)) ps
# (xp,ps) = accProject (\l->(PR_GetExecPath l,l)) ps
# (mm,ps) = accProject (\l->(PR_GetRootModuleName l,l)) ps
# (modules,ps) = getFromProject PR_GetModuleStuff ps
# (xp,ps) = getFromProject PR_GetExecPath ps
# (mm,ps) = getFromProject PR_GetRootModuleName ps
# (wId,ps) = getPWW ps
# (ws,ps) = accPIO (getWindow wId) ps
# (ok,mframe) = case ws of
Nothing -> (False,Nothing)
Just ws -> getControlViewFrame lbId.controlId ws
// # ps = trace_n` ("mframe",ok,mframe) ps
# (ok,mdomain) = case ws of
Nothing -> (False,Nothing)
Just ws -> getControlViewDomain lbId.controlId ws
// # ps = trace_n` ("mdomain",ok,mdomain) ps
# ps = closeAllExtListBoxItems lbId ps
# (ok,mframe`) = case ws of
Nothing -> (False,Nothing)
Just ws -> getControlViewFrame lbId.controlId ws
// # ps = trace_n` ("mframe`",ok,mframe`) ps
# (ok,mdomain`) = case ws of
Nothing -> (False,Nothing)
Just ws -> getControlViewDomain lbId.controlId ws
// # ps = trace_n` ("mdomain`",ok,mdomain`) ps
# (srcpaths,ps) = getProjwinPaths ps
# (appPath,ps) = getStup ps
# (prjPath,ps) = getProjectFilePath ps
......@@ -527,6 +523,7 @@ where
| b == d
= a < c
= False
before x y = bf srcpaths
where
bf Nil = False
......@@ -534,6 +531,7 @@ where
| p == y = False
| p == x = True
= bf r
makenice _ _ [] = []
makenice u s l=:[(a,b,_,_):r]
| s <> b // new directory
......@@ -643,7 +641,7 @@ pm_set ps
| isNothing path
= okNotice ["Unable to set main module.","There is no active module window."] ps
# path = fromJust path
# (project,ps) = accProject (\l->(l,l)) ps
# (project,ps) = getFromProject (\l->l) ps
// check if mod in project already has settings...
# info = PR_GetModuleInfo (GetModuleName path) project
| isJust info
......@@ -674,14 +672,15 @@ pm_set ps
pm_compile :: !*(PSt *General) -> *PSt *General;
pm_compile ps
| True
= DoProcess "compiling" (CompileProjectModule Compilation) (\_ _ _ _-> id) ps
= DoProcess "compiling" (CompileProjectModule Compilation) (\_ _ _ _-> id) ps
/*
// timed variant
# (stick,ps) = getCurrentTick ps
# ps = DoProcess "compiling" (CompileProjectModule Compilation) (\_ _ _ _-> id) ps
# (etick,ps) = getCurrentTick ps
# ps = updateErrorWindow ["Compiler Timing: " +++ toString ((tickDifference etick stick) / ticksPerSecond)] ps
= ps
*/
pm_check :: !*(PSt *General) -> *PSt *General;
pm_check ps
......@@ -730,7 +729,7 @@ where
# ps = closeInfo ps
| not ok
= ps
# (lo,ps) = accProject (\project->(PR_GetLinkOptions project,project)) ps
# (lo,ps) = getFromProject PR_GetLinkOptions ps
# (prj_path,ps) = getProjectFilePath ps
# (app_path,ps) = getStup ps
# prj_path` = RemoveFilename prj_path
......@@ -744,10 +743,10 @@ pm_run :: !*(PSt *General) -> *PSt *General;
pm_run ps
# (app_path,ps) = getStup ps
# (prj_path,ps) = getProjectFilePath ps
# (execpath,ps) = accProject (\l->(PR_GetExecPath l,l)) ps
# (execpath,ps) = getFromProject PR_GetExecPath ps
# prj_path` = RemoveFilename prj_path
# execpath = fulPath app_path prj_path` execpath
# (lo,ps) = accProject (\project->(PR_GetLinkOptions project,project)) ps
# (lo,ps) = getFromProject PR_GetLinkOptions ps
| lo.method == LM_Dynamic
# execpath = (RemoveSuffix` execpath) +++. ".bat"
= RunProgram execpath ps
......
......@@ -281,7 +281,7 @@ import StdPathname, Directory
getModulesInPaths ps
# (ep,ps) = getCurrentPaths ps
# (pp,ps) = accProject (\p->(PR_GetPaths p,p)) ps
# (pp,ps) = getFromProject PR_GetPaths ps
# (mods,ps) = accFiles (findmods (Concat pp ep)) ps
= (mods,ps)
where
......
......@@ -27,7 +27,7 @@ getTargetName ps
selectProjectTarget :: !(*(PSt *General) -> *([.Target],*(PSt *General))) !*(PSt *General) -> *(PSt *General)
selectProjectTarget getTs ps
# (name,ps) = accProject (\p->(PR_GetTarget p,p)) ps
# (name,ps) = getFromProject PR_GetTarget ps
# (ts,ps) = getTs ps
# idx = findIndex 0 name ts
| isNothing idx
......
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