import net.sourceforge.phpdt.ui.text.PHPSourceViewerConfiguration;
import net.sourceforge.phpdt.ui.text.folding.IJavaFoldingStructureProvider;
import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.ui.IPreferenceConstants;
import net.sourceforge.phpeclipse.ui.editor.BrowserUtil;
+import net.sourceforge.phpeclipse.ui.overlaypages.ProjectPrefUtil;
import net.sourceforge.phpeclipse.webbrowser.views.BrowserView;
import org.eclipse.core.resources.IMarker;
}
}
-
+
/**
* Finds the next position after the given position.
*
* Default constructor.
*/
public PHPEditor() {
- super();
+ super();
}
/*
setSourceViewerConfiguration(new PHPSourceViewerConfiguration(textTools
.getColorManager(), store, this,
IPHPPartitions.PHP_PARTITIONING));
-
+
// TODO changed in 3.x ?
// setRangeIndicator(new DefaultRangeIndicator());
// if
Preferences preferences = PHPeclipsePlugin.getDefault()
.getPluginPreferences();
preferences.addPropertyChangeListener(fPropertyChangeListener);
-
IInformationControlCreator informationControlCreator = new IInformationControlCreator() {
public IInformationControl createInformationControl(Shell parent) {
boolean cutDown = false;
installOccurrencesFinder();
PlatformUI.getWorkbench().addWindowListener(fActivationListener);
-
+
+ /*
+ * start of EDITOR_SAVE_ON_BLUR
+ * ed_mann
+ */
+ final PHPEditor editor = this;
+ FocusListener focusListener = new FocusListener() {
+
+ public void focusGained(FocusEvent e) {
+ return;
+ }
+
+ public void focusLost(FocusEvent e) {
+ //viewer.get
+ if(editor.isDirty() && PHPeclipsePlugin.getDefault().getPreferenceStore()
+ .getBoolean(PreferenceConstants.EDITOR_SAVE_ON_BLUR)){
+ editor.doSave(null);
+ }
+ }
+ };
+ projectionViewer.getTextWidget().addFocusListener(focusListener);
+ /*
+ * end of EDITOR_SAVE_ON_BLUR
+ * ed_mann
+ */
+
setWordWrap();
}