Skip to content

Add entry-tree parameter to collapse children #196

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

hriday-panchasara
Copy link
Contributor

@hriday-panchasara hriday-panchasara commented Jun 4, 2025

What it does

swagger: Add auto-expand level to TreeEntryModel
server: Add serialization of auto-expand level for tree models

tmf: Add auto-expand level in TmfTreeModel

How to test

Run updated unit tests.

Follow-ups

Related incubator PR.
#196

Review checklist

  • As an author, I have thoroughly tested my changes and carefully followed the instructions in this template

Signed-off-by: Hriday Panchasara hriday.panchasara@ericsson.com
Signed-off-by: Bernd Hufmann bernd.hufmann@ericsson.com

@bhufmann bhufmann self-assigned this Jun 5, 2025
Copy link
Contributor

@bhufmann bhufmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution. I added some review comments

/**
* @return The expand level.
*/
int getExpandLevel();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to getAutoExpandLevel

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -34,4 +34,9 @@ public interface TreeEntryModel {
*/
@NonNull
List<@NonNull TreeColumnHeader> getHeaders();

/**
* @return The expand level.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

   /**
    * @return The auto-expand level
    */


/**
* @return The expand level.
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add before method the following schema annotation:

@Schema(description = "Sets the auto-expand level to be used for the input of the tree. The "
             + "value 0 means that there is no auto-expand; 1 means that top-level "
             + "elements are expanded, but not their children; 2 means that top-level "
             + "elements are expanded, and their children, but not grand-children; and so "
             + "on. The value -1 means that all subtrees should be expanded.")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -114,4 +114,12 @@ public TreeModelWrapper(TmfTreeModel<@NonNull ITmfTreeDataModel> model) {
return fModel.getEntries();
}

/**
* Wrapper to the {@link TmfTreeModel#getExpandLevel()} method
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update link regarding getAutoExpandLevel

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

*
* @return Indicates till which level of the tree we should expand the nodes
*/
public int getExpandLevel() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getAutoExpandLevel

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bhufmann
Copy link
Contributor

bhufmann commented Jun 9, 2025

I'm going to update this PR with my suggestions to help with this contribution.

bhufmann and others added 2 commits June 10, 2025 13:35
Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Signed-off-by: Hriday Panchasara hriday.panchasara@ericsson.com
Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
@bhufmann bhufmann force-pushed the entry-model-collpase-children branch from 54366b0 to cc951e6 Compare June 10, 2025 17:40
@bhufmann bhufmann merged commit e99224c into eclipse-tracecompass-incubator:master Jun 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants