Java 类org.eclipse.ui.IWorkbench 实例源码

项目:n4js    文件:ADocSpecExportWizard.java   
@Override
public void init(IWorkbench targetWorkbench, IStructuredSelection currentSelection) {
    this.selection = currentSelection;

    List<?> selectedResources = IDE.computeSelectedResources(currentSelection);
    if (!selectedResources.isEmpty()) {
        this.selection = new StructuredSelection(selectedResources);
    }

    setWindowTitle("AsciiDoc Specification Export");
    setNeedsProgressMonitor(true);

    configAdocPage = new SpecConfigAdocPage("Configuration Page");
    processAdocPage = new SpecProcessPage("Process Page");
    comparePage = new SpecComparePage("Compare Page", "Adoc");
    summaryPage = new SpecExportCodeSummaryPage("Summary Page");
    configOutputPage = new SpecConfigOutputPage("Configuration Page");
    processOutputPage = new SpecProcessPage("Process Page");

    taskGenAdoc = new TaskGenerateAdoc(jsDoc2SpecProcessor, resourceSetProvider, n4JSCore, selection,
            configAdocPage, processAdocPage);
    taskWriteFiles = new TaskWriteFiles(processOutputPage, taskGenAdoc);

    addVisibilityListeners();
}
项目:gw4e.project    文件:GW4EPreferencePage.java   
private SWTBotShell showPreferenceDialogMAC() {
    final IWorkbench workbench = PlatformUI.getWorkbench();
    workbench.getDisplay().asyncExec(new Runnable() {
        public void run() {
            IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
            if (window != null) {
                Menu appMenu = workbench.getDisplay().getSystemMenu();
                for (MenuItem item : appMenu.getItems()) {
                    if (item.getText().startsWith("Preferences")) {
                        Event event = new Event();
                        event.time = (int) System.currentTimeMillis();
                        event.widget = item;
                        event.display = workbench.getDisplay();
                        item.setSelection(true);
                        item.notifyListeners(SWT.Selection, event);
                        break;
                    }
                }
            }
        }
    });
    return  getPreferenceDialog() ;
}
项目:avro-schema-editor    文件:SchemaEditorPropertyTester.java   
protected AvroSchemaEditor getEditor() {

    IWorkbench workbench = PlatformUI.getWorkbench();
       IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();

       if (window != null) {
           IWorkbenchPage workbenchPage = window.getActivePage();
           if (workbenchPage != null) {
            IWorkbenchPart activePart = workbenchPage.getActivePart();                
               if (activePart instanceof IWithAvroSchemaEditor) {
                return ((IWithAvroSchemaEditor) activePart).getEditor();
               }
           }
       }

       return null;
}
项目:eZooKeeper    文件:FileEditor.java   
public static IEditorPart editFile(File file, boolean preferIdeEditor) throws IOException, PartInitException {

        if (file == null || !file.exists() || !file.isFile() || !file.canRead()) {
            throw new IOException("Invalid file: '" + file + "'");
        }

        IWorkbench workBench = PlatformUI.getWorkbench();
        IWorkbenchPage page = workBench.getActiveWorkbenchWindow().getActivePage();
        IPath location = Path.fromOSString(file.getAbsolutePath());

        IFileStore fileStore = EFS.getLocalFileSystem().getStore(location);
        FileStoreEditorInput fileStoreEditorInput = new FileStoreEditorInput(fileStore);

        String editorId = IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID;
        if (preferIdeEditor) {
            IEditorDescriptor editorDescriptor = workBench.getEditorRegistry().getDefaultEditor(file.getName());
            if (editorDescriptor != null) {
                editorId = editorDescriptor.getId();
            }
        }

        return page.openEditor(fileStoreEditorInput, editorId);
    }
