import net.sourceforge.phpdt.internal.ui.text.JavaOutlineInformationControl;
import net.sourceforge.phpdt.internal.ui.text.JavaPresentationReconciler;
import net.sourceforge.phpdt.internal.ui.text.JavaReconciler;
-import net.sourceforge.phpdt.internal.ui.text.PreferencesAdapter;
import net.sourceforge.phpdt.internal.ui.text.java.JavaFormattingStrategy;
import net.sourceforge.phpdt.internal.ui.text.java.JavaStringAutoIndentStrategyDQ;
import net.sourceforge.phpdt.internal.ui.text.java.JavaStringAutoIndentStrategySQ;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.DefaultAutoIndentStrategy;
+import org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy;
import org.eclipse.jface.text.DefaultInformationControl;
-import org.eclipse.jface.text.IAutoIndentStrategy;
+import org.eclipse.jface.text.IAutoEditStrategy;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.jface.text.source.IAnnotationHover;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.editors.text.EditorsUI;
-import org.eclipse.ui.texteditor.ChainedPreferenceStore;
import org.eclipse.ui.texteditor.ITextEditor;
/**
/*
* (non-Javadoc) Method declared on SourceViewerConfiguration
*/
- public IAutoIndentStrategy getAutoIndentStrategy(ISourceViewer sourceViewer, String contentType) {
+ public IAutoEditStrategy getAutoEditStrategy(ISourceViewer sourceViewer, String contentType) {
if (IPHPPartitions.PHP_PHPDOC_COMMENT.equals(contentType)
|| IPHPPartitions.PHP_MULTILINE_COMMENT.equals(contentType))
return new JavaDocAutoIndentStrategy(getConfiguredDocumentPartitioning(sourceViewer));
return (PHPDocumentPartitioner.PHP_TEMPLATE_DATA.equals(contentType)
|| PHPDocumentPartitioner.PHP_SCRIPT_CODE.equals(contentType) || IDocument.DEFAULT_CONTENT_TYPE.equals(contentType)
|| IPHPPartitions.PHP_PARTITIONING.equals(contentType) || PHPPartitionScanner.PHP_SCRIPTING_AREA.equals(contentType) ? new PHPAutoIndentStrategy()
- : new DefaultAutoIndentStrategy());
+ : new DefaultIndentLineAutoEditStrategy());
}
/**
IPHPPartitions.HTML, IPHPPartitions.HTML_MULTILINE_COMMENT, IPHPPartitions.PHP_PARTITIONING,
IPHPPartitions.PHP_SINGLELINE_COMMENT, IPHPPartitions.PHP_MULTILINE_COMMENT, IPHPPartitions.PHP_PHPDOC_COMMENT,
- IPHPPartitions.PHP_STRING_DQ, IPHPPartitions.PHP_STRING_SQ, IPHPPartitions.CSS, IPHPPartitions.CSS_MULTILINE_COMMENT,
+ IPHPPartitions.PHP_STRING_DQ, IPHPPartitions.PHP_STRING_SQ, IPHPPartitions.PHP_STRING_HEREDOC, IPHPPartitions.CSS, IPHPPartitions.CSS_MULTILINE_COMMENT,
IPHPPartitions.JAVASCRIPT, IPHPPartitions.JS_MULTILINE_COMMENT, IPHPPartitions.SMARTY,
IPHPPartitions.SMARTY_MULTILINE_COMMENT,
public String[] getConfiguredPHPContentTypes() {
return new String[] { IDocument.DEFAULT_CONTENT_TYPE, IPHPPartitions.PHP_PARTITIONING, IPHPPartitions.PHP_SINGLELINE_COMMENT,
IPHPPartitions.PHP_MULTILINE_COMMENT, IPHPPartitions.PHP_PHPDOC_COMMENT, IPHPPartitions.PHP_STRING_DQ,
- IPHPPartitions.PHP_STRING_SQ, IPHPPartitions.CSS, IPHPPartitions.CSS_MULTILINE_COMMENT, IPHPPartitions.JAVASCRIPT,
+ IPHPPartitions.PHP_STRING_SQ, IPHPPartitions.PHP_STRING_HEREDOC, IPHPPartitions.CSS, IPHPPartitions.CSS_MULTILINE_COMMENT, IPHPPartitions.JAVASCRIPT,
IPHPPartitions.JS_MULTILINE_COMMENT, IPHPPartitions.SMARTY, IPHPPartitions.SMARTY_MULTILINE_COMMENT, };
}
assistant.setContentAssistProcessor(processor, IPHPPartitions.PHP_PARTITIONING);
assistant.setContentAssistProcessor(processor, IPHPPartitions.PHP_STRING_DQ);
assistant.setContentAssistProcessor(processor, IPHPPartitions.PHP_STRING_SQ);
+ assistant.setContentAssistProcessor(processor, IPHPPartitions.PHP_STRING_HEREDOC);
assistant.setContentAssistProcessor(new PHPDocCompletionProcessor(getEditor()), IPHPPartitions.PHP_PHPDOC_COMMENT);
// assistant.enableAutoActivation(true);
phpDR = new DefaultDamagerRepairer(getStringSQScanner());
phpReconciler.setDamager(phpDR, IPHPPartitions.PHP_STRING_SQ);
phpReconciler.setRepairer(phpDR, IPHPPartitions.PHP_STRING_SQ);
+ phpDR = new DefaultDamagerRepairer(getStringDQScanner());
+ phpReconciler.setDamager(phpDR, IPHPPartitions.PHP_STRING_HEREDOC);
+ phpReconciler.setRepairer(phpDR, IPHPPartitions.PHP_STRING_HEREDOC);
phpDR = new DefaultDamagerRepairer(getSinglelineCommentScanner());
phpReconciler.setDamager(phpDR, IPHPPartitions.PHP_SINGLELINE_COMMENT);
phpReconciler.setRepairer(phpDR, IPHPPartitions.PHP_SINGLELINE_COMMENT);