本文整理汇总了Java中org.eclipse.search.ui.NewSearchUI类的典型用法代码示例。如果您正苦于以下问题:Java NewSearchUI类的具体用法?Java NewSearchUI怎么用?Java NewSearchUI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NewSearchUI类属于org.eclipse.search.ui包,在下文中一共展示了NewSearchUI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createInitialLayout
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
@Override
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$
left.addView(IPageLayout.ID_PROJECT_EXPLORER);
left.addPlaceholder(IPageLayout.ID_RES_NAV);
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
bottom.addView("org.eclipse.tm.terminal.view.ui.TerminalsView");
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom.addPlaceholder(TemplatesView.ID);
bottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
bottom.addPlaceholder(IPageLayout.ID_TASK_LIST);
bottom.addPlaceholder(IPageLayout.ID_PROP_SHEET);
layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);
}
示例2: createInitialLayout
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
@Override
public void createInitialLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, (float) 0.25, editorArea); //$NON-NLS-1$
left.addView(IPageLayout.ID_PROJECT_EXPLORER);
left.addPlaceholder(IPageLayout.ID_RES_NAV);
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
bottom.addView("org.eclipse.tm.terminal.view.ui.TerminalsView");
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom.addPlaceholder(TemplatesView.ID);
bottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
bottom.addPlaceholder(IPageLayout.ID_TASK_LIST);
bottom.addPlaceholder(IPageLayout.ID_PROP_SHEET);
layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);
}
示例3: openAndSelect
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
public IEditorPart openAndSelect(IWorkbenchPage wbPage, IFile file, int offset, int length, boolean activate) throws PartInitException {
String editorId= null;
IEditorDescriptor desc= IDE.getEditorDescriptor(file);
if (desc == null || !desc.isInternal()) {
editorId= "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
} else {
editorId= desc.getId();
}
IEditorPart editor;
if (NewSearchUI.reuseEditor()) {
editor= showWithReuse(file, wbPage, editorId, activate);
} else {
editor= showWithoutReuse(file, wbPage, editorId, activate);
}
if (editor instanceof ITextEditor) {
ITextEditor textEditor= (ITextEditor) editor;
textEditor.selectAndReveal(offset, length);
} else if (editor != null) {
showWithMarker(editor, file, offset, length);
}
return editor;
}
示例4: 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);
}
示例5: addFolders
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
protected void addFolders(IPageLayout layout) {
IFolderLayout leftFolder = layout.createFolder("left", IPageLayout.LEFT, (float) 0.2, //$NON-NLS-1$
layout.getEditorArea());
leftFolder.addView(DLTKUIPlugin.ID_SCRIPT_EXPLORER);
leftFolder.addView("org.eclipse.dltk.testing.ResultView"); //$NON-NLS-1$
leftFolder.addPlaceholder("org.eclipse.dltk.ui.TypeHierarchy"); //$NON-NLS-1$
leftFolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
IFolderLayout bottomFolder = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, //$NON-NLS-1$
layout.getEditorArea());
bottomFolder.addView(IPageLayout.ID_PROBLEM_VIEW);
bottomFolder.addView(IPageLayout.ID_TASK_LIST);
bottomFolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);
bottomFolder.addPlaceholder("org.eclipse.dltk.callhierarchy.view"); //$NON-NLS-1$
bottomFolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
bottomFolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
}
示例6: partClosed
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
public void partClosed(IWorkbenchPartReference partRef)
{
if (partRef instanceof IEditorReference)
{
IEditorPart part = (IEditorPart) partRef.getPart(false);
if (part instanceof MultiPageEditorPart)
{
MultiPageEditorPart multi = (MultiPageEditorPart) part;
if (pageListener != null)
{
multi.getSite().getSelectionProvider().removeSelectionChangedListener(pageListener);
}
}
}
// If it's a search view, remove any query listeners for it!
else if (partRef instanceof IViewReference)
{
IViewPart view = (IViewPart) partRef.getPart(false);
if (queryListeners.containsKey(view))
{
NewSearchUI.removeQueryListener(queryListeners.remove(view));
}
}
}
示例7: 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();
}
示例8: deactivate
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
@Override
public void deactivate()
{
final IExecutionModel model = executionModel();
if (model != null)
{
model.traceView().unregister(this);
}
DebugPlugin.getDefault().removeDebugEventListener(this);
final IPreferenceStore store = PreferencesPlugin.getDefault().getPreferenceStore();
store.removePropertyChangeListener(this);
final IStepManager stepManager = JiveUIPlugin.getDefault().stepManager();
stepManager.removeStepListener(this);
final IThreadColorManager threadColorManager = JiveUIPlugin.getDefault()
.getThreadColorManager();
threadColorManager.removeThreadColorListener(this);
NewSearchUI.removeQueryListener(this);
updateJob.cancel();
setSelected(EditPart.SELECTED_NONE);
super.deactivate();
}
示例9: openAndSelect
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
public IEditorPart openAndSelect(IWorkbenchPage wbPage, IFile file, int offset, int length, boolean activate)
throws PartInitException {
String editorId = null;
IEditorDescriptor desc = IDE.getEditorDescriptor(file);
if (desc == null || !desc.isInternal()) {
editorId = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
} else {
editorId = desc.getId();
}
IEditorPart editor;
if (NewSearchUI.reuseEditor()) {
editor = showWithReuse(file, wbPage, editorId, activate);
} else {
editor = showWithoutReuse(file, wbPage, editorId, activate);
}
if (editor instanceof ITextEditor) {
ITextEditor textEditor = (ITextEditor) editor;
textEditor.selectAndReveal(offset, length);
} else if (editor != null) {
showWithMarker(editor, file, offset, length);
}
return editor;
}
示例10: defineLayout
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
/**
* @param layout
* @param editorArea
*/
public void defineLayout(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, (float) 0.26, editorArea); //$NON-NLS-1$
topLeft.addView("org.python.pydev.navigator.view");
IFolderLayout outputfolder = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea); //$NON-NLS-1$
//outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
outputfolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
outputfolder.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
//Add the outline only if we're not using the minimap.
if (!MinimapOverviewRulerPreferencesPage.getShowMinimapContents()) {
layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, (float) 0.75, editorArea);
}
}
示例11: defineActions
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
/**
* @param layout
*/
public void defineActions(IPageLayout layout) {
layout.addNewWizardShortcut(PythonProjectWizard.WIZARD_ID);
layout.addNewWizardShortcut(PythonSourceFolderWizard.WIZARD_ID);
layout.addNewWizardShortcut(PythonPackageWizard.WIZARD_ID);
layout.addNewWizardShortcut(PythonModuleWizard.WIZARD_ID);
layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder");//$NON-NLS-1$
layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file");//$NON-NLS-1$
layout.addNewWizardShortcut("org.eclipse.ui.editors.wizards.UntitledTextFileWizard");//$NON-NLS-1$
layout.addShowViewShortcut("org.python.pydev.navigator.view");
layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
layout.addShowViewShortcut("org.python.pydev.debug.pyunit.pyUnitView");
layout.addShowViewShortcut("org.python.pydev.debug.profile.ProfileView");
layout.addShowViewShortcut("org.python.pydev.views.PyCodeCoverageView");
layout.addShowViewShortcut(NewSearchUI.SEARCH_VIEW_ID);
layout.addShowViewShortcut(IPageLayout.ID_OUTLINE);
layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW);
//layout.addShowViewShortcut(IPageLayout.ID_RES_NAV);-- Navigator no longer supported
layout.addShowViewShortcut("org.eclipse.pde.runtime.LogView");
layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST);
layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
layout.addActionSet(IPageLayout.ID_NAVIGATE_ACTION_SET);
}
示例12: addViewStructure
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
protected void addViewStructure(IPageLayout layout) {
String editorArea = layout.getEditorArea();
IFolderLayout leftFolder = layout.createFolder("leftPane", IPageLayout.LEFT, 0.25f, editorArea);
leftFolder.addView(IPageLayout.ID_PROJECT_EXPLORER);
IFolderLayout bottomFolder = layout.createFolder("bottomPane", IPageLayout.BOTTOM, 0.75f, editorArea);
bottomFolder.addView(IPageLayout.ID_PROBLEM_VIEW);
bottomFolder.addView(IPageLayout.ID_TASK_LIST);
bottomFolder.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
bottomFolder.addView(IPageLayout.ID_PROGRESS_VIEW);
bottomFolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);
// Create outline after bottom pane
layout.addView(IPageLayout.ID_OUTLINE, IPageLayout.RIGHT, 0.75f, editorArea);
}
示例13: addViews
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
private void addViews() {
IFolderLayout bottom =
factory.createFolder(
"bottomRight", //NON-NLS-1
IPageLayout.BOTTOM,
0.75f,
factory.getEditorArea());
bottom.addView(IPageLayout.ID_PROP_SHEET);
bottom.addView("org.gw4e.eclipse.views.PerformanceView");
bottom.addView(IPageLayout.ID_PROBLEM_VIEW);
bottom.addView(JavaUI.ID_JAVADOC_VIEW);
bottom.addView(JavaUI.ID_SOURCE_VIEW);
bottom.addPlaceholder(NewSearchUI.SEARCH_VIEW_ID);
bottom.addPlaceholder(IConsoleConstants.ID_CONSOLE_VIEW);
bottom.addPlaceholder(IPageLayout.ID_BOOKMARKS);
bottom.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
IFolderLayout topLeft =
factory.createFolder(
"topLeft", //NON-NLS-1
IPageLayout.LEFT,
0.15f,
factory.getEditorArea());
topLeft.addView(JavaUI.ID_PACKAGES);
topLeft.addPlaceholder(JavaUI.ID_TYPE_HIERARCHY);
topLeft.addPlaceholder(JavaPlugin.ID_RES_NAV);
topLeft.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER);
IFolderLayout outlineFolder = factory.createFolder("right", IPageLayout.RIGHT, (float) 0.85, factory.getEditorArea()); //$NON-NLS-1$
outlineFolder.addView(IPageLayout.ID_OUTLINE);
}
示例14: performAction
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
@Override
public boolean performAction() {
ModelSearchQuery searchQuery = new ModelSearchQuery(buildQueryDefinition());
NewSearchUI.runQueryInForeground(fContainer.getRunnableContext(), searchQuery);
return true;
}
示例15: open
import org.eclipse.search.ui.NewSearchUI; //导入依赖的package包/类
@Override
public void open() {
// Execute Search
try {
int offset = tsFile.getPosition(getRange().startLineNumber, getRange().startColumn);
TypeScriptSearchQuery query = new TypeScriptSearchQuery(tsFile.getResource(), offset);
NewSearchUI.runQueryInBackground(query);
} catch (TypeScriptException e) {
e.printStackTrace();
}
}