Package org.eclipse.core.internal.resources

Examples of org.eclipse.core.internal.resources.File


    private void launch(Object[] elements, String mode)
    {
        try
        {
            File elementToLaunch = null;

            if (elements.length == 1)
            {
                Object selected = elements[0];
                if (selected instanceof File)
View Full Code Here


                IPath path = new Path(suiteStatus.getSuitePath());

                Workspace w = (Workspace) ResourcesPlugin.getWorkspace();

                File file = (File) w.newResource(path, IResource.FILE);

                FileEditorInput input = new FileEditorInput(file);

                try
                {
                    int myFile = fefe(file.getContents(), getSelectedStatus(event).getTestName());
                    IWorkbenchPage activePage = PlatformUI
                            .getWorkbench()
                            .getActiveWorkbenchWindow()
                            .getActivePage();

                    HashMap map = new HashMap();
                    map.put(IMarker.LINE_NUMBER, new Integer(myFile));
                    map.put(IWorkbenchPage.EDITOR_ID_ATTR,
                            "org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart");
                    IMarker marker = file.createMarker(IMarker.TEXT);
                    marker.setAttributes(map);
                    //page.openEditor(marker); //2.1 API
                    IDE.openEditor(activePage, marker);

                }
View Full Code Here

    if (dialog.open() == ResourceSelectionDialog.OK) {
      Object[] result = dialog.getResult();
      if (result.length == 1) {
        System.out.println(result[0].getClass());
        if (result[0] instanceof File) {
          File resource = (File) result[0];
          file.setText(resource.getFullPath().toOSString());
        }
      }
    }
  }
View Full Code Here

    throws Exception
  {
    String name = commandLine.getValue(Options.PROJECT_OPTION);
    String filename = commandLine.getValue(Options.FILE_OPTION);

    File file = (File)ProjectUtils.getFile(name, filename);

    // update local history
    if (file.exists()){
      FileSystemResourceManager localManager = file.getLocalManager();
      IFileStore store = localManager.getStore(file);
      IFileInfo fileInfo = store.fetchInfo();
      localManager.getHistoryStore()
        .addState(file.getFullPath(), store, fileInfo, false);
    }
    return null;
  }
View Full Code Here

    throws Exception
  {
    String project = commandLine.getValue(Options.PROJECT_OPTION);
    String filename = commandLine.getValue(Options.FILE_OPTION);

    File file = (File)ProjectUtils.getFile(project, filename);
    file.getLocalManager().getHistoryStore()
      .remove(file.getFullPath(), new NullProgressMonitor());
    return Services.getMessage("history.cleared");
  }
View Full Code Here

  {
    String project = commandLine.getValue(Options.PROJECT_OPTION);
    String filename = commandLine.getValue(Options.FILE_OPTION);
    long revision = commandLine.getLongValue(Options.REVISION_OPTION);

    File file = (File)ProjectUtils.getFile(project, filename);
    LocalFileHistory history = new LocalFileHistory(file, false);
    history.refresh(new NullProgressMonitor());
    IFileRevision[] revisions = history.getFileRevisions();
    for(IFileRevision rev : revisions){
      if (rev.getTimestamp() == revision){
View Full Code Here

    throws Exception
  {
    String project = commandLine.getValue(Options.PROJECT_OPTION);
    String filename = commandLine.getValue(Options.FILE_OPTION);

    File file = (File)ProjectUtils.getFile(project, filename);
    LocalFileHistory history =
      new LocalFileHistory(file, false /* include current */);
    history.refresh(new NullProgressMonitor());
    IFileRevision[] revisions = history.getFileRevisions();
    Arrays.sort(revisions, new Comparator<IFileRevision>(){
View Full Code Here

TOP

Related Classes of org.eclipse.core.internal.resources.File

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.