Commit a4f949b2 authored by Diederik van Arkel's avatar Diederik van Arkel

improve module open handling

parent e903a234
......@@ -772,15 +772,41 @@ ed_open_other pstate
| IsDefPathname path
# path = RemoveSuffix path
path = MakeImpPathname path
pstate = ed_open_path path pstate
# (exists,pstate) = accFiles (FExists path) pstate
| exists
= ed_open_path path pstate
| CleanModId (RemovePath (RemoveSuffix path))
= OpenModuleNoSel (RemovePath path) pstate
= pstate
| IsImpPathname path
# path = RemoveSuffix path
path = MakeDefPathname path
pstate = ed_open_path path pstate
# (exists,pstate) = accFiles (FExists path) pstate
| exists
= ed_open_path path pstate
| CleanModId (RemovePath (RemoveSuffix path))
= OpenModuleNoSel (RemovePath path) pstate
= pstate
= pstate
OpenModuleNoSel pathname ps
# (syspaths,ps) = getCurrentPaths ps
# (prj,ps) = getProject ps
# prjpaths = PR_GetPaths prj
# srcpaths = AppendLists prjpaths syspaths
# srcpaths = case IsABCPathname pathname of
True -> Map MakeSystemPathname srcpaths
_ -> srcpaths
# ((ok,fullpath),ps) = accFiles (SearchDisk False pathname srcpaths) ps
| not ok
= okNotice
[ "Clean Project Manager"
, "Could not find file:"
, pathname
] ps
# fullpath` = GetLongPathName fullpath
= ed_open_path fullpath` ps
OpenModule :: !.Modulename !.Selection !*(PSt General) -> *PSt General
OpenModule pathname sel ps
# (syspaths,ps) = getCurrentPaths ps
......@@ -1060,5 +1086,5 @@ pinit force_update proj proj_path ps
# ps = BringProjectUptoDate force_update cleanup ps
= ps
where
cleanup exepath bool1 bool2 ps
= abortLog False "" ps
cleanup exepath linked ok ps
= abortLog (not ok) "" ps
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