Package org.eclipse.ui.dialogs

Examples of org.eclipse.ui.dialogs.ResourceListSelectionDialog


    /***
     * Open a resource chooser to select a file
     **/
    protected void browseFiles() {
        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
        ResourceListSelectionDialog dialog = new ResourceListSelectionDialog(getShell(), root, IResource.FILE);
        dialog.setTitle(Constants.SEARCH_TITLE);
        if (dialog.open() == Window.OK) {
            Object[] files = dialog.getResult();
            IFile file = (IFile) files[0];
            fileText.setText(file.getFullPath().toString());
        }

    }
View Full Code Here


    /***
     * Open a resource chooser to select a file
     **/
    protected void browseFiles() {
        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
        ResourceListSelectionDialog dialog = new ResourceListSelectionDialog(getShell(), root, IResource.FILE);
        dialog.setTitle(Constants.SEARCH_TITLE);
        if (dialog.open() == Window.OK) {
            Object[] files = dialog.getResult();
            IFile file = (IFile) files[0];
            fileText.setText(file.getFullPath().toString());
        }

    }
View Full Code Here

  public CSAddBeanDialog(Shell parentShell) {
    super(parentShell);
    // TODO Auto-generated constructor stub
  }
  private void handleExtendBrowse() {
    ResourceListSelectionDialog listSelection = null;
   
    try {
      listSelection = new ResourceListSelectionDialog(
        getShell(),
        ResourcesPlugin.getWorkspace().getRoot(),
        IResource.FILE
      );
     
    } catch (Exception e) {
      e.printStackTrace();
    }
   
    if(listSelection.open() == ResourceListSelectionDialog.OK)
    {
      Object[] result = listSelection.getResult();
     
      if(result.length == 1)
      {
        IResource resource = (IResource)result[0];
        String s = resource.getProjectRelativePath().toString();
View Full Code Here

  /**
   * Uses the standard container selection dialog to
   * choose the new value for the cfcExtend field.
   */
  private void handleExtendBrowse() {
    ResourceListSelectionDialog listSelection = null;
   
    try {
      listSelection = new ResourceListSelectionDialog(
        getShell(),
        ResourcesPlugin.getWorkspace().getRoot(),
        IResource.FILE
      );
     
    } catch (Exception e) {
      e.printStackTrace();
    }
   
    if(listSelection.open() == ResourceListSelectionDialog.OK)
    {
      Object[] result = listSelection.getResult();
     
      if(result.length == 1)
      {
        IResource resource = (IResource)result[0];
        String s = resource.getProjectRelativePath().toString();
View Full Code Here

   * Opens a dialog to assist the user find their unit test. If the user
   * selects a file it will update the global instance of TestCase.
   */
  private void browseFiles() {
 
    ResourceListSelectionDialog listSelection = null;
   
    try {
      listSelection = new ResourceListSelectionDialog(
        null,
        ResourcesPlugin.getWorkspace().getRoot(),
        IResource.FILE
      );
    } catch (Exception e) {
      e.printStackTrace();
    }
   
    listSelection.setTitle("Find CFUnit Test");
   
    if(listSelection.open() == ResourceListSelectionDialog.OK) {
      Object[] result = listSelection.getResult();
     
      if(result.length == 1) {
        IResource resource = (IResource)result[0];
        CFUnitTestSuite.getInstence().setTest( CFUnitTestCase.getResourceFullName( resource ) );
        actionAutoload.setChecked( false );
View Full Code Here

  /**
   * Uses the standard container selection dialog to
   * choose the new value for the file under test field.
   */
  private void handleFileBrowse() {
    ResourceListSelectionDialog listSelection = null;
   
    try {
      listSelection = new ResourceListSelectionDialog(
        getShell(),
        ResourcesPlugin.getWorkspace().getRoot(),
        IResource.FILE
      );     
    } catch (Exception e) {
      e.printStackTrace();
    }
   
    if(listSelection.open() == ResourceListSelectionDialog.OK) {
      Object[] result = listSelection.getResult();
     
      if(result.length == 1) {
        futResource = (IResource)result[0];
        futLocation.setText( futResource.getFullPath().toString() );
        futLocation.setEnabled( true );
View Full Code Here

TOP

Related Classes of org.eclipse.ui.dialogs.ResourceListSelectionDialog

Copyright © 2018 www.massapicom. 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.