private void undo(Cell cell) { if (!CVS.isDELIB(cell.getLibrary())) return; File libraryFile = TextUtils.getFile(cell.getLibrary().getLibFile()); if (libraryFile == null) return; String libfile = libraryFile.getPath(); // get cell directory if not already added before // check cell files File cellFile = new File(libfile, DELIB.getCellFile(cell)); if (undo(cellFile)) { State state = CVSLibrary.getState(cell); if (state == State.ADDED) CVSLibrary.setState(cell, State.UNKNOWN); if (state == State.REMOVED) CVSLibrary.setState(cell, State.NONE); } }
private void generate(StringBuffer buf, Cell cell, String useDir) { if (!CVS.isDELIB(cell.getLibrary())) return; File libraryFile = TextUtils.getFile(cell.getLibrary().getLibFile()); if (libraryFile == null) return; String libfile = libraryFile.getPath(); // get cell directory if not already added before File celldirFile = new File(libfile, DELIB.getCellSubDir(cell.getId())); String celldir = celldirFile.getPath(); if (!addedCellDirs.containsKey(celldir) && !libfile.equals(celldir)) { if (celldirFile.exists()) add(buf, celldir, useDir); addedCellDirs.put(celldir, null); } // check cell files File cellFile = new File(libfile, DELIB.getCellFile(cell)); add(buf, cellFile.getPath(), useDir); // check that header is added or in cvs, or library is going to be added if (add) { File headerFile = new File(libfile, DELIB.getHeaderFile()); if (!libs.contains(cell.getLibrary()) && !CVS.isFileInCVS(headerFile)) { add(buf, headerFile.getPath(), useDir); } } }