IBM Corporation - Initial implementation
Klaus Hartlage - www.eclipseproject.de
**********************************************************************/
-import net.sourceforge.phpeclipse.phpeditor.php.PHPWordDetector;
+import net.sourceforge.phpeclipse.phpeditor.php.PHPWordExtractor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.help.IHelp;
import org.eclipse.ui.texteditor.DefaultRangeIndicator;
import org.eclipse.ui.texteditor.TextOperationAction;
import org.eclipse.ui.views.contentoutline.IContentOutlinePage;
-
+import org.eclipse.jface.action.IAction;
/**
* Java specific text editor.
*/
public class PHPEditor extends TextEditor {
-
+
/** The outline page */
private PHPContentOutlinePage fOutlinePage;
*/
public void doSave(IProgressMonitor monitor) {
super.doSave(monitor);
+ // compile or not, according to the user preferences
+ IAction a = PHPParserAction.getInstance();
+ if (a != null)
+ a.run();
if (fOutlinePage != null)
fOutlinePage.update();
}
// showMessage(shell, dialogTitle, ActionMessages.getString("Open help not available"), false); //$NON-NLS-1$
}
}
-
+
private String getFunctionName(IDocument doc, int pos) {
- Point word = PHPWordDetector.findWord(doc, pos);
+ Point word = PHPWordExtractor.findWord(doc, pos);
if (word != null) {
try {
return doc.get(word.x, word.y).replace('_', '-');