diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a0bf267a..7a91ce699 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,6 @@ jobs: uses: actions/setup-java@v4 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' - name: Run test suite run: mvn --batch-mode --activate-profiles ${{ matrix.profile }} --define release.signing.disabled=true clean verify diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 05dbe5d3c..057ecdb0b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,7 +14,7 @@ jobs: uses: actions/setup-java@v4 with: java-version: '11' - distribution: 'adopt' + distribution: 'temurin' server-id: ossrh server-username: OSSRH_USERNAME server-password: OSSRH_TOKEN diff --git a/protege-editor-owl/src/main/java/org/protege/editor/owl/model/hierarchy/ClassHierarchyPreferences.java b/protege-editor-owl/src/main/java/org/protege/editor/owl/model/hierarchy/ClassHierarchyPreferences.java index c672e5ee6..adf4e5f4a 100644 --- a/protege-editor-owl/src/main/java/org/protege/editor/owl/model/hierarchy/ClassHierarchyPreferences.java +++ b/protege-editor-owl/src/main/java/org/protege/editor/owl/model/hierarchy/ClassHierarchyPreferences.java @@ -16,6 +16,8 @@ public class ClassHierarchyPreferences { private static final String DISPLAY_RELATIONSHIPS_KEY = "DISPLAY_RELATIONSHIPS"; + private static final String DISPLAY_DEPRECATED_ENTITIES_KEY = "DISPLAY_DEPRECATED_ENTITIES"; + private static Preferences getPreferences() { return PreferencesManager.getInstance().getApplicationPreferences(CLASS_HIERARCHY_PREFERENCES); } @@ -31,4 +33,12 @@ public boolean isDisplayRelationships() { public void setDisplayRelationships(boolean displayRelationships) { getPreferences().putBoolean(DISPLAY_RELATIONSHIPS_KEY, displayRelationships); } + + public boolean isDisplayDeprecatedEntities() { + return getPreferences().getBoolean(DISPLAY_DEPRECATED_ENTITIES_KEY, false); + } + + public void setDisplayDeprecatedEntities(boolean displayDeprecatedEntities) { + getPreferences().putBoolean(DISPLAY_DEPRECATED_ENTITIES_KEY, displayDeprecatedEntities); + } } diff --git a/protege-editor-owl/src/main/java/org/protege/editor/owl/model/identifiers/IdentifiersDotOrg.java b/protege-editor-owl/src/main/java/org/protege/editor/owl/model/identifiers/IdentifiersDotOrg.java index 43b9ce497..9a9e3db9e 100644 --- a/protege-editor-owl/src/main/java/org/protege/editor/owl/model/identifiers/IdentifiersDotOrg.java +++ b/protege-editor-owl/src/main/java/org/protege/editor/owl/model/identifiers/IdentifiersDotOrg.java @@ -140,8 +140,6 @@ public List getCollections() { @Nonnull private static HttpClient createClient() { - return HttpClientBuilder.create().build(); - - + return HttpClientBuilder.create().useSystemProperties().build(); } } diff --git a/protege-editor-owl/src/main/java/org/protege/editor/owl/ui/action/DisplayDeprecatedEntitiesAction.java b/protege-editor-owl/src/main/java/org/protege/editor/owl/ui/action/DisplayDeprecatedEntitiesAction.java index 9a27e4524..ece6fc282 100644 --- a/protege-editor-owl/src/main/java/org/protege/editor/owl/ui/action/DisplayDeprecatedEntitiesAction.java +++ b/protege-editor-owl/src/main/java/org/protege/editor/owl/ui/action/DisplayDeprecatedEntitiesAction.java @@ -1,5 +1,6 @@ package org.protege.editor.owl.ui.action; +import org.protege.editor.owl.model.hierarchy.ClassHierarchyPreferences; import org.protege.editor.owl.ui.view.HasDisplayDeprecatedEntities; import java.awt.event.ActionEvent; @@ -13,7 +14,7 @@ public class DisplayDeprecatedEntitiesAction extends ComponentHierarchyAction initialiseAction() { - putValue(SELECTED_KEY, false); + putValue(SELECTED_KEY, ClassHierarchyPreferences.get().isDisplayDeprecatedEntities()); return HasDisplayDeprecatedEntities.class; } @@ -21,5 +22,6 @@ protected Class initialiseAction() { protected void actionPerformedOnTarget(ActionEvent e, HasDisplayDeprecatedEntities target) { boolean value = (boolean) getValue(SELECTED_KEY); target.setShowDeprecatedEntities(value); + ClassHierarchyPreferences.get().setDisplayDeprecatedEntities(value); } } diff --git a/protege-editor-owl/src/main/java/org/protege/editor/owl/ui/view/AbstractOWLEntityHierarchyViewComponent.java b/protege-editor-owl/src/main/java/org/protege/editor/owl/ui/view/AbstractOWLEntityHierarchyViewComponent.java index feeb90d07..f3609b11d 100644 --- a/protege-editor-owl/src/main/java/org/protege/editor/owl/ui/view/AbstractOWLEntityHierarchyViewComponent.java +++ b/protege-editor-owl/src/main/java/org/protege/editor/owl/ui/view/AbstractOWLEntityHierarchyViewComponent.java @@ -6,6 +6,7 @@ import org.protege.editor.core.ui.view.ViewMode; import org.protege.editor.core.util.HandlerRegistration; import org.protege.editor.owl.model.OWLModelManager; +import org.protege.editor.owl.model.hierarchy.ClassHierarchyPreferences; import org.protege.editor.owl.model.hierarchy.OWLObjectHierarchyProvider; import org.protege.editor.owl.ui.OWLObjectComparatorAdapter; import org.protege.editor.owl.ui.action.AbstractOWLTreeAction; @@ -170,8 +171,9 @@ public void mouseReleased(MouseEvent e) { breadCrumbTrailProviderRegistration = getOWLWorkspace().registerBreadcrumbTrailProvider(this); - // Don't show deprecated entities by default - getHierarchyProvider().setFilter(this::isNotDeprecated); + if (!ClassHierarchyPreferences.get().isDisplayDeprecatedEntities()) { + getHierarchyProvider().setFilter(this::isNotDeprecated); + } } private void scrollSelectedPathToVisibleRect() {