+
+ /**
+ * enables/disables nested composite. <br>
+ *
+ * @param ctrl - Composite to be en-/disabeld
+ * @param enabled - boolean
+ */
+ public static void recursiveSetEnabled(Control ctrl, boolean enabled) {
+ if (ctrl instanceof Composite) {
+ Composite comp = (Composite) ctrl;
+ for (Control c : comp.getChildren()) {
+ recursiveSetEnabled(c, enabled);
+ }
+ } else {
+ ctrl.setEnabled(enabled);
+ }
+ }
+
+ /**
+ * <p>
+ * getSortRanksNaturally
+ * </p>
+ *
+ * @return a boolean.
+ */
+ public static boolean getSortNodesNaturally() {
+ return getPreferenceStore().getBoolean(SORT_NODES_NATURALLY);
+ }
+
+ /**
+ * <p>
+ * setSortRanksNaturally
+ * </p>
+ *
+ * @param selection
+ * a boolean.
+ */
+ public static void setSortNodesNaturally(boolean selection) {
+ getPreferenceStore().setValue(SORT_NODES_NATURALLY, selection);
+ }
+
+
+ /**
+ * <p>
+ * getSortRanksNaturally
+ * </p>
+ *
+ * @return a boolean.
+ */
+ public static boolean getSortNodesStrictlyAlphabetically() {
+ return getPreferenceStore().getBoolean(SORT_NODES_ALPHABETICALLY);
+ }
+
+ /**
+ * <p>
+ * setSortRanksNaturally
+ * </p>
+ *
+ * @param selection
+ * a boolean.
+ */
+ public static void setSortNodesStrictlyAlphabetically(boolean selection) {
+ getPreferenceStore().setValue(SORT_NODES_ALPHABETICALLY, selection);
+ }
+
+ /**
+ * <p>
+ * setStoreNavigatorState
+ * </p>
+ *
+ * @param selection
+ * a boolean.
+ */
+ public static boolean isStoreNavigatorState() {
+ return getPreferenceStore().getBoolean(RESTORE_NAVIGATOR_STATE);
+
+ }
+
+ /**
+ * <p>
+ * setStoreNavigatorState
+ * </p>
+ *
+ * @param selection
+ * a boolean.
+ */
+ public static void setStoreNavigatorState(boolean selection) {
+ getPreferenceStore().setValue(RESTORE_NAVIGATOR_STATE, selection);
+
+ }
+
+ /**
+ * @return
+ */
+ public static boolean isShowUpWidgetIsDisposedMessages() {
+ return getPreferenceStore().getBoolean(IS_SHOW_UP_WIDGET_IS_DISPOSED);
+ }
+ public static void setShowUpWidgetIsDisposedMessages(boolean selection) {
+ getPreferenceStore().setValue(IS_SHOW_UP_WIDGET_IS_DISPOSED, selection);
+ }
+
+ /**
+ * @return
+ */
+ public static boolean isShowIdInVocabularyInChecklistEditor() {
+ return getPreferenceStore().getBoolean(IPreferenceKeys.CHECKLIST_ID_IN_VOCABULARY);
+ }
+ public static void setShowIdInVocabularyInChecklistEditor(boolean selection) {
+ getPreferenceStore().setValue(CHECKLIST_ID_IN_VOCABULARY, selection);
+ }
+
+ /**
+ * @return
+ */
+ public static boolean isShowRankInChecklistEditor() {
+ return getPreferenceStore().getBoolean(IPreferenceKeys.CHECKLIST_SHOW_RANK);
+ }
+ public static void setShowRankInChecklistEditor(boolean selection) {
+ getPreferenceStore().setValue(CHECKLIST_SHOW_RANK, selection);
+ }
+