Package ag.ion.bion.officelayer.document

Examples of ag.ion.bion.officelayer.document.IDocument


        Exception exception = loadTextDocumentOperation.getException();
       
        if(exception != null)
          throw new CoreException(new Status(IStatus.ERROR, EditorUIPlugin.PLUGIN_ID, IStatus.OK, exception.getMessage(), exception));

        IDocument document = loadTextDocumentOperation.getDocument();   
        configureOfficeFrame(officeFrame, document);
        setDocument(document);
        return composite;
      }
      return new Composite(parent, SWT.EMBEDDED);
View Full Code Here


  @Override
  public ITutorialDocument loadDocument(IFile file) {
    IOfficeApplication officeApplication = EditorCorePlugin.getDefault()
        .getManagedLocalOfficeApplication();

    IDocument document = null;
    String path = file.getLocation().toString();
    try {
      document = officeApplication.getDocumentService().loadDocument(
          path, DocumentDescriptor.DEFAULT_HIDDEN);
    } catch (OfficeApplicationException e) {
View Full Code Here

    if(editorMap == null)
      editorMap = new HashMap();
    editorMap.put(officeSearchMatch, editorPart);
   
    if(editorPart instanceof IDocumentProvider) {     
      IDocument document = ((IDocumentProvider)editorPart).getDocument();
      ISearchDescriptor searchDescriptor = getCurrentSearchDescriptor();
      if(searchDescriptor != null) {
        if(document instanceof ISearchableDocument) {
          ISearchableDocument searchableDocument = (ISearchableDocument)document;
          ag.ion.noa.search.ISearchResult searchResult = searchableDocument.getSearchService().findAll(searchDescriptor);
View Full Code Here

    if (!searchScope.matchesFileName(proxy.getName())) {
      return false;
    }
   
    IFile file= (IFile) proxy.requestResource();
    IDocument document = loadDoccument(file);
    if(document != null) {
      ISearchResult searchResult = search(document, searchDescriptor);
      if(!searchResult.isEmpty()) {
        progressMonitor.subTask(Messages.OfficeSearchVisitor_monitor_performinSearch);
        OfficeSearchMatch officeSearchMatch = new OfficeSearchMatch(file, searchResult.getTextRanges().length);
        officeSearchResult.addMatch(officeSearchMatch);
      }
    }
    document.close();
    updateProgressMonitor();
    return false;
  }
View Full Code Here

      String integrationID, String undoString) {
    if (tutorialDocument == null)
      return 0;

    OODocument ooDocument = (OODocument) tutorialDocument;
    IDocument document = ooDocument.getDocument();

    if (document.getDocumentType().equals(IDocument.WRITER)){
      return undoTextIntegration((ITextDocument) document, integrationID, undoString);
    }
    return 0;
  }
View Full Code Here

  @Test
  public void generateArtefactTest() throws OfficeApplicationException,
      NOAException, ParseException, IOException {
    OOApplication ooApplication = new OOApplication();
    IDocument document = ooApplication.loadDocument("test/sample.odt"); //$NON-NLS-1$
    OODocument ooDocument = new OODocument(document, new EclipseFile(
        "test/sample.odt")); //$NON-NLS-1$

    XMLProvider provider = new XMLProvider(
        "org.some.provider", "some.artefact"); //$NON-NLS-1$//$NON-NLS-2$
View Full Code Here

    ooApplication = new OOApplication();
  }

  @Test
  public void testWriter() throws NOAException, OfficeApplicationException {
    IDocument document = ooApplication
        .loadDocument("test/tagSearchTest.odt"); //$NON-NLS-1$
    testTag(document);
  }
View Full Code Here

    testTag(document);
  }

  @Test
  public void testImpress() throws NOAException, OfficeApplicationException {
    IDocument document = ooApplication
        .loadDocument("test/tagSearchTest.odp"); //$NON-NLS-1$
    testTag(document);
  }
View Full Code Here

      String integrationID, String undoString) {
    if (tutorialDocument == null)
      return 0;

    OODocument ooDocument = (OODocument) tutorialDocument;
    IDocument document = ooDocument.getDocument();

    if (document.getDocumentType().equals(IDocument.WRITER))
      return undoTextIntegration((ITextDocument) document, integrationID,
          undoString);
    if (document.getDocumentType().equals(IDocument.IMPRESS))
      return undoPresentationIntegration(
          (IPresentationDocument) document, integrationID, undoString);

    return 0;
  }
View Full Code Here

        progressMonitor.subTask(Messages.ConstructNewDocumentOperation_monitor_building_message);
        progressMonitor.worked(1);
        file = newDocumentRequest.getTargetContainer().getFile(new Path(newDocumentRequest.getDocumentName()))
        DocumentDescriptor documentDescriptor = new DocumentDescriptor();
        documentDescriptor.setHidden(true);
        IDocument document = null;
       
        progressMonitor.worked(1);
       
        progressMonitor.subTask(Messages.ConstructNewDocumentOperation_monitor_building_interface_message);
        if(newDocumentRequest.getTemplatePath() == null)
          document = officeApplication.getDocumentService().constructNewDocument(newDocumentRequest.getDocumentType(), documentDescriptor);
        else
          document = officeApplication.getDocumentService().loadDocument(newDocumentRequest.getTemplatePath(), documentDescriptor);
        progressMonitor.worked(1);
       
        progressMonitor.subTask(Messages.ConstructNewDocumentOperation_monitor_storing_message);
        document.getPersistenceService().store(file.getLocation().toOSString());
        document.close();
       
        progressMonitor.worked(1);
        done = true;
      }
      catch(Exception exception) {
View Full Code Here

TOP

Related Classes of ag.ion.bion.officelayer.document.IDocument

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.