diff options
Diffstat (limited to 'bundles/org.eclipse.wst.jsdt.web.support.jsp')
15 files changed, 0 insertions, 511 deletions
diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.classpath b/bundles/org.eclipse.wst.jsdt.web.support.jsp/.classpath deleted file mode 100644 index ce73933404..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.classpath +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.project b/bundles/org.eclipse.wst.jsdt.web.support.jsp/.project deleted file mode 100644 index f9e07960bf..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.project +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>org.eclipse.wst.jsdt.web.support.jsp</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.ManifestBuilder</name> - <arguments> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.pde.SchemaBuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.pde.PluginNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index afa5c91352..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Tue Apr 04 03:36:32 EDT 2006 -eclipse.preferences.version=1 -encoding/<project>=ISO-8859-1 diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 7ec5750225..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Mon Apr 17 01:48:39 EDT 2006 -eclipse.preferences.version=1 -line.separator=\r\n diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 915373933e..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,80 +0,0 @@ -#Sat Mar 24 11:23:54 EDT 2007 -eclipse.preferences.version=1 -org.eclipse.jdt.core.builder.cleanOutputFolder=clean -org.eclipse.jdt.core.builder.duplicateResourceTask=warning -org.eclipse.jdt.core.builder.invalidClasspath=ignore -org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch -org.eclipse.jdt.core.circularClasspath=error -org.eclipse.jdt.core.classpath.exclusionPatterns=enabled -org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.4 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.doc.comment.support=enabled -org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.deprecation=ignore -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning -org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=error -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error -org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=error -org.eclipse.jdt.core.compiler.problem.unusedLabel=error -org.eclipse.jdt.core.compiler.problem.unusedLocal=error -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.3 -org.eclipse.jdt.core.incompatibleJDKLevel=ignore -org.eclipse.jdt.core.incompleteClasspath=error diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 301c7adde6..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Mon Apr 17 01:48:39 EDT 2006 -eclipse.preferences.version=1 -internal.default.compliance=default -org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<templates/> diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.ltk.core.refactoring.prefs deleted file mode 100644 index c59368c5e1..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.ltk.core.refactoring.prefs +++ /dev/null @@ -1,3 +0,0 @@ -#Tue Apr 04 03:36:32 EDT 2006 -eclipse.preferences.version=1 -org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.pde.prefs deleted file mode 100644 index fc522bba76..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.pde.prefs +++ /dev/null @@ -1,16 +0,0 @@ -#Mon Apr 17 02:01:33 EDT 2006 -compilers.incompatible-environment=0 -compilers.p.build=0 -compilers.p.deprecated=1 -compilers.p.illegal-att-value=0 -compilers.p.no-required-att=0 -compilers.p.not-externalized-att=0 -compilers.p.unknown-attribute=0 -compilers.p.unknown-class=0 -compilers.p.unknown-element=0 -compilers.p.unknown-resource=0 -compilers.p.unresolved-ex-points=0 -compilers.p.unresolved-import=0 -compilers.p.unused-element-or-attribute=0 -compilers.use-project=true -eclipse.preferences.version=1 diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/META-INF/MANIFEST.MF b/bundles/org.eclipse.wst.jsdt.web.support.jsp/META-INF/MANIFEST.MF deleted file mode 100644 index 8b5d38dda4..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name.0 -Bundle-SymbolicName: org.eclipse.wst.jsdt.web.support.jsp;singleton:=true -Bundle-Version: 1.0.0 -Bundle-Activator: org.eclipse.wst.jsdt.web.support.jsp.Activator -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.wst.jsdt.web.ui, - org.eclipse.jst.jsp.ui, - org.eclipse.wst.sse.ui, - org.eclipse.jface.text, - org.eclipse.jface, - org.eclipse.wst.html.ui, - org.eclipse.wst.html.core, - org.eclipse.jst.jsp.core, - org.eclipse.wst.css.core, - org.eclipse.wst.xml.core, - org.eclipse.wst.sse.core, - org.eclipse.wst.jsdt.web.core -Eclipse-LazyStart: true -Bundle-RequiredExecutionEnvironment: J2SE-1.4 -Bundle-Vendor: %Bundle-Vendor.0 -Bundle-Localization: plugin diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/build.properties b/bundles/org.eclipse.wst.jsdt.web.support.jsp/build.properties deleted file mode 100644 index e9863e281e..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/plugin.properties b/bundles/org.eclipse.wst.jsdt.web.support.jsp/plugin.properties deleted file mode 100644 index f0465d1d92..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/plugin.properties +++ /dev/null @@ -1,3 +0,0 @@ -#Properties file for org.eclipse.wst.jsdt.web.support.jsp
-Bundle-Vendor.0 = Eclipse.org
-Bundle-Name.0 = JSDT support for JSP Plug-in
\ No newline at end of file diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/plugin.xml b/bundles/org.eclipse.wst.jsdt.web.support.jsp/plugin.xml deleted file mode 100644 index 8a748e0b2d..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/plugin.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<?eclipse version="3.2"?> -<plugin> - - <extension point="org.eclipse.wst.sse.ui.editorConfiguration"> - <sourceViewerConfiguration - class="org.eclipse.wst.jsdt.web.support.jsp.JSDTStructuredTextViewerConfigurationJSP" - target="org.eclipse.jst.jsp.core.jspsource.source" /> - - <!-- - <contentOutlineConfiguration - class="org.eclipse.jst.jsp.ui.views.contentoutline.JSPContentOutlineConfiguration" - target="org.eclipse.jst.jsp.core.jspsource" /> - --> - - </extension> - - <extension - point="org.eclipse.wst.sse.ui.adapterFactoryDescription"> - <adapterFactoryDescription - class="org.eclipse.wst.jsdt.web.support.jsp.JSDTAdapterFactoryProviderForJSP"> - <contentType id="org.eclipse.jst.jsp.core.jspsource" /> - </adapterFactoryDescription> - </extension> - - - <extension point="org.eclipse.wst.sse.ui.sourcevalidation"> - <validator - scope="total" - class="org.eclipse.wst.jsdt.web.core.internal.validation.JsValidator" - id="org.eclipse.wst.jsdt.web.support.jsp.jssourcevalidator"> - <contentTypeIdentifier id="org.eclipse.jst.jsp.core.jspsource"> - <partitionType id="org.eclipse.wst.html.SCRIPT"></partitionType> - <partitionType id="org.eclipse.wst.html.SCRIPT.EVENT"></partitionType> - </contentTypeIdentifier> - </validator> - </extension> - -</plugin> diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/src/org/eclipse/wst/jsdt/web/support/jsp/Activator.java b/bundles/org.eclipse.wst.jsdt.web.support.jsp/src/org/eclipse/wst/jsdt/web/support/jsp/Activator.java deleted file mode 100644 index 0eb9dc70d8..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/src/org/eclipse/wst/jsdt/web/support/jsp/Activator.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.eclipse.wst.jsdt.web.support.jsp; - -import org.eclipse.core.runtime.Plugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends Plugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.eclipse.wst.jsdt.web.support.jsp"; - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/src/org/eclipse/wst/jsdt/web/support/jsp/JSDTAdapterFactoryProviderForJSP.java b/bundles/org.eclipse.wst.jsdt.web.support.jsp/src/org/eclipse/wst/jsdt/web/support/jsp/JSDTAdapterFactoryProviderForJSP.java deleted file mode 100644 index da995c1719..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/src/org/eclipse/wst/jsdt/web/support/jsp/JSDTAdapterFactoryProviderForJSP.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.eclipse.wst.jsdt.web.support.jsp; - -import org.eclipse.jst.jsp.core.internal.modelhandler.ModelHandlerForJSP; -import org.eclipse.wst.jsdt.web.ui.internal.registry.AdapterFactoryProviderForJSDT; -import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IDocumentTypeHandler; - -public class JSDTAdapterFactoryProviderForJSP extends - AdapterFactoryProviderForJSDT { - - public boolean isFor(IDocumentTypeHandler contentTypeDescription) { - return (contentTypeDescription instanceof ModelHandlerForJSP); - } -} diff --git a/bundles/org.eclipse.wst.jsdt.web.support.jsp/src/org/eclipse/wst/jsdt/web/support/jsp/JSDTStructuredTextViewerConfigurationJSP.java b/bundles/org.eclipse.wst.jsdt.web.support.jsp/src/org/eclipse/wst/jsdt/web/support/jsp/JSDTStructuredTextViewerConfigurationJSP.java deleted file mode 100644 index ca0f0e5d5c..0000000000 --- a/bundles/org.eclipse.wst.jsdt.web.support.jsp/src/org/eclipse/wst/jsdt/web/support/jsp/JSDTStructuredTextViewerConfigurationJSP.java +++ /dev/null @@ -1,234 +0,0 @@ -package org.eclipse.wst.jsdt.web.support.jsp; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jface.text.IAutoEditStrategy; -import org.eclipse.jface.text.ITextDoubleClickStrategy; -import org.eclipse.jface.text.ITextHover; -import org.eclipse.jface.text.contentassist.IContentAssistProcessor; -import org.eclipse.jface.text.contentassist.IContentAssistant; -import org.eclipse.jface.text.formatter.IContentFormatter; -import org.eclipse.jface.text.formatter.IFormattingStrategy; -import org.eclipse.jface.text.formatter.MultiPassContentFormatter; -import org.eclipse.jface.text.hyperlink.IHyperlinkDetector; -import org.eclipse.jface.text.information.IInformationPresenter; -import org.eclipse.jface.text.information.IInformationProvider; -import org.eclipse.jface.text.source.ISourceViewer; -import org.eclipse.jst.jsp.core.internal.text.StructuredTextPartitionerForJSP; -import org.eclipse.jst.jsp.core.text.IJSPPartitions; -import org.eclipse.jst.jsp.ui.StructuredTextViewerConfigurationJSP; -import org.eclipse.jst.jsp.ui.internal.autoedit.StructuredAutoEditStrategyJSP; -import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants; -import org.eclipse.wst.css.core.text.ICSSPartitions; -import org.eclipse.wst.html.core.text.IHTMLPartitions; -import org.eclipse.wst.jsdt.web.ui.StructuredTextViewerConfigurationJSDT; -import org.eclipse.wst.jsdt.web.ui.StructuredTextViewerConfigurationJSDT.externalTypeExtension; -import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration; -import org.eclipse.wst.sse.ui.internal.ExtendedConfigurationBuilder; -import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider; -import org.eclipse.wst.xml.core.text.IXMLPartitions; - -public class JSDTStructuredTextViewerConfigurationJSP extends StructuredTextViewerConfigurationJSP{ - - private String[] fConfiguredContentTypes; - - private StructuredTextViewerConfiguration fHTMLSourceViewerConfiguration; - - private StructuredTextViewerConfiguration getHTMLSourceViewerConfiguration() { - if (fHTMLSourceViewerConfiguration == null) { - fHTMLSourceViewerConfiguration = new StructuredTextViewerConfigurationJSDT(); - } - return fHTMLSourceViewerConfiguration; - } - - /* - * From here down, had to copy code from the JSP because the class decided to make the two members above private - */ - public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) { - IAutoEditStrategy[] strategies = null; - - if (contentType == IHTMLPartitions.HTML_DEFAULT || contentType == IHTMLPartitions.HTML_DECLARATION) { - // html and jsp autoedit strategies - List allStrategies = new ArrayList(0); - - // add the jsp autoedit strategy first then add all html's - allStrategies.add(new StructuredAutoEditStrategyJSP()); - - IAutoEditStrategy[] htmlStrategies = getHTMLSourceViewerConfiguration().getAutoEditStrategies(sourceViewer, contentType); - for (int i = 0; i < htmlStrategies.length; i++) { - allStrategies.add(htmlStrategies[i]); - } - - strategies = (IAutoEditStrategy[]) allStrategies.toArray(new IAutoEditStrategy[allStrategies.size()]); - } - else { - strategies = super.getAutoEditStrategies(sourceViewer, contentType); - } - - return strategies; - } - - public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) { - if (fConfiguredContentTypes == null) { - /* - * A little bit of cheating because assuming html's configured - * content types will add default, unknown, and all xml configured - * content types - */ - String[] htmlTypes = getHTMLSourceViewerConfiguration().getConfiguredContentTypes(sourceViewer); - String[] jspTypes = StructuredTextPartitionerForJSP.getConfiguredContentTypes(); - fConfiguredContentTypes = new String[htmlTypes.length + jspTypes.length]; - - int index = 0; - System.arraycopy(htmlTypes, 0, fConfiguredContentTypes, index, htmlTypes.length); - System.arraycopy(jspTypes, 0, fConfiguredContentTypes, index += htmlTypes.length, jspTypes.length); - } - - return fConfiguredContentTypes; - } - - protected IContentAssistProcessor[] getContentAssistProcessors(ISourceViewer sourceViewer, String partitionType) { - IContentAssistProcessor[] processors = null; - - if (partitionType == IHTMLPartitions.SCRIPT) { - // HTML JavaScript - IContentAssistant htmlContentAssistant = getHTMLSourceViewerConfiguration().getContentAssistant(sourceViewer); - IContentAssistProcessor processor = htmlContentAssistant.getContentAssistProcessor(IHTMLPartitions.SCRIPT); - processors = new IContentAssistProcessor[]{processor}; - } - else if (partitionType == ICSSPartitions.STYLE) { - // HTML CSS - IContentAssistant htmlContentAssistant = getHTMLSourceViewerConfiguration().getContentAssistant(sourceViewer); - IContentAssistProcessor processor = htmlContentAssistant.getContentAssistProcessor(ICSSPartitions.STYLE); - processors = new IContentAssistProcessor[]{processor}; - } - else{ - processors = super.getContentAssistProcessors(sourceViewer, partitionType); - } - - return processors; - } - - public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) { - final IContentFormatter formatter = super.getContentFormatter(sourceViewer); - /* - * Check for any externally supported auto edit strategies from EP. - * [Bradley Childs - childsb@us.ibm.com] - */ - String[] contentTypes = getConfiguredContentTypes(sourceViewer); - for (int i = 0; i < contentTypes.length; i++) { - IFormattingStrategy cf = (IFormattingStrategy) ExtendedConfigurationBuilder.getInstance().getConfiguration(externalTypeExtension.CONTENT_FORMATER, contentTypes[i]); - if (cf != null && formatter instanceof MultiPassContentFormatter) { - ((MultiPassContentFormatter) formatter).setSlaveStrategy(cf, contentTypes[i]); - } - } - return formatter; - } - - public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) { - ITextDoubleClickStrategy strategy = null; - - // html or javascript - if (contentType == IHTMLPartitions.HTML_DEFAULT || contentType == IHTMLPartitions.SCRIPT) - strategy = getHTMLSourceViewerConfiguration().getDoubleClickStrategy(sourceViewer, contentType); - else if (contentType == IJSPPartitions.JSP_DEFAULT) - // JSP (just treat like html) - strategy = getHTMLSourceViewerConfiguration().getDoubleClickStrategy(sourceViewer, IHTMLPartitions.HTML_DEFAULT); - else - strategy = super.getDoubleClickStrategy(sourceViewer, contentType); - - return strategy; - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.editors.text.TextSourceViewerConfiguration#getHyperlinkDetectors(org.eclipse.jface.text.source.ISourceViewer) - */ - - public IHyperlinkDetector[] getHyperlinkDetectors(ISourceViewer sourceViewer) { - if (sourceViewer == null || !fPreferenceStore.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_HYPERLINKS_ENABLED)) { - return null; - } - List allDetectors = new ArrayList(0); - IHyperlinkDetector[] superDetectors = super.getHyperlinkDetectors(sourceViewer); - for (int m = 0; m < superDetectors.length; m++) { - IHyperlinkDetector detector = superDetectors[m]; - if (!allDetectors.contains(detector)) { - allDetectors.add(detector); - } - } - /* Check for external HyperLink Detectors */ - String[] contentTypes = getConfiguredContentTypes(sourceViewer); - for (int i = 0; i < contentTypes.length; i++) { - IHyperlinkDetector hl = (IHyperlinkDetector) ExtendedConfigurationBuilder.getInstance().getConfiguration(externalTypeExtension.HYPERLINK_DETECTOR, contentTypes[i]); - if (hl != null) { - allDetectors.add(hl); - } - } - return (IHyperlinkDetector[]) allDetectors.toArray(new IHyperlinkDetector[0]); - } - - public String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType) { - String[] indentations = null; - - if (contentType == IXMLPartitions.XML_DEFAULT) - indentations = super.getIndentPrefixes(sourceViewer, contentType); - else - indentations = getHTMLSourceViewerConfiguration().getIndentPrefixes(sourceViewer, contentType); - - return indentations; - } - - protected IInformationProvider getInformationProvider(ISourceViewer sourceViewer, String partitionType) { - IInformationProvider provider = null; - if (partitionType == IHTMLPartitions.HTML_DEFAULT) { - // HTML - IInformationPresenter htmlPresenter = getHTMLSourceViewerConfiguration().getInformationPresenter(sourceViewer); - provider = htmlPresenter.getInformationProvider(IHTMLPartitions.HTML_DEFAULT); - } - else if (partitionType == IHTMLPartitions.SCRIPT) { - // HTML JavaScript - IInformationPresenter htmlPresenter = getHTMLSourceViewerConfiguration().getInformationPresenter(sourceViewer); - provider = htmlPresenter.getInformationProvider(IHTMLPartitions.SCRIPT); - } - else{ - provider = super.getInformationProvider(sourceViewer, partitionType); - } - return provider; - } - - public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) { - LineStyleProvider[] providers = null; - - if (partitionType == IHTMLPartitions.HTML_DEFAULT || partitionType == IHTMLPartitions.HTML_COMMENT || partitionType == IHTMLPartitions.HTML_DECLARATION) { - providers = getHTMLSourceViewerConfiguration().getLineStyleProviders(sourceViewer, IHTMLPartitions.HTML_DEFAULT); - } - else if (partitionType == IHTMLPartitions.SCRIPT || partitionType == IJSPPartitions.JSP_CONTENT_JAVASCRIPT) { - providers = getHTMLSourceViewerConfiguration().getLineStyleProviders(sourceViewer, IHTMLPartitions.SCRIPT); - } - else if (partitionType == ICSSPartitions.STYLE) { - providers = getHTMLSourceViewerConfiguration().getLineStyleProviders(sourceViewer, ICSSPartitions.STYLE); - } - else{ - providers = super.getLineStyleProviders(sourceViewer, partitionType); - } - - return providers; - } - - public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType, int stateMask) { - ITextHover hover = null; - - if (contentType == IHTMLPartitions.HTML_DEFAULT || contentType == IHTMLPartitions.SCRIPT) { - // html and javascript regions - hover = getHTMLSourceViewerConfiguration().getTextHover(sourceViewer, contentType, stateMask); - } - else { - hover = super.getTextHover(sourceViewer, contentType); - } - - return hover; - } -} |