-
Notifications
You must be signed in to change notification settings - Fork 27
tmf.ui: Make AbstractSelectTreeViewer2 injectable; add AbstractSelectTreeViewer3 and SpecificColumnPatternFilter for column-aware filtering #366
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
Open
ShadowK2494
wants to merge
7
commits into
eclipse-tracecompass:master
Choose a base branch
from
ShadowK2494:feature/tmf-ui-tree-filters
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
667b23e
tmf.ui: make AbstractSelectTreeViewer2 injectable; add AbstractSelect…
ShadowK2494 f95ff5f
Update AbstractSelectTreeViewer3.java
ShadowK2494 416ccd4
Update SpecificColumnPatternFilter.java
ShadowK2494 617a3ba
Update MANIFEST.MF
ShadowK2494 c9b4f9d
Update MANIFEST.MF
ShadowK2494 a33eeea
Update MANIFEST.MF
ShadowK2494 aaf3da3
update pom.xml
ShadowK2494 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...ss.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/tree/AbstractSelectTreeViewer3.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2025 Hong Anh | ||
| * | ||
| * All rights reserved. This program and the accompanying materials are | ||
| * made available under the terms of the Eclipse Public License 2.0 which | ||
| * accompanies this distribution, and is available at | ||
| * https://www.eclipse.org/legal/epl-2.0/ | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| *******************************************************************************/ | ||
|
|
||
| package org.eclipse.tracecompass.tmf.ui.viewers.tree; | ||
|
|
||
| import org.eclipse.swt.SWT; | ||
| import org.eclipse.swt.widgets.Composite; | ||
| import org.eclipse.tracecompass.tmf.core.model.tree.ITmfTreeDataProvider; | ||
| import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.dialogs.SpecificColumnPatternFilter; | ||
| import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.dialogs.TriStateFilteredCheckboxTree; | ||
|
|
||
| /** | ||
| * An abstract tree viewer that supports selection with filtering capabilities. | ||
| * | ||
| * This viewer extends | ||
| * {@link AbstractSelectTreeViewer2} | ||
| * to allow filtering based on a specific column index. | ||
| * | ||
| * @author Hong Anh | ||
| * @since 9.2 | ||
| */ | ||
| public abstract class AbstractSelectTreeViewer3 extends AbstractSelectTreeViewer2 { | ||
| /** | ||
| * Constructor | ||
| * | ||
| * @param parent | ||
| * Parent composite | ||
| * @param legendIndex | ||
| * index of the legend column (-1 if none) | ||
| * @param id | ||
| * {@link ITmfTreeDataProvider} ID | ||
| * @param indexColumnFilter | ||
| * the index of the column to apply the filter on | ||
| */ | ||
| public AbstractSelectTreeViewer3(Composite parent, int legendIndex, String id, int indexColumnFilter) { | ||
| // Initialize the tree viewer with a filtered checkbox tree and column-based filtering | ||
| super(parent, new TriStateFilteredCheckboxTree(parent, | ||
| SWT.MULTI | SWT.H_SCROLL | SWT.FULL_SELECTION, | ||
| new SpecificColumnPatternFilter(indexColumnFilter), true, false), legendIndex, id); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...rg/eclipse/tracecompass/tmf/ui/widgets/timegraph/dialogs/SpecificColumnPatternFilter.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /******************************************************************************* | ||
| * Copyright (c) 2025 Hong Anh | ||
| * | ||
| * All rights reserved. This program and the accompanying materials are | ||
| * made available under the terms of the Eclipse Public License 2.0 which | ||
| * accompanies this distribution, and is available at | ||
| * https://www.eclipse.org/legal/epl-2.0/ | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| *******************************************************************************/ | ||
|
|
||
| package org.eclipse.tracecompass.tmf.ui.widgets.timegraph.dialogs; | ||
|
|
||
|
|
||
| /** | ||
| * A filter that extends {@link MultiTreePatternFilter} to allow filtering | ||
| * based on a specific column index. | ||
| * | ||
| * This implementation enables users to apply multiple patterns (separated by '/') | ||
| * while specifying which column of the tree should be used for matching. | ||
| * | ||
| * @author Hong Anh | ||
| * @since 9.2 | ||
| */ | ||
|
|
||
| public class SpecificColumnPatternFilter extends MultiTreePatternFilter { | ||
| private int index = 0; | ||
|
|
||
| /** | ||
| * Creates a new filter with the specified column index. | ||
| * @param indexColumnFilter the index of the column to apply the filter on | ||
| */ | ||
|
|
||
| public SpecificColumnPatternFilter(int indexColumnFilter) { | ||
| this.index = indexColumnFilter; | ||
| } | ||
|
|
||
| /** | ||
| * Returns the index of the column used for filtering. | ||
| * @return the column index specified during construction | ||
| */ | ||
| @Override | ||
| protected int getIndexColumnFilter() { | ||
| return this.index; | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: eclipse-tracecompass/org.eclipse.tracecompass
Length of output: 2844
🏁 Script executed:
Repository: eclipse-tracecompass/org.eclipse.tracecompass
Length of output: 3757
Version bump is consistent across pom.xml and MANIFEST.MF.
The minor version increment from 9.1.2-SNAPSHOT to 9.2.0-SNAPSHOT appropriately reflects the new public APIs (AbstractSelectTreeViewer3, SpecificColumnPatternFilter) and visibility changes. The MANIFEST.MF Bundle-Version is correctly set to 9.2.0.qualifier, and feature.xml imports use "greaterOrEqual" constraints that are compatible with 9.2.0.
No other module POMs require version updates; the parent pom version (11.0.0-SNAPSHOT) intentionally differs from child module versions in this project structure.
Verify that Tycho CI builds successfully with this version bump.
🤖 Prompt for AI Agents