import net.sourceforge.phpdt.internal.ui.text.JavaReconciler;
import net.sourceforge.phpdt.internal.ui.text.java.JavaFormattingStrategy;
import net.sourceforge.phpdt.internal.ui.text.java.JavaReconcilingStrategy;
+import net.sourceforge.phpdt.internal.ui.text.java.JavaStringAutoIndentStrategy;
import net.sourceforge.phpdt.internal.ui.text.java.hover.JavaEditorTextHoverDescriptor;
import net.sourceforge.phpdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy;
import net.sourceforge.phpdt.internal.ui.text.phpdoc.PHPDocCompletionProcessor;
import net.sourceforge.phpeclipse.phpeditor.php.PHPCompletionProcessor;
import net.sourceforge.phpeclipse.phpeditor.php.PHPDoubleClickSelector;
import net.sourceforge.phpeclipse.phpeditor.util.PHPColorProvider;
-import org.eclipse.core.resources.IFile;
+
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.DefaultAutoIndentStrategy;
import org.eclipse.jface.text.source.SourceViewerConfiguration;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IFileEditorInput;
/**
* Configuration for an <code>SourceViewer</code> which shows PHP code.
*/
*/
public IAutoIndentStrategy getAutoIndentStrategy(
ISourceViewer sourceViewer, String contentType) {
+ if (IPHPPartitions.PHP_STRING_DQ.equals(contentType))
+ return new JavaStringAutoIndentStrategy(getConfiguredDocumentPartitioning(sourceViewer));
+
return (IPHPPartitions.PHP_PARTITIONING.equals(contentType)
? new PHPAutoIndentStrategy()
: new DefaultAutoIndentStrategy());
return new String[]{IPHPPartitions.HTML,
IPHPPartitions.HTML_MULTILINE_COMMENT,
IPHPPartitions.PHP_PARTITIONING,
- IPHPPartitions.PHP_MULTILINE_COMMENT,
+ IPHPPartitions.PHP_PHPDOC_COMMENT,
IPHPPartitions.CSS,
IPHPPartitions.CSS_MULTILINE_COMMENT,
IPHPPartitions.JAVASCRIPT,
assistant.setContentAssistProcessor(new PHPCompletionProcessor(),
IPHPPartitions.PHP_PARTITIONING);
assistant.setContentAssistProcessor(new PHPDocCompletionProcessor(),
- IPHPPartitions.PHP_MULTILINE_COMMENT);
+ IPHPPartitions.PHP_PHPDOC_COMMENT);
// assistant.enableAutoActivation(true);
// assistant.setAutoActivationDelay(500);
// assistant.setProposalPopupOrientation(ContentAssistant.PROPOSAL_OVERLAY);
reconciler.setRepairer(dr, IPHPPartitions.PHP_PARTITIONING);
dr = new DefaultDamagerRepairer(getPHPDocScanner());
reconciler.setDamager(dr,
- IPHPPartitions.PHP_MULTILINE_COMMENT);
+ IPHPPartitions.PHP_PHPDOC_COMMENT);
reconciler.setRepairer(dr,
- IPHPPartitions.PHP_MULTILINE_COMMENT);
+ IPHPPartitions.PHP_PHPDOC_COMMENT);
return reconciler;
}
/*
presenter.setInformationProvider(provider,
IPHPPartitions.PHP_PARTITIONING);
presenter.setInformationProvider(provider,
- IPHPPartitions.PHP_MULTILINE_COMMENT);
+ IPHPPartitions.PHP_PHPDOC_COMMENT);
presenter.setInformationProvider(provider,
IPHPPartitions.SMARTY_MULTILINE_COMMENT);
presenter.setInformationProvider(provider,