Examples of fetchInfo()


Examples of org.eclipse.core.filesystem.IFileStore.fetchInfo()

      public void run() {
        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        if (window == null)
          return;
        IFileStore fileStore = EFS.getLocalFileSystem().getStore(new Path(path));
        IFileInfo fetchInfo = fileStore.fetchInfo();
        if (!fetchInfo.isDirectory() && fetchInfo.exists()) {
          IWorkbenchPage page = window.getActivePage();
          if (page == null) {
            String msg = NLS.bind(IDEWorkbenchMessages.OpenDelayedFileAction_message_noWindow, path);
            MessageDialog.open(MessageDialog.ERROR, window.getShell(),
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileStore.fetchInfo()

                }
                URI location = resource.getLocationURI();
                if (location != null) {
                    try {
                        IFileStore store = EFS.getStore(location);
                        if (store.fetchInfo().exists()) {
                            status.setError(NewWizardMessages.NewTypeWizardPage_error_TypeNameExistsDifferentCase);
                            return status;
                        }
                    } catch (CoreException e) {
                        status.setError(Messages.format(NewWizardMessages.NewTypeWizardPage_error_uri_location_unkown, BasicElementLabels.getURLPart(Resources.getLocationString(resource))));
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileStore.fetchInfo()

                }
                URI location = resource.getLocationURI();
                if (location != null) {
                    try {
                        IFileStore store = EFS.getStore(location);
                        if (store.fetchInfo().exists()) {
                            status.setError(NewWizardMessages.NewTypeWizardPage_error_TypeNameExistsDifferentCase);
                            return status;
                        }
                    } catch (CoreException e) {
                        status.setError(Messages.format(NewWizardMessages.NewTypeWizardPage_error_uri_location_unkown, BasicElementLabels.getURLPart(Resources.getLocationString(resource))));
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileStore.fetchInfo()

    IFileStore settings;
    settings = project.getProjectStore().getChild(IDavinciServerConstants.SETTINGS_DIRECTORY_NAME);
    if (settings == null)
      return false;
      IFileStore libFile = settings.getChild(IDavinciServerConstants.LIBS_FILE);
    if (libFile != null && libFile.fetchInfo().exists())
      return true;
    return false;
  }
}
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileStore.fetchInfo()

        if (filePath != null) {
            final IPath path = new Path(filePath);
            IFileStore fileStore = EFS.getLocalFileSystem().getStore(
                    path.removeLastSegments(1));
            fileStore = fileStore.getChild(path.lastSegment());
            final IFileInfo fetchInfo = fileStore.fetchInfo();
            if (!fetchInfo.isDirectory() && fetchInfo.exists()) {
                if (element instanceof IErlModule
                        && element.getParent() instanceof IErlExternal) {
                    return new ErlangExternalEditorInput(fileStore, (IErlModule) element);
                }
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileStore.fetchInfo()

            StringBuffer notFound = new StringBuffer();
            IWorkbenchPage page = window.getActivePage();
            for ( String name : names )
            {
                IFileStore fileStore = EFS.getLocalFileSystem().getStore( new Path( filterPath ) ).getChild( name );
                IFileInfo fetchInfo = fileStore.fetchInfo();
                if ( !fetchInfo.isDirectory() && fetchInfo.exists() )
                {
                    try
                    {
                        IDE.openEditorOnFileStore( page, fileStore );
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileStore.fetchInfo()

   */
  public boolean isDeleted(Object element) {
    FileInfo info= (FileInfo) fFileInfoMap.get(element);
    if (info != null)  {
      IFileStore fileStore= getFileStore(info);
      return fileStore == null ? true : !fileStore.fetchInfo().exists();
    }
    return getParentProvider().isDeleted(element);
  }

  /*
 
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileStore.fetchInfo()

    IStatus status= info.fTextFileBuffer.getStatus();

    // Ensure that we don't open an empty document for an non-existent IFile
    if (element instanceof IFileEditorInput || element instanceof IURIEditorInput) {
      IFileStore fileStore= info.fTextFileBuffer.getFileStore();
      if (fileStore != null && !fileStore.fetchInfo().exists()) {
        String message= NLSUtility.format(TextEditorMessages.TextFileDocumentProvider_error_doesNotExist, fileStore.toString());
        return new Status(IStatus.ERROR, EditorsUI.PLUGIN_ID, IResourceStatus.RESOURCE_NOT_FOUND, message, null);
      }
    }
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileStore.fetchInfo()

   */
  protected boolean isSystemFileReadOnly(FileInfo info)  {
    IFileStore fileStore= getFileStore(info);
    if (fileStore == null)
      return false;
    IFileInfo fileInfo= fileStore.fetchInfo();
    return fileInfo.exists() && fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY);
  }

  /**
   * Returns the file info object for the given element.
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileStore.fetchInfo()

   
    IFileStore fileStore= EFS.getLocalFileSystem().getStore(new Path(path));

    try {
      TemplateReaderWriter reader= new TemplateReaderWriter();
      if (fileStore.fetchInfo().exists()) {
        InputStream input= new BufferedInputStream(fileStore.openInputStream(EFS.NONE, null));
        try {
          TemplatePersistenceData[] datas= reader.read(input, null);
          for (int i= 0; i < datas.length; i++) {
            TemplatePersistenceData data= datas[i];
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.