项目:neoscada    文件:Application.java   
@Override
public void stop ()
{
    if ( !PlatformUI.isWorkbenchRunning () )
    {
        return;
    }
    final IWorkbench workbench = PlatformUI.getWorkbench ();
    final Display display = workbench.getDisplay ();
    display.syncExec ( new Runnable () {
        @Override
        public void run ()
        {
            if ( !display.isDisposed () )
            {
                workbench.close ();
            }
        }
    } );
}
项目:avro-schema-editor    文件:SearchNodeControl.java   
protected void search(String pattern, SearchType type, boolean withRef) {               
    IWorkbench workbench = PlatformUI.getWorkbench();
    IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
    IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
    IEditorPart editorPart = workbenchPage.getActiveEditor();
    if (editorPart instanceof IWithAvroSchemaEditor) {
        AvroSchemaEditor schemaEditor = ((IWithAvroSchemaEditor) editorPart).getEditor();           
        AvroContext masterContext = schemaEditor.getContext().getMaster();
        SearchNodeContext searchNodeContext = masterContext.getSearchNodeContext();
        if (pattern == null || pattern.trim().isEmpty()) {
            searchNodeContext.reset();
        } else if (searchNodeContext.searchNodes(type, pattern, withRef)) {
            AvroNode node = searchNodeContext.next();
            schemaEditor.getContentPart()
                .getSchemaViewer(AvroContext.Kind.MASTER)
                .setSelection(new StructuredSelection(node), true);
        }
        refreshCommands(editorPart, SearchNodePropertyTester.PROPERTIES);
    }
}
项目:n4js    文件:EditorsUtil.java   
static private final IWorkbenchPage unsafeGetWorkbenchPage() {
    IWorkbenchPage page = null;
    if (PlatformUI.isWorkbenchRunning()) {
        IWorkbench wb = PlatformUI.getWorkbench();
        IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
        page = win.getActivePage();
    }
    return page;
}
项目:n4js    文件:AbstractBuilderTest.java   
/***/
@SuppressWarnings("restriction")
protected IWorkbenchPage getActivePage() {
    IWorkbenchPage page = null;
    if (org.eclipse.ui.internal.Workbench.getInstance() != null) {
        IWorkbench wb = PlatformUI.getWorkbench();
        IWorkbenchWindow window = wb.getActiveWorkbenchWindow();
        // Could be null if using Timeout test rule and does not run on main thread.
        if (null != window) {
            page = window.getActivePage();
        }
    }
    return page;
}
项目:Hydrograph    文件:JobRunPreference.java   
@Override
public void init(IWorkbench workbench) {
    getPreferenceStore().setDefault(SAVE_JOB_BEFORE_RUN_PREFRENCE, MessageDialogWithToggle.PROMPT);
    getPreferenceStore().setDefault(LOG_LEVEL_PREFERENCE,DEFUALT_LOG_LEVEL);
    String value = Activator.getDefault().getPreferenceStore()
            .getString(SAVE_JOB_BEFORE_RUN_PREFRENCE);
    if (StringUtils.equals(MessageDialogWithToggle.ALWAYS, value)) {
        getPreferenceStore().setValue(SAVE_JOB_BEFORE_RUN_PREFRENCE, value);
    } else {
        getPreferenceStore().setValue(SAVE_JOB_BEFORE_RUN_PREFRENCE, MessageDialogWithToggle.PROMPT);
    }


    String log_level_value= Activator.getDefault().getPreferenceStore().getString(JobRunPreference.LOG_LEVEL_PREFERENCE);

    if (StringUtils.isNotBlank(log_level_value)) {
        getPreferenceStore().setValue(LOG_LEVEL_PREFERENCE, log_level_value);
    } else {
        getPreferenceStore().setValue(LOG_LEVEL_PREFERENCE, DEFUALT_LOG_LEVEL);
    }

    String consoleBufferValue = Activator.getDefault().getPreferenceStore().getString(Constants.CONSOLE_BUFFER_SIZE_PREFERANCE_NAME);
    if(StringUtils.isNotBlank(consoleBufferValue)){
        getPreferenceStore().setValue(Constants.CONSOLE_BUFFER_SIZE_PREFERANCE_NAME, consoleBufferValue);
    }else{
        getPreferenceStore().setValue(Constants.CONSOLE_BUFFER_SIZE_PREFERANCE_NAME, Constants.DEFUALT_CONSOLE_BUFFER_SIZE);
    }
}
项目:gw4e.project    文件:ConvertToFileCreationWizard.java   
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
    this.workbench = workbench;
    this.selection = selection;
    setWindowTitle((MessageUtil.getString("GraphWalker_Conversion_File"))); //$NON-NLS-1$
    setDefaultPageImageDescriptor(WIZARD_BANNER);
}
项目:n4js    文件:NFARExportWizard.java   
@Override
public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
    this.selection = currentSelection;

    setWindowTitle(NFARExportMessages.WizardTitle_export);
    setDefaultPageImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(
            "org.eclipse.ui.ide", "$nl$/icons/full/wizban/exportzip_wiz.png"));//$NON-NLS-1$
    setNeedsProgressMonitor(true);
}
项目:n4js    文件:ManualAssociationAwareWorkingSetManager.java   
/**
 * Resets the state of all Eclipse based working sets that belong to the 'Resources' type.
 */
