本文整理汇总了Java中org.eclipse.search.ui.NewSearchUI.addQueryListener方法的典型用法代码示例。如果您正苦于以下问题:Java NewSearchUI.addQueryListener方法的具体用法?Java NewSearchUI.addQueryListener怎么用?Java NewSearchUI.addQueryListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.search.ui.NewSearchUI
的用法示例。
在下文中一共展示了NewSearchUI.addQueryListener方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createControl
import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
pagebook = new PageBook(parent, SWT.NULL);
pagebook.setLayoutData(new GridData(GridData.FILL_BOTH));
busyLabel = new Table(pagebook, SWT.NONE);
TableItem item = new TableItem(busyLabel, SWT.NONE);
item.setText(Messages.ReferenceSearchViewPage_busyLabel);
busyLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
control = new Composite(pagebook, SWT.NULL);
control.setLayoutData(new GridData(GridData.FILL_BOTH));
control.setSize(100, 100);
control.setLayout(new FillLayout());
viewer = new TreeViewer(control, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setContentProvider(contentProvider);
viewer.setLabelProvider(labelProvider);
viewer.setSorter(sorter);
createOpenAndLinkWithEditorHandler();
IToolBarManager tbm = getSite().getActionBars().getToolBarManager();
fillToolbar(tbm);
tbm.update(true);
pagebook.showPage(control);
isBusyShowing = false;
queryListener = createQueryListener();
NewSearchUI.addQueryListener(queryListener);
}
示例2: activate
import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
@Override
public void activate()
{
super.activate();
final IExecutionModel model = executionModel();
uiAdapter.setModel(model);
model.traceView().register(this);
DebugPlugin.getDefault().addDebugEventListener(this);
final IPreferenceStore store = PreferencesPlugin.getDefault().getPreferenceStore();
store.addPropertyChangeListener(this);
final IStepManager stepManager = JiveUIPlugin.getDefault().stepManager();
stepManager.addStepListener(this);
final IThreadColorManager threadColorManager = JiveUIPlugin.getDefault()
.getThreadColorManager();
threadColorManager.addThreadColorListener(this);
NewSearchUI.addQueryListener(this);
updateJob.setSystem(true);
updateJob.schedule();
}
示例3: createControl
import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
parent = new Composite(parent, SWT.NONE);
final FillLayout layout = new FillLayout();
parent.setLayout(layout);
final TreeViewer tv = new TreeViewer(parent, SWT.FILL);
setViewer(tv);
tv.setContentProvider(new ContentProvider());
tv.setLabelProvider(new DecoratingLabelProvider(new EntryTreeLP()));
tv.setInput(getInput());
Action doubleClickAction = new Action() {
@Override
public void run() {
final IStructuredSelection selection =
(IStructuredSelection)tv.getSelection();
final HSSDEditor editor = getHSSDEditor();
TreeNode en = (TreeNode)selection.getFirstElement();
editor.openEntryEditor(en, null);
}
};
tv.addDoubleClickListener(new IDoubleClickListener() {
@Override
public void doubleClick(DoubleClickEvent event) {
doubleClickAction.run();
}
});
setControl(parent);
NewSearchUI.addQueryListener(queryListener);
}
示例4: SearchResultUpdater
import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
public SearchResultUpdater(JavaSearchResult result) {
fResult= result;
NewSearchUI.addQueryListener(this);
JavaCore.addElementChangedListener(this);
// TODO make this work with resources
}
示例5: SearchResultUpdater
import org.eclipse.search.ui.NewSearchUI; //导入方法依赖的package包/类
public SearchResultUpdater(AbstractTextSearchResult result) {
fResult = result;
NewSearchUI.addQueryListener(this);
ResourcesPlugin.getWorkspace().addResourceChangeListener(this);
}