Package org.eclipse.ui.dialogs

Examples of org.eclipse.ui.dialogs.ResourceSelectionDialog.open()


        ResourceSelectionDialog dialog = new ResourceSelectionDialog(getShell(), currentContainer,
                "Selection Dialog");
        dialog.setTitle("Selection Dialog");
        dialog.setMessage("Please select a file:");
        dialog.open();
        Object[] result = dialog.getResult();
        if (result[0] != null) {
          IResource res = (IResource) result[0];
          text.setText(res.getProjectRelativePath().toOSString());
        }
View Full Code Here


        ResourceSelectionDialog dialog = new ResourceSelectionDialog(getShell(), currentContainer,
                "Selection Dialog");
        dialog.setTitle("Selection Dialog");
        dialog.setMessage("Please select a file:");
        dialog.open();
        Object[] result = dialog.getResult();
        if (result[0] != null) {
          IResource res = (IResource) result[0];
          text.setText(res.getProjectRelativePath().toOSString());
        }
View Full Code Here

        dlg.setBlockOnOpen(true);
        dlg.setHelpAvailable(false);
        dlg.setMessage("Select the Acme file that describes"
            + " the architecture of the project");

        if (dlg.open() == ResourceSelectionDialog.OK) {
          for (Object obj : dlg.getResult()) {
            if (obj instanceof IFile) {
              IFile file = (IFile) obj;
              if (file.getFileExtension() != null) {
                for (AdlType type : adlTypes) {
View Full Code Here

        dlg.setBlockOnOpen(true);
        dlg.setHelpAvailable(false);
        dlg.setMessage("Select the Architecture Mapping file that maps"
            + " the architecture to the implementation");

        if (dlg.open() == ResourceSelectionDialog.OK) {
          for (Object obj : dlg.getResult()) {
            if (obj instanceof IFile) {
              IFile file = (IFile) obj;
              if (file.getFileExtension() != null
                  && file.getFileExtension().equals("xml")) {
View Full Code Here

   * <code>null</code> if no location was obtained from the user.
   */
  protected void handleWorkspaceLocationButtonSelected() {
    ResourceSelectionDialog dialog;
    dialog = new ResourceSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), ExternalToolsLaunchConfigurationMessages.ExternalToolsMainTab_Select_a_resource_22);
    dialog.open();
    Object[] results = dialog.getResult();
    if (results == null || results.length < 1) {
      return;
    }
    IResource resource = (IResource)results[0];
View Full Code Here

  private void handleBrowse() {
    ResourceSelectionDialog dialog = new ResourceSelectionDialog(
        getShell(), ResourcesPlugin.getWorkspace().getRoot(),
        "Select capability definition file");
    if (dialog.open() == ResourceSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        capabilityFileText.setText(((IFile)result[0]).getRawLocation().toOSString());
        dialogChanged();
      }
View Full Code Here

    ModelingProject model = null;
   
    ResourceSelectionDialog dialog = new ResourceSelectionDialog(getShell(),
        ResourcesPlugin.getWorkspace().getRoot(), "Select a modeling project");
   
    if (dialog.open() == ContainerSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        IFile res = (IFile) result[0];
       
        modelFileText.setText(res.getFullPath().toString());
View Full Code Here

  }
 
  private void handleProjectBrowse() {
    ResourceSelectionDialog dialog =
      new ResourceSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), "Select a modeling project");
    if (dialog.open() == ContainerSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        IFile res = (IFile) result[0];
       
        projectPathText.setText(res.getFullPath().toString());
View Full Code Here

      public void widgetSelected(SelectionEvent e) {
        ResourceSelectionDialog dialog = new ResourceSelectionDialog(
            PlatformUI.getWorkbench().getDisplay().getActiveShell(),
            ResourcesPlugin.getWorkspace().getRoot(),
            "Select the resource");
        if (dialog.open() == ContainerSelectionDialog.OK) {
          if (dialog.getResult().length == 1) {
            org.eclipse.core.resources.IResource selectedRes = (org.eclipse.core.resources.IResource) dialog.getResult()[0];
            ExternalResource resource = (ExternalResource) getSelectedResource();
            resource.setLocation(selectedRes.getFullPath().toOSString());
            resourceSectionPart.markStale();
View Full Code Here

   * the container field.
   */
  private void handleBrowse() {
    ResourceSelectionDialog dialog =
      new ResourceSelectionDialog(getShell(), ResourcesPlugin.getWorkspace().getRoot(), "Select an UML resource");
    if (dialog.open() == ContainerSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        this.umlResourceText.setText(((IResource) result[0]).getFullPath().toString());
        this.dialogChanged();
      } else {
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.