package com.perforce.p4simulink.ui; /** * Copyright (C) 2014 Perforce Software. All rights reserved. * * Please see LICENSE.txt in top-level folder of this distribution. */ import java.io.File; import java.io.FileWriter; import java.util.ArrayList; import java.util.List; import javax.swing.JTextArea; public class P4IgnoreDialogue extends P4Pane { public static final int UNSAVED = 0; public static final int SAVED = 1; private JTextArea contents; private File file; public P4IgnoreDialogue(String current, File ignoreFile) { contents = new JTextArea(current != null ? current : ""); file = ignoreFile; } public Object[] getFields() { List<Object> fields = new ArrayList<>(); fields.add(".p4ignore Contents: "); fields.add(contents); return fields.toArray(); } public int save() { if (file == null || !file.canWrite()) { // can't save it return UNSAVED; } try { FileWriter writer = new FileWriter(file); writer.write(contents.getText()); writer.close(); } catch (Exception e) { return UNSAVED; } return SAVED; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 11943 | Paul Allen | Remove unused classes. | ||
#2 | 11899 | Paul Allen | Inprogress development - moved work to branch | ||
#1 | 11898 | Paul Allen |
Populate -o //guest/perforce_software/p4sl/main/... //guest/paul_allen/p4sl/.... |
||
//guest/perforce_software/p4sl/main/src/main/java/com/perforce/p4simulink/ui/P4IgnoreDialogue.java | |||||
#3 | 11672 | Paul Allen |
Tidy up formatting and imports. No functional change. |
||
#2 | 11659 | Paul Allen |
Performance improvements, continued: improved performance of getFileState() by replacing the client haveList call with a direct server command. Also improved isLatest by removing fstat calls and replacing with simpler calls to diff and sync. Transferred from p4://perforce.perforce.com:1666@983506 |
||
#1 | 11656 | Paul Allen |
Additional functionality from Scania meeting, including current changelist selector (still needs descriptions added) as well as .p4ignore editor. Transferred from p4://perforce.perforce.com:1666@978388 |