Package org.eclipse.ui

Examples of org.eclipse.ui.IFileEditorInput


    IEditorPart editorPart = Workbench.getInstance()
        .getActiveWorkbenchWindow().getActivePage().getActiveEditor();

    if (editorPart != null) {
      IFileEditorInput input = (IFileEditorInput) editorPart
          .getEditorInput();
      IFile file = input.getFile();
      IProject activeProject = file.getProject();
     
      String fileName = file.getFullPath().toString();
      //String fileNameShort = fileName;
      //if(fileName.indexOf("/") > -1) fileNameShort = fileName.substring(fileName.lastIndexOf("/") +1);
View Full Code Here


      public void widgetSelected(SelectionEvent e) {
        IEditorPart editorPart = Workbench.getInstance()
            .getActiveWorkbenchWindow().getActivePage().getActiveEditor();

        if (editorPart != null) {
          IFileEditorInput input = (IFileEditorInput) editorPart
              .getEditorInput();
          IFile file = input.getFile();
          collectCustomComponents(file.getProject());
        }
      }
    });
View Full Code Here

  private void collectCustomComponents(){
    IEditorPart editorPart = Workbench.getInstance()
        .getActiveWorkbenchWindow().getActivePage().getActiveEditor();

    if (editorPart != null) {
      IFileEditorInput input = (IFileEditorInput) editorPart
          .getEditorInput();
      IFile file = input.getFile();
      IProject project = file.getProject();
      final IFile res = project.getFile("/components.tcc");
      if(res.exists()){
        List<TapestryComponentModel> nodeList = new ArrayList<TapestryComponentModel>();
        loadTapestryCustomComponentsTags(res, nodeList);
View Full Code Here

    private boolean isInSharedProject(Object element) {

        if (sarosSession == null)
            return false;

        IFileEditorInput fileEditorInput = (IFileEditorInput) element;

        return sarosSession.isShared(fileEditorInput.getFile().getProject());
    }
View Full Code Here

   */
  public Match[] computeContainedMatches(AbstractTextSearchResult result, IEditorPart editor) {

    IEditorInput editorInput = editor.getEditorInput();
    if (editorInput instanceof IFileEditorInput) {
      IFileEditorInput fileEditorInput = (IFileEditorInput) editorInput;
      return computeContainedMatches(result, fileEditorInput.getFile());
    }
    return this.NO_MATCHES;
  }
View Full Code Here

    if(flag){
      IEditorPart editorPart = Workbench.getInstance()
          .getActiveWorkbenchWindow().getActivePage().getActiveEditor();

      if (editorPart != null) {
        IFileEditorInput input = (IFileEditorInput) editorPart
            .getEditorInput();
        IFile file = input.getFile();
        IProject acproject = file.getProject();
        openTCCFile(acproject);
      }
    }
   
View Full Code Here

  public void init(IEditorSite site, IEditorInput input)
      throws PartInitException {
    super.setSite(site);
    super.setInput(input);
    if (input instanceof IFileEditorInput) {
      IFileEditorInput fl = (IFileEditorInput) input;
      try {
        IFile file = fl.getFile();
        InputStream stream = file.getContents(true);
        try {
          data = new Snapshot(stream);
          fact = new ViewerConfigurationFactories(data);
        } catch (Exception e) {
View Full Code Here

      if (startOffset > -1) {
        IEditorPart editorPart = Workbench.getInstance()
            .getActiveWorkbenchWindow().getActivePage()
            .getActiveEditor();
        if (editorPart != null) {
          IFileEditorInput input = (IFileEditorInput) editorPart
              .getEditorInput();
          IFile file = input.getFile();
          String fileName = file.getFullPath().toString();
          if (fileName.endsWith(".tml")) {
            String aimFileName = null;
            String aimNameShort = null;
            IProject activeProject = file.getProject();
View Full Code Here

  }
 
  private IProject getCurrentProject(){
    IEditorPart editorPart = Workbench.getInstance()
        .getActiveWorkbenchWindow().getActivePage().getActiveEditor();
    IFileEditorInput input = (IFileEditorInput) editorPart.getEditorInput();
    IFile file = input.getFile();
    return file.getProject();
  }
View Full Code Here

    setInput(input);
    // only accept a file as input.
    if (input instanceof IFileEditorInput) {
      try {
        // get the URI
        IFileEditorInput fileInput = (IFileEditorInput) input;
        file = fileInput.getFile();

        // load the file and retrieve its content in sets.
        // TODO(leeca):  Is this configured with the correct XStream flavor?
        ObjectXmlPersist persist =
            new ObjectXmlPersist(XStreamFactory.getSharedRefXStream());
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IFileEditorInput

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.