Skip to content

Commit

Permalink
fixed dependency on gui and added archUnitTest
Browse files Browse the repository at this point in the history
  • Loading branch information
r0light committed Aug 29, 2019
1 parent 2b760cd commit 047cbef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package org.jabref.logic.groups;

import org.jabref.gui.icon.IconTheme;
import org.jabref.logic.l10n.Localization;
import org.jabref.model.groups.AllEntriesGroup;

public class DefaultGroupsFactory {

private static String ALL_ENTRIES_GROUP_DEFAULT_ICON = "ALL_ENTRIES_GROUP_ICON";

private DefaultGroupsFactory() {
}

public static AllEntriesGroup getAllEntriesGroup() {
AllEntriesGroup group = new AllEntriesGroup(Localization.lang("All entries"));
group.setIconName(IconTheme.JabRefIcons.ALL_ENTRIES_GROUP_ICON.name());
group.setIconName(ALL_ENTRIES_GROUP_DEFAULT_ICON);
return group;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ public static void doNotUseJGoodies(JavaClasses classes) {
public static void doNotUseGlazedLists(JavaClasses classes) {
noClasses().should().accessClassesThat().resideInAPackage("ca.odell.glazedlists..").check(classes);
}


@ArchTest
public static void doNotUseGlyphsDirectly(JavaClasses classes) {
noClasses().that().resideOutsideOfPackage("org.jabref.gui.icon").should().accessClassesThat().resideInAnyPackage("de.jensd.fx.glyphs", "de.jensd.fx.glyphs.materialdesignicons").check(classes);
}

//"Currently disabled as there is no alternative for the rest of classes who need awt"
@ArchIgnore
@ArchTest
Expand Down

0 comments on commit 047cbef

Please sign in to comment.