コード例 #1
0
  /** 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();
    }
  }
コード例 #2
0
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.ui.texteditor.AbstractTextEditor#doSave(org.eclipse.core.runtime.IProgressMonitor)
  */
 @Override
 public void doSave(IProgressMonitor progressMonitor) {
   super.doSave(progressMonitor);
   updateExtensions();
 }
コード例 #3
0
 /** Saves the multi-page editor's document. */
 public void doSave(IProgressMonitor monitor) {
   m_editor.doSave(monitor);
 }
コード例 #4
0
ファイル: T24BasicEditor.java プロジェクト: debabratahazra/DS
 /** Saves current editor contents. */
 @Override
 public void doSave(IProgressMonitor monitor) {
   super.doSave(monitor);
 }