Révision 3574
TXM/trunk/org.txm.annotation.kr.rcp/src/org/txm/annotation/kr/rcp/commands/SaveAnnotationsAndUpdateCorpus.java (revision 3574) | ||
---|---|---|
37 | 37 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
38 | 38 |
|
39 | 39 |
ISelection sel = HandlerUtil.getCurrentSelection(event); |
40 |
if (!(sel instanceof IStructuredSelection)) { |
|
41 |
Log.info("No available selection to target the corpus annotations to save"); |
|
42 |
return null; |
|
43 |
} |
|
40 |
// if (!(sel instanceof IStructuredSelection)) {
|
|
41 |
// Log.info("No available selection to target the corpus annotations to save");
|
|
42 |
// return null;
|
|
43 |
// }
|
|
44 | 44 |
IStructuredSelection selection = (IStructuredSelection) sel; |
45 | 45 |
|
46 | 46 |
List<MainCorpus> corpora = Workspace.getInstance().getDeepChildren(MainCorpus.class); |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/commands/workspace/UpdateCorpus.java (revision 3574) | ||
---|---|---|
43 | 43 |
} |
44 | 44 |
MainCorpus corpus = (MainCorpus) s; |
45 | 45 |
|
46 |
UpdateCorpusDialog dialog = new UpdateCorpusDialog(HandlerUtil.getActiveShell(event), null);
|
|
46 |
UpdateCorpusDialog dialog = new UpdateCorpusDialog(HandlerUtil.getActiveShell(event)); |
|
47 | 47 |
dialog.setDoUpdateEdition(TBXPreferences.getInstance().getBoolean(TBXPreferences.UPDATEEDITIONS)); |
48 | 48 |
dialog.setDoForceUpdate("true".equals(event.getParameter("org.txm.rcp.commands.workspace.UpdateCorpus.force"))); //$NON-NLS-1$ //$NON-NLS-2$ |
49 | 49 |
|
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/swt/dialog/UpdateCorpusDialog.java (revision 3574) | ||
---|---|---|
173 | 173 |
|
174 | 174 |
@Override |
175 | 175 |
protected void buttonPressed(int buttonId) { |
176 |
|
|
176 | 177 |
if (buttonId == Dialog.OK) { |
177 | 178 |
doUpdateEditions = updateEditionsCheck.getSelection(); |
178 | 179 |
doForceUpdate = forceUpdateCheck.getSelection(); |
179 | 180 |
doOpenCorpusParameters = openCorpusParameters.getSelection(); |
181 |
corpusToUpdate = (MainCorpus) ((IStructuredSelection)corpusList.getSelection()).getFirstElement(); |
|
180 | 182 |
} |
181 | 183 |
|
182 | 184 |
super.buttonPressed(buttonId); |
Formats disponibles : Unified diff