Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lhaeger committed Feb 20, 2022
1 parent e3d8183 commit c88c5ed
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ public class BrowserQuickSearchWidget
public static final String VALUE_HISTORY_DIALOGSETTING_KEY = BrowserQuickSearchWidget.class.getName()
+ ".valueHistory"; //$NON-NLS-1$

/** The Constant VALUE_PROPOSALS_DIALOGSETTING_KEY. */
public static final String VALUE_PROPOSALS_DIALOGSETTING_KEY = BrowserQuickSearchWidget.class.getName()
+ ".valueProposals"; //$NON-NLS-1$

/** The Constant ATTRIBUTE_HISTORY_DIALOGSETTING_KEY. */
public static final String ATTRIBUTE_HISTORY_DIALOGSETTING_KEY = BrowserQuickSearchWidget.class.getName()
+ ".attributeHistory"; //$NON-NLS-1$
Expand Down Expand Up @@ -224,7 +228,9 @@ public void widgetDefaultSelected( SelectionEvent e )

String[] values = HistoryUtils.load( dialogSettings, VALUE_HISTORY_DIALOGSETTING_KEY );
quickSearchValueCombo = BaseWidgetUtils.createCombo( innerComposite, values, -1, 1 );
quickSearchValuePP = new ListContentProposalProvider( values );

String[] proposals = HistoryUtils.load( dialogSettings, VALUE_PROPOSALS_DIALOGSETTING_KEY );
quickSearchValuePP = new ListContentProposalProvider( proposals );
new ExtendedContentAssistCommandAdapter( quickSearchValueCombo, new ComboContentAdapter(), quickSearchValuePP,
null, null, true );
quickSearchValueCombo.addSelectionListener( new SelectionAdapter()
Expand Down Expand Up @@ -295,11 +301,15 @@ private void performSearch()
String[] attributes = HistoryUtils.load( dialogSettings, ATTRIBUTE_HISTORY_DIALOGSETTING_KEY );
quickSearchAttributeCombo.setItems( attributes );
quickSearchAttributeCombo.select( 0 );

HistoryUtils.save( dialogSettings, VALUE_HISTORY_DIALOGSETTING_KEY, quickSearchValueCombo.getText() );
String[] values = HistoryUtils.load( dialogSettings, VALUE_HISTORY_DIALOGSETTING_KEY );
quickSearchValueCombo.setItems( values );
quickSearchValueCombo.select( 0 );
quickSearchValuePP.setProposals( Arrays.asList( values ) );

HistoryUtils.save( dialogSettings, VALUE_PROPOSALS_DIALOGSETTING_KEY, quickSearchValueCombo.getText() );
String[] proposals = HistoryUtils.load( dialogSettings, VALUE_PROPOSALS_DIALOGSETTING_KEY );
quickSearchValuePP.setProposals( Arrays.asList( proposals ) );

IBrowserConnection conn = entry.getBrowserConnection();

Expand Down

0 comments on commit c88c5ed

Please sign in to comment.