import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Preferences;
+import net.sourceforge.phpeclipse.phpeditor.ICompilationUnitDocumentProvider;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
* the Common Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/cpl-v10.html
*
- * Contributors: IBM Corporation - Initial implementation Klaus Hartlage -
- * www.eclipseproject.de
+ * Contributors: IBM Corporation - Initial implementation
+ * www.phpeclipse.de
******************************************************************************/
/**
* PHP specific text editor.
private final static String CLOSE_STRINGS_SQ_PHP = PreferenceConstants.EDITOR_CLOSE_STRINGS_SQ_PHP;
/** Preference key for automatically wrapping Java strings */
- private final static String WRAP_STRINGS = PreferenceConstants.EDITOR_WRAP_STRINGS;
+// private final static String WRAP_STRINGS = PreferenceConstants.EDITOR_WRAP_STRINGS_DQ;
/** Preference key for automatically closing brackets and parenthesis */
private final static String CLOSE_BRACKETS_PHP = PreferenceConstants.EDITOR_CLOSE_BRACKETS_PHP;
}
}
- private void configureTabConverter() {
- if (fTabConverter != null) {
- IDocumentProvider provider = getDocumentProvider();
- if (provider instanceof PHPDocumentProvider) {
- PHPDocumentProvider cup = (PHPDocumentProvider) provider;
- fTabConverter.setLineTracker(cup.createLineTracker(getEditorInput()));
- }
- }
- }
-
+ // private void configureTabConverter() {
+ // if (fTabConverter != null) {
+ // IDocumentProvider provider = getDocumentProvider();
+ // if (provider instanceof PHPDocumentProvider) {
+ // PHPDocumentProvider cup = (PHPDocumentProvider) provider;
+ // fTabConverter.setLineTracker(cup.createLineTracker(getEditorInput()));
+ // }
+ // }
+ // }
+ private void configureTabConverter() {
+ if (fTabConverter != null) {
+ IDocumentProvider provider= getDocumentProvider();
+ if (provider instanceof ICompilationUnitDocumentProvider) {
+ ICompilationUnitDocumentProvider cup= (ICompilationUnitDocumentProvider) provider;
+ fTabConverter.setLineTracker(cup.createLineTracker(getEditorInput()));
+ }
+ }
+ }
private void startTabConversion() {
if (fTabConverter == null) {
fTabConverter = new TabConverter();
* @see org.eclipse.ui.texteditor.AbstractTextEditor#performSave(boolean, org.eclipse.core.runtime.IProgressMonitor)
*/
protected void performSave(boolean overwrite, IProgressMonitor progressMonitor) {
- IDocumentProvider p = getDocumentProvider();
- if (p instanceof PHPDocumentProvider) {
- PHPDocumentProvider cp = (PHPDocumentProvider) p;
- cp.setSavePolicy(fSavePolicy);
- }
- try {
- super.performSave(overwrite, progressMonitor);
- } finally {
- if (p instanceof PHPDocumentProvider) {
- PHPDocumentProvider cp = (PHPDocumentProvider) p;
- cp.setSavePolicy(null);
- }
- }
+// IDocumentProvider p = getDocumentProvider();
+// if (p instanceof PHPDocumentProvider) {
+// PHPDocumentProvider cp = (PHPDocumentProvider) p;
+// cp.setSavePolicy(fSavePolicy);
+// }
+// try {
+// super.performSave(overwrite, progressMonitor);
+// } finally {
+// if (p instanceof PHPDocumentProvider) {
+// PHPDocumentProvider cp = (PHPDocumentProvider) p;
+// cp.setSavePolicy(null);
+// }
+// }
+
+ IDocumentProvider p= getDocumentProvider();
+ if (p instanceof ICompilationUnitDocumentProvider) {
+ ICompilationUnitDocumentProvider cp= (ICompilationUnitDocumentProvider) p;
+ cp.setSavePolicy(fSavePolicy);
+ }
+ try {
+ super.performSave(overwrite, progressMonitor);
+ } finally {
+ if (p instanceof ICompilationUnitDocumentProvider) {
+ ICompilationUnitDocumentProvider cp= (ICompilationUnitDocumentProvider) p;
+ cp.setSavePolicy(null);
+ }
+ }
}
/*
}
}
- private boolean synchronizeOutlineOnCursorMove() {
- return PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SYNC_OUTLINE_ON_CURSOR_MOVE);
- }
-
/**
* Returns the updated java element for the old java element.
*/