Changeset 1524
- Timestamp:
- 03/24/20 09:40:55 (4 years ago)
- Location:
- trunk/src/org/expeditee/gui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/Frame.java
r1513 r1524 61 61 import org.expeditee.gio.input.KBMInputEvent.Key; 62 62 import org.expeditee.gio.input.StandardInputEventListeners; 63 import org.expeditee.gui.management.ResourceUtil; 63 64 import org.expeditee.io.Conversion; 64 65 import org.expeditee.io.ExpReader; … … 2930 2931 } 2931 2932 2932 public String getExportFileTagValue() 2933 { 2934 return getAnnotationValue("file"); 2933 public String getExportFileTagValue() { 2934 String annotationValue = getAnnotationValue("file"); 2935 Path exportPath = ResourceUtil.resolveResourcePath(annotationValue, DisplayController.getCurrentFrame()); 2936 return exportPath.toString(); 2935 2937 } 2936 2938 -
trunk/src/org/expeditee/gui/management/ResourceManager.java
r1516 r1524 312 312 for (String s: unresolved) { 313 313 String local = ResourceUtil.substitute(s, ResourceUtil.CURRENT_FRAMESET_FLAG, p.toString()); 314 local = ResourceUtil.substitute(local, ResourceUtil.EXPEDITEE_HOME, expediteeHome.toString()); 314 315 resolved.add(local); 315 316 } -
trunk/src/org/expeditee/gui/management/ResourceUtil.java
r1447 r1524 22 22 public static final String CURRENT_FRAMESET_FLAG = "${CURRENT_FRAMESET}"; 23 23 public static final String CURRENT_USER = "${CURRENT_USER}"; 24 public static final String EXPEDITEE_HOME = "${EXPEDITEE_HOME}"; 24 25 25 26 /** … … 67 68 Text item = DisplayController.getCurrentFrame().createNewText("@i: " + out.getName()); 68 69 return item; 70 } 71 72 public static Path resolveResourcePath(String unresolved, Frame context) { 73 Path expediteeHome = Paths.get(FrameIO.PARENT_FOLDER).toAbsolutePath(); 74 Path absolutePath = Paths.get(context.getFramesetPath()).toAbsolutePath(); 75 Path p = expediteeHome.relativize(absolutePath); 76 String resolved = ResourceUtil.substitute(unresolved, CURRENT_FRAMESET_FLAG, p.toString()); 77 resolved = ResourceUtil.substitute(resolved, EXPEDITEE_HOME, expediteeHome.toString()); 78 return Paths.get(resolved).toAbsolutePath(); 69 79 } 70 80
Note:
See TracChangeset
for help on using the changeset viewer.