/**
   * This is used to track the active viewer.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   *
   * @generated
   */
  protected void pageChange(int pageIndex) {
    super.pageChange(pageIndex);

    if (contentOutlinePage != null) {
      handleContentOutlineSelection(contentOutlinePage.getSelection());
    }
  }
 /** Calculates the contents of page 2 when the it is activated. */
 protected void pageChange(int newPageIndex) {
   super.pageChange(newPageIndex);
   if (newPageIndex == 1) {
     IDocument inputDocument =
         xmlEditor.getDocumentProvider().getDocument(xmlEditor.getEditorInput());
     String documentContent = inputDocument.get();
     TSEditor.setDocument(documentContent);
   } else if (newPageIndex == 0) {
     IDocument inputDocument =
         xmlEditor.getDocumentProvider().getDocument(xmlEditor.getEditorInput());
     String documentContent = inputDocument.get();
     if (documentContent.isEmpty()) {
       documentContent = "";
       Bundle bundle = Platform.getBundle("reprotool.ide.txtspec");
       URL url = bundle.getResource("schema/default.txtspec.xml");
       try {
         InputStream ir = url.openStream();
         InputStreamReader isr = new InputStreamReader(ir);
         BufferedReader br = new BufferedReader(isr);
         String append;
         if ((documentContent = (br.readLine())) != null) ;
         while ((append = (br.readLine())) != null) documentContent += ("\n" + append);
         br.close();
       } catch (Exception e) {
         System.err.println(e.getMessage() + " " + e.getCause().toString());
       }
       documentContent = documentContent.trim();
     }
     xmlEditor.setDocument(documentContent);
   }
 }
  /** Calculates the contents of page 2 when the it is activated. */
  protected void pageChange(int newPageIndex) {
    super.pageChange(newPageIndex);

    try {
      if (!getFileName().equals(AppYmlFile.configFileName)) {
        newPageIndex = 1;
      }

      if (newPageIndex == 0) {
        m_editor.doSave(null);

        String pathToFile = getFileLocation();

        m_ymlFile = null;
        m_ymlFile = new AppYmlFile(pathToFile);

        String sdk = m_ymlFile.getSdkPath();
        String appName = m_ymlFile.getAppName();
        String logName = m_ymlFile.getAppLog();

        m_appLogText.setText(logName);
        m_rhodesPathText.setText(sdk);
        m_appNameText.setText(appName);

        showCapabilitiesText(m_ymlFile.getCapabilities());

        return;
      }

      if (newPageIndex == 1) {
        m_editor.setInput(new FileEditorInput(getFile()));
        getFile().getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
      }
    } catch (FileNotFoundException e) {
      e.printStackTrace();
    } catch (CoreException e) {
      e.printStackTrace();
    }
  }
 protected void pageChange(int newPageIndex) {
   super.pageChange(newPageIndex);
   if (newPageIndex == 1) {
     reloadContextValues();
   }
 }
 /** Calculates the contents of page 2 when the it is activated. */
 protected void pageChange(int newPageIndex) {
   super.pageChange(newPageIndex);
 }
Exemple #6
0
 @Override
 protected void pageChange(final int newPageIndex) {
   super.pageChange(newPageIndex);
   final IEditorPart activeEditor = getActiveEditor();
   saveActivePage(activeEditor.getClass().getSimpleName());
 }
 /** Calculates the contents of page 2 when the it is activated. */
 protected void pageChange(int newPageIndex) {
   super.pageChange(newPageIndex);
   if (newPageIndex == 2) {
     sortWords();
   }
 }
 /** Calculates the contents of page 2 when the it is activated. */
 protected void pageChange(int newPageIndex) {
   super.pageChange(newPageIndex);
   if (newPageIndex == 1) {
     markdownToHtml();
   }
 }