Skip to content

Conversation

@jannisCode
Copy link
Contributor

This PR adresses the issue posed here: #2329

@eclipse-platform-bot
Copy link
Contributor

eclipse-platform-bot commented Nov 26, 2024

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

bundles/org.eclipse.text.quicksearch/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 4c83dfa0c04fa6dd30844f7bab1bbbb9a020679a Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <[email protected]>
Date: Tue, 17 Dec 2024 09:19:07 +0000
Subject: [PATCH] Version bump(s) for 4.35 stream


diff --git a/bundles/org.eclipse.text.quicksearch/META-INF/MANIFEST.MF b/bundles/org.eclipse.text.quicksearch/META-INF/MANIFEST.MF
index d656db96ed..dae450f163 100644
--- a/bundles/org.eclipse.text.quicksearch/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.text.quicksearch/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.text.quicksearch;singleton:=true
-Bundle-Version: 1.2.500.qualifier
+Bundle-Version: 1.2.600.qualifier
 Bundle-Activator: org.eclipse.text.quicksearch.internal.ui.QuickSearchActivator
 Require-Bundle: org.eclipse.ui;bundle-version="[3.113.0,4.0.0)",
  org.eclipse.core.resources;bundle-version="[3.13.0,4.0.0)",
-- 
2.47.1

Further information are available in Common Build Issues - Missing version increments.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2024

Test Results

 1 214 files  ±0   1 214 suites  ±0   1h 14m 46s ⏱️ -55s
 7 729 tests ±0   7 496 ✅ +1  233 💤 ±0  0 ❌  - 1 
16 232 runs  ±0  15 717 ✅ +1  515 💤 ±0  0 ❌  - 1 

Results for commit c71a9ed. ± Comparison against base commit 0344b2b.

♻️ This comment has been updated with latest results.

@jannisCode jannisCode force-pushed the Quick_search_fix branch 3 times, most recently from bb06744 to cfebba0 Compare November 26, 2024 13:17
@jannisCode jannisCode force-pushed the Quick_search_fix branch 2 times, most recently from ec72ad4 to 0b07e25 Compare November 28, 2024 17:59
@jannisCode jannisCode marked this pull request as ready for review November 29, 2024 09:24
@jannisCode jannisCode force-pushed the Quick_search_fix branch 3 times, most recently from 47d5efe to 1fd490f Compare December 6, 2024 13:04
Copy link
Member

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

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

Thank you for this PR.
I'm not very familiar with this part of the code and therefore just did a 'code-style' review. Please see my remarks below.

@Wittmaxi or @HeikoKlare do you plan to do a 'functional' review? If not I can have a look too.

@jannisCode jannisCode force-pushed the Quick_search_fix branch 2 times, most recently from ac14b93 to 8ea099c Compare December 9, 2024 08:43
Copy link
Member

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

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

I wouldn't add the empty element to the history. It should be active if it was the last one in use but I wouldn't put it in the list since one can always easily recreate the "empty" by deleting the content:

image

I also have some comment regarding the names of the new field and constant in DialogSettings and the spacing.

@jannisCode jannisCode force-pushed the Quick_search_fix branch 2 times, most recently from c9772f2 to 77f5171 Compare December 10, 2024 12:22
@jannisCode jannisCode force-pushed the Quick_search_fix branch 2 times, most recently from bb59c93 to 50bc99d Compare December 17, 2024 09:14
@fedejeanne fedejeanne force-pushed the Quick_search_fix branch 2 times, most recently from 0cfa7c9 to 104d3e3 Compare December 17, 2024 14:23
Copy link
Member

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

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

I tested it and it works as expected. I took the liberty of doing the following changes though, I thought it would be faster than reviewing again:

  • Removed unused constant
  • Inlined method getLastSearches()
  • Removed some unnecessary variables in methods
  • Made the field filterHistory final and non-static
  • Stored/retrieved the lasat searches (filterHistory) from the settings to allow the user to reuse the history even across restarts
  • Other small cosmetic changes (moved lines around)

I will merge this PR as soon as the tests are finished. @jannisCode please don't do any more changes.

@fedejeanne
Copy link
Member

@HannesWell may I drop your request for changes?

@fedejeanne
Copy link
Member

The test failure on Mac is unrelated: #294

The other 2 failures are confusing though, they are very similar but one fails for the plugin org.eclipse.search and the other one (Windows) fails for org.eclipse.e4.ui.swt.gtk

Linux

Error:  Failed to execute goal org.eclipse.tycho:tycho-apitools-plugin:4.0.10:verify (verify) on project org.eclipse.search: Execute ApiApplication failed: InvocationTargetException: Component 'Search Support' in the baseline 'workspace' is disposed [main]: Component was disposed here [Worker-1: Updating plug-in dependencies] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-apitools-plugin:4.0.10:verify (verify) on project org.eclipse.search: Execute ApiApplication failed
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
...

Windows

Error:  Failed to execute goal org.eclipse.tycho:tycho-apitools-plugin:4.0.10:verify (verify) on project org.eclipse.e4.ui.swt.gtk: Execute ApiApplication failed: InvocationTargetException: Component '%fragmentName' in the baseline 'workspace' is disposed [main]: Component was disposed here [Worker-1: Updating plug-in dependencies] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-apitools-plugin:4.0.10:verify (verify) on project org.eclipse.e4.ui.swt.gtk: Execute ApiApplication failed
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
...

I'm triggering the builds again.

@laeubi
Copy link
Contributor

laeubi commented Dec 17, 2024

@fedejeanne see

@HannesWell HannesWell dismissed their stale review December 17, 2024 22:08

Requests have been addressed.

Copy link
Member

@HannesWell HannesWell left a comment

Choose a reason for hiding this comment

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

@HannesWell may I drop your request for changes?

Yes, I dropped it. Thanks for the heads up.
I just a have another suggestion, but not crucial.

Comment on lines +431 to +436
String filter = filterHistory.getFirst();

// Filter out blanks
filterHistory.removeIf(String::isBlank);

searchIn.setItems(filterHistory.toArray(String[]::new));
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: I don't think we need a comment to explain the next line

Suggested change
String filter = filterHistory.getFirst();
// Filter out blanks
filterHistory.removeIf(String::isBlank);
searchIn.setItems(filterHistory.toArray(String[]::new));
String filter = filterHistory.getFirst();
filterHistory.removeIf(String::isBlank);
searchIn.setItems(filterHistory.toArray(String[]::new));

Copy link
Member

Choose a reason for hiding this comment

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

I'd normally agree but seeing that the builds are so brittle, I'd like to leave it as it is.

@fedejeanne fedejeanne merged commit 3325875 into eclipse-platform:master Dec 18, 2024
16 of 17 checks passed
@jukzi
Copy link
Contributor

jukzi commented Jan 15, 2025

This PR caused a NPE on first open:
#2706

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.

Add dropdown history to the "in" field of the Quick Search dialog window

6 participants