Revision 0fa0610e
Added by Patrick Plitzner over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java | ||
---|---|---|
46 | 46 |
import org.eclipse.core.runtime.jobs.ISchedulingRule; |
47 | 47 |
import org.eclipse.core.runtime.jobs.Job; |
48 | 48 |
import org.eclipse.e4.ui.model.application.ui.basic.MPart; |
49 |
import org.eclipse.e4.ui.workbench.modeling.EPartService; |
|
49 | 50 |
import org.eclipse.jface.action.IStatusLineManager; |
50 | 51 |
import org.eclipse.jface.operation.IRunnableWithProgress; |
51 | 52 |
import org.eclipse.jface.resource.ColorRegistry; |
... | ... | |
88 | 89 |
import eu.etaxonomy.taxeditor.store.CdmStore; |
89 | 90 |
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin; |
90 | 91 |
import eu.etaxonomy.taxeditor.ui.dialog.ReportTextDialog; |
91 |
import eu.etaxonomy.taxeditor.view.AbstractCdmDataViewer;
|
|
92 |
import eu.etaxonomy.taxeditor.view.detail.DetailsViewPart;
|
|
92 |
import eu.etaxonomy.taxeditor.view.e4.AbstractCdmDataViewerE4;
|
|
93 |
import eu.etaxonomy.taxeditor.view.e4.details.DetailsPartE4;
|
|
93 | 94 |
import eu.etaxonomy.taxeditor.workbench.part.IE4SavablePart; |
94 | 95 |
|
95 | 96 |
/** |
... | ... | |
614 | 615 |
return null; |
615 | 616 |
} |
616 | 617 |
|
617 |
public static DetailsViewPart getDetailsView() { |
|
618 |
return (DetailsViewPart) getView(DetailsViewPart.ID, false); |
|
618 |
public static DetailsPartE4 getDetailsView(EPartService partService) { |
|
619 |
MPart part = partService.findPart("eu.etaxonomy.taxeditor.view.e4.details.DetailsPartE4"); |
|
620 |
if(part!=null){ |
|
621 |
return (DetailsPartE4) part.getObject(); |
|
622 |
} |
|
623 |
return null; |
|
619 | 624 |
} |
620 | 625 |
|
621 |
public static void refreshDetailsViewer() { |
|
622 |
if (getDetailsView() != null) { |
|
623 |
((AbstractCdmDataViewer) getDetailsView().getViewer()).refresh();
|
|
626 |
public static void refreshDetailsViewer(EPartService partService) {
|
|
627 |
if (getDetailsView(partService) != null) {
|
|
628 |
((AbstractCdmDataViewerE4) getDetailsView(partService).getViewer()).refresh();
|
|
624 | 629 |
} |
625 | 630 |
} |
626 | 631 |
|
627 |
public static void reflowDetailsViewer() { |
|
628 |
if (getDetailsView() != null) { |
|
629 |
((AbstractCdmDataViewer) getDetailsView().getViewer()).reflow();
|
|
632 |
public static void reflowDetailsViewer(EPartService partService) {
|
|
633 |
if (getDetailsView(partService) != null) {
|
|
634 |
((AbstractCdmDataViewerE4) getDetailsView(partService).getViewer()).reflow();
|
|
630 | 635 |
} |
631 | 636 |
} |
632 | 637 |
|
Also available in: Unified diff
ref #6913 Remove org.eclipse.ui dependency from AbstractUtility