Examples of WorkbenchLabelProvider


Examples of org.eclipse.ui.model.WorkbenchLabelProvider

    public static IResource getWorkspaceResourceElement (Shell shell)
    {
        IResource resource = null;
        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(shell,
                new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        dialog.setTitle("Select Cpe descriptor");
        dialog.setMessage("Select Cpe Xml descriptor file");
        dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
        dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));
        int buttonId = dialog.open();
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

       * text field.
       */
      public void widgetSelected(SelectionEvent e) {

        final ElementTreeSelectionDialog folderSelectionDialog = new ElementTreeSelectionDialog(
                getShell(), new DecoratingLabelProvider(new WorkbenchLabelProvider(), PlatformUI
                        .getWorkbench().getDecoratorManager().getLabelDecorator()),
                new BaseWorkbenchContentProvider());

        folderSelectionDialog.addFilter(new ContainerElementFilter());

View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

   
    Button browseProject = new Button(projectGroup, SWT.NONE);
    browseProject.setText("Browse ...");
    browseProject.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        ILabelProvider labelProvider = new WorkbenchLabelProvider();

        ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(),
                labelProvider);
        dialog.setTitle("Project Selection");
        dialog.setMessage("Select a project");
        dialog.setElements(getWorkspaceRoot().getProjects());
        IProject project = getSelectedProject();
        if (project != null) {
          dialog.setInitialSelections(new Object[] { project });
        }
       
        if (dialog.open() == Window.OK) {
          IProject selectedProject = (IProject) dialog.getFirstResult();
          projectText.setText(selectedProject.getName());
        }
      }
    });
   
    // Descriptor Group
    Group descriptorGroup = new Group(projectComposite, SWT.None);
    descriptorGroup.setText("Descriptor:");
   
    GridData descriptorGroupData = new GridData();
    descriptorGroupData.grabExcessHorizontalSpace = true;
    descriptorGroupData.horizontalAlignment = SWT.FILL;
    descriptorGroup.setLayoutData(projectGroupData);
   
    GridLayout descriptorGroupLayout = new GridLayout(2, false);
    descriptorGroup.setLayout(descriptorGroupLayout);
   
    descriptorText = new Text(descriptorGroup, SWT.BORDER);
    GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).
            grab(true, false).applyTo(descriptorText);
    descriptorText.addModifyListener(new ModifyListener() {
     
      public void modifyText(ModifyEvent event) {
        updateLaunchConfigurationDialog();
      }
    });
    Button browseDescriptor = new Button(descriptorGroup, SWT.NONE);
    browseDescriptor.setText("Browse ...");
    browseDescriptor.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(),
                new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        dialog.setTitle("Select descriptor");
        dialog.setMessage("Select descriptor");
        dialog.setInput(getWorkspaceRoot());
        dialog.setInitialSelection(getWorkspaceRoot().findMember(descriptorText.getText()));
        if (dialog.open() == IDialogConstants.OK_ID) {
          IResource resource = (IResource) dialog.getFirstResult();
          if (resource != null) {
            String fileLoc = resource.getFullPath().toString();
            descriptorText.setText(fileLoc);
          }
        }
      }
    });
   
    // Input Resource Group
    Group inputResourceGroup = new Group(projectComposite, SWT.None);
    inputResourceGroup.setText("Input Resource:");
   
    GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).
            grab(true, false).applyTo(inputResourceGroup);
   
    GridLayout inputResourceGroupLayout = new GridLayout(2, false);
    inputResourceGroup.setLayout(inputResourceGroupLayout);
   
    inputText = new Text(inputResourceGroup, SWT.BORDER);
    GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).
            grab(true, false).applyTo(inputText);
    inputText.addModifyListener(new ModifyListener() {
     
      public void modifyText(ModifyEvent event) {
        updateLaunchConfigurationDialog();
      }
    });
   
    Button browseInputResource = new Button(inputResourceGroup, SWT.NONE);
    browseInputResource.setText("Browse ...");
    browseInputResource.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(),
                new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        dialog.setTitle("Select input folder or file");
        dialog.setMessage("Select input folder or file");
        dialog.setInput(getSelectedProject());
        dialog.setInitialSelection(getWorkspaceRoot().findMember(inputText.getText()));
        if (dialog.open() == IDialogConstants.OK_ID) {
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

    openProgramPathDialog(project);
  }
 
  protected void openProgramPathDialog(IProject project) {
    ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(
        getShell(), new WorkbenchLabelProvider(),
        new WorkbenchContentProvider());
    dialog.setTitle(LangUIMessages.mainTab_ProgramPath_searchButton_title);
    dialog.setMessage(LangUIMessages.mainTab_ProgramPath_searchButton_message);
   
    dialog.setInput(project);
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

    }
    return ArrayUtil.createFrom(list, IResource.class);
  }
 
  protected IResource chooseLaunchable(IResource[] scripts) {
    ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), new WorkbenchLabelProvider());
    dialog.setElements(scripts);
    dialog.setTitle(LangUIMessages.LaunchShortcut_selectLaunchableToLaunch);
    dialog.setMessage(LangUIMessages.LaunchShortcut_selectLaunchableToLaunch);
    if (dialog.open() == Window.OK) {
      return (IResource) dialog.getResult()[0];
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

    private BugContentProvider provider;

    public BugLabelProvider() {
        super();
        wbProvider = new WorkbenchLabelProvider();
    }
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

  }

  static IPath showWorkspaceDirectorySelectionDialog(Shell shell, String initialPath, IProject project) {
    String currentPathText = initialPath.replaceAll("\"", "");
    URI uri = URI.create(currentPathText);
    ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(shell, new WorkbenchLabelProvider(),
        new WorkbenchContentProvider());
    IWorkspaceRoot workspaceRoot = workspaceRoot();
    dialog.setInput(project == null ? workspaceRoot : project);
    dialog.setComparator(new ResourceComparator(NAME));
    IResource container = null;
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

//        Platform.getAdapterManager().registerAdapters(adapterFactory, CreatureAttribute.class);
//        Platform.getAdapterManager().registerAdapters(adapterFactory, CreatureAttributeFactory.class);
//        Platform.getAdapterManager().registerAdapters(adapterFactory, CreatureAttributeSection.class);
        Platform.getAdapterManager().registerAdapters(adapterFactory, Preference.class);

        viewer.setLabelProvider(new WorkbenchLabelProvider() /* AdminViewLabelProvider(this) */);
        viewer.setContentProvider(new BaseWorkbenchContentProvider() /* AdminViewContentProvider(this) */);
        viewer.addDoubleClickListener(new AdminViewDoubleClickListener(this));

        viewer.setInput(this);

View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

                                     SelectionDialogDetails selectionDialogDetails,
                                     QualifiedName qualifiedEntityId,
                                     ProjectProvider projectProvider,
                                     PolicyNameValidator policyNameValidator) {

        super(parentShell, new WorkbenchLabelProvider(),
                new WorkbenchContentProvider());

        // Set the instance entities
        this.policyNameValidator = policyNameValidator;
        this.qualifiedEntityId = qualifiedEntityId;
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

                                     SelectionDialogDetails selectionDialogDetails,
                                     QualifiedName qualifiedEntityId,
                                     ProjectProvider projectProvider,
                                     PolicyNameValidator policyNameValidator) {

        super(parentShell, new WorkbenchLabelProvider(),
                new WorkbenchContentProvider());

        // Set the instance entities
        this.policyNameValidator = policyNameValidator;
        this.qualifiedEntityId = qualifiedEntityId;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.