Revision fdc6d8ed
Added by Andreas Müller over 3 years ago
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/e4/BulkEditorE4Composite.java | ||
---|---|---|
6 | 6 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
7 | 7 |
* See LICENSE.TXT at the top of this package for the full license terms. |
8 | 8 |
*/ |
9 |
|
|
10 | 9 |
package eu.etaxonomy.taxeditor.bulkeditor.e4; |
11 | 10 |
|
12 | 11 |
import java.io.File; |
... | ... | |
88 | 87 |
import eu.etaxonomy.taxeditor.store.StoreUtil; |
89 | 88 |
|
90 | 89 |
/** |
91 |
* |
|
92 | 90 |
* @author pplitzner |
93 | 91 |
* @since Sep 8, 2017 |
94 |
* |
|
95 | 92 |
*/ |
96 | 93 |
public class BulkEditorE4Composite extends Composite { |
97 | 94 |
|
... | ... | |
127 | 124 |
@Inject |
128 | 125 |
private IEventBroker eventBroker; |
129 | 126 |
|
130 |
|
|
127 |
|
|
131 | 128 |
public BulkEditorE4Composite(BulkEditorE4 bulkEditor, Composite parent, int style) { |
132 | 129 |
super(parent, style); |
133 | 130 |
parent.setLayout(new GridLayout()); |
... | ... | |
146 | 143 |
bottomComposite.setLayout(new GridLayout()); |
147 | 144 |
} |
148 | 145 |
|
149 |
@SuppressWarnings("unused") |
|
150 | 146 |
public void init(AbstractBulkEditorInput<?> input){ |
151 | 147 |
|
152 | 148 |
input.getPropertyKeys().forEach(key->columnList.add(key)); |
... | ... | |
174 | 170 |
selectionListener.setFullySelectedRowsOnly(false); |
175 | 171 |
|
176 | 172 |
bottomComposite.layout(); |
177 |
|
|
178 | 173 |
} |
179 | 174 |
|
180 | 175 |
private void createTable(){ |
... | ... | |
300 | 295 |
UiBindingRegistry uiBindingRegistry) { |
301 | 296 |
// add e4 menu to NatTable |
302 | 297 |
new PopupMenuBuilder(natTable, e4Menu) |
303 |
.withHideColumnMenuItem() |
|
304 |
.withShowAllColumnsMenuItem() |
|
305 |
.build(); |
|
298 |
.withHideColumnMenuItem()
|
|
299 |
.withShowAllColumnsMenuItem()
|
|
300 |
.build();
|
|
306 | 301 |
|
307 | 302 |
// register the UI binding for header, corner and body region |
308 | 303 |
uiBindingRegistry.registerMouseDownBinding( |
... | ... | |
314 | 309 |
} |
315 | 310 |
}); |
316 | 311 |
|
317 |
|
|
318 | 312 |
//enable sorting |
319 | 313 |
natTable.addConfiguration(new SingleClickSortConfiguration()); |
320 | 314 |
|
... | ... | |
369 | 363 |
|
370 | 364 |
} |
371 | 365 |
|
372 |
/** {@inheritDoc} |
|
373 |
* @param selection */ |
|
374 | 366 |
public void performSearch(BulkEditorQuery query, IStructuredSelection selection) { |
375 | 367 |
if (query != null) { |
376 | 368 |
if(StoreUtil.promptCheckIsDirty(bulkEditor)){ |
... | ... | |
451 | 443 |
File getStatePropertiesFile() { |
452 | 444 |
return bulkEditorSearch.getStatePropertiesFile(); |
453 | 445 |
} |
454 |
|
|
455 | 446 |
} |
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/FactualDataPartE4.java | ||
---|---|---|
127 | 127 |
} |
128 | 128 |
|
129 | 129 |
Object partObject = createPartObject(activePart); |
130 |
|
|
131 |
|
|
130 |
|
|
131 |
|
|
132 | 132 |
|
133 | 133 |
if ((partObject instanceof DetailsPartE4 && !(selection instanceof TaxonName))|| partObject instanceof SupplementalDataPartE4 |
134 | 134 |
|| partObject instanceof MediaViewPartE4 || partObject instanceof ConceptViewPartE4 || ((partObject instanceof AbstractCdmEditorPartE4) &&(((AbstractCdmEditorPartE4)partObject).getViewer().getInput() instanceof DescriptionElementBase))) { |
... | ... | |
206 | 206 |
((TreeViewer) viewer).setExpandedElements(expandedObjects); |
207 | 207 |
if(object instanceof DescriptionElementBase){ |
208 | 208 |
DescriptionElementBase descriptionElement = (DescriptionElementBase) object; |
209 |
DescriptionBase description = descriptionElement.getInDescription(); |
|
209 |
DescriptionBase<?> description = descriptionElement.getInDescription();
|
|
210 | 210 |
FeatureNodeContainerTree containerTree = featureNodeContainerCache.get(description); |
211 | 211 |
FeatureNodeContainer featureNodeContainer = containerTree.getFeatureNodeContainerForDescriptionElement(descriptionElement); |
212 | 212 |
if (featureNodeContainer == null){ |
Also available in: Unified diff
cleanup