/** 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(); } }
/** * {@inheritDoc} * * @see * org.eclipse.ui.texteditor.AbstractTextEditor#doSave(org.eclipse.core.runtime.IProgressMonitor) */ @Override public void doSave(IProgressMonitor progressMonitor) { super.doSave(progressMonitor); updateExtensions(); }
/** Saves the multi-page editor's document. */ public void doSave(IProgressMonitor monitor) { m_editor.doSave(monitor); }
/** Saves current editor contents. */ @Override public void doSave(IProgressMonitor monitor) { super.doSave(monitor); }