コード例 #1
0
 private void writeComposite(
     final Element res,
     final VirtualFile file,
     final EditorWithProviderComposite composite,
     final boolean pinned,
     final EditorWithProviderComposite selectedEditor) {
   final Element fileElement = new Element("file");
   fileElement.setAttribute("leaf-file-name", file.getName()); // TODO: all files
   final HistoryEntry entry = composite.currentStateAsHistoryEntry();
   entry.writeExternal(fileElement, getManager().getProject());
   fileElement.setAttribute("pinned", Boolean.toString(pinned));
   fileElement.setAttribute(
       "current", Boolean.toString(composite.equals(getManager().getLastSelected())));
   fileElement.setAttribute("current-in-tab", Boolean.toString(composite.equals(selectedEditor)));
   res.addContent(fileElement);
 }
コード例 #2
0
 @NotNull
 private Element writeComposite(
     VirtualFile file,
     EditorWithProviderComposite composite,
     boolean pinned,
     EditorWithProviderComposite selectedEditor) {
   Element fileElement = new Element("file");
   fileElement.setAttribute("leaf-file-name", file.getName()); // TODO: all files
   composite.currentStateAsHistoryEntry().writeExternal(fileElement, getManager().getProject());
   fileElement.setAttribute(PINNED, Boolean.toString(pinned));
   fileElement.setAttribute(CURRENT_IN_TAB, Boolean.toString(composite.equals(selectedEditor)));
   return fileElement;
 }