Revision e41cdd18
Added by Lutz Suhrbier almost 13 years ago
.gitattributes | ||
---|---|---|
583 | 583 |
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/wizard/SelectServiceWizardPage.java -text |
584 | 584 |
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/wizard/SelectStylesheetWizardPage.java -text |
585 | 585 |
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/wizard/SelectTaxaWizardPage.java -text |
586 |
eu.etaxonomy.taxeditor.store.rap/.classpath -text |
|
587 |
eu.etaxonomy.taxeditor.store.rap/.project -text |
|
588 |
eu.etaxonomy.taxeditor.store.rap/.settings/org.eclipse.jdt.core.prefs -text |
|
589 |
eu.etaxonomy.taxeditor.store.rap/META-INF/MANIFEST.MF -text |
|
590 |
eu.etaxonomy.taxeditor.store.rap/bin/eu/etaxonomy/taxeditor/store/singlesource/widget/DisplayProxyImpl.class -text |
|
591 |
eu.etaxonomy.taxeditor.store.rap/build.properties -text |
|
592 |
eu.etaxonomy.taxeditor.store.rap/src/eu/etaxonomy/taxeditor/store/singlesource/widget/DisplayProxyImpl.java -text |
|
593 |
eu.etaxonomy.taxeditor.store.rcp/.classpath -text |
|
594 |
eu.etaxonomy.taxeditor.store.rcp/.project -text |
|
595 |
eu.etaxonomy.taxeditor.store.rcp/.settings/org.eclipse.jdt.core.prefs -text |
|
596 |
eu.etaxonomy.taxeditor.store.rcp/META-INF/MANIFEST.MF -text |
|
597 |
eu.etaxonomy.taxeditor.store.rcp/bin/eu/etaxonomy/taxeditor/store/singlesource/widget/DisplayProxyImpl.class -text |
|
598 |
eu.etaxonomy.taxeditor.store.rcp/build.properties -text |
|
599 |
eu.etaxonomy.taxeditor.store.rcp/fragment.xml -text |
|
600 |
eu.etaxonomy.taxeditor.store.rcp/src/eu/etaxonomy/taxeditor/store/singlesource/widget/DisplayProxyImpl.java -text |
|
586 | 601 |
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF -text |
587 | 602 |
eu.etaxonomy.taxeditor.store/build.properties -text |
588 | 603 |
eu.etaxonomy.taxeditor.store/icons/256color_16x16.bmp -text |
... | ... | |
877 | 892 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/TermManager.java -text |
878 | 893 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/TermStore.java -text |
879 | 894 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/internal/TaxeditorStorePlugin.java -text |
895 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/singlesource/ImplementationLoader.java -text |
|
896 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/singlesource/widget/DisplayProxy.java -text |
|
897 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/singlesource/widget/IDisplayProxy.java -text |
|
880 | 898 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/bar/AuthenticatedUserBar.java -text |
881 | 899 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/LoginDialog.java -text |
882 | 900 |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialogs/UriDialog.java -text |
eu.etaxonomy.taxeditor.application/src/main/java/eu/etaxonomy/taxeditor/ApplicationWorkbenchAdvisor.java | ||
---|---|---|
1 | 1 |
package eu.etaxonomy.taxeditor; |
2 | 2 |
|
3 |
import org.eclipse.swt.widgets.Display; |
|
3 | 4 |
import org.eclipse.ui.application.IWorkbenchConfigurer; |
4 | 5 |
import org.eclipse.ui.application.IWorkbenchWindowConfigurer; |
5 | 6 |
import org.eclipse.ui.application.WorkbenchAdvisor; |
6 | 7 |
import org.eclipse.ui.application.WorkbenchWindowAdvisor; |
7 | 8 |
|
9 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
10 |
|
|
8 | 11 |
|
9 | 12 |
/** |
10 | 13 |
* <p>ApplicationWorkbenchAdvisor class.</p> |
... | ... | |
49 | 52 |
// Remembers the user's view layout, window size, window location etc. |
50 | 53 |
// for the next time application is started |
51 | 54 |
configurer.setSaveAndRestore(true); |
55 |
|
|
56 |
DisplayProxy.setDefault(Display.getDefault()); |
|
52 | 57 |
} |
53 | 58 |
|
54 | 59 |
/* (non-Javadoc) |
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/SupplementalTextScanner.java | ||
---|---|---|
26 | 26 |
import org.eclipse.jface.text.rules.Token; |
27 | 27 |
import org.eclipse.jface.text.source.ISourceViewer; |
28 | 28 |
import org.eclipse.swt.SWT; |
29 |
import org.eclipse.swt.widgets.Display; |
|
29 |
|
|
30 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
30 | 31 |
|
31 | 32 |
/** |
32 | 33 |
* Gives a different color and font style to all text identified as supplemental text by |
... | ... | |
63 | 64 |
this.sourceViewer = sourceViewer; |
64 | 65 |
this.lineDisplayStrategy = lineDisplayStrategy; |
65 | 66 |
|
66 |
TextAttribute textAttribute = new TextAttribute(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY), null, SWT.ITALIC);
|
|
67 |
TextAttribute textAttribute = new TextAttribute(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_DARK_GRAY), null, SWT.ITALIC);
|
|
67 | 68 |
IToken supplementalTextToken = new Token(textAttribute); |
68 | 69 |
|
69 | 70 |
rule = new SupplementalTextRule(supplementalTextToken); |
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/BulkEditorLineDisplay.java | ||
---|---|---|
18 | 18 |
import org.eclipse.jface.action.IStatusLineManager; |
19 | 19 |
import org.eclipse.swt.graphics.Font; |
20 | 20 |
import org.eclipse.swt.graphics.Image; |
21 |
import org.eclipse.swt.widgets.Display; |
|
22 | 21 |
|
23 | 22 |
import eu.etaxonomy.cdm.common.CdmUtils; |
24 | 23 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
... | ... | |
26 | 25 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
27 | 26 |
import eu.etaxonomy.cdm.model.common.IAnnotatableEntity; |
28 | 27 |
import eu.etaxonomy.cdm.model.common.ICdmBase; |
29 |
import eu.etaxonomy.cdm.model.common.IdentifiableEntity; |
|
30 | 28 |
import eu.etaxonomy.cdm.model.common.Marker; |
31 | 29 |
import eu.etaxonomy.cdm.model.common.MarkerType; |
32 | 30 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase; |
... | ... | |
35 | 33 |
import eu.etaxonomy.taxeditor.annotatedlineeditor.ILineDisplayStrategy; |
36 | 34 |
import eu.etaxonomy.taxeditor.bulkeditor.input.AbstractBulkEditorInput; |
37 | 35 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
36 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
38 | 37 |
|
39 | 38 |
/** |
40 | 39 |
* <p>BulkEditorLineDisplay class.</p> |
... | ... | |
143 | 142 |
// see http://wiki.eclipse.org/FAQ_Why_do_I_get_an_invalid_thread_access_exception%3F |
144 | 143 |
new Thread(new Runnable() { |
145 | 144 |
public void run() { |
146 |
Display.getDefault().asyncExec(new Runnable() { |
|
145 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
147 | 146 |
public void run() { |
148 | 147 |
IStatusLineManager statusLineManager = editor.getEditorSite().getActionBars().getStatusLineManager(); |
149 | 148 |
statusLineManager.setMessage(text); |
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/referencingobjects/ReferencingObjectsView.java | ||
---|---|---|
41 | 41 |
import eu.etaxonomy.taxeditor.model.DescriptionHelper; |
42 | 42 |
import eu.etaxonomy.taxeditor.model.LineSelection; |
43 | 43 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
44 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
44 | 45 |
import eu.etaxonomy.taxeditor.view.AbstractCdmViewPart; |
45 | 46 |
|
46 | 47 |
/** |
... | ... | |
104 | 105 |
*/ |
105 | 106 |
public void updateReferencingObjects(final IdentifiableEntity entity) { |
106 | 107 |
|
107 |
final Display display = Display.getCurrent();
|
|
108 |
final Display display = DisplayProxy.getDefault();
|
|
108 | 109 |
|
109 | 110 |
Job job = new Job("Update Referencing Objects") { |
110 | 111 |
|
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/SimpleSelectionProvider.java | ||
---|---|---|
22 | 22 |
import org.eclipse.jface.viewers.StructuredSelection; |
23 | 23 |
import org.eclipse.swt.widgets.Display; |
24 | 24 |
|
25 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
26 |
|
|
25 | 27 |
/** |
26 | 28 |
* <p>SimpleSelectionProvider class.</p> |
27 | 29 |
* |
... | ... | |
89 | 91 |
|
90 | 92 |
if(job == null){ |
91 | 93 |
final SelectionChangedEvent selectionChangedEvent = new SelectionChangedEvent(this, selection); |
92 |
final Display display = Display.getCurrent();
|
|
94 |
final Display display = DisplayProxy.getDefault();
|
|
93 | 95 |
job = new Job("Setting Selection"){ |
94 | 96 |
|
95 | 97 |
@Override |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/key/polytomous/PolytomousKeyListLabelProvider.java | ||
---|---|---|
18 | 18 |
import org.eclipse.swt.custom.StyleRange; |
19 | 19 |
import org.eclipse.swt.graphics.Color; |
20 | 20 |
import org.eclipse.swt.graphics.TextStyle; |
21 |
import org.eclipse.swt.widgets.Display; |
|
22 | 21 |
|
23 | 22 |
import eu.etaxonomy.cdm.common.CdmUtils; |
24 | 23 |
import eu.etaxonomy.cdm.model.description.KeyStatement; |
25 | 24 |
import eu.etaxonomy.cdm.model.description.PolytomousKeyNode; |
26 | 25 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
26 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
27 | 27 |
|
28 | 28 |
/** |
29 | 29 |
* @author n.hoffmann |
... | ... | |
32 | 32 |
*/ |
33 | 33 |
public class PolytomousKeyListLabelProvider extends StyledCellLabelProvider { |
34 | 34 |
|
35 |
private static Color colorLink = Display.getCurrent().getSystemColor(
|
|
35 |
private static Color colorLink = DisplayProxy.getDefault().getSystemColor(
|
|
36 | 36 |
SWT.COLOR_BLUE); |
37 | 37 |
private Styler styler; |
38 | 38 |
|
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/AbstractGroup.java | ||
---|---|---|
19 | 19 |
import org.eclipse.swt.dnd.Transfer; |
20 | 20 |
import org.eclipse.swt.graphics.Color; |
21 | 21 |
import org.eclipse.swt.widgets.Composite; |
22 |
import org.eclipse.swt.widgets.Display; |
|
23 | 22 |
import org.eclipse.swt.widgets.Menu; |
24 | 23 |
import org.eclipse.ui.forms.widgets.TableWrapData; |
25 | 24 |
import org.eclipse.ui.forms.widgets.TableWrapLayout; |
... | ... | |
32 | 31 |
import eu.etaxonomy.taxeditor.editor.name.dnd.NameEditorDropTargetEffect; |
33 | 32 |
import eu.etaxonomy.taxeditor.editor.name.dnd.NameEditorDropTargetListener; |
34 | 33 |
import eu.etaxonomy.taxeditor.preference.Resources; |
34 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
35 | 35 |
|
36 | 36 |
/** |
37 | 37 |
* <p>Abstract AbstractGroup class.</p> |
... | ... | |
91 | 91 |
layout.horizontalSpacing = 0; |
92 | 92 |
control.setLayout(layout); |
93 | 93 |
|
94 |
control.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_GRAY)); |
|
94 |
control.setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_GRAY));
|
|
95 | 95 |
} |
96 | 96 |
|
97 | 97 |
/** |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/AbstractGroupedContainer.java | ||
---|---|---|
65 | 65 |
import eu.etaxonomy.taxeditor.model.TextHelper; |
66 | 66 |
import eu.etaxonomy.taxeditor.parser.ParseHandler; |
67 | 67 |
import eu.etaxonomy.taxeditor.preference.Resources; |
68 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
68 | 69 |
|
69 | 70 |
/** |
70 | 71 |
* Formats <code>GroupedComposite</code> with cosmetic and layout properties specific to the |
... | ... | |
688 | 689 |
selection = this; |
689 | 690 |
|
690 | 691 |
// start timer |
691 |
Display display = Display.getCurrent();
|
|
692 |
Display display = DisplayProxy.getDefault();
|
|
692 | 693 |
Runnable runnable = new Runnable() { |
693 | 694 |
|
694 | 695 |
public void run() { |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/container/NameViewer.java | ||
---|---|---|
30 | 30 |
import org.eclipse.swt.widgets.Canvas; |
31 | 31 |
import org.eclipse.swt.widgets.Composite; |
32 | 32 |
import org.eclipse.swt.widgets.Control; |
33 |
import org.eclipse.swt.widgets.Display; |
|
34 | 33 |
import org.eclipse.swt.widgets.Layout; |
35 | 34 |
import org.eclipse.swt.widgets.Menu; |
36 | 35 |
import org.eclipse.ui.IActionBars; |
... | ... | |
48 | 47 |
import eu.etaxonomy.taxeditor.editor.ViewerConfiguration; |
49 | 48 |
import eu.etaxonomy.taxeditor.editor.name.container.EditorAnnotation.EditorAnnotationType; |
50 | 49 |
import eu.etaxonomy.taxeditor.preference.Resources; |
50 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
51 | 51 |
|
52 | 52 |
/** |
53 | 53 |
* SourceViewer implementation called by NameComposite. |
... | ... | |
184 | 184 |
// Add ability to paint red squigglies |
185 | 185 |
annotationPainter.addAnnotationType(EditorAnnotationType.ERROR.name(), LineWrapSquigglesStrategy.ID); |
186 | 186 |
annotationPainter.setAnnotationTypeColor(EditorAnnotationType.ERROR.image, |
187 |
new Color(Display.getDefault(), EditorAnnotationType.ERROR.color)); |
|
187 |
new Color(DisplayProxy.getDefault(), EditorAnnotationType.ERROR.color));
|
|
188 | 188 |
|
189 | 189 |
// Add ability to paint yellow squigglies |
190 | 190 |
annotationPainter.addAnnotationType(EditorAnnotationType.WARNING.name(), LineWrapSquigglesStrategy.ID); |
191 | 191 |
annotationPainter.setAnnotationTypeColor(EditorAnnotationType.WARNING.image, |
192 |
new Color(Display.getDefault(), EditorAnnotationType.WARNING.color)); |
|
192 |
new Color(DisplayProxy.getDefault(), EditorAnnotationType.WARNING.color));
|
|
193 | 193 |
|
194 | 194 |
this.addPainter(annotationPainter); |
195 | 195 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/handler/ChangeAcceptedTaxonToSynonymHandler.java | ||
---|---|---|
13 | 13 |
import org.eclipse.core.commands.ExecutionException; |
14 | 14 |
import org.eclipse.core.commands.IHandler; |
15 | 15 |
import org.eclipse.core.commands.common.NotDefinedException; |
16 |
import org.eclipse.swt.widgets.Display; |
|
17 | 16 |
import org.eclipse.ui.PartInitException; |
18 | 17 |
import org.eclipse.ui.handlers.HandlerUtil; |
19 | 18 |
|
... | ... | |
26 | 25 |
import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor; |
27 | 26 |
import eu.etaxonomy.taxeditor.editor.name.operation.ChangeAcceptedTaxonToSynonymOperation; |
28 | 27 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
28 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
29 | 29 |
import eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection.TaxonNodeSelectionDialog; |
30 | 30 |
|
31 | 31 |
/** |
... | ... | |
83 | 83 |
*/ |
84 | 84 |
/** {@inheritDoc} */ |
85 | 85 |
public boolean postOperation(CdmBase objectAffectedByOperation) { |
86 |
Display.getDefault().asyncExec(new Runnable(){ |
|
86 |
DisplayProxy.getDefault().asyncExec(new Runnable(){
|
|
87 | 87 |
|
88 | 88 |
public void run() { |
89 | 89 |
EditorUtil.close(editor.getMultiPageTaxonEditor()); |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/NavigationUtil.java | ||
---|---|---|
19 | 19 |
import org.eclipse.core.commands.operations.IUndoContext; |
20 | 20 |
import org.eclipse.core.commands.operations.UndoContext; |
21 | 21 |
import org.eclipse.jface.viewers.StructuredSelection; |
22 |
import org.eclipse.swt.widgets.Display; |
|
23 | 22 |
import org.eclipse.swt.widgets.Shell; |
24 | 23 |
import org.eclipse.ui.IEditorPart; |
25 | 24 |
import org.eclipse.ui.IEditorReference; |
... | ... | |
37 | 36 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
38 | 37 |
import eu.etaxonomy.cdm.model.taxon.TaxonNode; |
39 | 38 |
import eu.etaxonomy.taxeditor.editor.EditorUtil; |
40 |
import eu.etaxonomy.taxeditor.editor.OpenEditorConfiguration; |
|
41 | 39 |
import eu.etaxonomy.taxeditor.editor.TaxonEditorInput; |
42 | 40 |
import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin; |
43 | 41 |
import eu.etaxonomy.taxeditor.model.AbstractUtility; |
44 | 42 |
import eu.etaxonomy.taxeditor.navigation.internal.TaxeditorNavigationPlugin; |
45 | 43 |
import eu.etaxonomy.taxeditor.navigation.navigator.TaxonNavigator; |
44 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
46 | 45 |
|
47 | 46 |
/** |
48 | 47 |
* <p>NavigationUtil class.</p> |
... | ... | |
212 | 211 |
* @param parentElement a {@link java.lang.Object} object. |
213 | 212 |
*/ |
214 | 213 |
public static void selectInNavigator(final Object element, final Object parentElement) { |
215 |
Display.getDefault().asyncExec(new Runnable(){ |
|
214 |
DisplayProxy.getDefault().asyncExec(new Runnable(){
|
|
216 | 215 |
|
217 | 216 |
public void run() { |
218 | 217 |
TaxonNavigator navigator = showNavigator(); |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewPart.java | ||
---|---|---|
22 | 22 |
import org.eclipse.swt.layout.GridLayout; |
23 | 23 |
import org.eclipse.swt.widgets.Composite; |
24 | 24 |
import org.eclipse.swt.widgets.Control; |
25 |
import org.eclipse.swt.widgets.Display; |
|
26 | 25 |
import org.eclipse.swt.widgets.Menu; |
27 | 26 |
import org.eclipse.swt.widgets.Text; |
28 | 27 |
import org.eclipse.ui.IMemento; |
... | ... | |
43 | 42 |
import eu.etaxonomy.taxeditor.navigation.NavigationUtil; |
44 | 43 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
45 | 44 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
45 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
46 | 46 |
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory; |
47 | 47 |
|
48 | 48 |
/** |
... | ... | |
111 | 111 |
private PolytomousKeyViewPartDataChangeBehavior dataChangeBehavior; |
112 | 112 |
|
113 | 113 |
public PolytomousKeyViewPart(){ |
114 |
formFactory = new CdmFormFactory(Display.getDefault()); |
|
114 |
formFactory = new CdmFormFactory(DisplayProxy.getDefault());
|
|
115 | 115 |
} |
116 | 116 |
|
117 | 117 |
/* (non-Javadoc) |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/PolytomousKeyViewPartDataChangeBehavior.java | ||
---|---|---|
22 | 22 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType; |
23 | 23 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
24 | 24 |
import eu.etaxonomy.taxeditor.model.AbstractDataChangeBehaviour; |
25 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
25 | 26 |
|
26 | 27 |
/** |
27 | 28 |
* @author n.hoffmann |
... | ... | |
47 | 48 |
@Override |
48 | 49 |
public void reactOnDataChange(CdmDataChangeMap changeEvents) { |
49 | 50 |
if(isRelevant(changeEvents)){ |
50 |
final Display display = Display.getCurrent();
|
|
51 |
final Display display = DisplayProxy.getDefault();
|
|
51 | 52 |
Job job = new Job("Updating Polytomous Key Viewer") { |
52 | 53 |
|
53 | 54 |
@Override |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/key/polytomous/handler/EditHandler.java | ||
---|---|---|
19 | 19 |
import org.eclipse.core.runtime.jobs.Job; |
20 | 20 |
import org.eclipse.jface.viewers.ISelection; |
21 | 21 |
import org.eclipse.jface.viewers.StructuredSelection; |
22 |
import org.eclipse.swt.widgets.Display; |
|
23 | 22 |
|
24 | 23 |
import eu.etaxonomy.cdm.model.description.PolytomousKey; |
25 | 24 |
import eu.etaxonomy.taxeditor.navigation.NavigationUtil; |
26 | 25 |
import eu.etaxonomy.taxeditor.navigation.key.polytomous.PolytomousKeyViewPart; |
26 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
27 | 27 |
|
28 | 28 |
/** |
29 | 29 |
* @author n.hoffmann |
... | ... | |
52 | 52 |
for(final Object selectedObject : structuredSelection.toArray()){ |
53 | 53 |
if(selectedObject instanceof PolytomousKey){ |
54 | 54 |
|
55 |
Display.getDefault().asyncExec(new Runnable(){ |
|
55 |
DisplayProxy.getDefault().asyncExec(new Runnable(){
|
|
56 | 56 |
|
57 | 57 |
@Override |
58 | 58 |
public void run() { |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/TaxonNavigatorDataChangeBehavior.java | ||
---|---|---|
30 | 30 |
import eu.etaxonomy.taxeditor.model.AbstractDataChangeBehaviour; |
31 | 31 |
import eu.etaxonomy.taxeditor.model.IDataChangeBehavior; |
32 | 32 |
import eu.etaxonomy.taxeditor.navigation.NavigationUtil; |
33 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
33 | 34 |
|
34 | 35 |
/** |
35 | 36 |
* <p>TaxonNavigatorDataChangeBehavior class.</p> |
... | ... | |
134 | 135 |
public void reactOnDataChange(CdmDataChangeMap events) { |
135 | 136 |
if(isRelevant(events)){ |
136 | 137 |
|
137 |
final Display display = Display.getCurrent();
|
|
138 |
final Display display = DisplayProxy.getDefault();
|
|
138 | 139 |
Job job = new Job("Updating Taxon Navigator") { |
139 | 140 |
|
140 | 141 |
@Override |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/navigator/handler/EditHandler.java | ||
---|---|---|
27 | 27 |
import eu.etaxonomy.cdm.model.taxon.Classification; |
28 | 28 |
import eu.etaxonomy.taxeditor.navigation.NavigationUtil; |
29 | 29 |
import eu.etaxonomy.taxeditor.newWizard.NewClassificationWizard; |
30 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
30 | 31 |
|
31 | 32 |
/** |
32 | 33 |
* <p>EditHandler class.</p> |
... | ... | |
66 | 67 |
protected IStatus run(IProgressMonitor monitor) { |
67 | 68 |
for(final Object selectedObject : structuredSelection.toArray()){ |
68 | 69 |
|
69 |
Display.getDefault().asyncExec(new Runnable(){ |
|
70 |
DisplayProxy.getDefault().asyncExec(new Runnable(){
|
|
70 | 71 |
|
71 | 72 |
public void run() { |
72 | 73 |
NavigationUtil.openEditor(selectedObject); |
eu.etaxonomy.taxeditor.navigation/src/main/java/eu/etaxonomy/taxeditor/navigation/search/SearchResultView.java | ||
---|---|---|
46 | 46 |
import eu.etaxonomy.taxeditor.navigation.NavigationUtil; |
47 | 47 |
import eu.etaxonomy.taxeditor.navigation.search.SearchBar.SearchOption; |
48 | 48 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
49 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
49 | 50 |
|
50 | 51 |
/** |
51 | 52 |
* <p>SearchResultView class.</p> |
... | ... | |
192 | 193 |
|
193 | 194 |
status.setText("Searching..."); |
194 | 195 |
|
195 |
searchJob = new SearchJob(Display.getCurrent(), configurator);
|
|
196 |
searchJob = new SearchJob(DisplayProxy.getDefault(), configurator);
|
|
196 | 197 |
searchJob.schedule(); |
197 | 198 |
|
198 | 199 |
} |
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/wizard/AbstractPublishWizard.java | ||
---|---|---|
11 | 11 |
import org.eclipse.jface.viewers.IStructuredSelection; |
12 | 12 |
import org.eclipse.jface.wizard.IWizardPage; |
13 | 13 |
import org.eclipse.jface.wizard.Wizard; |
14 |
import org.eclipse.swt.widgets.Display; |
|
15 | 14 |
import org.eclipse.ui.IExportWizard; |
16 | 15 |
import org.eclipse.ui.IWorkbench; |
17 | 16 |
|
... | ... | |
23 | 22 |
import eu.etaxonomy.taxeditor.printpublisher.PrintUtil; |
24 | 23 |
import eu.etaxonomy.taxeditor.printpublisher.internal.PrintpublisherPlugin; |
25 | 24 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
25 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
26 | 26 |
|
27 | 27 |
/** |
28 | 28 |
* <p>AbstractPublishWizard class.</p> |
... | ... | |
95 | 95 |
}finally{ |
96 | 96 |
monitor.done(); |
97 | 97 |
if(conversation != null) conversation.close(); |
98 |
Display.getDefault().asyncExec(new Runnable() { |
|
98 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
99 | 99 |
@Override |
100 | 100 |
public void run() { |
101 |
MessageDialog.openInformation(Display.getDefault().getActiveShell(), "Print Publisher", "Your document was created."); |
|
101 |
MessageDialog.openInformation(DisplayProxy.getDefault().getActiveShell(), "Print Publisher", "Your document was created.");
|
|
102 | 102 |
} |
103 | 103 |
}); |
104 | 104 |
} |
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/wizard/SelectServiceWizardPage.java | ||
---|---|---|
34 | 34 |
import org.eclipse.swt.layout.GridLayout; |
35 | 35 |
import org.eclipse.swt.widgets.Button; |
36 | 36 |
import org.eclipse.swt.widgets.Composite; |
37 |
import org.eclipse.swt.widgets.Display; |
|
38 | 37 |
import org.eclipse.swt.widgets.Group; |
39 | 38 |
import org.eclipse.swt.widgets.Text; |
40 | 39 |
import org.jdom.Element; |
... | ... | |
43 | 42 |
import eu.etaxonomy.cdm.print.PublishConfigurator; |
44 | 43 |
import eu.etaxonomy.cdm.print.XMLHelper; |
45 | 44 |
import eu.etaxonomy.cdm.print.XMLHelper.EntityType; |
46 |
import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter; |
|
47 |
import eu.etaxonomy.taxeditor.printpublisher.PrintUtil; |
|
48 | 45 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
49 | 46 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
47 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
50 | 48 |
|
51 | 49 |
/** |
52 | 50 |
* <p>SelectServiceWizardPage class.</p> |
... | ... | |
209 | 207 |
IXMLEntityFactory factory = getConfigurator().getFactory(); |
210 | 208 |
final List<Element> classifications = factory.getClassifications(); |
211 | 209 |
|
212 |
Display.getDefault().asyncExec(new Runnable(){ |
|
210 |
DisplayProxy.getDefault().asyncExec(new Runnable(){
|
|
213 | 211 |
|
214 | 212 |
@Override |
215 | 213 |
public void run() { |
eu.etaxonomy.taxeditor.printpublisher/src/main/java/eu/etaxonomy/taxeditor/printpublisher/wizard/SelectTaxaWizardPage.java | ||
---|---|---|
28 | 28 |
import org.eclipse.swt.layout.GridLayout; |
29 | 29 |
import org.eclipse.swt.widgets.Button; |
30 | 30 |
import org.eclipse.swt.widgets.Composite; |
31 |
import org.eclipse.swt.widgets.Display; |
|
32 | 31 |
import org.jdom.Element; |
33 | 32 |
|
34 | 33 |
import eu.etaxonomy.cdm.print.IXMLEntityFactory; |
35 | 34 |
import eu.etaxonomy.cdm.print.XMLHelper; |
36 | 35 |
import eu.etaxonomy.cdm.print.XMLHelper.EntityType; |
37 | 36 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
37 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
38 | 38 |
|
39 | 39 |
/** |
40 | 40 |
* <p>SelectTaxaWizardPage class.</p> |
... | ... | |
97 | 97 |
IXMLEntityFactory factory = getConfigurator().getFactory(); |
98 | 98 |
final List<Element> classifications = factory.getClassifications(); |
99 | 99 |
|
100 |
Display.getDefault().asyncExec(new Runnable(){ |
|
100 |
DisplayProxy.getDefault().asyncExec(new Runnable(){
|
|
101 | 101 |
|
102 | 102 |
@Override |
103 | 103 |
public void run() { |
eu.etaxonomy.taxeditor.store.rap/.classpath | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<classpath> |
|
3 |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> |
|
4 |
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> |
|
5 |
<classpathentry kind="src" path="src"/> |
|
6 |
<classpathentry kind="output" path="bin"/> |
|
7 |
</classpath> |
eu.etaxonomy.taxeditor.store.rap/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>eu.etaxonomy.taxeditor.store.rap</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
<buildCommand> |
|
9 |
<name>org.eclipse.jdt.core.javabuilder</name> |
|
10 |
<arguments> |
|
11 |
</arguments> |
|
12 |
</buildCommand> |
|
13 |
<buildCommand> |
|
14 |
<name>org.eclipse.pde.ManifestBuilder</name> |
|
15 |
<arguments> |
|
16 |
</arguments> |
|
17 |
</buildCommand> |
|
18 |
<buildCommand> |
|
19 |
<name>org.eclipse.pde.SchemaBuilder</name> |
|
20 |
<arguments> |
|
21 |
</arguments> |
|
22 |
</buildCommand> |
|
23 |
</buildSpec> |
|
24 |
<natures> |
|
25 |
<nature>org.eclipse.pde.PluginNature</nature> |
|
26 |
<nature>org.eclipse.jdt.core.javanature</nature> |
|
27 |
</natures> |
|
28 |
</projectDescription> |
eu.etaxonomy.taxeditor.store.rap/.settings/org.eclipse.jdt.core.prefs | ||
---|---|---|
1 |
#Thu Jul 07 11:13:32 CEST 2011 |
|
2 |
eclipse.preferences.version=1 |
|
3 |
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled |
|
4 |
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 |
|
5 |
org.eclipse.jdt.core.compiler.compliance=1.6 |
|
6 |
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error |
|
7 |
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error |
|
8 |
org.eclipse.jdt.core.compiler.source=1.6 |
eu.etaxonomy.taxeditor.store.rap/META-INF/MANIFEST.MF | ||
---|---|---|
1 |
Manifest-Version: 1.0 |
|
2 |
Bundle-ManifestVersion: 2 |
|
3 |
Bundle-Name: Rap |
|
4 |
Bundle-SymbolicName: eu.etaxonomy.taxeditor.store.rap |
|
5 |
Bundle-Version: 1.0.0.qualifier |
|
6 |
Fragment-Host: eu.etaxonomy.taxeditor.store;bundle-version="3.0.0" |
|
7 |
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 |
eu.etaxonomy.taxeditor.store.rap/build.properties | ||
---|---|---|
1 |
source.. = src/ |
|
2 |
output.. = bin/ |
|
3 |
bin.includes = META-INF/,\ |
|
4 |
. |
eu.etaxonomy.taxeditor.store.rap/src/eu/etaxonomy/taxeditor/store/singlesource/widget/DisplayProxyImpl.java | ||
---|---|---|
1 |
package eu.etaxonomy.taxeditor.store.singlesource.widget; |
|
2 |
|
|
3 |
import org.eclipse.swt.widgets.Display; |
|
4 |
|
|
5 |
public class DisplayProxyImpl extends SessionSingletonBase implements IDisplayProxy { |
|
6 |
|
|
7 |
private static Display defaultDisplay; |
|
8 |
|
|
9 |
@Override |
|
10 |
public Display getDefault() { |
|
11 |
return defaultDisplay; |
|
12 |
} |
|
13 |
|
|
14 |
@Override |
|
15 |
public void setDefault( Display display ) { |
|
16 |
defaultDisplay = display; |
|
17 |
} |
|
18 |
|
|
19 |
} |
eu.etaxonomy.taxeditor.store.rcp/.classpath | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<classpath> |
|
3 |
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> |
|
4 |
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> |
|
5 |
<classpathentry kind="src" path="src"/> |
|
6 |
<classpathentry kind="output" path="bin"/> |
|
7 |
</classpath> |
eu.etaxonomy.taxeditor.store.rcp/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>eu.etaxonomy.taxeditor.store.rcp</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
<buildCommand> |
|
9 |
<name>org.eclipse.jdt.core.javabuilder</name> |
|
10 |
<arguments> |
|
11 |
</arguments> |
|
12 |
</buildCommand> |
|
13 |
<buildCommand> |
|
14 |
<name>org.eclipse.pde.ManifestBuilder</name> |
|
15 |
<arguments> |
|
16 |
</arguments> |
|
17 |
</buildCommand> |
|
18 |
<buildCommand> |
|
19 |
<name>org.eclipse.pde.SchemaBuilder</name> |
|
20 |
<arguments> |
|
21 |
</arguments> |
|
22 |
</buildCommand> |
|
23 |
</buildSpec> |
|
24 |
<natures> |
|
25 |
<nature>org.eclipse.pde.PluginNature</nature> |
|
26 |
<nature>org.eclipse.jdt.core.javanature</nature> |
|
27 |
</natures> |
|
28 |
</projectDescription> |
eu.etaxonomy.taxeditor.store.rcp/.settings/org.eclipse.jdt.core.prefs | ||
---|---|---|
1 |
#Thu Jul 07 11:12:43 CEST 2011 |
|
2 |
eclipse.preferences.version=1 |
|
3 |
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled |
|
4 |
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 |
|
5 |
org.eclipse.jdt.core.compiler.compliance=1.6 |
|
6 |
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error |
|
7 |
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error |
|
8 |
org.eclipse.jdt.core.compiler.source=1.6 |
eu.etaxonomy.taxeditor.store.rcp/META-INF/MANIFEST.MF | ||
---|---|---|
1 |
Manifest-Version: 1.0 |
|
2 |
Bundle-ManifestVersion: 2 |
|
3 |
Bundle-Name: Rcp |
|
4 |
Bundle-SymbolicName: eu.etaxonomy.taxeditor.store.rcp;singleton:=true |
|
5 |
Bundle-Version: 1.0.0.qualifier |
|
6 |
Fragment-Host: eu.etaxonomy.taxeditor.store;bundle-version="3.0.0.qualifier" |
|
7 |
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 |
eu.etaxonomy.taxeditor.store.rcp/build.properties | ||
---|---|---|
1 |
source.. = src/ |
|
2 |
output.. = bin/ |
|
3 |
bin.includes = META-INF/,\ |
|
4 |
.,\ |
|
5 |
fragment.xml |
eu.etaxonomy.taxeditor.store.rcp/fragment.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<?eclipse version="3.4"?> |
|
3 |
<fragment> |
|
4 |
|
|
5 |
</fragment> |
eu.etaxonomy.taxeditor.store.rcp/src/eu/etaxonomy/taxeditor/store/singlesource/widget/DisplayProxyImpl.java | ||
---|---|---|
1 |
package eu.etaxonomy.taxeditor.store.singlesource.widget; |
|
2 |
|
|
3 |
import org.eclipse.swt.widgets.Display; |
|
4 |
|
|
5 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.IDisplayProxy; |
|
6 |
|
|
7 |
public class DisplayProxyImpl implements IDisplayProxy { |
|
8 |
|
|
9 |
@Override |
|
10 |
public Display getDefault() { |
|
11 |
return Display.getDefault(); |
|
12 |
} |
|
13 |
|
|
14 |
@Override |
|
15 |
public void setDefault(Display display) { |
|
16 |
} |
|
17 |
|
|
18 |
} |
eu.etaxonomy.taxeditor.store/META-INF/MANIFEST.MF | ||
---|---|---|
32 | 32 |
eu.etaxonomy.taxeditor.store, |
33 | 33 |
eu.etaxonomy.taxeditor.store.internal, |
34 | 34 |
eu.etaxonomy.taxeditor.store.operations, |
35 |
eu.etaxonomy.taxeditor.store.singlesource, |
|
36 |
eu.etaxonomy.taxeditor.store.singlesource.widget, |
|
35 | 37 |
eu.etaxonomy.taxeditor.ui.bar, |
36 | 38 |
eu.etaxonomy.taxeditor.ui.dialogs, |
37 | 39 |
eu.etaxonomy.taxeditor.ui.dialogs.filteredSelection, |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ExportManager.java | ||
---|---|---|
27 | 27 |
import eu.etaxonomy.cdm.io.sdd.out.SDDExportConfigurator; |
28 | 28 |
import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter; |
29 | 29 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
30 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
30 | 31 |
|
31 | 32 |
/** |
32 | 33 |
* <p> |
... | ... | |
78 | 79 |
|
79 | 80 |
Assert.isNotNull(configurator, "Configuration may not be null"); |
80 | 81 |
|
81 |
final Display display = Display.getCurrent();
|
|
82 |
final Display display = DisplayProxy.getDefault();
|
|
82 | 83 |
|
83 | 84 |
Job job = new Job("Export: " + configurator.getClass().getSimpleName()) { |
84 | 85 |
@Override |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/ImportManager.java | ||
---|---|---|
31 | 31 |
import eu.etaxonomy.taxeditor.model.CdmProgressMonitorAdapter; |
32 | 32 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
33 | 33 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
34 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
34 | 35 |
|
35 | 36 |
/** |
36 | 37 |
* <p> |
... | ... | |
78 | 79 |
protected Job createIOJob(final IImportConfigurator configurator) { |
79 | 80 |
Assert.isNotNull(configurator, "Configuration may not be null"); |
80 | 81 |
|
81 |
final Display display = Display.getDefault(); |
|
82 |
final Display display = DisplayProxy.getDefault();
|
|
82 | 83 |
|
83 | 84 |
Job job = new Job("Import: " + configurator.getClass().getSimpleName()) { |
84 | 85 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java | ||
---|---|---|
32 | 32 |
import org.eclipse.jface.window.ApplicationWindow; |
33 | 33 |
import org.eclipse.swt.graphics.Color; |
34 | 34 |
import org.eclipse.swt.graphics.Font; |
35 |
import org.eclipse.swt.widgets.Display; |
|
36 | 35 |
import org.eclipse.swt.widgets.Shell; |
37 | 36 |
import org.eclipse.ui.IEditorPart; |
38 | 37 |
import org.eclipse.ui.IViewPart; |
... | ... | |
52 | 51 |
import eu.etaxonomy.taxeditor.operation.AbstractPostOperation; |
53 | 52 |
import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled; |
54 | 53 |
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin; |
54 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
55 | 55 |
import eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer; |
56 | 56 |
import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart; |
57 | 57 |
import eu.etaxonomy.taxeditor.view.supplementaldata.SupplementalDataViewPart; |
... | ... | |
300 | 300 |
*/ |
301 | 301 |
public static void informationDialog(final String title, |
302 | 302 |
final String message) { |
303 |
Display.getDefault().asyncExec(new Runnable() { |
|
303 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
304 | 304 |
|
305 | 305 |
public void run() { |
306 | 306 |
MessageDialog.openInformation(getShell(), title, message); |
... | ... | |
322 | 322 |
*/ |
323 | 323 |
public static void warningDialog(final String title, final Object source, |
324 | 324 |
final String message) { |
325 |
Display.getDefault().asyncExec(new Runnable() { |
|
325 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
326 | 326 |
|
327 | 327 |
public void run() { |
328 | 328 |
MessageDialog.openWarning(getShell(), title, message); |
... | ... | |
351 | 351 |
*/ |
352 | 352 |
public static void errorDialog(final String title, final Object source, |
353 | 353 |
final String message, final Throwable t) { |
354 |
Display.getDefault().asyncExec(new Runnable() { |
|
354 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
355 | 355 |
|
356 | 356 |
public void run() { |
357 | 357 |
MessageDialog.openError(getShell(), title, message + getCauseRecursively(t)); |
... | ... | |
389 | 389 |
*/ |
390 | 390 |
public static void errorDialog(final String title, final Object source, |
391 | 391 |
final IStatus status) { |
392 |
Display.getDefault().asyncExec(new Runnable() { |
|
392 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
393 | 393 |
|
394 | 394 |
public void run() { |
395 | 395 |
MessageDialog.openError(getShell(), title, status.getMessage()); |
... | ... | |
524 | 524 |
* a {@link java.lang.String} object. |
525 | 525 |
*/ |
526 | 526 |
public static void setStatusLine(final String message) { |
527 |
Display.getDefault().asyncExec(new Runnable() { |
|
527 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
528 | 528 |
|
529 | 529 |
public void run() { |
530 | 530 |
statusLineManager.setMessage(message); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/newWizard/AbstractNewEntityWizard.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
import org.eclipse.jface.viewers.IStructuredSelection; |
14 | 14 |
import org.eclipse.jface.wizard.Wizard; |
15 |
import org.eclipse.swt.widgets.Display; |
|
16 | 15 |
import org.eclipse.ui.INewWizard; |
17 | 16 |
import org.eclipse.ui.ISelectionService; |
18 | 17 |
import org.eclipse.ui.IWorkbench; |
... | ... | |
22 | 21 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
23 | 22 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
24 | 23 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
24 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
25 | 25 |
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory; |
26 | 26 |
|
27 | 27 |
/** |
... | ... | |
105 | 105 |
} |
106 | 106 |
this.selection = selection; |
107 | 107 |
|
108 |
formFactory = new CdmFormFactory(Display.getCurrent(), null);
|
|
108 |
formFactory = new CdmFormFactory(DisplayProxy.getDefault(), null);
|
|
109 | 109 |
conversation = CdmStore.createConversation(); |
110 | 110 |
entity = createNewEntity(); |
111 | 111 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/CdmStore.java | ||
---|---|---|
15 | 15 |
|
16 | 16 |
import org.eclipse.core.runtime.IProgressMonitor; |
17 | 17 |
import org.eclipse.core.runtime.jobs.Job; |
18 |
import org.eclipse.swt.widgets.Display; |
|
19 | 18 |
import org.springframework.core.io.ClassPathResource; |
20 | 19 |
import org.springframework.core.io.Resource; |
21 | 20 |
import org.springframework.security.authentication.ProviderManager; |
... | ... | |
33 | 32 |
import eu.etaxonomy.taxeditor.io.ImportManager; |
34 | 33 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
35 | 34 |
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin; |
35 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
36 | 36 |
import eu.etaxonomy.taxeditor.view.datasource.CdmDataSourceViewPart; |
37 | 37 |
|
38 | 38 |
/** |
... | ... | |
136 | 136 |
final Resource applicationContextBean) { |
137 | 137 |
StoreUtil.info("Connecting to datasource: " + datasource); |
138 | 138 |
|
139 |
job = new CdmStoreConnector(Display.getDefault(), datasource, |
|
139 |
job = new CdmStoreConnector(DisplayProxy.getDefault(), datasource,
|
|
140 | 140 |
dbSchemaValidation, applicationContextBean); |
141 | 141 |
job.setUser(true); |
142 | 142 |
job.setPriority(Job.BUILD); |
... | ... | |
155 | 155 |
* a {@link org.eclipse.core.runtime.IProgressMonitor} object. |
156 | 156 |
*/ |
157 | 157 |
public static void close(final IProgressMonitor monitor) { |
158 |
Display.getDefault().asyncExec(new Runnable() { |
|
158 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
159 | 159 |
/* |
160 | 160 |
* (non-Javadoc) |
161 | 161 |
* |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/SearchManager.java | ||
---|---|---|
15 | 15 |
import java.util.List; |
16 | 16 |
|
17 | 17 |
import org.eclipse.jface.dialogs.MessageDialog; |
18 |
import org.eclipse.swt.widgets.Display; |
|
19 | 18 |
|
20 | 19 |
import eu.etaxonomy.cdm.api.service.IAgentService; |
21 | 20 |
import eu.etaxonomy.cdm.api.service.IGroupService; |
... | ... | |
29 | 28 |
import eu.etaxonomy.cdm.model.agent.AgentBase; |
30 | 29 |
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase; |
31 | 30 |
import eu.etaxonomy.cdm.model.common.Group; |
32 |
import eu.etaxonomy.cdm.model.common.IIdentifiableEntity; |
|
33 | 31 |
import eu.etaxonomy.cdm.model.common.RelationshipBase; |
34 | 32 |
import eu.etaxonomy.cdm.model.common.User; |
35 | 33 |
import eu.etaxonomy.cdm.model.common.UuidAndTitleCache; |
... | ... | |
41 | 39 |
import eu.etaxonomy.cdm.model.taxon.TaxonBase; |
42 | 40 |
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys; |
43 | 41 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
42 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
44 | 43 |
|
45 | 44 |
/** |
46 | 45 |
* @author n.hoffmann |
... | ... | |
180 | 179 |
*/ |
181 | 180 |
private boolean checkLargeResult(int count) { |
182 | 181 |
if(count > MAX_RESULTS_BEFORE_WARNING){ |
183 |
return MessageDialog.openConfirm(Display.getDefault().getActiveShell(), "Large result expected", |
|
182 |
return MessageDialog.openConfirm(DisplayProxy.getDefault().getActiveShell(), "Large result expected",
|
|
184 | 183 |
String.format("The current search will return %s objects. This will " + |
185 | 184 |
"take a long time and/or might render the editor unusable. Please consider refining your search.", count)); |
186 | 185 |
}else{ |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/singlesource/ImplementationLoader.java | ||
---|---|---|
1 |
/** |
|
2 |
* |
|
3 |
*/ |
|
4 |
package eu.etaxonomy.taxeditor.store.singlesource; |
|
5 |
|
|
6 |
/** |
|
7 |
* @author Lutz Suhrbier |
|
8 |
* |
|
9 |
*/ |
|
10 |
public class ImplementationLoader { |
|
11 |
|
|
12 |
public static Object newInstance(final Class<?> type){ |
|
13 |
String name = type.getName(); |
|
14 |
Object result = null; |
|
15 |
try { |
|
16 |
result = type.getClassLoader().loadClass(name + "Impl").newInstance(); |
|
17 |
} catch (InstantiationException e) { |
|
18 |
e.printStackTrace(); |
|
19 |
} catch (IllegalAccessException e) { |
|
20 |
e.printStackTrace(); |
|
21 |
} catch (ClassNotFoundException e) { |
|
22 |
e.printStackTrace(); |
|
23 |
} |
|
24 |
return result; |
|
25 |
} |
|
26 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/singlesource/widget/DisplayProxy.java | ||
---|---|---|
1 |
package eu.etaxonomy.taxeditor.store.singlesource.widget; |
|
2 |
|
|
3 |
import org.eclipse.swt.widgets.Display; |
|
4 |
|
|
5 |
import eu.etaxonomy.taxeditor.store.singlesource.ImplementationLoader; |
|
6 |
|
|
7 |
public class DisplayProxy { |
|
8 |
private final static IDisplayProxy DISPLAY_PROXY; |
|
9 |
static{ |
|
10 |
DISPLAY_PROXY = (IDisplayProxy) ImplementationLoader.newInstance(DisplayProxy.class); |
|
11 |
} |
|
12 |
|
|
13 |
public static Display getDefault(){ |
|
14 |
return DISPLAY_PROXY.getDefault(); |
|
15 |
} |
|
16 |
|
|
17 |
public static void setDefault(Display display){ |
|
18 |
DISPLAY_PROXY.setDefault(display); |
|
19 |
} |
|
20 |
|
|
21 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/store/singlesource/widget/IDisplayProxy.java | ||
---|---|---|
1 |
/** |
|
2 |
* |
|
3 |
*/ |
|
4 |
package eu.etaxonomy.taxeditor.store.singlesource.widget; |
|
5 |
|
|
6 |
import org.eclipse.swt.widgets.Display; |
|
7 |
|
|
8 |
/** |
|
9 |
* @author Lutz Suhrbier |
|
10 |
* |
|
11 |
*/ |
|
12 |
public interface IDisplayProxy { |
|
13 |
|
|
14 |
public Display getDefault(); |
|
15 |
|
|
16 |
public void setDefault(Display display); |
|
17 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/AbstractFormSection.java | ||
---|---|---|
22 | 22 |
import org.eclipse.swt.graphics.Color; |
23 | 23 |
import org.eclipse.swt.widgets.Composite; |
24 | 24 |
import org.eclipse.swt.widgets.Control; |
25 |
import org.eclipse.swt.widgets.Display; |
|
26 | 25 |
import org.eclipse.swt.widgets.TypedListener; |
27 | 26 |
import org.eclipse.swt.widgets.Widget; |
28 | 27 |
import org.eclipse.ui.forms.widgets.Section; |
... | ... | |
33 | 32 |
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled; |
34 | 33 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
35 | 34 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
35 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
36 | 36 |
|
37 | 37 |
/** |
38 | 38 |
* <p>Abstract AbstractFormSection class.</p> |
... | ... | |
265 | 265 |
/** {@inheritDoc} */ |
266 | 266 |
public void setSelected(boolean selected) { |
267 | 267 |
if(selected){ |
268 |
setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_LIST_SELECTION));
|
|
268 |
setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_LIST_SELECTION));
|
|
269 | 269 |
}else{ |
270 |
setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
|
270 |
setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_WHITE));
|
|
271 | 271 |
} |
272 | 272 |
} |
273 | 273 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ISelectable.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
import org.eclipse.swt.SWT; |
14 | 14 |
import org.eclipse.swt.graphics.Color; |
15 |
import org.eclipse.swt.widgets.Display; |
|
15 |
|
|
16 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
16 | 17 |
|
17 | 18 |
|
18 | 19 |
/** |
... | ... | |
25 | 26 |
public interface ISelectable{ |
26 | 27 |
|
27 | 28 |
/** Constant <code>SELECTED</code> */ |
28 |
public static Color SELECTED = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_SELECTION);
|
|
29 |
public static Color SELECTED = DisplayProxy.getDefault().getSystemColor(SWT.COLOR_LIST_SELECTION);
|
|
29 | 30 |
/** Constant <code>NOT_SELECTED</code> */ |
30 |
public static Color NOT_SELECTED = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);
|
|
31 |
public static Color NOT_SELECTED = DisplayProxy.getDefault().getSystemColor(SWT.COLOR_WHITE);
|
|
31 | 32 |
|
32 | 33 |
/** |
33 | 34 |
* <p>setSelected</p> |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/ImageElement.java | ||
---|---|---|
33 | 33 |
|
34 | 34 |
import eu.etaxonomy.cdm.common.UriUtils; |
35 | 35 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
36 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
36 | 37 |
|
37 | 38 |
/** |
38 | 39 |
* <p>ImageElement class.</p> |
... | ... | |
85 | 86 |
public void initImageUri(URI uri) throws IOException, HttpException { |
86 | 87 |
this.imageUri = uri; |
87 | 88 |
InputStream imageStream = UriUtils.getInputStream(imageUri); |
88 |
image = new Image(Display.getCurrent(), imageStream);
|
|
89 |
image = new Image(DisplayProxy.getDefault(), imageStream);
|
|
89 | 90 |
} |
90 | 91 |
|
91 | 92 |
|
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/NumberWithLabelElement.java | ||
---|---|---|
12 | 12 |
|
13 | 13 |
import org.eclipse.swt.SWT; |
14 | 14 |
import org.eclipse.swt.events.ModifyEvent; |
15 |
import org.eclipse.swt.widgets.Display; |
|
16 | 15 |
|
17 | 16 |
import eu.etaxonomy.cdm.common.CdmUtils; |
17 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
18 | 18 |
|
19 | 19 |
|
20 | 20 |
/** |
... | ... | |
116 | 116 |
public void modifyText(ModifyEvent event) { |
117 | 117 |
String value = text.getText(); |
118 | 118 |
if(CdmUtils.isEmpty(value)){ |
119 |
text.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
|
119 |
text.setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_WHITE));
|
|
120 | 120 |
return; |
121 | 121 |
} |
122 | 122 |
|
... | ... | |
129 | 129 |
} |
130 | 130 |
|
131 | 131 |
}catch(NumberFormatException e){ |
132 |
text.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
|
|
132 |
text.setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_RED));
|
|
133 | 133 |
firePropertyChangeEvent(new CdmPropertyChangeEvent(this, e)); |
134 | 134 |
return; |
135 | 135 |
} |
136 | 136 |
|
137 | 137 |
exception = null; |
138 |
text.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
|
|
138 |
text.setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_WHITE));
|
|
139 | 139 |
|
140 | 140 |
super.modifyText(event); |
141 | 141 |
} |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/forms/password/PasswordWizard.java | ||
---|---|---|
11 | 11 |
package eu.etaxonomy.taxeditor.ui.forms.password; |
12 | 12 |
|
13 | 13 |
import org.eclipse.jface.wizard.Wizard; |
14 |
import org.eclipse.swt.widgets.Display; |
|
15 | 14 |
|
16 | 15 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
17 | 16 |
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled; |
... | ... | |
19 | 18 |
import eu.etaxonomy.cdm.model.common.User; |
20 | 19 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
21 | 20 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
21 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
22 | 22 |
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory; |
23 | 23 |
|
24 | 24 |
/** |
... | ... | |
42 | 42 |
*/ |
43 | 43 |
@Override |
44 | 44 |
public void addPages() { |
45 |
CdmFormFactory formFactory = new CdmFormFactory(Display.getDefault()); |
|
45 |
CdmFormFactory formFactory = new CdmFormFactory(DisplayProxy.getDefault());
|
|
46 | 46 |
|
47 | 47 |
// if(CdmStore.getLoginManager().isAdmin()){ |
48 | 48 |
// |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/openurl/OpenUrlSelectorWizard.java | ||
---|---|---|
14 | 14 |
import java.util.List; |
15 | 15 |
|
16 | 16 |
import org.eclipse.jface.wizard.Wizard; |
17 |
import org.eclipse.swt.widgets.Display; |
|
18 | 17 |
|
19 | 18 |
import eu.etaxonomy.cdm.ext.openurl.MobotOpenUrlQuery; |
20 | 19 |
import eu.etaxonomy.cdm.ext.openurl.MobotOpenUrlServiceWrapper; |
... | ... | |
23 | 22 |
import eu.etaxonomy.cdm.model.reference.Reference; |
24 | 23 |
import eu.etaxonomy.taxeditor.preference.IPreferenceKeys; |
25 | 24 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
25 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
26 | 26 |
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory; |
27 | 27 |
|
28 | 28 |
/** |
... | ... | |
63 | 63 |
setWindowTitle("Mobot Open Url"); |
64 | 64 |
setNeedsProgressMonitor(true); |
65 | 65 |
|
66 |
formFactory = new CdmFormFactory(Display.getDefault()); |
|
66 |
formFactory = new CdmFormFactory(DisplayProxy.getDefault());
|
|
67 | 67 |
|
68 | 68 |
openUrlServiceWrapper = new MobotOpenUrlServiceWrapper(); |
69 | 69 |
openUrlServiceWrapper.setBaseUrl(PreferencesUtil.getPreferenceStore().getString(IPreferenceKeys.OPENURL_ACCESS_POINT)); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/NaturalLanguageDetailElement.java | ||
---|---|---|
26 | 26 |
import eu.etaxonomy.taxeditor.preference.PreferencesUtil; |
27 | 27 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
28 | 28 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
29 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
29 | 30 |
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory; |
30 | 31 |
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement; |
31 | 32 |
import eu.etaxonomy.taxeditor.ui.forms.LabelElement; |
... | ... | |
84 | 85 |
private TaxonDescription entity; |
85 | 86 |
private NaturalLanguageGenerator generator = new NaturalLanguageGenerator(); |
86 | 87 |
private FeatureTree featureTree = PreferencesUtil.getDefaultFeatureTreeForStructuredDescription(); |
87 |
private Display display = Display.getCurrent();
|
|
88 |
private Display display = DisplayProxy.getDefault();
|
|
88 | 89 |
|
89 | 90 |
public FetchNaturalLanguageDescriptionJob(String jobName, TaxonDescription entity){ |
90 | 91 |
super(jobName); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/taxon/ParsingMessageElement.java | ||
---|---|---|
14 | 14 |
import org.eclipse.swt.SWT; |
15 | 15 |
import org.eclipse.swt.graphics.Color; |
16 | 16 |
import org.eclipse.swt.widgets.Composite; |
17 |
import org.eclipse.swt.widgets.Display; |
|
18 | 17 |
import org.eclipse.swt.widgets.Label; |
19 | 18 |
|
20 | 19 |
import eu.etaxonomy.cdm.strategy.parser.ParserProblem; |
21 | 20 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
21 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
22 | 22 |
import eu.etaxonomy.taxeditor.ui.forms.AbstractCdmFormElement; |
23 | 23 |
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory; |
24 | 24 |
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement; |
... | ... | |
64 | 64 |
|
65 | 65 |
private Color getColor(){ |
66 | 66 |
if(parserProblem.isError()){ |
67 |
return Display.getCurrent().getSystemColor(SWT.COLOR_RED);
|
|
67 |
return DisplayProxy.getDefault().getSystemColor(SWT.COLOR_RED);
|
|
68 | 68 |
} |
69 | 69 |
|
70 | 70 |
if(parserProblem.isWarning()){ |
71 |
return Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW);
|
|
71 |
return DisplayProxy.getDefault().getSystemColor(SWT.COLOR_YELLOW);
|
|
72 | 72 |
} |
73 | 73 |
// we should never get here |
74 | 74 |
return null; |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationMetaDataWizardPage.java | ||
---|---|---|
14 | 14 |
import org.eclipse.swt.SWT; |
15 | 15 |
import org.eclipse.swt.custom.SashForm; |
16 | 16 |
import org.eclipse.swt.widgets.Composite; |
17 |
import org.eclipse.swt.widgets.Display; |
|
18 | 17 |
|
18 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
19 | 19 |
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory; |
20 | 20 |
|
21 | 21 |
/** |
... | ... | |
36 | 36 |
super("TranslationMetaDataWizardPage"); |
37 | 37 |
setTitle("See information about existing translations"); |
38 | 38 |
|
39 |
formFactory = new CdmFormFactory(Display.getCurrent());
|
|
39 |
formFactory = new CdmFormFactory(DisplayProxy.getDefault());
|
|
40 | 40 |
} |
41 | 41 |
|
42 | 42 |
/* (non-Javadoc) |
... | ... | |
46 | 46 |
@Override |
47 | 47 |
public void createControl(Composite parent) { |
48 | 48 |
Composite control = formFactory.createComposite(parent); |
49 |
// control.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GREEN));
|
|
49 |
// control.setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_GREEN));
|
|
50 | 50 |
control.setLayout(CdmFormFactory.LAYOUT(1, false)); |
51 | 51 |
SashForm sash = new SashForm(control, SWT.HORIZONTAL); |
52 | 52 |
sash.setLayoutData(CdmFormFactory.FILL()); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/translation/TranslationWizardPage.java | ||
---|---|---|
23 | 23 |
import org.eclipse.swt.events.SelectionEvent; |
24 | 24 |
import org.eclipse.swt.widgets.Button; |
25 | 25 |
import org.eclipse.swt.widgets.Composite; |
26 |
import org.eclipse.swt.widgets.Display; |
|
27 | 26 |
|
28 | 27 |
import eu.etaxonomy.cdm.model.common.Language; |
29 | 28 |
import eu.etaxonomy.cdm.model.common.LanguageString; |
30 | 29 |
import eu.etaxonomy.cdm.model.common.MultilanguageTextHelper; |
31 | 30 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
32 | 31 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
32 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
33 | 33 |
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory; |
34 | 34 |
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory.TermComboType; |
35 | 35 |
import eu.etaxonomy.taxeditor.ui.forms.ICdmFormElement; |
... | ... | |
74 | 74 |
Assert.isNotNull(multilanguageText, "Multilanguage text may not be null"); |
75 | 75 |
setTitle("Add or edit translations."); |
76 | 76 |
this.multilanguageText = multilanguageText; |
77 |
formFactory = new CdmFormFactory(Display.getCurrent());
|
|
77 |
formFactory = new CdmFormFactory(DisplayProxy.getDefault());
|
|
78 | 78 |
} |
79 | 79 |
|
80 | 80 |
/* (non-Javadoc) |
... | ... | |
84 | 84 |
@Override |
85 | 85 |
public void createControl(Composite parent) { |
86 | 86 |
Composite control = formFactory.createComposite(parent); |
87 |
// control.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GREEN));
|
|
87 |
// control.setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_GREEN));
|
|
88 | 88 |
control.setLayout(CdmFormFactory.LAYOUT(2, true)); |
89 | 89 |
|
90 | 90 |
Composite leftContainer = formFactory.createComposite(control); |
91 | 91 |
leftContainer.setLayoutData(CdmFormFactory.FILL()); |
92 | 92 |
leftContainer.setLayout(CdmFormFactory.LAYOUT(1, false)); |
93 |
// leftContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_BLUE));
|
|
93 |
// leftContainer.setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_BLUE));
|
|
94 | 94 |
RootElement leftRoot = new RootElement(formFactory, leftContainer); |
95 | 95 |
|
96 | 96 |
Composite rightContainer = formFactory.createComposite(control); |
97 | 97 |
rightContainer.setLayoutData(CdmFormFactory.FILL()); |
98 | 98 |
rightContainer.setLayout(CdmFormFactory.LAYOUT(1, false)); |
99 |
// rightContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
|
|
99 |
// rightContainer.setBackground(DisplayProxy.getDefault().getSystemColor(SWT.COLOR_RED));
|
|
100 | 100 |
RootElement rightRoot = new RootElement(formFactory, rightContainer); |
101 | 101 |
|
102 | 102 |
createLeftControls(leftRoot); |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/AbstractCdmDataViewer.java | ||
---|---|---|
15 | 15 |
import org.eclipse.jface.viewers.Viewer; |
16 | 16 |
import org.eclipse.swt.widgets.Composite; |
17 | 17 |
import org.eclipse.swt.widgets.Control; |
18 |
import org.eclipse.swt.widgets.Display; |
|
19 | 18 |
import org.eclipse.ui.forms.IFormPart; |
20 | 19 |
import org.eclipse.ui.forms.ManagedForm; |
21 | 20 |
import org.eclipse.ui.forms.widgets.ScrolledForm; |
... | ... | |
23 | 22 |
import eu.etaxonomy.cdm.api.conversation.ConversationHolder; |
24 | 23 |
import eu.etaxonomy.cdm.api.conversation.IConversationEnabled; |
25 | 24 |
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap; |
25 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
26 | 26 |
import eu.etaxonomy.taxeditor.ui.forms.AbstractFormSection; |
27 | 27 |
import eu.etaxonomy.taxeditor.ui.forms.CdmFormFactory; |
28 | 28 |
import eu.etaxonomy.taxeditor.ui.forms.RootElement; |
... | ... | |
91 | 91 |
formFactory.dispose(); |
92 | 92 |
formFactory = null; |
93 | 93 |
} |
94 |
formFactory = new CdmFormFactory(Display.getCurrent(), this);
|
|
94 |
formFactory = new CdmFormFactory(DisplayProxy.getDefault(), this);
|
|
95 | 95 |
} |
96 | 96 |
|
97 | 97 |
protected void markViewPartDirty(){ |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmDataSourceViewPart.java | ||
---|---|---|
36 | 36 |
import org.eclipse.swt.layout.FillLayout; |
37 | 37 |
import org.eclipse.swt.widgets.Composite; |
38 | 38 |
import org.eclipse.swt.widgets.Control; |
39 |
import org.eclipse.swt.widgets.Display; |
|
40 | 39 |
import org.eclipse.swt.widgets.Menu; |
41 | 40 |
import org.eclipse.swt.widgets.Table; |
42 | 41 |
import org.eclipse.swt.widgets.TableColumn; |
... | ... | |
53 | 52 |
import eu.etaxonomy.taxeditor.model.IContextListener; |
54 | 53 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
55 | 54 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
55 |
import eu.etaxonomy.taxeditor.store.singlesource.widget.DisplayProxy; |
|
56 | 56 |
|
57 | 57 |
/** |
58 | 58 |
* <p>CdmDataSourceViewPart class.</p> |
... | ... | |
121 | 121 |
monitor.worked(1); |
122 | 122 |
} |
123 | 123 |
|
124 |
Display.getDefault().asyncExec(new Runnable() { |
|
124 |
DisplayProxy.getDefault().asyncExec(new Runnable() {
|
|
125 | 125 |
|
126 | 126 |
@Override |
127 | 127 |
public void run() { |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmMetaDataAwareDataSourceContainer.java | ||
---|---|---|
19 | 19 |
import org.eclipse.core.runtime.Status; |
20 | 20 |
import org.eclipse.core.runtime.jobs.Job; |
Also available in: Unified diff
Replaced any Display.getDefault() & Display,getCurrent() by DisplayProxy.getDefault() which is implemented in fragment store.rcp or store.rap respectively