package org.eclipse.platform.discovery.compatibility.internal.container; | |
import org.eclipse.jface.operation.IRunnableContext; | |
import org.eclipse.jface.viewers.ISelection; | |
import org.eclipse.platform.discovery.ui.api.ISearchParametersUI.IConsoleContext; | |
import org.eclipse.platform.discovery.util.api.longop.ILongOperationRunner; | |
import org.eclipse.search.ui.ISearchPageContainer; | |
import org.eclipse.ui.IEditorInput; | |
import org.eclipse.ui.IWorkingSet; | |
public class SearchPageContainer implements ISearchPageContainer { | |
private IConsoleContext consoleContext; | |
public SearchPageContainer(IConsoleContext consoleContext) { | |
this.consoleContext = consoleContext; | |
} | |
@Override | |
public ISelection getSelection() { | |
return null; | |
} | |
@Override | |
public IRunnableContext getRunnableContext() { | |
return new OperationRunnerToRunnableContextAdapter(consoleContext.progressMonitor()); | |
} | |
@Override | |
public void setPerformActionEnabled(boolean state) { | |
consoleContext.notifyComplete(state); | |
} | |
@Override | |
public int getSelectedScope() { | |
return WORKSPACE_SCOPE; | |
} | |
@Override | |
public void setSelectedScope(int scope) { | |
// throw new UnsupportedOperationException(); | |
} | |
@Override | |
public boolean hasValidScope() { | |
return true; | |
} | |
@Override | |
public void setActiveEditorCanProvideScopeSelection(boolean state) { | |
} | |
@Override | |
public IEditorInput getActiveEditorInput() { | |
return null; | |
} | |
@Override | |
public IWorkingSet[] getSelectedWorkingSets() { | |
return null; | |
} | |
@Override | |
public void setSelectedWorkingSets(IWorkingSet[] workingSets) { | |
throw new UnsupportedOperationException(); | |
} | |
@Override | |
public String[] getSelectedProjectNames() { | |
return null; | |
} | |
} |