import org.eclipse.core.commands.operations.IOperationHistory;
import org.eclipse.core.commands.operations.IUndoContext;
import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
import eu.etaxonomy.cdm.api.facade.DerivedUnitFacade;
import eu.etaxonomy.cdm.model.common.CdmBase;
statusLineManager = manager;
}
+ public static void reflowParentScrolledForm(Composite composite, boolean flushCashes){
+ ScrolledForm scrolledForm = null;
+ Composite parent = composite;
+ while(parent!=null && !(parent instanceof ScrolledForm)){
+ parent = parent.getParent();
+ }
+ scrolledForm = (ScrolledForm)parent;
+ if(scrolledForm!=null){
+ scrolledForm.reflow(flushCashes);
+ scrolledForm.redraw();
+ }
+ }
+
/**
* <p>getUndoContext</p>
return TaxeditorStorePlugin.PLUGIN_ID;
}
- /**
- *
- * @return
- */
- public static IEditorInput getActiveEditorInput() {
- IEditorPart activeEditor = getActiveEditor();
- if (activeEditor != null){
- return activeEditor.getEditorInput();
- }
- return null;
+ /**
+ * Cleans title string for output in section titles<br>
+ * E.g. escapes '&' with "&&" to avoid mnemonic handling (see
+ * Label.setText() documentation)<br>
+ * see also #4302
+ *
+ * @param title
+ * the title string to clean
+ * @return the cleaned title string
+ */
+ public static String cleanTitleString(String title){
+ return title.replace("&", "&&");
}
+
}