Changeset 23
- Timestamp:
- 05/13/08 11:48:32 (16 years ago)
- Location:
- trunk/src/org/expeditee
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/agents/CopyTree.java
r8 r23 5 5 6 6 import org.expeditee.gui.Frame; 7 import org.expeditee.gui.FrameGraphics; 7 8 import org.expeditee.gui.FrameIO; 8 9 import org.expeditee.gui.FrameUtils; … … 48 49 processFrame(zero); 49 50 } catch (ExistingFramesetException efe) { 50 // get the frame path 51 Frame zero = FrameIO.LoadFrame(_nameTo + "0"); 52 _framePath = zero.path; 53 _firstNumber = _lastNumber + 1; 51 FrameGraphics.ErrorMessage("A frameset called " + _nameTo 52 + " already exists."); 53 return false; 54 54 } catch (Exception e) { 55 55 return false; … … 80 80 for (Item i : fresh.getItems()) 81 81 if (i.getLink() != null && !i.isAnnotation() && i.isLinkValid()) { 82 String link = i.getLink(); 83 link = link.toLowerCase(); 84 // link = link.replace(_nameFrom, _nameTo); 82 String link = i.getLink().toLowerCase(); 83 //convert to absolute link with the old framesetName 84 if (FrameIO.isPositiveInteger(link)){ 85 link = _nameFrom + link; 86 } 87 //check if we already have this in our map 85 88 if (_nameMap.containsKey(link)) 86 89 link = _nameMap.get(link); 90 //otherwise add it to our map 87 91 else if (link.startsWith(_nameFrom)) { 88 92 _nameMap.put(link, _nameTo + (++_lastNumber)); 89 link = _nameTo+ _lastNumber;93 link = "" + _lastNumber; 90 94 } 91 95 i.setLink(link); … … 93 97 && i.isLinkValid()) { 94 98 // annotation links need to be parsed at the end 95 if (i.get Link().toLowerCase().startsWith(_nameFrom)) {99 if (i.getAbsoluteLink().toLowerCase().startsWith(_nameFrom)) { 96 100 _toReparse.add(fresh.getFrameName()); 97 101 added = true; … … 101 105 102 106 fresh.path = _framePath; 103 FrameIO. SaveFrame(fresh);107 FrameIO.ForceSaveFrame(fresh); 104 108 FrameIO.ResumeCache(); 105 109 } -
trunk/src/org/expeditee/gui/Browser.java
r22 r23 84 84 } catch (Exception e) { 85 85 //TODO tell the user that there was a problem creating the profile frame and close nicely 86 e.printStackTrace(); 86 87 assert(false); 87 88 } -
trunk/src/org/expeditee/gui/DisplayIO.java
r22 r23 59 59 * The title to display in the Title bar. 60 60 */ 61 public static final String TITLE = "Exp0 8May2008D";61 public static final String TITLE = "Exp09May2008A"; 62 62 63 63 private DisplayIO() { -
trunk/src/org/expeditee/gui/FrameIO.java
r22 r23 727 727 728 728 public static Frame CreateNewProfile(String username) throws Exception { 729 Frame profile = CreateFrameset(username, PROFILE_PATH );729 Frame profile = CreateFrameset(username, PROFILE_PATH, true); 730 730 FrameUtils.CreateDefaultProfile(profile); 731 731 return profile; -
trunk/src/org/expeditee/stats/SessionStats.java
r22 r23 259 259 for (String s : _FrameEvents) 260 260 eventList.append(s + '\n'); 261 eventList.deleteCharAt(eventList.length() - 1); 261 if (eventList.length() > 0) 262 eventList.deleteCharAt(eventList.length() - 1); 262 263 return eventList.toString(); 263 264 }
Note:
See TracChangeset
for help on using the changeset viewer.