Search in sources :

Example 1 with RecentsManager

use of com.intellij.ui.RecentsManager in project android by JetBrains.

the class ActivityComboProvider method createComponent.

@NotNull
@Override
protected ReferenceEditorComboWithBrowseButton createComponent(@NotNull Parameter parameter) {
    ChooseClassActionListener browseAction = new ChooseClassActionListener(myModule);
    RecentsManager recentsManager = RecentsManager.getInstance(myModule.getProject());
    // Always have a blank entry and make sure it shows up first - because by default, most users
    // won't want to add any parent.
    recentsManager.registerRecentEntry(myRecentsKey, "");
    ReferenceEditorComboWithBrowseButton control = new ReferenceEditorComboWithBrowseButton(browseAction, "", myModule.getProject(), true, new OnlyShowActivities(myModule), myRecentsKey);
    // Need to tell our browse action which component to modify when user hits OK. Ideally we'd
    // pass this into browseAction's constructor but the control isn't created until after.
    browseAction.setOwner(control);
    return control;
}
Also used : RecentsManager(com.intellij.ui.RecentsManager) ReferenceEditorComboWithBrowseButton(com.intellij.ui.ReferenceEditorComboWithBrowseButton) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with RecentsManager

use of com.intellij.ui.RecentsManager in project android by JetBrains.

the class ActivityComboProvider method accept.

@Override
public void accept(@NotNull ReferenceEditorComboWithBrowseButton component) {
    RecentsManager recentsManager = RecentsManager.getInstance(myModule.getProject());
    recentsManager.registerRecentEntry(myRecentsKey, component.getText());
}
Also used : RecentsManager(com.intellij.ui.RecentsManager)

Example 3 with RecentsManager

use of com.intellij.ui.RecentsManager in project android by JetBrains.

the class PackageComboProvider method accept.

@Override
public void accept(@NotNull EditorComboBox component) {
    RecentsManager recentsManager = RecentsManager.getInstance(myProject);
    recentsManager.registerRecentEntry(myRecentsKey, component.getText());
}
Also used : RecentsManager(com.intellij.ui.RecentsManager)

Aggregations

RecentsManager (com.intellij.ui.RecentsManager)3 ReferenceEditorComboWithBrowseButton (com.intellij.ui.ReferenceEditorComboWithBrowseButton)1 NotNull (org.jetbrains.annotations.NotNull)1