private void resetEclipseWorkingSetsBaseOnCurrentState() {
    try {
        if (getWorkbench() == null || getWorkbench().getWorkingSetManager() == null) {
            return; // happens during shutdown
        }

        // Removed listener otherwise due to the Eclipse based working set deletion
        // we would delete our content.
        getWorkbench().getWorkingSetManager().removePropertyChangeListener(this);

        deleteEclipseResourcesWorkingSets();
        final IWorkingSetManager manager = getWorkbench().getWorkingSetManager();
        for (final WorkingSet workingSet : getAllWorkingSets()) {
            if (!OTHERS_WORKING_SET_ID.equals(workingSet.getId())) {
                org.eclipse.ui.internal.WorkingSet eclipseWorkingSet = createEclipseWorkingSet(workingSet);
                eclipseWorkingSet.setId(WorkingSetManagerModificationStrategy.RESOURCE_WORKING_SET_ID);
                manager.addWorkingSet(eclipseWorkingSet);
            }
        }
    } finally {
        IWorkbench wb = getWorkbench();
        if (wb != null) {
            IWorkingSetManager wsm = wb.getWorkingSetManager();
            if (wsm != null) { // null-safe re-adding (can be null during shutdown)
                wsm.addPropertyChangeListener(this);
            }
        }
    }
}
项目:n4js    文件:WorkingSetEditWizard.java   
@Override
public void init(final IWorkbench workbench, final IStructuredSelection selection) {
    if (selection != null && !selection.isEmpty()) {
        final Object firstElement = selection.getFirstElement();
        if (firstElement instanceof WorkingSet) {
            editedWorkingSet = (WorkingSet) firstElement;
        }
    }
}
项目:OCCI-Studio    文件:InfrastructureModelWizard.java   
/**
 * This just records the information.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void init(IWorkbench workbench, IStructuredSelection selection) {
    this.workbench = workbench;
    this.selection = selection;
    setWindowTitle(InfrastructureEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
    setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(InfrastructureEditorPlugin.INSTANCE.getImage("full/wizban/NewInfrastructure")));
}
项目:n4js    文件:N4JSApplicationWorkbenchWindowAdvisor.java   
private void initN4Context() {
    if (isWorkbenchRunning()) {
        final IWorkbench workbench = getWorkbench();
        workbench.getDisplay().asyncExec(() -> {
            final IContextService service = workbench.getService(IContextService.class);
            service.activateContext(N4_CONTEXT_ID);
        });
    }
}
项目:n4js    文件:N4JSApplication.java   
@Override
public void stop() {
    final IWorkbench workbench = PlatformUI.getWorkbench();
    if (workbench == null)
        return;
    final Display display = workbench.getDisplay();
    display.syncExec(new Runnable() {
        @Override
        public void run() {
            if (!display.isDisposed())
                workbench.close();
        }
    });
}
项目:gw4e.project    文件:FilterTests.java   
private void resetWorkbench() {
    try {
        IViewReference[] views = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getViewReferences();
        for (IViewReference iViewReference : views) {
             if ( iViewReference.getTitle().equals( "Welcome" ) ) {
                    iViewReference.getPage().hideView(iViewReference);
                    break;
            }
        }

        IWorkbench workbench = PlatformUI.getWorkbench();
        IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
        IWorkbenchPage page = workbenchWindow.getActivePage();
        Shell activeShell = Display.getCurrent().getActiveShell();
        if ( activeShell != null && activeShell != workbenchWindow.getShell() ) {
            activeShell.close();
        }
        page.closeAllEditors( false );
        page.resetPerspective();
        String defaultPerspectiveId = workbench.getPerspectiveRegistry().getDefaultPerspective();
        workbench.showPerspective( defaultPerspectiveId, workbenchWindow );
        page.resetPerspective();
    }
    catch ( WorkbenchException e ) {
        throw new RuntimeException( e );
    }

}
项目:AgentWorkbench    文件:UiBridge.java   
/**
 * Returns the current workbench, if active.
 * @return the workbench
 */
