Révision 3535
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/handlers/export/ExportResultParameters.java (revision 3535) | ||
---|---|---|
28 | 28 |
package org.txm.rcp.handlers.export; |
29 | 29 |
|
30 | 30 |
import java.io.File; |
31 |
import java.io.IOException; |
|
32 | 31 |
import java.util.ArrayList; |
33 | 32 |
import java.util.Calendar; |
33 |
import java.util.HashSet; |
|
34 | 34 |
|
35 | 35 |
import org.eclipse.core.commands.AbstractHandler; |
36 | 36 |
import org.eclipse.core.commands.ExecutionEvent; |
... | ... | |
46 | 46 |
import org.eclipse.swt.widgets.Shell; |
47 | 47 |
import org.eclipse.ui.handlers.HandlerUtil; |
48 | 48 |
import org.txm.Toolbox; |
49 |
import org.txm.core.preferences.TBXPreferences; |
|
50 | 49 |
import org.txm.core.preferences.TXMPreferences; |
51 | 50 |
import org.txm.core.results.TXMResult; |
52 | 51 |
import org.txm.rcp.JobsTimer; |
53 | 52 |
import org.txm.rcp.StatusLine; |
54 |
import org.txm.rcp.handlers.files.EditFile; |
|
55 | 53 |
import org.txm.rcp.messages.TXMUIMessages; |
56 | 54 |
import org.txm.rcp.swt.dialog.LastOpened; |
57 | 55 |
import org.txm.rcp.utils.JobHandler; |
... | ... | |
114 | 112 |
|
115 | 113 |
try { |
116 | 114 |
|
117 |
ArrayList<TXMResult> toExport = new ArrayList<TXMResult>();
|
|
115 |
HashSet<TXMResult> toExport = new HashSet<TXMResult>();
|
|
118 | 116 |
for (Object o : selection.toList()) { |
119 | 117 |
if (!(o instanceof TXMResult)) continue; |
120 | 118 |
TXMResult r = (TXMResult)o; |
121 | 119 |
toExport.add(r); |
122 | 120 |
TXMResult parent = ((TXMResult)o).getParent(); |
123 | 121 |
|
122 |
// add invisible parents to rebuild the result |
|
124 | 123 |
while(parent != null && !parent.isVisible()) { // insivisble parent must be added to the exported results |
125 | 124 |
|
126 | 125 |
toExport.add(parent); |
127 | 126 |
parent = parent.getParent(); |
128 | 127 |
} |
128 |
|
|
129 |
// add children |
|
130 |
for (TXMResult c : r.getDeepChildren()) { |
|
131 |
toExport.add(c); |
|
132 |
} |
|
129 | 133 |
} |
130 | 134 |
|
131 | 135 |
ArrayList<File> files = new ArrayList<>(); |
Formats disponibles : Unified diff