15 |
15 |
import java.util.Arrays;
|
16 |
16 |
import java.util.List;
|
17 |
17 |
|
|
18 |
import org.eclipse.jface.wizard.WizardPage;
|
18 |
19 |
import org.eclipse.swt.SWT;
|
19 |
20 |
import org.eclipse.swt.widgets.Display;
|
20 |
21 |
import org.eclipse.swt.widgets.Label;
|
... | ... | |
30 |
31 |
import eu.etaxonomy.cdm.model.reference.ReferenceType;
|
31 |
32 |
import eu.etaxonomy.taxeditor.store.CdmStore;
|
32 |
33 |
import eu.etaxonomy.taxeditor.ui.combo.EnumComboElement;
|
|
34 |
import eu.etaxonomy.taxeditor.ui.element.AbstractCdmEntityWizardPage;
|
33 |
35 |
import eu.etaxonomy.taxeditor.ui.element.CdmFormFactory;
|
34 |
36 |
import eu.etaxonomy.taxeditor.ui.element.CdmPropertyChangeEvent;
|
35 |
37 |
import eu.etaxonomy.taxeditor.ui.element.ICdmFormElement;
|
... | ... | |
113 |
115 |
@Override
|
114 |
116 |
protected void createControls(ICdmFormElement formElement,
|
115 |
117 |
Reference entity, int style) {
|
|
118 |
ICdmFormElement o = this.getParentElement();
|
|
119 |
Class clazz=o.getClass();
|
116 |
120 |
setWarnForReferencingObjects(formElement);
|
117 |
121 |
|
|
122 |
|
118 |
123 |
toggleable_cache = formFactory.createToggleableTextField(formElement,
|
119 |
124 |
"Reference Cache", entity.getTitleCache(),
|
120 |
125 |
entity.isProtectedTitleCache(), style);
|
... | ... | |
615 |
620 |
}else{
|
616 |
621 |
warnForReferencedObjects.setText(CdmUtils.Nz("The reference is referenced by " + referencingObjectsCount+ " objects, if you change it, it is changed for all these objects"));
|
617 |
622 |
}
|
|
623 |
warnForReferencedObjects.setVisible(false);
|
618 |
624 |
}
|
619 |
625 |
}
|
620 |
626 |
|
|
627 |
public void setWarnForReferencingObjectsVisible(boolean isVisible){
|
|
628 |
if (warnForReferencedObjects != null){
|
|
629 |
warnForReferencedObjects.setVisible(isVisible);
|
|
630 |
}
|
|
631 |
}
|
|
632 |
|
|
633 |
|
621 |
634 |
}
|
ref #5972: the wizard warns the user if the reference is used ssomewhere else