public IWorkbench getWorkbench() {
    if (this.isWorkbenchRunning()==true) {
        return PlatformUI.getWorkbench();
    }
    return null;
}
项目:AgentWorkbench    文件:UiBridge.java   
/**
 * Returns the active workbench window.
 * @return the active workbench window
 */
public IWorkbenchWindow getActiveWorkbenchWindow() {
    IWorkbench iwb = this.getWorkbench();
    if (iwb!=null) {
        return iwb.getActiveWorkbenchWindow();
    }
    return null;
}
项目:bdf2    文件:POJO2DataTypeWizard.java   
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
    if(selection.isEmpty()){
        // do nothing
    }else{
        selectClassPage.init(selection);
    }
}
项目:SimQRI    文件:MetamodelModelWizard.java   
/**
 * This just records the information.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void init(IWorkbench workbench, IStructuredSelection selection) {
    this.workbench = workbench;
    this.selection = selection;
    setWindowTitle(MetamodelEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
    setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(MetamodelEditorPlugin.INSTANCE.getImage("full/wizban/NewMetamodel")));
}
项目:eclipse-bash-editor    文件:EclipseUtil.java   
/**
 * Returns workbench or <code>null</code>
 * 
 * @return workbench or <code>null</code>
 */
private static IWorkbench getWorkbench() {
    if (!PlatformUI.isWorkbenchRunning()) {
        return null;
    }
    IWorkbench workbench = PlatformUI.getWorkbench();
    return workbench;
}
项目:codelens-eclipse    文件:EditorTracker.java   
private void init() {
    if (PlatformUI.isWorkbenchRunning()) {
        IWorkbench workbench = CodeLensEditorPlugin.getDefault().getWorkbench();
        if (workbench != null) {
            IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
            for (IWorkbenchWindow window : windows) {
                windowOpened(window);
            }
            CodeLensEditorPlugin.getDefault().getWorkbench().addWindowListener(this);
        }
    }
}
项目:Hydrograph    文件:ExecutionTrackPreference.java   
@Override
public void init(IWorkbench workbench) {
    IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore();
    preferenceStore.setDefault(ExecutionPreferenceConstants.EXECUTION_TRACKING, true);
    preferenceStore.setDefault(ExecutionPreferenceConstants.TRACKING_LOG_PATH,
            TrackingDisplayUtils.INSTANCE.getInstallationPath());

    setPreferenceStore(preferenceStore);
}
项目:gemoc-studio-modeldebugging    文件:TracingannotationsModelWizard.java   
/**
 * This just records the information.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void init(IWorkbench workbench, IStructuredSelection selection) {
    this.workbench = workbench;
    this.selection = selection;
    setWindowTitle(TracingannotationsEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
    setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(TracingannotationsEditorPlugin.INSTANCE.getImage("full/wizban/NewTracingannotations")));
}
项目:OCCI-Studio    文件:NewDiagramWizard.java   
/**
 * This just records the information.
 */
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
    this.workbench = workbench;
    this.selection = selection;
    setWindowTitle(Messages.NewConfigurationWizard_WindowTitle);
}
项目:gw4e.project    文件:GeneratorToFileCreationWizard.java   
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
    this.workbench = workbench;
    setWindowTitle((MessageUtil.getString("GraphWalker_Generator_File"))); //$NON-NLS-1$
    setDefaultPageImageDescriptor(WIZARD_BANNER);

    List models = selection.toList();
    model = (IFile) models.get(0);
    ids = (List<String>) models.get(1);
}
项目:gemoc-studio-modeldebugging    文件:NewGemocSiriusProjectWizard.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench,
 *      org.eclipse.jface.viewers.IStructuredSelection)
 */
public void init(final IWorkbench wkbch, final IStructuredSelection sel) {
    this.workbench = wkbch;
    setWindowTitle("New Viewpoint Specification Project");
    setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE
            .getImageDescriptor(SiriusEditorPlugin.INSTANCE
                    .getImage("full/wizban/banner_viewpoint_specification_project.gif")));
}
项目:OCCI-Studio    文件:SlaModelWizard.java   
/**
 * This just records the information.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void init(IWorkbench workbench, IStructuredSelection selection) {
    this.workbench = workbench;
    this.selection = selection;
    setWindowTitle(SlaEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
    setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(SlaEditorPlugin.INSTANCE.getImage("full/wizban/NewSla")));
}
项目:time4sys    文件:NfpModelWizard.java   
/**
 * This just records the information.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void init(IWorkbench workbench, IStructuredSelection selection) {
    this.workbench = workbench;
    this.selection = selection;
    setWindowTitle(NfpEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
    setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(NfpEditorPlugin.INSTANCE.getImage("full/wizban/NewNfp")));
}
项目:eclipse-batch-editor    文件:EclipseUtil.java   
/**
 * Returns active workbench shell - or <code>null</code>
 * 
 * @return active workbench shell - or <code>null</code>
 */
