Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-rabe committed Jul 28, 2016
1 parent 56cbede commit 261b160
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/jEdit-mmt/src/info/kwarc/mmt/jedit/MMTSideKick.scala
Expand Up @@ -97,7 +97,7 @@ class MMTSideKick extends SideKickParser("mmt") with Logger {
val uri = utils.FileURI(path)
val text = buffer.getText
val nsMap = controller.getNamespaceMap
val ps = controller.backend.resolvePhysical(path) match {
val ps = controller.backend.resolvePhysical(path) orElse controller.backend.resolveAnyPhysicalAndLoad(path) match {
case None =>
ParsingStream.fromString(text, DPath(uri), path.getExtension.getOrElse(""), Some(nsMap))
case Some((a, p)) =>
Expand Down
1 change: 1 addition & 0 deletions src/jEdit-mmt/src/resources/plugin/properties
Expand Up @@ -4,5 +4,6 @@ buffer.encoding=UTF-8
view.expandOnInput=true
view.wrapGuide=false
sidekick-tree.dock-position=left
sidekick.buffer-save-parse=true
error-list.dock-position=bottom
view.showBufferSwitcher=false
8 changes: 8 additions & 0 deletions src/mmt-api/src/main/info/kwarc/mmt/api/backend/Backend.scala
Expand Up @@ -212,6 +212,14 @@ class Backend(extman: ExtensionManager, val report: info.kwarc.mmt.api.frontend.
}
}
}
/** like resolveAnyPhysical but automatically loads and returns the archive */
def resolveAnyPhysicalAndLoad(f: File): Option[(Archive, List[String])] = {
resolveAnyPhysical(f) flatMap {
case (root,rel) =>
openArchive(root)
getArchive(root) map {a => (a, rel.tail)}
}
}

/** creates and registers a RealizationArchive */
def openRealizationArchive(file: File) {
Expand Down

0 comments on commit 261b160

Please sign in to comment.