Skip to content

Commit

Permalink
Add warning about kotlin metadata ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Jan 11, 2025
1 parent b8b9d73 commit ac39522
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,24 @@
import jakarta.annotation.Nullable;
import jakarta.enterprise.context.Dependent;
import jakarta.inject.Inject;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.control.Label;
import javafx.scene.control.TreeCell;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeView;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.StackPane;
import software.coley.recaf.info.ClassInfo;
import software.coley.recaf.path.ClassPathNode;
import software.coley.recaf.path.PathNode;
import software.coley.recaf.services.navigation.Actions;
import software.coley.recaf.services.navigation.Navigable;
import software.coley.recaf.services.text.TextFormatConfig;
import software.coley.recaf.ui.config.MemberDisplayFormatConfig;
import software.coley.recaf.ui.control.BoundLabel;
import software.coley.recaf.util.Icons;
import software.coley.recaf.util.Lang;
import software.coley.recaf.util.kotlin.model.KtClass;
import software.coley.recaf.util.kotlin.model.KtConstructor;
import software.coley.recaf.util.kotlin.model.KtElement;
Expand Down Expand Up @@ -83,7 +89,14 @@ protected void updateItem(KtElement element, boolean empty) {
}
}
});
Label label = new BoundLabel(Lang.getBinding("kotlinmetadata.orderwarning"));
label.getStyleClass().add(Styles.TEXT_SUBTLE);
label.setPadding(new Insets(8));
label.setWrapText(true);
BorderPane labelWrapper = new BorderPane(label);
labelWrapper.getStyleClass().add("workspace-filter-pane"); // Style used for top-border separator
setCenter(tree);
setBottom(labelWrapper);
setMinWidth(235);
}

Expand Down
1 change: 1 addition & 0 deletions recaf-ui/src/main/resources/translations/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ hierarchy.parents=Parents

## Kotlin Metadata
kotlinmetadata.title=@Metadata
kotlinmetadata.orderwarning=Important: Items do not appear in the same order as defined in the class file

## Logging
logging.title=Logging
Expand Down

0 comments on commit ac39522

Please sign in to comment.