public static Shell getActiveWorkbenchShell() {
    IWorkbench workbench = getWorkbench();
    if (workbench == null) {
        return null;
    }
    IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
    if (window == null) {
        return null;
    }
    Shell shell = window.getShell();
    return shell;
}
项目:eclipse-batch-editor    文件:EclipseUtil.java   
public static IWorkbenchWindow getActiveWorkbenchWindow() {
    IWorkbench workbench = getWorkbench();
    if (workbench == null) {
        return null;
    }
    IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();

    if (workbenchWindow != null) {
        return workbenchWindow;
    }
    /* fall back - try to execute in UI */
    WorkbenchWindowRunnable wwr = new WorkbenchWindowRunnable();
    getSafeDisplay().syncExec(wwr);
    return wwr.workbenchWindowFromUI;
}
项目:OCCI-Studio    文件:OCCIModelWizard.java   
/**
 * This just records the information.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void init(IWorkbench workbench, IStructuredSelection selection) {
    this.workbench = workbench;
    this.selection = selection;
    setWindowTitle(OCCIEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
    setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(OCCIEditorPlugin.INSTANCE.getImage("full/wizban/NewOCCI")));
}
项目:time4sys    文件:SrmModelWizard.java   
/**
 * This just records the information.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void init(IWorkbench workbench, IStructuredSelection selection) {
    this.workbench = workbench;
    this.selection = selection;
    setWindowTitle(SrmEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
    setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(SrmEditorPlugin.INSTANCE.getImage("full/wizban/NewSrm")));
}
项目:neoscada    文件:ProtocolModelWizard.java   
/**
 * This just records the information.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void init ( IWorkbench workbench, IStructuredSelection selection )
{
    this.workbench = workbench;
    this.selection = selection;
    setWindowTitle ( NextGenerationProtocolEditorPlugin.INSTANCE.getString ( "_UI_Wizard_label" ) ); //$NON-NLS-1$
    setDefaultPageImageDescriptor ( ExtendedImageRegistry.INSTANCE.getImageDescriptor ( NextGenerationProtocolEditorPlugin.INSTANCE.getImage ( "full/wizban/NewProtocol" ) ) ); //$NON-NLS-1$
}
项目:neoscada    文件:WriteOperationWizard.java   
@Override
public void init ( final IWorkbench workbench, final IStructuredSelection selection )
{
    setNeedsProgressMonitor ( true );

    this.selection = selection;
}
项目:neoscada    文件:WriteAttributesOperationWizard.java   
@Override
public void init ( final IWorkbench workbench, final IStructuredSelection selection )
{
    setNeedsProgressMonitor ( true );
    setWindowTitle ( Messages.getString ( "WriteAttributesOperationWizard.Title" ) ); //$NON-NLS-1$

    this.selection = selection;
}
项目:time4sys    文件:MappingModelWizard.java   
/**
 * This just records the information.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void init(IWorkbench workbench, IStructuredSelection selection) {
    this.workbench = workbench;
    this.selection = selection;
    setWindowTitle(MappingEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
    setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(MappingEditorPlugin.INSTANCE.getImage("full/wizban/NewMapping")));
}
项目:gemoc-studio    文件:GexpressionsModelWizard.java   
/**
 * This just records the information.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void init(IWorkbench workbench, IStructuredSelection selection) {
    this.workbench = workbench;
    this.selection = selection;
    setWindowTitle(GexpressionsEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
    setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(GexpressionsEditorPlugin.INSTANCE.getImage("full/wizban/NewGexpressions")));
}
项目:neoscada    文件:CreateQueryWizard.java   
public void init ( final IWorkbench workbench, final IStructuredSelection selection )
{
    final Object o = selection.getFirstElement ();
    if ( o instanceof QueryListWrapper )
    {
        this.wrapper = (QueryListWrapper)o;
    }
}