Examples of WorkbenchLabelProvider


Examples of org.eclipse.ui.model.WorkbenchLabelProvider

        });
    }

    private void selectInProject() {
        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(),
                new WorkbenchLabelProvider(), new BaseWorkbenchContentProvider());
        dialog.setTitle("Select a file in the project:");
        dialog.setMessage("Select a file in the project:");
        // Filter to the project
        dialog.addFilter(new ViewerFilter() {
            public boolean select(Viewer viewer, Object parentElement, Object element) {
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

        }
    }

    private void selectInWorkspace() {
        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(),
                new WorkbenchLabelProvider(), new BaseWorkbenchContentProvider());
        dialog.setTitle("Select a file in the workspace:");
        dialog.setMessage("Select a file in the workspace:");
        // Filter closed projects
        dialog.addFilter(new ViewerFilter() {
            public boolean select(Viewer viewer, Object parentElement, Object element) {
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

        btn.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                String path = null;
                if (project != null) {
                    ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(Display
                            .getDefault().getActiveShell(), new WorkbenchLabelProvider(),
                            new WorkbenchContentProvider());
                    dialog.setValidator(new ISelectionStatusValidator() {
                        private final IStatus errorStatus = new Status(IStatus.ERROR, IvyPlugin.ID,
                                0, "", null);
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

        btnAdd.addSelectionListener(new SelectionAdapter() {
            @Override
            public void widgetSelected(SelectionEvent e) {
                // IResource newFile = ResourcesPlugin.getWorkspace().getRoot();
                // if(newFile != null) {
                ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
                dialog.setValidator(new ISelectionStatusValidator() {
                    public IStatus validate(Object[] selection) {
                        if (selection.length > 0 && selection[0] instanceof IFile) {
                            return new Status(IStatus.OK, Plugin.PLUGIN_ID, IStatus.OK, "", null); //$NON-NLS-1$
                        }
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

  public void createPartControl(Composite parent) {
    // the PageBook allows simple switching between two viewers
    pagebook = new PageBook(parent, SWT.NONE);

    tableviewer = new TableViewer(pagebook, SWT.NONE);
    tableviewer.setLabelProvider(new WorkbenchLabelProvider());
    tableviewer.setContentProvider(new ArrayContentProvider());
    tableviewer.setSelection(null);

    // we're cooperative and also provide our selection
    // at least for the tableviewer
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

    fMapNameDialogField.setLabelText("Map name:");
    fMapNameDialogField.setText("default.map");
   
    fProjectListDialogField= new ListDialogField(this,
        new String[] { "Add...",   null, "Remove" },
        new WorkbenchLabelProvider());
    fProjectListDialogField.setDialogFieldListener(this);
    fProjectListDialogField.setLabelText("Projects:");
    fProjectListDialogField.setRemoveButtonIndex(2);

    fFileExtensionsDialogField= new ListDialogField(this,
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

  private void chooseProjects() {
    ListSelectionDialog dialog= new ListSelectionDialog(
        getShell(),
        getNotYetRequiredProjects(),
        ArrayContentProvider.getInstance(),
        new WorkbenchLabelProvider(),
        "message");
    dialog.setTitle("title");
    dialog.setHelpAvailable(false);
    if (dialog.open() != Window.OK) return;
    for (Object each: dialog.getResult()) fProjectListDialogField.addElement(each);
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

  @SuppressWarnings("unchecked")
  private IFolder chooseFolder(String title, String message, IPath initialPath) {
    Class[] acceptedClasses= new Class[] { IContainer.class };
    ViewerFilter filter= new TypedViewerFilter(acceptedClasses, null);

    ILabelProvider lp= new WorkbenchLabelProvider();
    ITreeContentProvider cp= new WorkbenchContentProvider();

    ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp);
    dialog.setTitle(title);
    dialog.setMessage(message);
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

    Button browseButton = new Button(composite, SWT.PUSH);
    browseButton.setText("Browse ...");
    browseButton.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(ResourcesPlugin.getWorkspace().getRoot());
        dialog.setInitialSelection(ResourcesPlugin.getWorkspace().getRoot().
                findMember(typeSystemText.getText()));
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchLabelProvider

                                    String dialogTitle, String dialogMessage)
    {
        IResource resource = null;
       
        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(shell,
                new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        dialog.setTitle(dialogTitle);
        dialog.setMessage(dialogMessage);
        dialog.setInput(root);
        dialog.setSorter(new ResourceSorter(ResourceSorter.NAME));
        int buttonId = dialog.open();
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.