Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IWorkspaceRoot.findMember()


        setPageComplete(false);
        return;
      }
      else {
        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
        IResource resource = root.findMember(new Path(containerPath));
        if(resource == null) {
          setMessage(Messages.NewDocumentWizardDefinePage_message_error_folder_not_available, ERROR);
          setPageComplete(false);
          return;
        }
View Full Code Here


            return;
          }
        }
       
        IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
        IResource resource = root.findMember(new Path(containerPath));
       
        boolean useDocumentFileExtension = false;
        if(templateFileExtension != null) {
          if(!buttonConstructTemplate.getSelection()) {
            useDocumentFileExtension = true;
View Full Code Here

    return folder == null ? false : folder.getFile(MARKERFILE).exists();
  }

  private static IFolder getFolder(IPath path) {
    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    IResource res = root.findMember(path);
    return res instanceof IFolder ? (IFolder) res : null;
  }

  private static InputStream getMarkerContent() {
    String text = "Class files instrumented at " + new Date(); //$NON-NLS-1$
View Full Code Here

  protected void doFinish(String containerName, String fileName, IProgressMonitor monitor) throws CoreException {
    // create a sample file
    monitor.beginTask("Creating " + fileName, 2);
    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    IResource resource = root.findMember(new Path(containerName));
    if (!resource.exists() || !(resource instanceof IContainer)) {
      throwCoreException("Container \"" + containerName + "\" does not exist.");
    }
    IContainer container = (IContainer) resource;
    final IFile file = container.getFile(new Path(fileName));
View Full Code Here

  protected void doFinish(String containerName, String fileName, IProgressMonitor monitor) throws CoreException {
    // create a sample file
    monitor.beginTask("Creating " + fileName, 2);
    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
    IResource resource = root.findMember(new Path(containerName));
    if (!resource.exists() || !(resource instanceof IContainer)) {
      throwCoreException("Container \"" + containerName + "\" does not exist.");
    }
    IContainer container = (IContainer) resource;
    final IFile file = container.getFile(new Path(fileName));
View Full Code Here

     
      for(int i=0;i<javaScripts.length;i++){
        InputStream in = null;
        Object obj = null;
        if(javaScripts[i].startsWith(JavaScriptLibraryTable.PREFIX)){
          IResource resource = wsroot.findMember(javaScripts[i].substring(JavaScriptLibraryTable.PREFIX.length()));
          if(resource!=null && resource instanceof IFile && resource.exists()){
            in = ((IFile)resource).getContents();
            obj = resource;
          }
        } else {
View Full Code Here

    IWorkspaceRoot wsroot = ResourcesPlugin.getWorkspace().getRoot();
   
    for(int i=0;i<includes.size();i++){
      String include = (String)includes.get(i);
      if(include.startsWith(JavaScriptLibraryTable.PREFIX)){
        IResource resource = wsroot.findMember(include.substring(JavaScriptLibraryTable.PREFIX.length()));
        if(resource!=null && resource instanceof IFile && resource.exists()){
          args.add(fixArgument(((IFile)resource).getLocation().toString()));
        }
      } else {
        args.add(fixArgument(include));
View Full Code Here

    String[] javaScripts = params.getJavaScripts();
    IWorkspaceRoot wsroot = ResourcesPlugin.getWorkspace().getRoot();
   
    for(int i=0;i<javaScripts.length;i++){
      if(javaScripts[i].startsWith(JavaScriptLibraryTable.PREFIX)){
        IResource resource = wsroot.findMember(javaScripts[i].substring(JavaScriptLibraryTable.PREFIX.length()));
        if(resource!=null && resource instanceof IFile && resource.exists()){
          tableModel.add(resource);
        }
      } else {
        tableModel.add(new File(javaScripts[i]));
View Full Code Here

      functions.clear();
     
      for(int i=0;i<javaScripts.length;i++){
        InputStream in = null;
        if(javaScripts[i].startsWith(JavaScriptLibraryTable.PREFIX)){
          IResource resource = wsroot.findMember(javaScripts[i].substring(JavaScriptLibraryTable.PREFIX.length()));
          if(resource!=null && resource instanceof IFile && resource.exists()){
            in = ((IFile)resource).getContents();
          }
        } else {
          in = new FileInputStream(javaScripts[i]);
View Full Code Here

      tableModel.clear();
      IWorkspaceRoot wsroot = ResourcesPlugin.getWorkspace().getRoot();
      for(int i=0;i<includes.size();i++){
        String path = (String)includes.get(i);
        if(path.startsWith(JavaScriptLibraryTable.PREFIX)){
          IResource resource = wsroot.findMember(path.substring(JavaScriptLibraryTable.PREFIX.length()));
          if(resource!=null && resource instanceof IFile && resource.exists()){
            tableModel.add(resource);
          }
        } else {
          tableModel.add(new File(path));
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.