Project

General

Profile

Revision dc6c6341

IDdc6c6341ea1259d3b444858e2f58712298bbb87a
Parent fc78d44d
Child a054bfaf

Added by Niels Hoffmann over 9 years ago

Print Publisher runs outside of conversations; Fixes a bug with empty selections in SelectFeatureTreeWizard; Added a warn method that accepts throwables; ImageElement does not show error dialogs but logs errors silently;

View differences:

eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/wizard/AbstractPublishWizard.java
84 84
					getConfigurator().setProgressMonitor(CdmProgressMonitorAdapter.CreateMonitor(monitor));
85 85
					
86 86
					if(getConfigurator().isLocal()){
87
						conversation= CdmStore.createConversation();
87
						conversation = CdmStore.createConversation();
88
						// we want to enforce that the session is closed and nothing is 
89
						// instantiated beneath the regular cdmlib-remote object boundaries 
90
						conversation.commit(false);
88 91
					}
89 92
					
90 93
					Publisher.publish(getConfigurator());
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/wizard/SelectFeatureTreeWizardPage.java
121 121
	public void selectionChanged(SelectionChangedEvent event) {
122 122
		IStructuredSelection selection = (IStructuredSelection) event.getSelection();
123 123
		
124
		setPageComplete(selection.size() == 1);
124
		if(selection.isEmpty()){
125
			return;
126
		}
127
		
128
		setPageComplete(true);
129
		
125 130
		
126 131
		Element featureTreeElement = (Element) selection.getFirstElement();
127 132
			
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
51 51

  
52 52
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
53 53
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
54
import eu.etaxonomy.taxeditor.store.StoreUtil;
55 54
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
56 55
import eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer;
57 56
import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
......
740 739
		getLog4JLogger(source).warn(message);
741 740
		log(status);
742 741
	}
742
	
743
	public static void warn(Class source, Throwable t) {
744
		IStatus status = new Status(IStatus.WARNING, getPluginId(), t.getMessage(), t);
745
		getLog4JLogger(source).warn(t);
746
		log(status);
747
	}
743 748

  
744 749
	/**
745 750
	 * <p>
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/menu/AbstractMenuPreferences.java
43 43
import eu.etaxonomy.taxeditor.preference.wizard.VocabularyTermWizard;
44 44
import eu.etaxonomy.taxeditor.store.CdmStore;
45 45
import eu.etaxonomy.taxeditor.store.StoreUtil;
46
import eu.etaxonomy.taxeditor.store.TermStore;
47 46

  
48 47
/**
49 48
 * <p>Abstract AbstractMenuPreferences class.</p>
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ImageElement.java
18 18
import org.eclipse.core.runtime.Status;
19 19
import org.eclipse.core.runtime.jobs.Job;
20 20
import org.eclipse.jface.operation.IRunnableWithProgress;
21
import org.eclipse.swt.SWT;
21 22
import org.eclipse.swt.events.PaintEvent;
22 23
import org.eclipse.swt.events.PaintListener;
23 24
import org.eclipse.swt.graphics.GC;
......
26 27
import org.eclipse.swt.widgets.Composite;
27 28
import org.eclipse.swt.widgets.Display;
28 29
import org.eclipse.swt.widgets.Event;
30
import org.eclipse.swt.widgets.Label;
29 31
import org.eclipse.ui.forms.widgets.TableWrapData;
30 32

  
31 33
import eu.etaxonomy.cdm.common.UriUtils;
......
154 156
					}
155 157
					monitor.done();					
156 158
				}catch (Exception e) {
157
					StoreUtil.errorDialog("Could not load image", getClass(), e.getMessage()  + ": " + imageUri , e);
159
					StoreUtil.warn(getClass(), e);
158 160
				} 
159 161
			}					
160 162
		};
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/media/MediaElement.java
14 14
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory;
15 15
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.EntityDetailType;
16 16
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.SelectionType;
17
import eu.etaxonomy.taxeditor.ui.forms.CdmPropertyChangeEvent;
17 18
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement;
18 19
import eu.etaxonomy.taxeditor.ui.forms.LanguageStringWithLabelElement;
19 20
import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailSection;

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)