Révision 3981
| TXM/trunk/bundles/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/handlers/base/ComputeSubCorpus.java (revision 3981) | ||
|---|---|---|
| 205 | 205 |
Log.warning(TXMUIMessages.errorColonSubcorpusWasNotCreated); |
| 206 | 206 |
return Status.CANCEL_STATUS; |
| 207 | 207 |
} |
| 208 |
if (subcorpus.isDirty()) {
|
|
| 209 |
System.out.println("KC ?? "+subcorpus);
|
|
| 208 |
if (subcorpus.getSize() == 0) {
|
|
| 209 |
Log.warning("The created subcorpus is empty. Aborting creation.");
|
|
| 210 | 210 |
// clean broken partition |
| 211 | 211 |
subcorpus.delete(); |
| 212 | 212 |
} |
| TXM/trunk/bundles/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/handlers/base/ComputePartition.java (revision 3981) | ||
|---|---|---|
| 30 | 30 |
import java.lang.reflect.InvocationTargetException; |
| 31 | 31 |
import java.util.ArrayList; |
| 32 | 32 |
|
| 33 |
import org.apache.commons.lang.StringUtils; |
|
| 33 | 34 |
import org.eclipse.core.commands.ExecutionEvent; |
| 34 | 35 |
import org.eclipse.core.commands.ExecutionException; |
| 35 | 36 |
import org.eclipse.core.runtime.IProgressMonitor; |
| ... | ... | |
| 65 | 66 |
*/ |
| 66 | 67 |
public class ComputePartition extends BaseAbstractHandler {
|
| 67 | 68 |
|
| 68 |
|
|
| 69 | 69 |
/** |
| 70 | 70 |
* Partition. |
| 71 | 71 |
*/ |
| 72 | 72 |
protected Partition partition; |
| 73 | 73 |
|
| 74 |
|
|
| 75 | 74 |
/* |
| 76 | 75 |
* (non-Javadoc) |
| 77 | 76 |
* @see |
| ... | ... | |
| 182 | 181 |
partition.compute(subMonitor.split(10)); |
| 183 | 182 |
|
| 184 | 183 |
// ensure the partition viability |
| 185 |
if (partition.getPartsCount() == 0) {
|
|
| 184 |
if (partition.getPartsCount() == 0 || partition.getTotalSize() == 0) {
|
|
| 186 | 185 |
Log.warning(TXMUIMessages.errorColonThePartitionCreatedHasNoPart); |
| 186 |
partition.delete(); |
|
| 187 | 187 |
return Status.CANCEL_STATUS; |
| 188 | 188 |
} |
| 189 | 189 |
ArrayList<Part> emptyParts = new ArrayList<>(); |
| ... | ... | |
| 201 | 201 |
return Status.CANCEL_STATUS; |
| 202 | 202 |
} |
| 203 | 203 |
else if (emptyParts.size() != 0) {
|
| 204 |
Log.warning(NLS.bind(CQPUIMessages.WarningSomePartsAreEmptyP0, emptyParts));
|
|
| 204 |
Log.warning(NLS.bind(CQPUIMessages.WarningSomePartsAreEmptyP0, StringUtils.join(emptyParts, ", ")));
|
|
| 205 | 205 |
} |
| 206 | 206 |
|
| 207 | 207 |
subMonitor.subTask(TXMUIMessages.refreshingCorpora); |
Formats disponibles : Unified diff