Skip to content

Commit

Permalink
Merge branch 'protegeproject:master' into migrateLibs
Browse files Browse the repository at this point in the history
  • Loading branch information
mosfet80 committed Sep 18, 2024
2 parents 5d3dedc + 4728d66 commit 62e4fbe
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ public List<IdoNamespace> getCollections() {

@Nonnull
private static HttpClient createClient() {
return HttpClientBuilder.create().build();


return HttpClientBuilder.create().useSystemProperties().build();
}
}
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -13,13 +14,14 @@ public class DisplayDeprecatedEntitiesAction extends ComponentHierarchyAction<Ha

@Override
protected Class<HasDisplayDeprecatedEntities> initialiseAction() {
putValue(SELECTED_KEY, false);
putValue(SELECTED_KEY, ClassHierarchyPreferences.get().isDisplayDeprecatedEntities());
return HasDisplayDeprecatedEntities.class;
}

@Override
protected void actionPerformedOnTarget(ActionEvent e, HasDisplayDeprecatedEntities target) {
boolean value = (boolean) getValue(SELECTED_KEY);
target.setShowDeprecatedEntities(value);
ClassHierarchyPreferences.get().setDisplayDeprecatedEntities(value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 62e4fbe

Please sign in to comment.