Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IFile


    }

    private void handleOpenInEditor() {
        if (_tableControl.getTable().getSelectionCount() > 0) {
            IFile selectedFile = _directAccessibleFilesModel.getBeans().get(_tableControl.getTable().getSelectionIndex());
            try {
                WorkbenchUtils.openEditor(Plugin.getDefault().getWorkbench(), selectedFile, ResourceIDs.EDITOR_TML);
            }
            catch (PartInitException e) {
                WorkbenchUtils.showErrorDialog(Plugin.getDefault(), getSite().getShell(), "Unable to open TML Editor", e);
View Full Code Here


            _model.getDesignContainer().accept(new IResourceVisitor() {

                public boolean visit(IResource resource) throws CoreException {

                    if (resource instanceof IFile) {
                        IFile file = (IFile) resource;
                        if (WGADesignStructureHelper.isDirectAccess(file)) {
                            directAccessibleFiles.add(file);
                        }
                    }
View Full Code Here

      } else if (workspaceSelection instanceof IFile) {
        bestContainer = ((IFile) workspaceSelection).getParent();
      }
     
      if (bestContainer != null) {
        IFile syncInfo = WGADesignStructureHelper.determineSyncInfo(bestContainer);
        if (syncInfo != null) {
          WGADesignStructureHelper helper = new WGADesignStructureHelper(syncInfo);
          return new SingleStructuredSelection(helper.getDesignRoot());
        }
      }
View Full Code Here

    dialog.setInput(_model.getTMLScriptDirectory());
    dialog.setTitle("Please select an initialisation script");
   
    int result = dialog.open();
    if (result == ListDialog.OK) {
      IFile selectedScript = (IFile) dialog.getResult()[0];
      IPath selectedScriptPath = selectedScript.getLocation();
      IPath tmlScriptDirectoryPath = new Path(_model.getTMLScriptDirectory().getAbsolutePath());     
      _txtInitScript.setText(computePathToScriptFrom(tmlScriptDirectoryPath,selectedScriptPath));
         
    }   
  }
View Full Code Here

    dialog.setInput(_model.getTMLScriptDirectory());
    dialog.setTitle("Please select an connection script");
   
    int result = dialog.open();
    if (result == ListDialog.OK) {
        IFile selectedScript = (IFile) dialog.getResult()[0];
          IPath selectedScriptPath = selectedScript.getLocation();
          IPath tmlScriptDirectoryPath = new Path(_model.getTMLScriptDirectory().getAbsolutePath());         
          _txtConnectionScript.setText(computePathToScriptFrom(tmlScriptDirectoryPath,selectedScriptPath));
   
  }
View Full Code Here

    dialog.setInput(_model.getTMLScriptDirectory());
    dialog.setTitle("Please select a disconnection script");
   
    int result = dialog.open();
    if (result == ListDialog.OK) {
        IFile selectedScript = (IFile) dialog.getResult()[0];
          IPath selectedScriptPath = selectedScript.getLocation();
          IPath tmlScriptDirectoryPath = new Path(_model.getTMLScriptDirectory().getAbsolutePath());         
          _txtDisconnectionScript.setText(computePathToScriptFrom(tmlScriptDirectoryPath,selectedScriptPath));
   
  }
View Full Code Here

      files.add(currentFolder.getFile("general.properties"));
    }

    Iterator<IFile> it = files.iterator();
    while (it.hasNext()) {
      IFile current = it.next();
      String currentFileName = current.getName().substring(0, current.getName().lastIndexOf('.'));
      labelFiles.add(currentFileName);

    }

    List<String> list = new ArrayList<String>();
View Full Code Here

    String prefix = "";
    if (_buttonCheckPrefix.getSelection()) {
      prefix = _comboPrefix.getText();
    }

    IFile selectedLabelFile = getCurrentSelectedLabelContainer().getFile(getCurrentSelectedLabelFileName());
    if (!_keyExists) {
      _wgaDesign.createLabel(selectedLabelFile, prefix + _txtKeyTabNew.getText(), _textSelection.getText());
    }
    try {
      _replaceHandeler.replace(prefix + _txtKeyTabNew.getText());
View Full Code Here

   
   
    if(editor!=null){
      input = editor.getEditorInput();
    }
    IFile file = null;
   
    if (input!=null && input instanceof IFileEditorInput) {
      file = ((IFileEditorInput) input).getFile();
    }
    return file;
View Full Code Here

  /**
   * retrieves the active project by the active editor
   */
  public IProject getActiveProject() {
    IFile file = getActiveFile();
    if (file != null) {
      return file.getProject();
    } else {
      return null;
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.core.resources.IFile

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.