Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/SMUtil.java')
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/SMUtil.java36
1 files changed, 0 insertions, 36 deletions
diff --git a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/SMUtil.java b/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/SMUtil.java
deleted file mode 100644
index 8d3b9c066b..0000000000
--- a/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/SMUtil.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.wst.html.core.internal.validate;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-final class SMUtil {
-
- private SMUtil() {
- super();
- }
-
- /* get an ancestor element ignoring implicit ones. */
- public static Element getParentElement(Node child) {
- if (child == null)
- return null;
-
- Node p = child.getParentNode();
- while (p != null) {
- if (p.getNodeType() == Node.ELEMENT_NODE) {
- return (Element) p;
- }
- p = p.getParentNode();
- }
- return null;
- }
-}

Back to the top

p.core/build.properties22
-rw-r--r--bundles/org.eclipse.jst.jsp.core/component.xml24
-rw-r--r--bundles/org.eclipse.jst.jsp.core/plugin.properties28
-rw-r--r--bundles/org.eclipse.jst.jsp.core/plugin.xml301
-rw-r--r--bundles/org.eclipse.jst.jsp.core/schema/eltranslator.exsd121
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/Assert.java121
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCoreMessages.java42
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePlugin.java93
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties21
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/Logger.java144
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMContentWrapperImpl.java56
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMDocumentWrapperImpl.java216
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMElementDeclarationWrapperImpl.java128
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMGroupWrapperImpl.java112
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMNodeWrapperImpl.java79
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/JSPCMDocumentFactory.java72
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/TaglibController.java311
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMAttributeDeclarationImpl.java259
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDataTypeImpl.java100
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java676
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentImpl.java445
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMElementDeclarationImpl.java461
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNamedNodeMapImpl.java85
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNodeListImpl.java63
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java1202
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDFunctionImpl.java151
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDInitParamImpl.java64
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDListenerImpl.java40
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDValidatorImpl.java58
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDVariableImpl.java101
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TaglibTracker.java41
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP11TLDNames.java49
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP12TLDNames.java77
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP20TLDNames.java31
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDAttributeDeclaration.java62
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDDocument.java105
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDElementDeclaration.java114
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDFunction.java36
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDInitParam.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDListener.java20
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDValidator.java27
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDVariable.java48
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentproperties/JSPFContentProperties.java213
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentproperties/JSPFContentPropertiesManager.java245
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/ByteReader.java109
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/ContentDescriberForJSP.java253
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/HeadParserToken.java44
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/IntStack.java99
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java2107
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizerConstants.java21
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPResourceEncodingDetector.java521
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/DocumentFactoryForJSP.java54
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapter.java59
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterFactory.java97
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterImpl.java704
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcher.java23
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java58
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherImpl.java108
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/AttrImplForJSP.java35
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/CommentImplForJSP.java50
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMDocumentForJSP.java120
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMModelForJSP.java45
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/ElementImplForJSP.java69
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/NestDOMModelUpdater.java34
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/NestedDOMModelParser.java85
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/TextImplForJSP.java28
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/IJSPHeadContentDetector.java22
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentHeadContentDetector.java33
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentLoader.java312
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/CompilationUnitHelper.java48
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/EscapedTextUtil.java87
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/IJSPTranslation.java83
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSP2ServletNameUtil.java134
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPIncludeRegionHelper.java94
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPProblemRequestor.java88
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java629
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java226
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java65
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationExtension.java441
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationUtil.java123
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java2487
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java531
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpress.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAndExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTChoiceExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTEqualityExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTFunctionInvocation.java40
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTGTNode.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTImplicitObject.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTLiteral.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTMultiplyExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOperatorExpression.java36
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOrExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTRelationalExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTStart.java28
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTUnaryExpression.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValue.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValuePrefix.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValueSuffix.java41
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java45
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java457
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/FindFunctionInvocationVisitor.java100
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JJTJSPELParserState.java134
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj675
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt281
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java1158
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserConstants.java121
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java855
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTreeConstants.java50
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserVisitor.java33
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java68
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Node.java48
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ParseException.java208
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java412
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleNode.java116
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Token.java92
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/TokenMgrError.java149
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixparser.sed18
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixtm.sed27
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/go.sh9
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java163
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java722
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPPathIndexer.java109
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchDocument.java258
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchParticipant.java106
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchScope.java127
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchSupport.java542
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JavaSearchDocumentDelegate.java71
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/NullSearchDocument.java44
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/EmbeddedTypeStateData.java40
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/JSPModelLoader.java665
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/ModelHandlerForJSP.java66
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryAdapterImpl.java25
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryAssociationProvider.java26
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryCMProvider.java74
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryImpl.java162
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/ModelQueryAdapterFactoryForJSP.java169
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPDirectiveStructuredDocumentRegion.java34
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPReParser.java369
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPSourceParser.java420
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPParserRegionFactory.java37
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPStructuredRegionFactory.java34
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java3706
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceInitializer.java45
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceNames.java39
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP11Namespace.java109
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP12Namespace.java19
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP20Namespace.java26
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/contenttype/ContentTypeIdForJSP.java49
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/contenttype/IContentDescriptionForJSP.java25
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/text/IJSPPartitionTypes.java24
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/regions/DOMJSPRegionContexts.java56
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibClassLoader.java363
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java603
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperCache.java155
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java77
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibVariable.java88
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/tasks/JSPFileTaskScanner.java22
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/text/StructuredTextPartitionerForJSP.java409
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/CommonXML.java84
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/DocumentProvider.java472
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPActionValidator.java269
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPBatchValidator.java507
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPDirectiveValidator.java269
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPELValidator.java182
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPJavaValidator.java307
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPValidator.java413
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/ELProblem.java34
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/IJSPELTranslator.java48
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/IJarRecord.java41
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITLDRecord.java41
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITagDirRecord.java24
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibIndexListener.java30
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibRecord.java75
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibRecordEvent.java38
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/IURLRecord.java48
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java1896
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java808
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/text/IJSPPartitions.java24
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/contentmodel/JSPedCSSTaglibController.java24
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/contenttype/ContentDescriberForJSPedCSS.java236
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/IJSPCSSImportRule.java18
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/IJSPCSSNode.java19
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPCSSImportRuleImpl.java47
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPCSSNodeImpl.java51
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPedCSSModelImpl.java29
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPedCSSModelParser.java162
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/encoding/JSPedCSSDocumentLoader.java26
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/modelhandler/JSPedCSSModelLoader.java38
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/modelhandler/ModelHandlerForJSPedCSS.java44
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSSourceParser.java43
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSTokenizer.java2075
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parserz/JSPedCSSRegionContexts.java26
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.classpath7
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.cvsignore8
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.options2
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.project28
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.pde.prefs15
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF65
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/about.html34
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/build.properties21
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/dtool16/newjsp_wiz.gifbin360 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/etool16/newjsp_wiz.gifbin598 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/class_obj.gifbin586 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/default_co.gifbin176 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_default_obj.gifbin118 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_private_obj.gifbin87 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_protected_obj.gifbin119 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_public_obj.gifbin124 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_default_obj.gifbin604 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_private_obj.gifbin603 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_protected_obj.gifbin600 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_public_obj.gifbin586 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_default_obj.gifbin595 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_private_obj.gifbin594 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_protected_obj.gifbin592 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_public_obj.gifbin574 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/localvariable_obj.gifbin152 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/package_obj.gifbin227 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/private_co.gifbin183 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/protected_co.gifbin182 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/public.gifbin193 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/public_co.gifbin194 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-generic.gifbin98 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-jsp.gifbin135 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-template.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/full/wizban/newjspfile_wiz.gifbin3040 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspdecl.gifbin190 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspexp.gifbin124 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspincl.gifbin213 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspscr.gifbin531 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/snippets/jsptaglib.gifbin338 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/snippets/tag-generic.gifbin82 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/icons/snippets/tag-jsp.gifbin358 -> 0 bytes-rw-r--r--bundles/org.eclipse.jst.jsp.ui/plugin.properties84
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/plugin.xml676
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/css/ui/internal/properties/JSPedCSSPropertySource.java40
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/css/ui/internal/registry/AdapterFactoryProviderJSPedCSS.java25
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/css/ui/internal/views/properties/JSPedCSSPropertySheetConfiguration.java188
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java441
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/IActionConstantsJSP.java19
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/IActionDefinitionIdsJSP.java21
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIMessages.java107
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPlugin.java98
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties87
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/Logger.java144
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/AutoEditStrategyForTabs.java187
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSP.java104
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java268
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaBreakpointProvider.java105
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaScriptBreakpointProvider.java81
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaStratumBreakpointProvider.java172
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavascriptLineBreakpoint.java64
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/AutoImportProposal.java142
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/BeanInfoProvider.java442
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/CustomTemplateProposal.java42
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/IBeanInfoProvider.java20
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/IJavaPropertyDescriptor.java27
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java285
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposal.java55
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java1273
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java304
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELCompletionProcessor.java10
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELContentAssistProcessor.java139
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELProposalCollector.java82
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java239
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java259
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPProposalCollector.java209
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java164
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java173
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaParameterListValidator.java216
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaTypeCompletionProposal.java300
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaTypeFinder.java134
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaTypeNameRequestor.java121
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/NoRegionContentAssistProcessorForJSP.java96
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/ReplaceNameTemplateContext.java104
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/JSPFContentSettingsPropertyPage.java244
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/ProjectJSPFContentSettingsPropertyPage.java19
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/derived/SingleCharReader.java66
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/ActionContributorJSP.java94
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/IHelpContextIds.java53
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPEditorPluginImageHelper.java179
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPEditorPluginImages.java48
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPSourceEditingTextTools.java62
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/format/FormattingStrategyJSPJava.java110
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/ExternalFileEditorInput.java160
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/ExternalFileHyperlink.java60
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlink.java67
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlinkDetector.java237
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java221
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarHyperlink.java114
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarUriHyperlink.java75
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileHyperlink.java161
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/WorkspaceFileHyperlink.java79
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLHyperlinkDetector.java503
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java372
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPJavaSelectionProvider.java60
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameChange.java67
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameParticipant.java80
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameRequestor.java47
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveElementActionDelegate.java116
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameChange.java68
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameParticipant.java74
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameRequestor.java41
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameElementActionDelegate.java109
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveChange.java66
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveParticipant.java82
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveRequestor.java60
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameChange.java69
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameParticipant.java80
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameRequestor.java63
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/BasicJSPSearchRequestor.java141
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesActionDelegate.java40
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesProcessor.java82
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPOccurrencesSearchResult.java29
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchQuery.java117
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchRequestor.java81
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSingleFileSearchRequestor.java38
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/ui/JSPMatchPresentation.java45
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/ui/JSPQueryParticipant.java98
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceInitializer.java70
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceNames.java65
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPColorPage.java167
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPFilesPreferencePage.java122
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPSourcePreferencePage.java105
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPStyledTextColorPicker.java42
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPTemplatePreferencePage.java58
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionAnnotationModelChanges.java54
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterFactoryHTML.java205
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterFactoryJSP.java77
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterHTML.java291
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionModelNodeAdapterJSP.java26
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/ProjectionViewerInformation.java196
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/projection/StructuredTextFoldingProviderJSP.java399
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/registry/AdapterFactoryProviderForJSP.java79
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/IStyleConstantsJSP.java5
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/LineStyleProviderForJSP.java224
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/IStyleConstantsJSPJava.java20
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaCodeScanner.java106
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaColorProvider.java82
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaWhitespaceDetector.java26
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaWordDetector.java32
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/LineStyleProviderForJava.java347
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/IStyleConstantsJSPEL.java18
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELCodeScanner.java83
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELColorProvider.java102
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELWhitespaceDetector.java26
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELWordDetector.java32
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/LineStyleProviderForJSPEL.java333
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/HTMLPrinter.java216
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPInformationProvider.java42
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java144
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocInformationProvider.java43
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPTagInfoHoverProcessor.java51
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JavaWordFinder.java69
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/EncodingTemplateVariableResolverJSP.java38
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/TemplateContextTypeIdsJSP.java50
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/TemplateContextTypeJSP.java33
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JSPDocumentRegionEdgeMatcher.java28
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaCodeReader.java252
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaPairMatcher.java202
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/JSPActionSourceValidator.java269
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPFileWizardPage.java278
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPTemplatesWizardPage.java474
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPWizard.java132
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/views/contentoutline/JSPContentOutlineConfiguration.java51
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.properties40
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.xml23
-rw-r--r--bundles/org.eclipse.wst.html.core/.classpath7
-rw-r--r--bundles/org.eclipse.wst.html.core/.cvsignore8
-rw-r--r--bundles/org.eclipse.wst.html.core/.options2
-rw-r--r--bundles/org.eclipse.wst.html.core/.project28
-rw-r--r--bundles/org.eclipse.wst.html.core/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.html.core/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--bundles/org.eclipse.wst.html.core/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--bundles/org.eclipse.wst.html.core/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.html.core/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.html.core/META-INF/MANIFEST.MF37
-rw-r--r--bundles/org.eclipse.wst.html.core/about.html34
-rw-r--r--bundles/org.eclipse.wst.html.core/build.properties23
-rw-r--r--bundles/org.eclipse.wst.html.core/component.xml15
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref.properties108
-rw-r--r--bundles/org.eclipse.wst.html.core/data/htmref.xml306
-rw-r--r--bundles/org.eclipse.wst.html.core/plugin.properties14
-rw-r--r--bundles/org.eclipse.wst.html.core/plugin.xml199
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLContentBuilder.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCoreMessages.java61
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePlugin.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePluginResources.properties42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/Logger.java144
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/AbstractNodeCleanupHandler.java83
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/CSSTextNodeCleanupHandler.java86
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java692
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupHandlerFactory.java147
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupProcessorImpl.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/JSPElementNodeCleanupHandler.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/NodeCleanupHandler.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/commentelement/handlers/CommentElementHandlerForSSI.java150
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/AttributeCollection.java1285
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMContentImpl.java58
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMGroupImpl.java83
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNamedNodeMapImpl.java114
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNamespaceImpl.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNodeImpl.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CMNodeListImpl.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ComplexTypeDefinition.java75
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ComplexTypeDefinitionFactory.java183
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdAddress.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdColumnGroup.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdDl.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdEmbed.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFieldset.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFlowContainer.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdFrameset.java93
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdHead.java175
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdHtml.java334
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdInlineContainer.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdLiContainer.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdMap.java72
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdNoframesContent.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdOptionContainer.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdParamContainer.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdSelect.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTable.java140
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTableCellContainer.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdTrContainer.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/DeclCollection.java244
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ElementCollection.java881
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/EntityCollection.java837
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HCMDocImpl.java83
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLAttrDeclImpl.java122
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLAttributeDeclaration.java24
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDataType.java66
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDataTypeImpl.java125
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDocument.java35
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMDocumentFactory.java60
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLCMNode.java32
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLElemDeclImpl.java366
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLElementDeclaration.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLEntityDeclImpl.java76
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLEntityDeclaration.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLPropertyDeclaration.java102
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedA.java99
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedADDRESS.java58
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedAPPLET.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedAREA.java61
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBASE.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBASEFONT.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBDO.java61
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBGSOUND.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBLOCKQUOTE.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBODY.java96
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBR.java51
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedBUTTON.java101
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCAPTION.java48
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCENTER.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCOL.java67
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCOLGROUP.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDD.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDIV.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDL.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDT.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedEMBED.java94
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedEmpty.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFIELDSET.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFONT.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFORM.java92
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFRAME.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFRAMESET.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFlowContainer.java26
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFontStyle.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHEAD.java78
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHR.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHTML.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHeading.java84
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedIFRAME.java76
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedIMG.java88
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedINPUT.java122
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedISINDEX.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedInlineContainer.java29
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLABEL.java93
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLEGEND.java54
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLI.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLINK.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedListItemContainer.java30
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMAP.java53
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMARQUEE.java81
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMENU.java88
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMETA.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMarkChanges.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOBR.java33
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOEMBED.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOFRAMES.java79
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedNOSCRIPT.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOBJECT.java86
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOL.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOPTGROUP.java55
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedOPTION.java66
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedP.java104
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPARAM.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPRE.java91
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPcdata.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedPhrase.java41
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedQ.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSCRIPT.java81
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSELECT.java79
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSPAN.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIBase.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIConfig.java48
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIEcho.java46
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIExec.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIFlastmod.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIFsize.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIInclude.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSIPrintenv.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSSISet.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSTYLE.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedScripts.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTABLE.java90
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTEXTAREA.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTITLE.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTR.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTableBody.java73
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTableCell.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedUL.java73
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedWBR.java32
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JCMDocImpl.java73
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP11Namespace.java112
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSPCMDocument.java28
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSPElementCollection.java895
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/PropertyProvider.java23
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/PropertyProviderFactory.java360
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/AttributeCollection.java314
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CHCMDocImpl.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CHTMLNamespace.java152
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMContentImpl.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMGroupImpl.java83
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMNamedNodeMapImpl.java112
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMNodeImpl.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CMNodeListImpl.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/ComplexTypeDefinition.java76
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/ComplexTypeDefinitionFactory.java144
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdAddress.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdDl.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdFlowContainer.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdHead.java174
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdHtml.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdInlineContainer.java50
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdLiContainer.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdOptionContainer.java69
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/CtdSelect.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/DeclCollection.java251
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/ElementCollection.java492
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/EntityCollection.java837
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLAttrDeclImpl.java118
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLCMDataTypeImpl.java126
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLCMNode.java32
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLElemDeclImpl.java369
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HTMLEntityDeclImpl.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedA.java98
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedADDRESS.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBASE.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBLOCKQUOTE.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBODY.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedBR.java51
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedCENTER.java55
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDD.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDIV.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDL.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedDT.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedEmpty.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedFORM.java91
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedFlowContainer.java26
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHEAD.java71
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHR.java75
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHTML.java80
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedHeading.java84
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedIMG.java87
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedINPUT.java108
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedInlineContainer.java29
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedLI.java58
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedListItemContainer.java30
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedMENU.java86
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedMETA.java67
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedOL.java58
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedOPTION.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedP.java104
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedPRE.java90
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedPcdata.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedSELECT.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedSSIBase.java52
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedSSIConfig.java45
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedSSIEcho.java43
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedSSIExec.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedSSIFlastmod.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedSSIFsize.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedSSIInclude.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedSSIPrintenv.java48
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedSSISet.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedTEXTAREA.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedTITLE.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/HedUL.java57
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/PropertyProvider.java26
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/chtml/PropertyProviderFactory.java364
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/ssi/SSICMDocumentFactory.java158
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentproperties/HTMLContentProperties.java194
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentproperties/HTMLContentPropertiesManager.java238
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/AbstractResourceEncodingDetector.java261
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/ByteReader.java109
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/ContentDescriberForHTML.java231
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/EncodingGuesser.java173
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizer.java1690
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizerConstants.java20
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLResourceEncodingDetector.java187
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HeadParserToken.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/IntStack.java99
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/NullMemento.java37
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/DOMStyleModelImpl.java67
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/DocumentStyleImpl.java96
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/ElementStyleImpl.java73
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLConverter.java302
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLDocumentTypeAdapter.java257
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLDocumentTypeAdapterFactory.java170
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLDocumentTypeConstants.java19
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLDocumentTypeEntry.java136
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLDocumentTypeRegistry.java142
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLDocumentTypeRegistryReader.java107
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLModelParserAdapter.java356
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/HTMLModelParserAdapterFactory.java83
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/MetaData.java28
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/MetaDataAdapter.java301
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/TagScanner.java166
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/UnknownTagAdapter.java82
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/encoding/HTMLDocumentCharsetDetector.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/encoding/HTMLDocumentLoader.java165
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/encoding/HTMLModelLoader.java112
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/EmbeddedCSSFormatter.java90
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLElementFormatter.java376
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLFormatContraintsImpl.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLFormatProcessorImpl.java61
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLFormatter.java651
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLFormatterFactory.java109
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLTextFormatter.java299
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/SpaceConverter.java233
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/AbstractCSSModelAdapter.java105
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/AbstractStyleSheetAdapter.java249
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/CSSQueryContext.java137
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/CSSQueryDeclarationData.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/CSSQueryTraverser.java115
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/CSSQueryValueData.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/HTMLDocumentAdapter.java398
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/HTMLStyleSelectorAdapter.java141
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/HTMLStyleSelectorAdapterFactory.java77
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/LinkElementAdapter.java275
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/StyleAdapterFactory.java162
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/StyleAttrAdapter.java248
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/StyleElementAdapter.java452
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/StyleListener.java22
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/URLHelper.java33
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/URLModelProvider.java445
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelhandler/EmbeddedHTML.java166
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelhandler/ModelHandlerForHTML.java55
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/CMAttributeDeclarationBuddySystem.java67
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/CMDocumentForBuddySystem.java119
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/CMElementDeclarationBuddySystem.java201
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/CMNamedNodeMapForBuddySystem.java109
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/CMNodeBuddySystem.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/DocumentQuery.java200
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/ElementDeclarationAdapter.java29
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/ElementDeclarationAdapterFactory.java68
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/HMQUtil.java121
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/HTMLElementDeclarationAdapter.java54
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/HTMLModelQueryAssociationProvider.java54
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/HTMLModelQueryCMProvider.java117
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/HTMLModelQueryImpl.java156
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/ModelQueryAdapterFactoryForEmbeddedHTML.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/ModelQueryAdapterFactoryForHTML.java212
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/XHTMLAssociationProvider.java128
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceInitializer.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceNames.java223
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/HTML40Namespace.java675
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/HTMLCMProperties.java116
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/HTMLFilesPreferenceNames.java33
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/HTMLFormatContraints.java35
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/PreferenceNames.java35
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/contenttype/ContentTypeFamilyForHTML.java40
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/contenttype/ContentTypeIdForHTML.java40
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/text/IHTMLPartitionTypes.java21
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/text/StructuredTextPartitionerForHTML.java208
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/AbstractErrorInfo.java40
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/CMUtil.java200
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/CompositeValidator.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/DocumentPropagatingValidator.java52
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/ElementPropagatingValidator.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/ErrorInfo.java26
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/ErrorInfoImpl.java56
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/ErrorState.java41
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/FMUtil.java78
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java255
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLDocumentContentValidator.java196
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLElementAncestorValidator.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLElementContentValidator.java180
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLSimpleDocumentValidator.java39
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLSimpleValidator.java42
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLValidationAdapterFactory.java72
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/MessageFactory.java253
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/NamespaceValidator.java127
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/NullValidator.java34
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/PrimeValidator.java25
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/SMUtil.java36
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/Segment.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/SyntaxValidator.java345
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/text/IHTMLPartitions.java21
-rw-r--r--bundles/org.eclipse.wst.html.ui/.classpath8
-rw-r--r--bundles/org.eclipse.wst.html.ui/.cvsignore7
-rw-r--r--bundles/org.eclipse.wst.html.ui/.options1
-rw-r--r--bundles/org.eclipse.wst.html.ui/.project28
-rw-r--r--bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.pde.prefs15
-rw-r--r--bundles/org.eclipse.wst.html.ui/META-INF/MANIFEST.MF52
-rw-r--r--bundles/org.eclipse.wst.html.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.html.ui/build.properties23
-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/dtool16/newhtml_wiz.gifbin232 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/etool16/newhtml_wiz.gifbin352 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/table.gifbin573 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-anchor.gifbin197 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-body.gifbin343 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-button.gifbin344 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-font.gifbin229 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-form.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-generic.gifbin98 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-html.gifbin570 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-image-map.gifbin577 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-image.gifbin601 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-jsp.gifbin135 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-template.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag-title.gifbin581 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/obj16/tag.gifbin82 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/icons/full/wizban/newhfile_wiz.gifbin3032 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/org.eclipse.jdt.core.prefs80
-rw-r--r--bundles/org.eclipse.wst.html.ui/plugin.properties53
-rw-r--r--bundles/org.eclipse.wst.html.ui/plugin.xml455
-rw-r--r--bundles/org.eclipse.wst.html.ui/schema/deviceProfileEntryProvider.exsd109
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationReporter.java139
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationResult.java64
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidationWorkbenchHelper.java47
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/HTMLValidator.java517
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/LocalizedMessage.java65
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/TaskListHelper.java44
-rw-r--r--bundles/org.eclipse.wst.html.ui/src-html-validation/org/eclipse/wst/html/internal/validation/TaskListUtility.java436
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/StructuredTextViewerConfigurationHTML.java328
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIMessages.java117
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPlugin.java98
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIPluginResources.properties89
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/Logger.java160
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/autoedit/AutoEditStrategyForTabs.java188
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/autoedit/StructuredAutoEditStrategyHTML.java143
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/CustomTemplateProposal.java40
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java488
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java130
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java164
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/NoRegionContentAssistProcessorForHTML.java38
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/ReplaceNameTemplateContext.java104
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/XHTMLMinimalContentModelGenerator.java83
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/HTMLNodeActionManager.java129
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/JFaceNodeAdapterFactoryForHTML.java50
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentoutline/JFaceNodeAdapterForHTML.java73
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/AbstractDeviceProfileEntry.java33
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/AbstractDeviceProfileEntryProvider.java32
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ContentSettingsRegistry.java173
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntry.java27
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntryProvider.java28
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/DeviceProfileEntryProviderBuilder.java59
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/HTMLContentSettingsPropertyPage.java280
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ProjectContentSettingsPropertyPage.java282
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/ProjectWebContentSettingsPropertyPage.java19
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentproperties/ui/WebContentSettingsPropertyPage.java373
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/correction/CorrectionAssistantProviderHTML.java51
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/derived/SingleCharReader.java67
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/ActionContributorHTML.java29
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/CleanupActionHTMLDelegate.java162
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/CleanupDialogHTML.java318
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/HTMLEditorPluginImageHelper.java149
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/HTMLEditorPluginImages.java32
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/IHelpContextIds.java49
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/ExternalFileEditorInput.java159
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/ExternalFileHyperlink.java60
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/WorkspaceFileHyperlink.java79
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/XMLHyperlinkDetector.java503
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceInitializer.java89
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceNames.java65
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLColorPage.java124
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLFilesPreferencePage.java128
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSourcePreferencePage.java139
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLTemplatePreferencePage.java58
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionAnnotationModelChanges.java54
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionModelNodeAdapterFactoryHTML.java205
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionModelNodeAdapterHTML.java291
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/ProjectionViewerInformation.java196
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/projection/StructuredTextFoldingProviderHTML.java326
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/registry/AdapterFactoryProviderForHTML.java66
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/search/HTMLFindOccurrencesActionDelegate.java34
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/search/HTMLFindOccurrencesProcessor.java32
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/style/IStyleConstantsHTML.java22
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/style/LineStyleProviderForHTML.java75
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLInformationProvider.java62
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLTagInfoHoverProcessor.java28
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/EncodingTemplateVariableResolverHTML.java38
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/TemplateContextTypeHTML.java34
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/templates/TemplateContextTypeIdsHTML.java50
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/text/HTMLDocumentRegionEdgeMatcher.java27
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/text/IJavaPartitions.java54
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/text/JavaCodeReader.java244
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/text/JavaHeuristicScanner.java986
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/text/JavaPairMatcher.java277
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/text/Symbols.java57
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLFileWizardPage.java251
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLTemplatesWizardPage.java474
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLWizard.java131
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/views/contentoutline/HTMLContentOutlineConfiguration.java44
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.properties44
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.xml28
-rw-r--r--bundles/org.eclipse.wst.sse.core/.classpath10
-rw-r--r--bundles/org.eclipse.wst.sse.core/.cvsignore9
-rw-r--r--bundles/org.eclipse.wst.sse.core/.options18
-rw-r--r--bundles/org.eclipse.wst.sse.core/.project28
-rw-r--r--bundles/org.eclipse.wst.sse.core/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.sse.core/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--bundles/org.eclipse.wst.sse.core/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--bundles/org.eclipse.wst.sse.core/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.sse.core/.settings/org.eclipse.pde.prefs15
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.jFlex286
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.java977
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizerGenJava.cmd23
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/jflexerr.txt0
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/jflexout.txt6
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/HTMLHeadTokenizer.jFlex285
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/HTMLHeadTokenizer.java1206
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/HTMLHeadTokenizerGenJava.cmd23
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/jflexerr.txt0
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/jflexout.txt8
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XML10Names/XML10Names.jFlex100
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XML10Names/XML10Names.java594
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XML10Names/XML10NamesGenJava.cmd25
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XML10Names/XML10NamesGenJavaJFlex14.cmd25
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XML10Names/jflexerr.txt0
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XML10Names/jflexout.txt6
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer/XMLHeadTokenizer.jFlex260
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer/XMLHeadTokenizer.java905
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer/XMLHeadTokenizerGenJava.cmd28
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer/jflexerr.txt0
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer/jflexout.txt8
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer/oldXMLHeadTokenizer.skeleton263
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/CSSTokenizer/devel/CSSTokenizer.java1948
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/CSSTokenizer/devel/CSSTokenizer.jflex511
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/CSSTokenizer/devel/flex.cmd7
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/CSSTokenizer/devel/flex.sh15
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/README11
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/JSPTokenizer.java3706
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/JSPTokenizer.jflex2646
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/XMLTokenizer.java1881
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/XMLTokenizer.jflex1322
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/flex.cmd3
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/flex.sh7
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/flexj.cmd3
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/flexx.cmd3
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/skeleton.sse351
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/skeleton.sse.readme6
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/build.xml75
-rw-r--r--bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF47
-rw-r--r--bundles/org.eclipse.wst.sse.core/README.txt2
-rw-r--r--bundles/org.eclipse.wst.sse.core/about.html34
-rw-r--r--bundles/org.eclipse.wst.sse.core/build.properties32
-rw-r--r--bundles/org.eclipse.wst.sse.core/component.xml20
-rw-r--r--bundles/org.eclipse.wst.sse.core/config/charset.properties86
-rw-r--r--bundles/org.eclipse.wst.sse.core/config/defaultIANA.properties16
-rw-r--r--bundles/org.eclipse.wst.sse.core/config/override.properties24
-rw-r--r--bundles/org.eclipse.wst.sse.core/doc/book.css106
-rw-r--r--bundles/org.eclipse.wst.sse.core/doc/schema.css66
-rw-r--r--bundles/org.eclipse.wst.sse.core/handyStuff.jpage1
-rw-r--r--bundles/org.eclipse.wst.sse.core/plugin.properties25
-rw-r--r--bundles/org.eclipse.wst.sse.core/plugin.xml50
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/adaptOnCreateFactory.exsd93
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/commentElementHandler.exsd131
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/contentTypeFactoryContribution.exsd93
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/cssprofile.exsd130
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/documentTypes.exsd172
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/embeddedTypeHandler.exsd109
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/formatProcessors.exsd124
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/modelHandler.exsd130
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/taskscanner.exsd123
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/AbstractContentSettingsHandler.java83
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/AbstractSubject.java54
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettings.java705
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettingsChangeSubject.java62
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettingsCreator.java26
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettingsFileHandler.java147
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettingsSelfHandler.java93
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ContentSettingsSynchronizer.java174
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/IContentSettings.java83
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/IContentSettingsHandler.java25
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/IContentSettingsListener.java22
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/INotify.java22
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/ISubject.java26
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-contentproperties/org/eclipse/wst/sse/internal/contentproperties/SimpleNodeOperator.java354
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedIO.java258
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedReaderCreator.java533
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedStreamCreator.java509
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CommonCharsetNames.java258
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CommonEncodingPreferenceNames.java73
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/ContentBasedPreferenceGateway.java165
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/ContentTypeEncodingPreferences.java179
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/EncodingMemento.java249
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/EncodingRule.java59
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/ICodedResourcePlugin.java19
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/IContentDescriptionExtended.java42
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/IResourceCharsetDetector.java21
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/IStreamCharsetDetector.java28
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/NonContentBasedEncodingRules.java139
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/Assert.java120
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/BufferedLimitedReader.java58
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/BufferedLimitedStream.java79
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/ByteReader.java109
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/CodedResourcePlugin.java55
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/Logger.java158
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/NullInputStream.java69
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/ResourceBundleHelper.java61
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/util/UnicodeBOMEncodingDetector.java213
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/CharConversionErrorWithDetail.java43
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/MalformedInputExceptionWithDetail.java103
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/MalformedOutputExceptionWithDetail.java44
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/exceptions/UnsupportedCharsetExceptionWithDetail.java47
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/provisional/tasks/IFileTaskScanner.java73
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/provisional/tasks/TaskTag.java52
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/FileTaskScannerRegistryReader.java183
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/StructuredFileTaskScanner.java333
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/TaskScanningJob.java222
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/TaskScanningScheduler.java133
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/TaskTagPreferenceKeys.java24
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/WorkspaceTaskScanner.java433
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/StructuredModelManager.java72
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/FileBufferModelManager.java718
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/IExecutionDelegate.java20
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ILockable.java30
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/JSPAwareAdapterFactory.java22
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/Logger.java185
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ModelManagerPluginRegistryReader.java198
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/NoCancelProgressMonitor.java35
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/NotImplementedException.java37
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/NullMemento.java37
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/PropagatingAdapter.java38
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/PropagatingAdapterFactory.java29
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECoreMessages.java39
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java93
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePluginResources.properties21
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/cleanup/AbstractStructuredCleanupProcessor.java456
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/cleanup/IStructuredCleanupHandler.java23
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/cleanup/IStructuredCleanupPreferences.java56
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/cleanup/IStructuredCleanupProcessor.java114
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/cleanup/StructuredCleanupPreferences.java135
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/cleanup/StructuredContentCleanupHandler.java20
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/cleanup/StructuredContentCleanupHandlerImpl.java43
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/document/AbstractDocumentLoader.java438
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/document/DocumentReader.java131
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/document/IDocumentCharsetDetector.java22
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/document/IDocumentLoader.java70
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/document/StructuredDocumentFactory.java66
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/document/TextUtilities.java73
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/filebuffers/BasicStructuredDocumentFactory.java91
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/AbstractStructuredFormatProcessor.java517
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/IStructuredFormatContraints.java39
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/IStructuredFormatPreferences.java33
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/IStructuredFormatProcessor.java70
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/IStructuredFormatter.java36
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/StructuredFormatContraints.java53
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/format/StructuredFormatPreferences.java43
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/modelhandler/AbstractModelHandler.java72
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/modelhandler/EmbeddedTypeHandler.java77
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/modelhandler/IDocumentTypeHandler.java42
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/modelhandler/IModelHandler.java43
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/BlockMarker.java111
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/BlockTagParser.java32
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/BlockTokenizer.java58
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/IBlockedStructuredDocumentRegion.java41
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/JSPCapableParser.java28
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/RegionParser.java52
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/StructuredDocumentRegionHandler.java28
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/StructuredDocumentRegionHandlerExtension.java20
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/StructuredDocumentRegionParser.java24
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/StructuredDocumentRegionParserExtension.java28
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/TagMarker.java80
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/model/AbstractModelLoader.java529
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/model/AbstractStructuredModel.java1568
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/model/FactoryRegistry.java179
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/model/LifecycleNotificationManager.java119
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/model/ModelLifecycleEvent.java117
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/model/ModelManagerImpl.java1664
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/EmbeddedTypeRegistry.java35
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/EmbeddedTypeRegistryImpl.java132
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/EmbeddedTypeRegistryReader.java71
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/ModelHandlerRegistry.java295
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/ModelHandlerRegistryReader.java106
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/ModelHandlerUtility.java50
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/modelhandler/PluginContributedFactoryReader.java126
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/parser/ContextRegion.java197
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/parser/ForeignRegion.java88
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/preferences/CommonModelPreferenceNames.java76
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/preferences/PreferenceInitializer.java32
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/AbstractAdapterFactory.java158
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/AbstractNotifier.java240
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/DocumentChanged.java61
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/IModelLifecycleListener.java27
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/IModelLoader.java87
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/IModelManager.java297
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/IModelStateListener.java64
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/INodeAdapter.java43
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/INodeAdapterFactory.java76
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/INodeNotifier.java103
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/IStructuredModel.java391
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/IndexedRegion.java74
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/StructuredModelManager.java75
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/document/IEncodedDocument.java58
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/document/IStructuredDocumentProposed.java223
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/AboutToBeChangedEvent.java44
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/IModelAboutToBeChangedListener.java26
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/IStructuredDocumentListener.java30
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/NewDocumentContentEvent.java40
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/NewDocumentEvent.java68
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/NoChangeEvent.java73
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/RegionChangedEvent.java80
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/RegionsReplacedEvent.java85
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/StructuredDocumentEvent.java146
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/events/StructuredDocumentRegionsReplacedEvent.java73
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/exceptions/ResourceAlreadyExists.java40
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/exceptions/ResourceInUse.java40
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/model/IModelManagerProposed.java338
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/model/IModelStateListenerProposed.java36
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/model/INodeAdapterFactoryManager.java33
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/model/IStructuredModelEvent.java17
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/model/IStructuredModelProposed.java152
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/IStructuredDocument.java218
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/IStructuredDocumentRegion.java163
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/IStructuredDocumentRegionList.java52
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/IStructuredPartitionTypes.java14
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/IStructuredPartitioning.java12
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/IStructuredTextPartitioner.java86
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/IStructuredTextReParser.java72
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/ITextRegion.java158
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/ITextRegionCollection.java178
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/ITextRegionContainer.java40
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/text/ITextRegionList.java131
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/BasicStructuredDocument.java2890
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/BasicStructuredDocumentRegion.java600
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/CharSequenceReader.java127
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/CoreNodeList.java130
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/DeleteEqualPositionUpdater.java66
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/GenericPositionManager.java403
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/IExecutionDelegatable.java20
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/IRegionComparible.java20
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/JobSafeStructuredDocument.java281
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/MinimalDocument.java445
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/ReadOnlyPosition.java37
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/StructuredDocumentReParser.java1651
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/StructuredDocumentRegionEnumeration.java87
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/StructuredDocumentRegionIterator.java115
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/StructuredDocumentSequentialRewriteTextStore.java132
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/StructuredDocumentTextStore.java191
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/SubSetTextStore.java127
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/TextRegionListImpl.java223
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/IStructuredRegion.java27
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/IStructuredTypedRegion.java24
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/SimpleStructuredRegion.java91
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/SimpleStructuredTypedRegion.java88
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/rules/StructuredTextPartitioner.java604
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/CommandCursorPosition.java66
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/IDocumentSelectionMediator.java35
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/IStructuredTextUndoManager.java155
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextCommand.java34
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextCommandImpl.java137
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextCompoundCommandImpl.java260
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/StructuredTextUndoManager.java652
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/undo/UndoDocumentEvent.java45
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/Assert.java164
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/Debug.java206
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/DocumentInputStream.java108
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/JarUtilities.java180
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/PathHelper.java148
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/ProjectResolver.java234
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/ResourceUtil.java79
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/ScriptLanguageKeys.java39
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/TextUtilities.java63
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/URIResolver.java81
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/Utilities.java130
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/validate/ValidationAdapter.java31
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/validate/ValidationMessage.java69
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/validate/ValidationReporter.java24
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/text/IStructuredPartitions.java14
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/utils/StringUtils.java743
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.classpath10
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.cvsignore8
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.options66
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.project27
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.pde.prefs15
-rw-r--r--bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF65
-rw-r--r--bundles/org.eclipse.wst.sse.ui/README.txt2
-rw-r--r--bundles/org.eclipse.wst.sse.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.sse.ui/build.properties30
-rw-r--r--bundles/org.eclipse.wst.sse.ui/html/maintopic.html13
-rw-r--r--bundles/org.eclipse.wst.sse.ui/html/subtopic.html13
-rw-r--r--bundles/org.eclipse.wst.sse.ui/html/toc.html13
-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/ctool16/spellcheck.gifbin370 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/collapseall.gifbin155 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/delete.gifbin221 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/dlcl16/synced.gifbin149 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/dtool16/spellcheck.gifbin243 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/collapseall.gifbin157 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/delete.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/elcl16/synced.gifbin233 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/etool16/spellcheck.gifbin370 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/obj16/occ_match.gifbin121 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/obj16/preferences.gifbin224 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/full/obj16/prop_ps.gifbin344 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/icons/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.ui/plugin.properties81
-rw-r--r--bundles/org.eclipse.wst.sse.ui/plugin.xml474
-rw-r--r--bundles/org.eclipse.wst.sse.ui/reexport-info.txt4
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/editorconfiguration.exsd256
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/sourcevalidation.exsd191
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-encoding/org/eclipse/wst/sse/ui/internal/encoding/ui/EncodingPreferencePage.java109
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ConfigurationPointCalculator.java151
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ISelfValidateEditAction.java27
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/ISourceEditingTextTools.java50
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IBreakpointConstants.java21
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IBreakpointProvider.java62
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IExtendedStorageEditorInput.java37
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/NodeLocation.java48
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/NullSourceEditingTextTools.java63
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/ExclusionsTab.java373
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/MainTab.java450
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/PropertyPreferencePage.java269
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/TaskTagPreferencePage.java353
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/EditorExecutionContext.java85
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/FoldingActionGroup.java165
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/InformationProvider.java66
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java3436
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerConfiguration.java471
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerUndoManager.java200
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/AbstractDropAction.java94
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/CaretMediator.java284
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedConfigurationBuilder.java265
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedEditorActionBuilder.java789
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ExtendedEditorDropTargetAdapter.java351
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/FileDropAction.java47
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/FormatProcessorsExtensionReader.java102
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/GotoAnnotationAction.java370
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IActionValidator.java17
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IDropAction.java37
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedContributor.java30
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedEditorAction.java38
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedMarkupEditor.java47
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IExtendedSimpleEditor.java33
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IModelProvider.java21
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IPopupMenuContributor.java22
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/IReleasable.java20
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ISourceViewerActionBarContributor.java29
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ITemporaryAnnotation.java17
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/Logger.java161
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/PreferenceInitializer.java74
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ReadOnlyAwareDropTargetAdapter.java50
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIMessages.java422
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPlugin.java80
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties395
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ShowViewAction.java99
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StorageModelProvider.java681
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredDocumentToTextAdapter.java1332
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredLineChangeHover.java48
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredMarkerAnnotation.java125
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModel.java108
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModelFactory.java49
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextAnnotationHover.java391
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextLineBreakingReader.java114
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextSelectionChangedEvent.java35
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredTextViewer.java793
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/TextDropAction.java27
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/TransferBuilder.java662
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/UnknownContentTypeDialog.java67
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActionContributor.java377
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActionDefinitionIds.java42
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActiveEditorActionHandler.java286
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/CleanupAction.java85
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/FormatActionDelegate.java228
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ResourceActionDelegate.java75
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/StructuredTextEditorActionConstants.java44
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompoundContentAssistProcessor.java422
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/ContentAssistUtils.java92
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CustomCompletionProposal.java333
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/IRelevanceCompletionProposal.java28
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/IRelevanceConstants.java17
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/StructuredContentAssistant.java143
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/ConfigurableContentOutlinePage.java707
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/IJFaceNodeAdapter.java44
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/IJFaceNodeAdapterFactory.java26
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/PropertyChangeUpdateAction.java80
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/PropertyChangeUpdateActionContributionItem.java85
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ComboList.java287
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ComboListOnPropertyPage.java39
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentproperties/ui/ContentSettingsPropertyPage.java297
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/ContributedProcessorDescriptor.java35
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/CorrectionAssistantProvider.java31
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/IQuickAssistProcessor.java31
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/IQuickFixProcessor.java30
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/NoModificationCompletionProposal.java77
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/StructuredCorrectionProcessor.java158
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/BreakpointRulerAction.java304
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/DebugTextEditor.java438
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/EditBreakpointAction.java63
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ManageBreakpointAction.java90
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointAction.java200
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/ToggleBreakpointsTarget.java189
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/HTML2TextReader.java304
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/HTMLTextPresenter.java194
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/LineBreakingReader.java124
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/SingleCharReader.java66
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/SubstitutionTextReader.java158
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/edit/util/SharedEditorPluginImageHelper.java58
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorModelUtil.java77
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorPluginImageHelper.java155
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/EditorPluginImages.java33
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/IHelpContextIds.java58
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/editor/StructuredModelDocumentProvider.java263
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ActionDescriptor.java378
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/BreakpointProviderBuilder.java405
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/DropActionProxy.java150
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ExtendedEditorActionProxy.java149
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ExtendedEditorActionProxyForDelayLoading.java752
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/IExtendedEditorActionProxyForDelayLoading.java22
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/ImageUtil.java84
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/RegistryReader.java176
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/format/StructuredFormattingStrategy.java91
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/hyperlink/HighlighterHyperlinkPresenter.java468
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/hyperlink/OpenHyperlinkAction.java66
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/AbstractOpenOn.java267
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/ExternalFileEditorInput.java116
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/IOpenOn.java46
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenFileHyperlinkTracker.java660
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnAction.java74
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnBuilder.java267
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnDefinition.java157
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/OpenOnProvider.java143
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/EditorPreferenceNames.java86
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/OverlayPreferenceStore.java486
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/TabFolderLayout.java61
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractColorPage.java279
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractPreferencePage.java284
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractPreferenceTab.java266
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorEditor.java142
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorHelper.java147
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/ColorNames.java27
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/EmptyFilePreferencePage.java100
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/FilePreferencePage.java132
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/IPreferenceTab.java29
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StatusInfo.java202
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StructuredTextEditorPreferencePage.java451
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StyledTextColorPicker.java948
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/TextHoverPreferenceTab.java453
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/TranslucencyPreferenceTab.java149
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/IStructuredTextFoldingProvider.java45
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/AdapterPropertySheetEntryLabelProvider.java51
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/ConfigurablePropertySheetPage.java214
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/CustomPropertyDescriptor.java89
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/RemoveAction.java45
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/properties/ShowPropertiesAction.java38
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/preferences/CommonEditorPreferenceNames.java35
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryProvider.java33
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistry.java32
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryExtension.java22
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryImpl.java210
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/registry/AdapterFactoryRegistryReader.java142
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/AbstractLineStyleProvider.java348
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/Highlighter.java906
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/IHighlighter.java34
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/LineStyleProvider.java52
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/LineStyleProviderForNoOp.java48
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/AbstractStructuredTextReconcilingStrategy.java527
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java735
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentAdapter.java43
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DocumentRegionProcessor.java224
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IConfigurableReconciler.java35
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IReconcileAnnotationKey.java35
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IStructuredReconcileStep.java66
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/IStructuredReconcilingStrategy.java43
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/ReconcileAnnotationKey.java56
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredReconcileStep.java193
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredRegionProcessor.java351
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredTextReconcilingStrategy.java65
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/TemporaryAnnotation.java230
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/AnnotationInfo.java38
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ISourceValidator.java42
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/IncrementalHelper.java57
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/IncrementalReporter.java111
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ReconcileStepForValidator.java345
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorBuilder.java139
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorMetaData.java241
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/validator/ValidatorStrategy.java325
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchLabelProvider.java75
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchQuery.java217
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesActionDelegate.java147
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesProcessor.java121
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesContentProvider.java89
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchQuery.java184
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchResult.java127
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchViewPage.java140
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/SelectionHistory.java117
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectAction.java110
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructureSelectHistoryAction.java56
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructuredSelectActionDelegate.java124
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/selection/StructuredSelectHistoryActionDelegate.java83
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/SpellcheckStrategy.java424
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AbstractHoverProcessor.java83
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AnnotationHoverProcessor.java204
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/BestMatchHover.java129
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/DebugInfoHoverProcessor.java95
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/ProblemAnnotationHoverProcessor.java51
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/TextHoverManager.java243
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/text/DocumentRegionEdgeMatcher.java118
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/OffsetStatusLineContributionItem.java1039
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/StructuredTextAnnotationImageProvider.java56
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/Assert.java120
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/EditorUtility.java142
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/PlatformStatusLineUtil.java171
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/RegistryReader.java175
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/Sorter.java77
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/CaretEvent.java52
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/ICaretListener.java20
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/INodeSelectionListener.java22
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/ITextSelectionListener.java20
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/NodeSelectionChangedEvent.java43
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/view/events/TextSelectionChangedEvent.java41
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/ContentOutlineConfiguration.java307
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/IPropertySourceExtension.java41
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/properties/PropertySheetConfiguration.java104
-rw-r--r--bundles/org.eclipse.wst.sse.ui/testToc.xml8
-rw-r--r--bundles/org.eclipse.wst.sse.ui/toc.xml13
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogWriter.java16
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.classpath11
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.cvsignore10
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.options1
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.project27
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.xml.ui/.settings/org.eclipse.pde.prefs15
-rw-r--r--bundles/org.eclipse.wst.xml.ui/META-INF/MANIFEST.MF60
-rw-r--r--bundles/org.eclipse.wst.xml.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.xml.ui/build.properties30
-rw-r--r--bundles/org.eclipse.wst.xml.ui/examples/EditingAndValidatingXML.zipbin13213 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/XMLFile.gifbin564 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/collapse.gifbin146 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/collapse_all.gifbin155 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/constrainoff.gifbin216 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/constrainon.gifbin210 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/expand.gifbin153 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/expand_all.gifbin164 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/new_xml.gifbin239 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/rldgrmr.gifbin245 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/dtool16/validate.gifbin334 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/collapse.gifbin146 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/collapse_all.gifbin157 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/constrainoff.gifbin348 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/constrainon.gifbin333 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/expand.gifbin153 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/expand_all.gifbin164 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/new_xml.gifbin370 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/rldgrmr.gifbin368 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/etool16/validate.gifbin558 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/XSDFile.gifbin574 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/add_correction.gifbin318 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/att_req_obj.gifbin221 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/attribute_obj.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/cdatasection.gifbin359 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/choice.gifbin145 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/comment_obj.gifbin196 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/correction_change.gifbin197 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/doctype.gifbin594 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/dtdfile.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/element_obj.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/entity.gifbin124 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/entity_reference.gifbin316 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/enum.gifbin80 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/error-overlay.gifbin82 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/localvariable_obj.gifbin152 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/notation.gifbin177 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/occurone_obj.gifbin139 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/proinst_obj.gifbin138 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag-generic-deemphasized.gifbin853 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag-generic-emphasized.gifbin863 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag-generic.gifbin98 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/tag-macro.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/text.gifbin349 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/txtext.gifbin354 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/obj16/warning_obj.gifbin337 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/error_ovr.gifbin82 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/stale_error_ovr.gifbin77 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/ovr16/warn_ovr.gifbin162 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/full/view16/attibute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/newSampleProject_wiz.gifbin596 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/newSampleProject_wizbanner.gifbin3213 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/icons/xmldoc.gifbin564 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/plugin.properties70
-rw-r--r--bundles/org.eclipse.wst.xml.ui/plugin.xml486
-rw-r--r--bundles/org.eclipse.wst.xml.ui/schema/catalogFileType.exsd120
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/AdvancedOptionsDialog.java255
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/CatalogFileTypeRegistryReader.java89
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/EditCatalogEntryDialog.java969
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ElementNodePage.java38
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/ImageFactory.java205
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/URIUtils.java44
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntriesView.java306
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogEntryDetailsView.java121
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogFileType.java56
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogMessages.java135
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogPreferencePage.java269
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogResources.properties111
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLCatalogTreeViewer.java261
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/XMLQuickScan.java92
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/etool50/catalogEntry.gifbin1736 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/etool50/nextCatalog.gifbin1701 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/entry_obj.gifbin3213 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/file_expand.gifbin323 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/file_obj.gifbin561 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/nextCatalog_obj.gifbin608 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/obj16/xmlcatalog_obj.gifbin598 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-catalog/org/eclipse/wst/xml/ui/internal/catalog/icons/ovr16/error-overlay.gifbin82 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/DOMPropertyDescriptorFactory.java133
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/IDesignViewer.java23
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/IDesignViewerActionBarContributor.java19
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/SourceEditorActionBarContributor.java210
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/SourcePageActionContributor.java62
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeContentHelper.java450
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/TreeExtension.java553
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/ViewerExpandCollapseAction.java63
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorActionDefinitionIds.java32
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorMessages.java50
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginHOLD_OLD.java51
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginImageHelper.java152
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorPluginImages.java27
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLEditorResources.properties30
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorActionBarContributor.java88
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart.java796
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeActionBarContributor.java319
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeContentProvider.java314
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeHelpContextIds.java31
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreePropertyDescriptorFactory.java116
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTableTreeViewer.java261
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-multipage/org/eclipse/wst/xml/ui/internal/tabletree/XMLTreeExtension.java167
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/XMLValidationUIMessages.java41
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorActionDelegate.java160
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorDialog.java285
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/ReferencedFileErrorUtility.java131
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/core/errorinfo/TaskListTableViewer.java182
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-validation/org/eclipse/wst/xml/ui/internal/validation/xmlvalidation.properties29
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationOperation.java205
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationWizard.java231
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/ExampleProjectCreationWizardPage.java109
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/IXMLWizardHelpContextIds.java48
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NamespaceInfoContentBuilder.java57
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewModelWizard.java352
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLGenerator.java382
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/NewXMLWizard.java836
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLImportActionDelegate.java86
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLSchemaValidationChecker.java68
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizard.java43
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/XMLWizardsMessages.java83
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/icons/generatexml_wiz.gifbin3500 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xml.ui/src-wizards/org/eclipse/wst/xml/ui/internal/wizards/wizardResource.properties80
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/StructuredTextViewerConfigurationXML.java257
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/DOMObserver.java193
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/Logger.java159
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIMessages.java312
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPlugin.java116
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/XMLUIPluginResources.properties320
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AbstractCommentActionXMLDelegate.java115
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AbstractNodeActionManager.java667
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ActionContributorXML.java204
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/AddBlockCommentActionXMLDelegate.java82
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/BaseNodeActionManager.java514
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/CleanupActionXMLDelegate.java136
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/CleanupDialogXML.java197
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditAttributeAction.java80
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditDoctypeAction.java187
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditElementAction.java117
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditProcessingInstructionAction.java94
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/EditSchemaInfoAction.java164
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/MenuBuilder.java145
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/NodeAction.java26
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/RemoveBlockCommentActionXMLDelegate.java86
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ReplacePrefixAction.java79
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/actions/ToggleCommentActionXMLDelegate.java170
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/AutoEditStrategyForTabs.java187
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/autoedit/StructuredAutoEditStrategyXML.java143
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentAssistProcessor.java2332
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AbstractContentModelGenerator.java86
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformation.java113
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformationPresenter.java120
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/AttributeContextInformationProvider.java208
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ContentAssistRequest.java256
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ContextInfoModelUtil.java65
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/CustomTemplateProposal.java40
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NoRegionContentAssistProcessor.java262
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/NonValidatingModelQueryAction.java159
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ProposalComparator.java48
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/ReplaceNameTemplateContext.java104
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/SimpleCMElementDeclaration.java170
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/SourceEditorImageHelper.java48
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistProcessor.java157
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentAssistUtilities.java490
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLContentModelGenerator.java135
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLRelevanceConstants.java52
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentassist/XMLTemplateCompletionProcessor.java167
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapter.java246
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeAdapterFactory.java173
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeContentProvider.java114
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/JFaceNodeLabelProvider.java74
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/RefreshStructureJob.java248
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/contentoutline/XMLNodeActionManager.java52
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/CorrectionAssistantProviderXML.java48
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/CorrectionProcessorXML.java42
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/InsertRequiredAttrsQuickAssistProposal.java179
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/ProblemIDsXML.java31
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickAssistProcessorXML.java169
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/QuickFixProcessorXML.java147
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RemoveUnknownElementQuickFixProposal.java161
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/RenameInFileQuickAssistProposal.java183
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/correction/SurroundWithNewElementQuickAssistProposal.java109
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditAttributeDialog.java170
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditDoctypeDialog.java234
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditElementDialog.java143
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditEntityHelper.java71
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditNamespaceInfoDialog.java255
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditProcessingInstructionDialog.java119
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/EditSchemaInfoDialog.java80
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/NamespaceInfoErrorHelper.java99
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/NamespaceInfoTable.java391
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectFileOrXMLCatalogIdDialog.java87
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectFileOrXMLCatalogIdPanel.java180
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectXMLCatalogIdDialog.java112
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/SelectXMLCatalogIdPanel.java150
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/UpdateListener.java20
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dialogs/XMLCatalogTableViewer.java198
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dnd/DragNodeCommand.java265
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/dnd/XMLDragAndDropManager.java54
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/doubleclick/XMLDoubleClickStrategy.java285
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/CMImageUtil.java98
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/IHelpContextIds.java45
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/XMLEditorPluginImageHelper.java155
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/editor/XMLEditorPluginImages.java55
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/ExternalFileEditorInput.java158
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/ExternalFileHyperlink.java60
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/WorkspaceFileHyperlink.java79
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/hyperlink/XMLHyperlinkDetector.java503
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonAddNamespacesControl.java265
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonAddNamespacesDialog.java210
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonEditNamespacesDialog.java319
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonEditNamespacesTargetFieldDialog.java104
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/nsedit/CommonNamespaceInfoTable.java340
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/EncodingSettings.java356
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/WorkbenchDefaultEncodingSettings.java137
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLColorPage.java223
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLFilesPreferencePage.java306
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLSourcePreferencePage.java353
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLTemplatePreferencePage.java67
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLUIPreferenceInitializer.java105
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/preferences/XMLUIPreferenceNames.java85
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionAnnotationModelChanges.java54
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterFactoryXML.java157
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionModelNodeAdapterXML.java296
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/ProjectionViewerInformation.java196
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/projection/StructuredTextFoldingProviderXML.java324
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/EnumeratedStringPropertyDescriptor.java69
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/StringComboBoxCellEditor.java111
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/properties/XMLPropertySource.java738
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/provisional/IDOMSourceEditingTextTools.java68
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/provisional/XMLSourceEditingTextTools.java176
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/registry/AdapterFactoryProviderForXML.java88
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/search/XMLFindOccurrencesActionDelegate.java34
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/search/XMLFindOccurrencesProcessor.java31
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectEnclosingXMLActionDelegate.java70
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectNextXMLActionDelegate.java105
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/selection/StructuredSelectPreviousXMLActionDelegate.java85
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/IStyleConstantsXML.java41
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/style/LineStyleProviderForXML.java170
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/MarkupTagInfoProvider.java174
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLInformationProvider.java66
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/taginfo/XMLTagInfoHoverProcessor.java337
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/EncodingTemplateVariableResolverXML.java38
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/TemplateContextTypeIdsXML.java50
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/templates/TemplateContextTypeXML.java35
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/text/XMLDocumentRegionEdgeMatcher.java25
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/SharedXMLEditorPluginImageHelper.java72
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/XMLCommonResources.java93
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/util/XMLCommonUIContextIds.java51
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidator.java566
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/DelegatingSourceValidatorForXML.java62
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/internal/validation/MarkupValidator.java649
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/contentoutline/XMLContentOutlineConfiguration.java521
-rw-r--r--bundles/org.eclipse.wst.xml.ui/src/org/eclipse/wst/xml/ui/views/properties/XMLPropertySheetConfiguration.java257
-rw-r--r--bundles/org.eclipse.wst.xml.ui/templates/xmldefault-templates.properties18
-rw-r--r--bundles/org.eclipse.wst.xml.ui/templates/xmldefault-templates.xml7
-rw-r--r--bundles/org.eclipse.wst.xsd.core/.classpath9
-rw-r--r--bundles/org.eclipse.wst.xsd.core/.cvsignore6
-rw-r--r--bundles/org.eclipse.wst.xsd.core/.project28
-rw-r--r--bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.core.prefs59
-rw-r--r--bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--bundles/org.eclipse.wst.xsd.core/META-INF/MANIFEST.MF25
-rw-r--r--bundles/org.eclipse.wst.xsd.core/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsd.core/build.properties22
-rw-r--r--bundles/org.eclipse.wst.xsd.core/plugin.properties22
-rw-r--r--bundles/org.eclipse.wst.xsd.core/plugin.xml66
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/CMDocumentFactoryXSD.java45
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/CMNodeImpl.java41
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/XSDCMManager.java38
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/XSDImpl.java2861
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/XSDTypeUtil.java121
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/XSDVisitor.java190
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/util/XSDSchemaLocatorAdapterFactory.java31
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/util/XSDSchemaLocatorImpl.java75
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/XSDValidationConfiguration.java64
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/XSDValidationMessages.java32
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/XSDValidator.java237
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/eclipse/Validator.java119
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/eclipse/XSDDelegatingValidator.java31
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/eclipse/XSDMessageInfoHelper.java79
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/eclipse/XSDValidator.java48
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/xsdvalidation.properties12
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src/org/eclipse/wst/xsd/core/internal/XSDCorePlugin.java56
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src/org/eclipse/wst/xsd/core/internal/preferences/XSDCorePreferenceInitializer.java34
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src/org/eclipse/wst/xsd/core/internal/preferences/XSDCorePreferenceNames.java31
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.classpath36
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.cvsignore8
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.project28
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF91
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/build.properties25
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/component.xml7
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/XSDFile.gifbin361 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/blank.gifbin832 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/browsebutton.gifbin825 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/collapse_attr.gifbin854 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/delete_obj.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/dlcl16/schemaview_co.gifbin336 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/dlcl16/showproperties_obj.gifbin577 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/dtool16/help_contents.gifbin253 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/dtool16/showproperties_obj.gifbin577 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/elcl16/schemaview_co.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/elcl16/showproperties_obj.gifbin577 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/etool16/help_contents.gifbin259 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/etool16/showproperties_obj.gifbin577 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/expand_attr.gifbin856 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/filter.gifbin219 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDAnyAttributedis.gifbin358 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDAnydis.gifbin365 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDAttributeGroup.gifbin215 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDAttributeGroupRef.gifbin327 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDAttributeGroupRefdis.gifbin212 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDAttributeGroupdis.gifbin209 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDAttributeRefdis.gifbin233 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDAttributedis.gifbin164 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDComplexContent.gifbin348 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDComplexType.gifbin345 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDComplexTypedis.gifbin229 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDElementRefdis.gifbin349 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDElementdis.gifbin223 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDGroup.gifbin327 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDGroupRef.gifbin331 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDGroupRefdis.gifbin215 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDGroupdis.gifbin209 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/XSDSimpleContent.gifbin210 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/all_obj.gifbin116 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/alldis_obj.gifbin73 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/annotationsheader.gifbin376 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributegroupsheader.gifbin369 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/attributesheader.gifbin367 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/choice_obj.gifbin130 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/choicedis_obj.gifbin97 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/directivesheader.gifbin336 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/elementsheader.gifbin595 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/error_marker.gifbin292 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/extnsn_obj.gifbin185 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/extnsndis_obj.gifbin130 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/groupsheader.gifbin372 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/index.gifbin1109 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/notationsheader.gifbin345 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/sequence_obj.gifbin120 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/sequencedis_obj.gifbin91 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/simpletype_obj.gifbin149 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/simpletypedis_obj.gifbin145 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_list_obj.gifbin350 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_listdis_obj.gifbin224 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_restrict_obj.gifbin231 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_restrictdis_obj.gifbin213 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_union_obj.gifbin243 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/smpl_uniondis_obj.gifbin230 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/obj16/typesheader.gifbin242 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/ovr16/attributeoverlay.gifbin117 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/ovr16/extnsn_ovr.gifbin111 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/ovr16/extnsndis_ovr.gifbin111 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/ovr16/textoverlay.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/plugin.properties848
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/plugin.xml451
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/ui/internal/adt/typeviz/TypeVizEditorMode.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/ui/internal/adt/typeviz/design/figures/BoxFigure.java103
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/ui/internal/adt/typeviz/design/figures/CompartmentFigure.java188
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/ui/internal/adt/typeviz/design/figures/FieldFigure.java253
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/ui/internal/adt/typeviz/design/figures/HeadingFigure.java91
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/ui/internal/adt/typeviz/design/figures/RoundedLineBorder.java66
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/ui/internal/adt/typeviz/design/figures/StructureFigure.java61
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/ui/internal/adt/typeviz/design/figures/TypeVizFigureFactory.java64
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/ui/internal/adt/typeviz/design/layouts/ColumnData.java83
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/ui/internal/adt/typeviz/design/layouts/RowLayout.java179
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/actions/CreateElementAction.java360
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/actions/DOMAttribute.java75
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/actions/IXSDToolbarAction.java19
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/actions/MoveAction.java149
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/actions/MoveAttributeAction.java245
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/actions/XSDEditNamespacesAction.java286
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/CategoryAdapter.java175
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAdapterFactory.java142
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAnyTypeDefinitionAdapter.java29
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeDeclarationAdapter.java46
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeGroupDefinitionAdapter.java138
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeUseAdapter.java79
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDBaseAdapter.java199
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDBaseAttributeAdapter.java208
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDChildUtility.java280
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDComplexTypeDefinitionAdapter.java418
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDElementDeclarationAdapter.java295
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDEmptyFieldAdapter.java120
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDModelGroupAdapter.java231
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDModelGroupDefinitionAdapter.java228
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDParticleAdapter.java161
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDSchemaAdapter.java503
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDSchemaDirectiveAdapter.java138
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDSimpleTypeDefinitionAdapter.java151
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDTypeDefinitionAdapter.java68
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDVisitor.java219
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDVisitorForFields.java177
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDWildcardAdapter.java227
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/commands/DragAndDropCommand.java505
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/AttributeGroupDefinitionEditPart.java109
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/CategoryEditPart.java223
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/ConnectableEditPart.java207
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/ModelGroupDefinitionReferenceEditPart.java117
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/ModelGroupEditPart.java224
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/ReferenceConnection.java49
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/SpaceFillerForFieldEditPart.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/TargetConnectionSpacingFigureEditPart.java41
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/TopLevelComponentEditPart.java375
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDAttributesForAnnotationEditPart.java59
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDBaseFieldEditPart.java99
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDEditPartFactory.java160
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDGroupsForAnnotationEditPart.java90
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDModelGroupRouter.java379
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDSchemaEditPart.java333
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDSimpleTypeEditPart.java158
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/model/SpaceFiller.java163
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/model/TargetConnectionSpaceFiller.java50
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editpolicies/DragAndDropEditPolicy.java45
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editpolicies/GraphNodeDragTracker.java33
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editpolicies/SelectionHandlesEditPolicyImpl.java237
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editpolicies/TopLevelComponentLabelCellEditorLocator.java49
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editpolicies/TopLevelNameDirectEditManager.java171
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/figures/CategoryFigure.java97
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/figures/CenteredIconFigure.java98
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/figures/GenericGroupFigure.java93
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/figures/HyperLinkLabel.java47
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/figures/IExtendedFigureFactory.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/figures/IModelGroupFigure.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/figures/ModelGroupFigure.java58
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/figures/SpacingFigure.java25
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/layouts/ContainerLayout.java219
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/layouts/FillLayout.java158
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/layouts/ModelGroupLayout.java197
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/BuiltInTypesTreeViewerProvider.java221
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewComponentDialog.java196
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewElementButtonHandler.java26
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewElementDialog.java92
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewTypeButtonHandler.java26
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewTypeDialog.java209
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/SelectBuiltInTypesForFilteringDialog.java108
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/BaseHyperlinkDetector.java267
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/ISelectionMapper.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/InternalXSDMultiPageEditor.java1028
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/KeyboardDragImpl.java21
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/Logger.java157
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/Messages.java112
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/SourcePageActionContributor.java58
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/StructuredTextViewerConfigurationXSD.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDComplexTypeBaseTypeEditManager.java125
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDEditorCSHelpIds.java134
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDEditorConfiguration.java192
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDEditorContextIds.java460
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDEditorExtensionProperties.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDEditorPlugin.java370
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDElementReferenceEditManager.java131
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDFileEditorInput.java69
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDHyperlink.java104
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDHyperlinkDetector.java151
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDHyperlinkTargetLocator.java301
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDMultiPageEditorContributor.java254
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDSelectionMapper.java44
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDSubstitutionGroupEditManager.java73
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDTabbedPropertySheetPage.java141
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDTypeReferenceEditManager.java190
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/Dot.gifbin806 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/GenerateDtd.gifbin605 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/GenerateJava.gifbin609 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/GraphViewElementRef.gifbin860 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/NewXSD.gifbin3261 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/RegexWizardArrow.gifbin54 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/TriangleToolBar.gifbin92 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/ValidateXSD.gifbin558 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDAll.gifbin88 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDAnnotate.gifbin594 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDAny.gifbin613 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDAnyAttribute.gifbin384 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDAppInfo.gifbin121 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDAttribute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDAttributeGroup.gifbin235 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDAttributeGroupRef.gifbin361 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDAttributeRef.gifbin350 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDChoice.gifbin145 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDComplexContent.gifbin211 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDComplexType.gifbin155 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDDateAndTimeTypes.gifbin594 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDDoc.gifbin368 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDElement.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDElementRef.gifbin585 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDExtension.gifbin101 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDField.gifbin227 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDFile.gifbin361 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDGlobalAttribute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDGlobalElement.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDGroup.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDGroupRef.gifbin899 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDImport.gifbin114 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDInclude.gifbin324 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDKey.gifbin323 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDKeyRef.gifbin558 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDNotation.gifbin177 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDNumberTypes.gifbin115 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDRedefine.gifbin373 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDSelector.gifbin136 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDSequence.gifbin91 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDSimpleContent.gifbin210 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDSimpleEnum.gifbin105 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDSimpleList.gifbin347 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDSimplePattern.gifbin120 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDSimpleRestrict.gifbin141 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDSimpleType.gifbin150 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDSimpleTypeForEditPart.gifbin150 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDSimpleUnion.gifbin138 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/XSDUnique.gifbin210 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/appinfo_browse.gifbin323 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/appinfo_category.gifbin583 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/back.gifbin873 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/browsebutton.gifbin825 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/error_st_obj.gifbin339 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/forward.gifbin874 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/generate_xml.gifbin612 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/quickassist.gifbin225 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/regx_wiz.gifbin3241 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/reloadgrammar.gifbin365 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/sort.gifbin159 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/icons/xmlcatalog_obj.gifbin598 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/messages.properties113
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/search/IXSDTypesFilter.java25
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/search/XSDComponentDescriptionProvider.java189
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/search/XSDElementsSearchListProvider.java49
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/search/XSDSearchListDialogDelegate.java124
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/search/XSDSearchListProvider.java234
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/search/XSDTypesSearchListProvider.java110
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/navigation/DesignViewNavigationLocation.java334
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/navigation/MultiPageEditorTextSelectionNavigationLocation.java50
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/nsedit/SchemaPrefixChangeHandler.java208
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/nsedit/TargetNamespaceChangeHandler.java152
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/nsedit/XSDVisitor.java216
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/preferences/XSDPreferencePage.java298
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/text/XSDModelAdapter.java193
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/text/XSDModelQueryExtension.java220
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/text/XSDModelReconcileAdapter.java158
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/util/DocumentAdapter.java58
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/util/ModelReconcileAdapter.java147
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/util/SelectionAdapter.java83
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/util/TypesHelper.java403
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/util/ViewUtility.java246
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/util/XSDDOMHelper.java456
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/util/XSDSchemaLocationResolverAdapterFactory.java31
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/util/XSDSchemaLocationResolverImpl.java39
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/utils/OpenOnSelectionHelper.java346
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/validation/DelegatingSourceValidatorForXSD.java64
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/widgets/EnumerationsDialog.java111
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/widgets/TypeSection.java335
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/widgets/XSDEditSchemaInfoDialog.java176
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/wizards/NewXSDWizard.java172
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/wizards/RegexCompositionPage.java947
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/wizards/RegexNode.java421
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/wizards/RegexTestingPage.java150
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/wizards/RegexWizard.java68
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/wizards/XSDLocationChoicePage.java69
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/wizards/XSDNewFilePage.java129
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/wizards/XSDSelectIncludeFileWizard.java371
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/AddFieldAction.java77
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/BaseDirectEditAction.java90
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/BaseSelectionAction.java127
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/DeleteAction.java77
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/SetInputToGraphView.java84
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/ShowPropertiesViewAction.java56
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/BaseGraphicalViewerKeyHandler.java149
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/DesignViewContextMenuProvider.java161
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/DesignViewGraphicalViewer.java300
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/DesignViewerGraphicConstants.java21
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/FlatCCombo.java1493
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/IAnnotationProvider.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/IKeyboardDrag.java19
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/ImageOverlayDescriptor.java60
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/directedit/ADTComboBoxCellEditor.java367
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/directedit/ComboBoxCellEditorManager.java224
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/directedit/ElementReferenceDirectEditManager.java179
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/directedit/LabelCellEditorLocator.java90
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/directedit/LabelEditManager.java132
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/directedit/TypeReferenceDirectEditManager.java187
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/ADTEditPartFactory.java92
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/BackToSchemaEditPart.java134
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/BaseEditPart.java201
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/BaseFieldEditPart.java449
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/BaseTypeConnectingEditPart.java183
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/BoxEditPart.java92
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/CenteredConnectionAnchor.java115
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/ColumnEditPart.java112
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/CompartmentEditPart.java213
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/ComplexTypeEditPart.java81
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/EditPartNavigationHandlerUtil.java72
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/FieldEditPart.java21
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/IConnectionContainer.java6
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/INamedEditPart.java21
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/RootContentEditPart.java168
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/RootEditPart.java115
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/StructureEditPart.java223
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/TopLevelFieldEditPart.java102
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/TypeReferenceConnection.java62
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/model/AbstractModelCollection.java65
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/model/Annotation.java37
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/model/Compartment.java73
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/model/FocusTypeColumn.java47
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/model/IActionProvider.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/model/IFeedbackHandler.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/model/IGraphElement.java16
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/model/IModelProxy.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/model/ReferencedTypeColumn.java138
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editpolicies/ADTDirectEditPolicy.java46
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editpolicies/ADTSelectionFeedbackEditPolicy.java40
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editpolicies/DirectEditPolicyDelegate.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editpolicies/IADTUpdateCommand.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editpolicies/KeyBoardAccessibilityEditPolicy.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editpolicies/SimpleDirectEditPolicy.java58
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/figures/IADTFigure.java22
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/figures/ICompartmentFigure.java19
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/figures/IFieldFigure.java23
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/figures/IFigureFactory.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/figures/IStructureFigure.java22
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/edit/ComponentReferenceEditManager.java26
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/edit/IComponentDialog.java31
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/ADTMultiPageEditor.java256
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/CommonMultiPageEditor.java711
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/CommonSelectionManager.java111
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/ContextMenuParticipant.java15
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/EditorMode.java27
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/EditorModeManager.java126
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/IEditorModeListener.java6
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/Messages.java41
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/ProductCustomizationProvider.java31
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/messages.properties24
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IADTObject.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IADTObjectListener.java16
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IComplexType.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IField.java34
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IModel.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IStructure.java23
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IType.java23
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/outline/ADTContentOutlinePage.java217
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/outline/ADTContentOutlineProvider.java138
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/outline/ADTLabelProvider.java79
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/outline/ITreeElement.java23
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/properties/ADTTabbedPropertySheetPage.java40
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDAnyAttributeAction.java90
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDAnyElementAction.java61
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDAttributeDeclarationAction.java105
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDAttributeGroupDefinitionAction.java78
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDComplexTypeDefinitionAction.java52
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDElementAction.java126
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDModelGroupAction.java95
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDModelGroupDefinitionAction.java62
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDSchemaDirectiveAction.java75
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDSimpleTypeDefinitionAction.java53
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/DeleteXSDConcreteComponentAction.java53
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/OpenInNewEditor.java166
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/SetMultiplicityAction.java88
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/SetTypeAction.java49
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/XSDBaseAction.java76
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddDocumentationCommand.java132
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddEnumerationsCommand.java50
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddExtensibilityElementCommand.java81
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddExtensionAttributeCommand.java110
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddExtensionCommand.java48
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddExtensionElementCommand.java152
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDAnyAttributeCommand.java64
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDAnyElementCommand.java45
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDAttributeDeclarationCommand.java176
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDAttributeGroupDefinitionCommand.java159
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDComplexTypeDefinitionCommand.java122
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDElementCommand.java340
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDImportCommand.java42
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDIncludeCommand.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDModelGroupCommand.java151
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDModelGroupDefinitionCommand.java116
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDRedefineCommand.java44
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDSchemaDirectiveCommand.java60
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDSimpleTypeDefinitionCommand.java91
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/BaseCommand.java196
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/ChangeToLocalSimpleTypeCommand.java80
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/DeleteCommand.java164
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/ExtensibleAddExtensionCommand.java214
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/ExtensibleRemoveExtensionNodeCommand.java94
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/RemoveExtensionAttributerCommand.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/RemoveExtensionElementCommand.java46
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/RemoveExtensionNodeCommand.java61
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetBaseTypeAndManagerDirectivesCommand.java37
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetBaseTypeCommand.java85
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetMultiplicityCommand.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetTypeCommand.java116
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetXSDFacetValueCommand.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateAttributeValueCommand.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateComplexTypeDerivationBy.java51
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateComponentReferenceAndManageDirectivesCommand.java133
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateContentModelCommand.java49
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateElementReferenceAndManageDirectivesCommand.java57
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateElementReferenceCommand.java39
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateMaxOccursCommand.java65
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateMinOccursCommand.java92
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateNameCommand.java90
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateNamespaceInformationCommand.java298
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateNumericBoundsFacetCommand.java168
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateStringLengthFacetCommand.java230
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateTextValueCommand.java61
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateTypeReferenceAndManageDirectivesCommand.java60
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateTypeReferenceCommand.java78
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateXSDPatternFacetCommand.java76
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateXSDWhiteSpaceFacetCommand.java60
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/providers/XSDSectionLabelProvider.java163
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/AbstractExtensionsSection.java609
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/AbstractSection.java365
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/AbstractSectionDescriptor.java108
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/AnnotationSection.java162
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/CommonDirectivesSection.java156
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/EnumerationsSection.java405
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/ExtensionsSection.java294
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/FacetViewer.java559
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/IDocumentChangedNotifier.java19
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/MultiplicitySection.java216
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/RefactoringSection.java93
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/SchemaLocationSection.java207
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/SimpleContentUnionMemberTypesDialog.java312
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/SpecificConstraintsWidget.java692
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDActionManager.java148
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDAnyElementContentsSection.java251
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDAttributeDeclarationSection.java399
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDAttributeGroupDefinitionSection.java284
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDComplexTypeAdvancedSection.java221
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDComplexTypeSection.java357
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationAdvancedSection.java367
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationSection.java583
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDFacetSection.java979
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDFacetSectionFilter.java42
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDImportSection.java376
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDModelGroupDefinitionSection.java334
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDModelGroupSection.java163
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDSchemaSection.java312
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDSimpleTypeSection.java752
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDTableTreeViewer.java126
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/AddExtensionsComponentDialog.java784
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/AddNewCategoryDialog.java385
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/CategoryProvider.java81
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/DOMExtensionDetailsContentProvider.java201
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/DOMExtensionItem.java216
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/DOMExtensionItemEditManager.java40
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/DOMExtensionItemMenuListener.java117
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/DOMExtensionTreeContentProvider.java73
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/DOMExtensionTreeLabelProvider.java80
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/ExtensionDetailsContentProvider.java9
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/ExtensionDetailsViewer.java326
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/ExtensionItem.java21
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/ExtensionItemEditManager.java22
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/ExtensionItemFilter.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/ExtensionsSchemasRegistry.java361
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/SelectFromCatalogDialog.java212
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/SpecificationForExtensionsSchema.java219
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/XSDExtensionTreeContentProvider.java109
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/custom/DefaultListNodeEditorConfiguration.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/custom/DialogNodeEditorConfiguration.java23
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/custom/ListNodeEditorConfiguration.java25
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/custom/NodeCustomizationRegistry.java157
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/custom/NodeEditorConfiguration.java33
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/custom/NodeEditorProvider.java8
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/custom/NodeFilter.java11
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/util/Messages.java113
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/util/XSDCommonUIUtils.java520
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/util/messages.properties96
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/Checks.java38
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/INameUpdating.java25
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/IReferenceUpdating.java35
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/PerformUnsavedRefactoringOperation.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringComponent.java62
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/RefactoringMessages.java49
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/TextChangeManager.java115
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/XMLRefactoringComponent.java78
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/MakeAnonymousTypeGlobalAction.java158
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/MakeLocalElementGlobalAction.java76
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameAction.java118
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameComponentAction.java156
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameResourceAction.java78
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameResourceActionDelegate.java57
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/RenameTargetNamespaceAction.java78
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/SelectionDispatchAction.java195
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorActionGroup.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDRefactorGroupActionDelegate.java50
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/XSDSelectionDispatchAction.java54
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/messages.properties41
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ComponentRenameArguments.java52
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameComponentProcessor.java501
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameResourceProcessor.java174
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/RenameTargetNamespaceProcessor.java419
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ResourceRenameChange.java108
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/ResourceRenameParticipant.java296
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/SortingSearchRequestor.java87
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XMLComponentRenameParticipant.java138
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/rename/XSDComponentRenameParticipant.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/AbstractCommand.java71
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeAnonymousTypeGlobalCommand.java84
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeLocalElementGlobalCommand.java98
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeTypeGlobalChange.java168
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/structure/MakeTypeGlobalProcessor.java220
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/util/TextChangeCompatibility.java97
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorActionGroup.java215
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupActionDelegate.java146
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactorGroupSubMenu.java57
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RefactoringWizardMessages.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameInputWizardPage.java257
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/RenameRefactoringWizard.java72
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/wizard/messages.properties55
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/IXSDSearchConstants.java29
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/SearchMessages.java31
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/XSDSearchContributor.java93
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/XSDSearchParticipant.java51
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/XSDSearchQuery.java54
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/BaseGroupActionDelegate.java146
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/CompositeActionGroup.java99
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/DeclarationsSearchGroup.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/FindAction.java30
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/FindReferencesAction.java149
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/FindReferencesInProjectAction.java45
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/FindReferencesInWorkingSetAction.java88
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/ImplementorsSearchGroup.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/OccurrencesSearchGroup.java17
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/ReferencesSearchGroup.java179
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/SearchGroup.java20
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchActionGroup.java35
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchDeclarationsGroupActionDelegate.java22
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchGroupSubMenu.java72
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-search/org/eclipse/wst/xsd/ui/internal/search/actions/XSDSearchReferencesGroupActionDelegate.java46
-rw-r--r--features/org.eclipse.wst.xml_core.feature.patch/.project17
-rw-r--r--features/org.eclipse.wst.xml_core.feature.patch/build.properties6
-rw-r--r--features/org.eclipse.wst.xml_core.feature.patch/buildnotes_org.eclipse.wst.xml_core.feature.patch.html23
-rw-r--r--features/org.eclipse.wst.xml_core.feature.patch/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_core.feature.patch/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.xml_core.feature.patch/feature.properties151
-rw-r--r--features/org.eclipse.wst.xml_core.feature.patch/feature.xml35
-rw-r--r--features/org.eclipse.wst.xml_core.feature.patch/license.html93
2227 files changed, 12 insertions, 312584 deletions
diff --git a/bundles/org.eclipse.jst.jsp.core/.classpath b/bundles/org.eclipse.jst.jsp.core/.classpath
deleted file mode 100644
index cb0105380b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.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"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/bundles/org.eclipse.jst.jsp.core/.cvsignore b/bundles/org.eclipse.jst.jsp.core/.cvsignore
deleted file mode 100644
index 12f30eb312..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-bin
-temp.folder
-jspmodel.jar
-dev.properties
-org.eclipse.jst.jsp.core_6.0.0.jar
-build.xml
-org.eclipse.jst.jsp.core_6.0.0.zip
-jspmodelsrc.zip
-@dot
-src.zip
-javaCompiler...args
diff --git a/bundles/org.eclipse.jst.jsp.core/.options b/bundles/org.eclipse.jst.jsp.core/.options
deleted file mode 100644
index dd48016024..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.options
+++ /dev/null
@@ -1,35 +0,0 @@
-org.eclipse.jst.jsp.core/debug=true
-org.eclipse.jst.jsp.core/debug/tracefilter=
-org.eclipse.jst.jsp.core/debug/jspindexmanager=false
-org.eclipse.jst.jsp.core/debug/jsptranslation=false
-org.eclipse.jst.jsp.core/debug/jsptranslationstodisk=false
-org.eclipse.jst.jsp.core/debug/jspsearch=false
-
-org.eclipse.jst.jsp.core/taglib/resolve=false
-
-
-# org.eclipse.jst.jsp.core.contentmodel.tld.TLDCMDocumentManager._debug
-org.eclipse.jst.jsp.core/debug/tldcmdocument/manager=false
-org.eclipse.jst.jsp.core/debug/tldcmdocument/cache=false
-
-# org.eclipse.jst.jsp.core.contentmodel.tld.CMDocumentFactoryTLD._debug
-org.eclipse.jst.jsp.core/debug/tldcmdocument/factory=false
-
-#org.eclipse.jst.jsp.core.internal.contentmodel.ProjectDescription._debugIndexCreation
-org.eclipse.jst.jsp.core/taglib/indexcreation=false
-#org.eclipse.jst.jsp.core.internal.contentmodel.ProjectDescription._debugIndexTime
-org.eclipse.jst.jsp.core/taglib/indextime=false
-
-#org.eclipse.jst.jsp.core.internal.contentmodel.TaglibIndex._debugEvents
-org.eclipse.jst.jsp.core/taglib/events=false
-#org.eclipse.jst.jsp.core.internal.contentmodel.TaglibIndex._debugIndexCreation
-org.eclipse.jst.jsp.core/taglib/indexcreation=false
-#org.eclipse.jst.jsp.core.internal.contentmodel.TaglibIndex._debugResolution
-org.eclipse.jst.jsp.core/taglib/resolve=false
-
-org.eclipse.jst.jsp.core/debug/jspjavamapping=false
-org.eclipse.jst.jsp.core/debug/jspvalidator=false
-org.eclipse.jst.jsp.core/debug/taglibvars=false
-
-org.eclipse.jst.jsp.core/debug/taglibclassloader=false
-org.eclipse.jst.jsp.core/debug/fragments/cache=false
diff --git a/bundles/org.eclipse.jst.jsp.core/.project b/bundles/org.eclipse.jst.jsp.core/.project
deleted file mode 100644
index 0f10b7a1d8..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.jsp.core</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.jst.jsp.core/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index afa5c91352..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.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.jst.jsp.core/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index 7ec5750225..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.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.jst.jsp.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 782e417e41..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,80 +0,0 @@
-#Sun Apr 16 17:23:39 EDT 2006
-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=ignore
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=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=warning
-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=warning
-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=warning
-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.unsafeTypeOperation=warning
-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.jst.jsp.core/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 301c7adde6..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.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.jst.jsp.core/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index c59368c5e1..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.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.jst.jsp.core/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fc522bba76..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.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.jst.jsp.core/DevTimeSupport/CSSJSPParser/HowToGen.html b/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/HowToGen.html
deleted file mode 100644
index ea439f1291..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/HowToGen.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<html>
-<body>
-<p>
-JSPedCSSTokenizer class is a scanner generated by <a href="http://www.jflex.de/">JFlex</a> 1.4.1
-from the JSPedCSSTokenizer.flex grammer file.
-After generating the scanner, I removed unused private field errors.
-</p>
-</body>
-<html>
diff --git a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex b/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex
deleted file mode 100644
index a48194e5b1..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex
+++ /dev/null
@@ -1,596 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.css.core.internal.parser;
-
-import java.io.CharArrayReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jst.jsp.css.core.internal.parserz.JSPedCSSRegionContexts;
-import org.eclipse.wst.css.core.internal.parser.CSSRegionUtil;
-import org.eclipse.wst.css.core.internal.parser.ICSSTokenizer;
-import org.eclipse.wst.css.core.internal.parser.regions.CSSTextRegionFactory;
-import org.eclipse.wst.css.core.internal.parserz.CSSTextToken;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-%%
-
-%public
-%class JSPedCSSTokenizer
-%implements JSPedCSSRegionContexts, ICSSTokenizer
-%function primGetNextToken
-%type String
-%char
-%line
-%unicode
-%caseless
-%pack
-
-%{
- private final static String UNDEFINED = "undefined";
- private String fBufferedContext = null;
- private int fBufferedStart;
-// private int fBufferedTextLength;
- private int fBufferedLength;
-// private StringBuffer fBufferedText = null;
- private CSSTextRegionFactory fRegionFactory = CSSTextRegionFactory.getInstance();
- private int fInitialState = YYINITIAL;
- public final static int BUFFER_SIZE_NORMAL = 16384;
- public final static int BUFFER_SIZE_SMALL = 256;
- private int fInitialBufferSize = BUFFER_SIZE_NORMAL;
-
- public void setInitialState(int state) {
- fInitialState = state;
- }
-
- public void setInitialBufferSize(int size) {
- fInitialBufferSize = size;
- }
-
- /* user method */
- public final ITextRegion getNextToken() throws IOException {
- String context;
- String nextTokenType;
- boolean spaceFollows;
-// StringBuffer text;
- int start;
- int textLength;
- int length;
- if (fBufferedContext != null) {
- context = fBufferedContext;
-// text = fBufferedText;
- start = fBufferedStart;
- textLength = length = fBufferedLength;
-
- fBufferedContext = null;
- } else {
- context = primGetNextToken();
-// text = new StringBuffer(yytext());
- start = yychar;
- textLength = length = yylength();
- }
-
- if (context != null) {
- if (context == CSS_JSP_SCRIPTLET || context == CSS_JSP_EL){
- nextTokenType = primGetNextToken();
- while (nextTokenType != CSS_JSP_END && nextTokenType != CSS_EL_END && nextTokenType != CSS_JSP_COMMENT) {
-// text.append(yytext());
- textLength += yylength();
- length = textLength;
- if (context.equals(CSS_JSP_SCRIPTLET) && (yystate() == ST_JSP_DIRECTIVE || yystate() == ST_JSP_EXP || yystate() == ST_JSP_DECLARATION)){
- context = nextTokenType;
- }
- nextTokenType = primGetNextToken();
- if (nextTokenType == null){
- break;
- }
- }
- if (context == CSS_JSP_SCRIPTLET){
- while (nextTokenType != CSS_JSP_COMMENT_END) {
-// text.append(yytext());
- textLength += yylength();
- length = textLength;
- if (context.equals(CSS_JSP_SCRIPTLET) && yystate() == ST_JSP_COMMENT){
- context = nextTokenType;
- }
-
- nextTokenType = primGetNextToken();
- if (nextTokenType == null){
- break;
- }
- }
- if (context == CSS_JSP_COMMENT){
- context = CSS_COMMENT;
- }
- }
- textLength += yylength();
- length = textLength;
-
- }
- if (context == UNDEFINED) {
- // undef -> concatenate undef's
- nextTokenType = primGetNextToken();
- while (nextTokenType == UNDEFINED) {
-// text.append(yytext());
- textLength += yylength();
- length = textLength;
- nextTokenType = primGetNextToken();
- }
- fBufferedContext = nextTokenType;
-// fBufferedText = new StringBuffer(yytext());
- fBufferedStart = yychar;
- fBufferedLength = yylength();
- } else {
- nextTokenType = null;
- spaceFollows = false;
- if (CSSRegionUtil.isDeclarationValueType(context)) { // declaration value can contain VALUE_S
- nextTokenType = primGetNextToken();
- spaceFollows = (nextTokenType == CSS_DECLARATION_VALUE_S);
- } else if (canContainSpace(context)) {
- nextTokenType = primGetNextToken();
- spaceFollows = (nextTokenType == CSS_S);
- }
- if (nextTokenType != null) { // nextToken is retrieved
- if (spaceFollows) {
- // next is space -> append
-// text.append(yytext());
- length += yylength();
- } else {
- // next is NOT space -> push this for next time, return itself
- fBufferedContext = nextTokenType;
-// fBufferedText = new StringBuffer(yytext());
- fBufferedStart = yychar;
- fBufferedLength = yylength();
- }
- }
- }
- }
-
- if (context != null) {
- if (context == UNDEFINED) {
- context = CSS_UNKNOWN;
- }
- return fRegionFactory.createRegion(context, start, textLength, length);
- } else {
- return null;
- }
- }
-
- /* user method */
- /* for standalone use */
- public final List parseText() throws IOException {
- List tokens = new ArrayList();
-
- CSSTextToken token;
- for (String kind = primGetNextToken(); kind != null; kind = primGetNextToken()) {
- token = new CSSTextToken();
- token.kind = kind;
- token.start = yychar;
- token.length = yylength();
- token.image = yytext();
- tokens.add(token);
- }
-
- return tokens;
- }
-
- /* user method */
- private boolean canContainSpace(String type) {
- if (type == CSS_DELIMITER || type == CSS_RBRACE || type == CSS_DECLARATION_DELIMITER) {
- return false;
- } else {
- return true;
- }
- }
-
- /* user method */
- public final int getOffset() {
- return yychar;
- }
-
- /* user method */
- public final boolean isEOF() {
- return zzAtEOF;
- }
-
- /* user method */
- public void reset(char[] charArray) {
- reset(new CharArrayReader(charArray), 0);
- }
-
- /* user method */
- public final void reset(java.io.Reader in, int newOffset) {
- /** the input device */
- zzReader = in;
-
- /** the current state of the DFA */
- zzState = 0;
-
- /** the current lexical state */
- zzLexicalState = fInitialState; //YYINITIAL;
-
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- if (zzBuffer.length != fInitialBufferSize) {
- zzBuffer = new char[fInitialBufferSize];
- }
- java.util.Arrays.fill(zzBuffer, (char)0);
-
- /** the textposition at the last accepting state */
- zzMarkedPos = 0;
-
- /** the textposition at the last state to be included in yytext */
- zzPushbackPos = 0;
-
- /** the current text position in the buffer */
- zzCurrentPos = 0;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- zzStartRead = 0;
-
- /** endRead marks the last character in the buffer, that has been read
- from input */
- zzEndRead = 0;
-
- /** number of newlines encountered up to the start of the matched text */
- yyline = 0;
-
- /** the number of characters up to the start of the matched text */
- yychar = 0;
-
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- yycolumn = 0;
-
- /**
- * yy_atBOL == true <=> the scanner is currently at the beginning of a line
- */
- zzAtBOL = false;
-
- /** yy_atEOF == true <=> the scanner has returned a value for EOF */
- zzAtEOF = false;
-
- /* user variables */
- // fUndefined.delete(0, fUndefined.length());
- }
-
- /* user method */
- public JSPedCSSTokenizer() {
- super();
- }
-
- private int fJSPPreviousState = fInitialState;
- private void yyJspBegin(int newstate){
- fJSPPreviousState = yystate();
- yybegin(newstate);
- }
- private void yyJspEnd(){
- yybegin(fJSPPreviousState);
- }
-%}
-
-%state ST_CHARSET_NAME
-%state ST_CHARSET_DELIMITER
-%state ST_IMPORT_URI
-%state ST_IMPORT_MEDIUM
-%state ST_IMPORT_DELIMITER
-%state ST_MEDIA_MEDIUM
-%state ST_MEDIA_DELIMITER
-%state ST_PAGE_PSEUDO_PAGE
-%state ST_PAGE_DELIMITER
-%state ST_FONT_FACE_DELIMITER
-%state ST_SELECTOR
-%state ST_SELECTOR_MODIFIER
-%state ST_SELECTOR_ATTRIBUTE_NAME
-%state ST_SELECTOR_ATTRIBUTE_OPERATOR
-%state ST_SELECTOR_ATTRIBUTE_VALUE
-%state ST_SELECTOR_ATTRIBUTE_END
-%state ST_DECLARATION
-%state ST_DECLARATION_SEPARATOR
-%state ST_DECLARATION_PRE_VALUE
-%state ST_DECLARATION_VALUE
-%state ST_JSP_SCRIPTLET
-%state ST_JSP_DIRECTIVE
-%state ST_JSP_DECLARATION
-%state ST_JSP_EXP
-%state ST_JSP_EL
-%state ST_JSP_COMMENT
-
-
-h = [0-9a-f]
-nonascii = [\u0080-\uffff]
-unicode = \\{h}{1,6}[ \t\r\n\f]?
-escape = {unicode}|\\[ -~\u0080-\uffff]
-nmstart = [_a-zA-Z-]|{nonascii}|{escape}
-nmchar = [_a-zA-Z0-9-]|{nonascii}|{escape}
-string1 = \"([\t !#$%&(-~]|\\{nl}|\'|{nonascii}|{escape})*\"
-string2 = \'([\t !#$%&(-~]|\\{nl}|\"|{nonascii}|{escape})*\'
-
-ident = {nmstart}{nmchar}*
-name = {nmchar}+
-num = [+-]?([0-9]+|[0-9]*"."[0-9]+)
-string = {string1}|{string2}
-url = ([ !#$%&*-~]|{nonascii}|{escape})*
-s = [ \t\r\n\f]
-w = {s}*
-nl = \n|\r\n|\r|\f
-range = \?{1,6}|{h}(\?{0,5}|{h}(\?{0,4}|{h}(\?{0,3}|{h}(\?{0,2}|{h}(\??|{h})))))
-
-hash = "#"{name}
-uri = ("url("{w}{string}{w}")"|"url("{w}{url}{w}")")
-function = {ident}"("
-unicode_range = "U"\+[0-9a-fA-F?]{1,6}("-"[0-9a-fA-F?]{1,6})?
-
-SS = [\x20\x09\x0D\x0A]
-jspstart = "<"{SS}*"%"{SS}*
-jspend = "%"{SS}*">"
-elstart = "$"{SS}*"{"
-elend = "}"
-
-%%
-
-
-
-<YYINITIAL> {
- {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
- {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
-}
-
-<ST_JSP_SCRIPTLET> {
- "@" {yybegin(ST_JSP_DIRECTIVE); return CSS_JSP_DIRECTIVE;}
- "=" {yybegin(ST_JSP_EXP); return CSS_JSP_EXP;}
- "!" {yybegin(ST_JSP_DECLARATION); return CSS_JSP_DECL;}
- {jspend} {yyJspEnd(); return CSS_JSP_END;}
- "--" { yybegin(ST_JSP_COMMENT); return CSS_JSP_COMMENT;}
-}
-
-/* override global "}" */
-<ST_JSP_EL> {
- {elend} {yyJspEnd(); return CSS_EL_END; }
-}
-
-<ST_JSP_DIRECTIVE, ST_JSP_EXP, ST_JSP_DECLARATION> {
- {jspend} {yyJspEnd(); return CSS_JSP_END;}
-}
-
-<ST_JSP_COMMENT> {
- -+-{jspend} { yyJspEnd(); return CSS_JSP_COMMENT_END; }
- "}" { return UNDEFINED; }
-}
-
-
-/*
- * *** global ***
- */
-
-{s}+ { return CSS_S; }
-"<!--" { return CSS_CDO; }
-"-->" { return CSS_CDC; }
-"}" { yybegin(YYINITIAL); return CSS_RBRACE; }
-\/\*[^*]*\*+([^/*][^*]*\*+)*\/ { return CSS_COMMENT; }
-//\<\%--[^-}]*[}]*[^}]*-+-\%\> { return CSS_COMMENT; }
-
-
-//<YYINITIAL> {
-// "@import" { yybegin(ST_IMPORT_URI); return CSS_IMPORT; }
-//}
-
-/*
- * *** charset rule ***
- * CHARSET_SYM S* STRING S* ';'
- */
-
-"@charset" { yybegin(ST_CHARSET_NAME); return CSS_CHARSET; }
-
-<ST_CHARSET_NAME> {
- {string} { yybegin(ST_CHARSET_DELIMITER); return CSS_STRING; }
-}
-
-<ST_CHARSET_DELIMITER> {
- ";" { yybegin(YYINITIAL); return CSS_DELIMITER; }
-}
-
-/*
- * *** import rule ***
- * IMPORT_SYM S* [STRING|URI] S* [ medium [ COMMA S* medium]* ]? ';' S*
- */
-
-"@import" { yybegin(ST_IMPORT_URI); return CSS_IMPORT; }
-
-<ST_IMPORT_URI> {
- {string} { yybegin(ST_IMPORT_MEDIUM); return CSS_STRING; }
- // "url("{w}{string}{w}")" { yybegin(ST_IMPORT_MEDIUM); return CSS_URI; }
- // "url("{w}{url}{w}")" { yybegin(ST_IMPORT_MEDIUM); return CSS_URI; }
- {uri} { yybegin(ST_IMPORT_MEDIUM); return CSS_URI; }
- ";" { yybegin(YYINITIAL); return CSS_DELIMITER; }
-}
-
-<ST_IMPORT_MEDIUM> {
- {ident} { yybegin(ST_IMPORT_DELIMITER); return CSS_MEDIUM; }
- ";" { yybegin(YYINITIAL); return CSS_DELIMITER; }
-}
-
-<ST_IMPORT_DELIMITER> {
- ";" { yybegin(YYINITIAL); return CSS_DELIMITER; }
- "," { yybegin(ST_IMPORT_MEDIUM); return CSS_MEDIA_SEPARATOR; }
-}
-
-/*
- * *** media rule ***
- * MEDIA_SYM S* medium [ COMMA S* medium ]* LBRACE S* ruleset* '}' S*
- */
-
-"@media" { yybegin(ST_MEDIA_MEDIUM); return CSS_MEDIA; }
-
-/*
- * medium
- * IDENT S*
- */
-<ST_MEDIA_MEDIUM> {
- {ident} { yybegin(ST_MEDIA_DELIMITER); return CSS_MEDIUM; }
-}
-
-<ST_MEDIA_DELIMITER> {
- "{" { yybegin(YYINITIAL); return CSS_LBRACE; }
- "," { yybegin(ST_MEDIA_MEDIUM); return CSS_MEDIA_SEPARATOR; }
-}
-
-/*
- * *** page rule **
- * PAGE_SYM S* pseudo_page? S* LBRACE S* declaration [ ';' S* declaration ]* '}' S*
- */
-
-"@page" { yybegin(ST_PAGE_PSEUDO_PAGE); return CSS_PAGE; }
-
-/*
- * pseudo_page
- * ':' IDENT
- */
-
-<ST_PAGE_PSEUDO_PAGE> {
- ":"?{ident} { yybegin(ST_PAGE_DELIMITER); return CSS_PAGE_SELECTOR; }
- "{" { yybegin(ST_DECLARATION); return CSS_LBRACE; }
-}
-
-<ST_PAGE_DELIMITER> {
- "{" { yybegin(ST_DECLARATION); return CSS_LBRACE; }
-}
-
-/*
- * font-face
- * FONT_FACE_SYM S* '{' S* declaration [ ';' S* declaration '* '}' S*
- */
-
-"@font-face" { yybegin(ST_FONT_FACE_DELIMITER); return CSS_FONT_FACE; }
-
-<ST_FONT_FACE_DELIMITER> {
- "{" { yybegin(ST_DECLARATION); return CSS_LBRACE; }
-}
-
-/*
- * selector
- * simple_selector [ combinator simple_selector ]*
- */
-
-/*
- * simple_selector
- * element_name [ HASH | class | attrib | pseudo ]* | [ HASH | class | attrib | pseudo ]+
- */
-
-<YYINITIAL, ST_SELECTOR_MODIFIER, ST_SELECTOR> {
- "*" { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_UNIVERSAL; }
- {hash} { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ID; }
-// ":"{ident} { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_PSEUDO; }
- ":"{ident}("("{s}*{ident}{s}*")")? { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_PSEUDO; }
- "."{name} { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_CLASS; }
- "[" { yybegin(ST_SELECTOR_ATTRIBUTE_NAME); return CSS_SELECTOR_ATTRIBUTE_START; }
-}
-
-<YYINITIAL, ST_SELECTOR> {
- {ident} { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ELEMENT_NAME; }
-}
-
-<ST_SELECTOR_MODIFIER> {
- "," { yybegin(ST_SELECTOR); return CSS_SELECTOR_SEPARATOR; }
- // using LOOKAHEAD
- {s}+/[^+>\{] { yybegin(ST_SELECTOR); return CSS_SELECTOR_COMBINATOR; }
- "+"|">" { yybegin(ST_SELECTOR); return CSS_SELECTOR_COMBINATOR; }
- "{" { yybegin(ST_DECLARATION); return CSS_LBRACE; }
-}
-
-/*
- * attrib
- * '[' S* IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S* [ IDENT | STRING ] S* ]? ']'
- */
-
-<ST_SELECTOR_ATTRIBUTE_NAME> {
- {ident} { yybegin(ST_SELECTOR_ATTRIBUTE_OPERATOR); return CSS_SELECTOR_ATTRIBUTE_NAME; }
-}
-
-<ST_SELECTOR_ATTRIBUTE_OPERATOR> {
- "="|"~="|"|=" { yybegin(ST_SELECTOR_ATTRIBUTE_VALUE); return CSS_SELECTOR_ATTRIBUTE_OPERATOR; }
- "]" { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ATTRIBUTE_END; }
-}
-
-<ST_SELECTOR_ATTRIBUTE_VALUE> {
- {ident}|{string} { yybegin(ST_SELECTOR_ATTRIBUTE_END); return CSS_SELECTOR_ATTRIBUTE_VALUE; }
-}
-
-<ST_SELECTOR_ATTRIBUTE_END> {
- "]" { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ATTRIBUTE_END; }
-}
-
-/*
- * declaration
- * property ':' S* expr prio? | // empty //
- */
-
-<ST_DECLARATION> {
- {ident} { yybegin(ST_DECLARATION_SEPARATOR); return CSS_DECLARATION_PROPERTY; }
- {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
- {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
-}
-
-<ST_DECLARATION_SEPARATOR> {
- ":" { yybegin(ST_DECLARATION_PRE_VALUE); return CSS_DECLARATION_SEPARATOR; }
- {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
- {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
-}
-
-<ST_DECLARATION_PRE_VALUE, ST_DECLARATION_VALUE> {
- "!"{s}*"important" { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_IMPORTANT; }
- {ident} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_IDENT; }
- ")" { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE; }
- {num}{ident} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_DIMENSION; }
- {num}"%" { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_PERCENTAGE; }
- {num} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_NUMBER; }
- {function} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_FUNCTION; }
- {string} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_STRING; }
- {uri} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_URI; }
- "#"{name} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_HASH; }
- {unicode_range} { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_UNICODE_RANGE; }
- [,/] { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_OPERATOR; }
- {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
- {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
-}
-
-<ST_DECLARATION_VALUE> {
- {s}+/[^;}] { return CSS_DECLARATION_VALUE_S; }
- {jspstart} {yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;}
- {elstart} {yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;}
-}
-
-<ST_DECLARATION, ST_DECLARATION_SEPARATOR, ST_DECLARATION_PRE_VALUE, ST_DECLARATION_VALUE> {
- ";" { yybegin(ST_DECLARATION); return CSS_DECLARATION_DELIMITER; }
- // "}" { yybegin(YYINITIAL); return CSS_RBRACE; }
-}
-
-
-//<YYINITIAL, ST_IMPORT_URI, ST_IMPORT_MEDIUM, ST_IMPORT_DELIMITER> {
-// \/\*[^*]*\*+([^/*][^*]*\*+)*\/ { return CSS_COMMENT; }
-// {s}+ { return CSS_S; }
-// . { return UNDEFINED; }
-//}
-
-//<YYINITIAL, ST_IMPORT_URI, ST_IMPORT_MEDIUM, ST_IMPORT_DELIMITER> {
-// [^ \t\r\n\f]+ { return CSS_UNKNOWN; }
-//}
-
-
-
-
-
-. {
- return UNDEFINED;
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex b/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex
deleted file mode 100644
index c47ae1c0ef..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex
+++ /dev/null
@@ -1,307 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*nlsXXX*/
-package org.eclipse.jst.jsp.core.internal.contenttype;
-import java.io.IOException;
-import java.io.Reader;
-
-import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants;
-import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants;
-
-
-
-
-
-%%
-
-%{
-
-
-
-
- private boolean hasMore = true;
- private final static int MAX_TO_SCAN = 8000;
- StringBuffer string = new StringBuffer();
- // state stack for easier state handling
- private IntStack fStateStack = new IntStack();
- private String valueText = null;
- private boolean isXHTML;
- private boolean isWML;
-
-
- public JSPHeadTokenizer() {
- super();
- }
-
- public void reset (Reader in) {
- /* the input device */
- zzReader = in;
-
- /* the current state of the DFA */
- zzState = 0;
-
- /* the current lexical state */
- zzLexicalState = YYINITIAL;
-
- /* this buffer contains the current text to be matched and is
- the source of the yytext() string */
- java.util.Arrays.fill(zzBuffer, (char)0);
-
- /* the textposition at the last accepting state */
- zzMarkedPos = 0;
-
- /* the textposition at the last state to be included in yytext */
- zzPushbackPos = 0;
-
- /* the current text position in the buffer */
- zzCurrentPos = 0;
-
- /* startRead marks the beginning of the yytext() string in the buffer */
- zzStartRead = 0;
-
- /**
- * endRead marks the last character in the buffer, that has been read
- * from input
- */
- zzEndRead = 0;
-
- /* number of newlines encountered up to the start of the matched text */
- //yyline = 0;
-
- /* the number of characters up to the start of the matched text */
- yychar = 0;
-
- /**
- * the number of characters from the last newline up to the start
- * of the matched text
- */
- //yycolumn = 0;
-
- /**
- * yy_atBOL == true <=> the scanner is currently at the beginning
- * of a line
- */
- zzAtBOL = true;
-
- /* yy_atEOF == true <=> the scanner has returned a value for EOF */
- zzAtEOF = false;
-
- /* denotes if the user-EOF-code has already been executed */
- zzEOFDone = false;
-
-
- fStateStack.clear();
-
- hasMore = true;
- isXHTML=false;
- isWML=false;
-
-
- }
-
-
- public final HeadParserToken getNextToken() throws IOException {
- String context = null;
- context = primGetNextToken();
- HeadParserToken result = null;
- if (valueText != null) {
- result = createToken(context, yychar, valueText);
- valueText = null;
- } else {
- result = createToken(context, yychar, yytext());
- }
- return result;
- }
-
- public final boolean hasMoreTokens() {
- return hasMore && yychar < MAX_TO_SCAN;
- }
- private void pushCurrentState() {
- fStateStack.push(yystate());
-
- }
-
- private void popState() {
- yybegin(fStateStack.pop());
- }
- private HeadParserToken createToken(String context, int start, String text) {
- return new HeadParserToken(context, start, text);
- }
-
- public boolean isXHTML() {
- return isXHTML;
- }
- public boolean isWML() {
- return isWML;
- }
-
-%}
-
-%eof{
- hasMore=false;
-%eof}
-
-%public
-%class JSPHeadTokenizer
-%function primGetNextToken
-%type String
-%char
-%unicode
-%ignorecase
-//%debug
-%switch
-%buffer 8192
-
-
-UTF16BE = \xFE\xFF
-UTF16LE = \xFF\xFE
-UTF83ByteBOM = \xEF\xBB\xBF
-
-// SpaceChar = [\x20\x09]
-
-
-// [3] S ::= (0x20 | 0x9 | 0xD | 0xA)+
-S = [\x20\x09\x0D\x0A]
-
-BeginAttribeValue = {S}* \= {S}*
-
-LineTerminator = \r|\n
-
-
-%state ST_XMLDecl
-%state ST_PAGE_DIRECTIVE
-%state QuotedAttributeValue
-%state DQ_STRING
-%state SQ_STRING
-%state UnDelimitedString
-
-%%
-
-
-<YYINITIAL>
-{
- // force to start at beginning of line (^) and at beginning of file (yychar == 0)
- ^ {UTF16BE} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16BE;}}
- ^ {UTF16LE} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16LE;}}
- ^ {UTF83ByteBOM} {if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;}}
-
- // force to be started on first line, but we do allow preceeding spaces
- ^ {S}* "<\?xml" {S}+ {if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}}
-
-
- // following are some simply rules to identify JSP content as "XHTML"
- // see http://www.rfc-editor.org/rfc/rfc3236.txt
- "<!DOCTYPE" {S}* "html" {S}* "PUBLIC" .* "//DTD XHTML" {isXHTML = true;}
- "<html" {S}* "xmlns" {S}* "=" {S}* (\" | \') "http://www.w3.org/1999/xhtml" {isXHTML = true;}
- // another case that's part of the "HTML family" is WML 1.0 (WML 2.0 is part of XHTML)
- "<!DOCTYPE" {S}* "wml" {S}* "PUBLIC" .* "//DTD WML" {isWML = true;}
-
- "<%" {S}* "@" {S}* "page" {S}+ {yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;}
- "<jsp:directive.page" {S}+ {yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;}
-
-
-}
-
-<ST_XMLDecl>
-{
- "version" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;}
- "encoding" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;}
- // note the "forced end" (via 'hasMore=false') once the end of XML Declaration found
- // This is since non-ascii chars may follow and may cause IOExceptions which would not occur once stream is
- // read with incorrect encoding (such as if platform encoding is in effect until true encoding detected).
- // BUT, the hasMore=false was removed for this JSP case (probably still ok for pure XML) because
- // in a JSP, we must parse past xmlDecl to get at JSP page directive.
- // We'll assume all chars in this area are "readable" as is.
- {S}* "\?>" {yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd;}
-}
-
-<ST_PAGE_DIRECTIVE>
-{
-// removed 'language' since it really can be handled seperately from encoding, but may add it back later for simple re-use.
- "language" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageLanguage;}
- "contentType" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageContentType;}
- "pageEncoding" {BeginAttribeValue} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageEncoding;}
- // note the "forced end" (via 'hasMore=false') once the end of XML Declaration found
- // This is since non-ascii chars may follow and may cause IOExceptions which would not occur once stream is
- // read in correct encoding.
-
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=4205 demonstrates how we need to keep parsing,
- // even if come to end of one page directive, so hasMore=false was removed from these rules.
- "%>" { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;}
- "\/>" { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;}
-}
-
-
-<QuotedAttributeValue>
-{
- \" { yybegin(DQ_STRING); string.setLength(0); }
- \' { yybegin(SQ_STRING); string.setLength(0); }
- // in this state, anything other than a space character can start an undelimited string
- {S}*. { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);}
-
-}
-
-
-<DQ_STRING>
-{
-
- \" { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; }
- {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- "\?>" { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- '<' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- . { string.append( yytext() ); }
-
- "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
-
-
-}
-
-<SQ_STRING>
-{
-
- \' { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;}
- {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- '<' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- . { string.append( yytext() ); }
- "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
-
-
-}
-
-<UnDelimitedString>
-{
-
-
- {S} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; }
- {LineTerminator} { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- "\?>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- '<' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- // these are a bit special, since we started an undelimit string, but found a quote ... probably indicates a missing beginning quote
- \' { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;}
- \" { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;}
-
- . { string.append( yytext() ); }
- "%>" { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
-
-}
-
-// The "match anything" rule should always be in effect except for when looking for end of string
-// (That is, remember to update state list if/when new states added)
-<YYINITIAL, ST_XMLDecl, QuotedAttributeValue, ST_PAGE_DIRECTIVE>
-{
-// this is the fallback (match "anything") rule (for this scanner, input is ignored, and position advanced, if not recognized)
-.|\n {if (yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}}
-}
-
-// this rule always in effect
-<<EOF>> {hasMore = false; return EncodingParserConstants.EOF;}
-
diff --git a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/buildParser.xml b/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/buildParser.xml
deleted file mode 100644
index 2ebe182109..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/buildParser.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="tokenizer" default="HeadTokenizer">
-
- <!-- Note: for Eclipse env., the JFlex 1.4 jar should be added
- to the ant global entries -->
- <taskdef classname="JFlex.anttask.JFlexTask" name="jflex" />
-
- <target name="init">
- <property name="src.file" value="JSPHeadTokenizer.jFlex"/>
- <property name="src.dir" value="HeadParsers"/>
- <property name="dest.dir" value="../src"/>
- <!-- touch causes to always build, remove for real 'make' behavior -->
- <touch file="${src.dir}/${src.file}"/>
-
- </target>
-
- <target name="HeadTokenizer" depends="init">
- <antcall target="run-jflex"/>
- </target>
-
- <target name="run-jflex" depends="init">
- <jflex
- file="${src.dir}/${src.file}"
- destdir="${dest.dir}"
- verbose="true"
- nobak="true"
- time="on"
- />
- </target>
-
-
-</project> \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF
deleted file mode 100644
index e33d3cbff7..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,55 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jst.jsp.core; singleton:=true
-Bundle-Version: 1.1.105.qualifier
-Bundle-Activator: org.eclipse.jst.jsp.core.internal.JSPCorePlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.jst.jsp.core.internal;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.contentmodel;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.contentmodel.tld;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.contentproperties;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.contenttype;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.document;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.domdocument;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.encoding;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.java;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.java.jspel;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.java.search;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.modelhandler;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.modelquery;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.parser;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.parser.internal;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.preferences;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.provisional;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.provisional.contenttype;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.provisional.text;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.regions;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.taglib;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.tasks;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.text;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.util;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.internal.validation;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.core.jspel,
- org.eclipse.jst.jsp.core.taglib,
- org.eclipse.jst.jsp.core.text,
- org.eclipse.jst.jsp.css.core.internal.document;x-internal:=true,
- org.eclipse.jst.jsp.css.core.internal.modelhandler;x-internal:=true,
- org.eclipse.jst.jsp.css.core.internal.parserz;x-internal:=true
-Require-Bundle: com.ibm.icu;bundle-version="[3.4.4,3.5.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,3.3.0)",
- org.eclipse.core.resources;bundle-version="[3.2.0,3.3.0)",
- org.eclipse.core.filebuffers;bundle-version="[3.2.0,3.3.0)",
- org.eclipse.text;bundle-version="[3.2.0,3.3.0)",
- org.eclipse.jdt.core;bundle-version="[3.2.0,3.3.0)",
- org.eclipse.wst.common.uriresolver;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.css.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.html.core;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.validation;bundle-version="[1.1.0,1.2.0)",
- org.eclipse.wst.sse.ui;bundle-version="[1.0.101,1.1.0)",
- org.eclipse.equinox.servlet.api;bundle-version="[1.0.0,1.1.0)"
-Eclipse-LazyStart: true; exceptions="org.eclipse.jst.jsp.core.internal.contenttype"
diff --git a/bundles/org.eclipse.jst.jsp.core/about.html b/bundles/org.eclipse.jst.jsp.core/about.html
deleted file mode 100644
index 4ec5989581..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/about.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<HTML>
-
-<head>
-<title>About</title>
-<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
-</head>
-
-<BODY lang="EN-US">
-
-<H3>About This Content</H3>
-
-<P>May 2, 2006</P>
-
-<H3>License</H3>
-
-<P>The Eclipse Foundation makes available all content in this plug-in
-("Content"). Unless otherwise indicated below, the Content is provided to you
-under the terms and conditions of the Eclipse Public License Version 1.0
-("EPL"). A copy of the EPL is available at
-<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
-For purposes of the EPL, "Program" will mean the Content.</P>
-
-<P>If you did not receive this Content directly from the Eclipse Foundation, the
-Content is being redistributed by another party ("Redistributor") and different
-terms and conditions may apply to your use of any object code in the Content.
-Check the Redistributor’s license that was provided with the Content. If no such
-license exists, contact the Redistributor. Unless otherwise indicated below, the
-terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at
-<A href="http://www.eclipse.org/">http://www.eclipse.org/</A>.</P>
-
-</BODY>
-</HTML>
diff --git a/bundles/org.eclipse.jst.jsp.core/build.properties b/bundles/org.eclipse.jst.jsp.core/build.properties
deleted file mode 100644
index ae187aec1f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/build.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = plugin.xml,\
- .options,\
- plugin.properties,\
- META-INF/,\
- .,\
- about.html
-bin.excludes = @dot/**,\
- temp.folder/**
-src.includes = component.xml,\
- DevTimeSupport/,\
- schema/
-source.. = src/
diff --git a/bundles/org.eclipse.jst.jsp.core/component.xml b/bundles/org.eclipse.jst.jsp.core/component.xml
deleted file mode 100644
index eacf9aaf88..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/component.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<component xmlns="http://eclipse.org/wtp/releng/tools/component-model" name="org.eclipse.jst.jsp">
- <component-depends unrestricted="true" />
- <plugin id="org.eclipse.jst.jsp.core" fragment="false" />
- <package name="org.eclipse.jst.jsp.core.taglib" api="false">
- <type name="IJarRecord" implement="false" />
- <!-- <type name="ITagDirRecord" implement="false" /> -->
- <!-- <type name="ITaglibIndexListener" implement="true" /> -->
- <type name="ITaglibRecord" implement="false" />
- <!-- <type name="ITaglibRecordEvent" implement="false" /> -->
- <type name="ITLDRecord" implement="false" />
- <type name="IURLRecord" implement="false" />
- <type name="TaglibIndex" subclass="false" instantiate="false" />
- </package>
- <plugin id="org.eclipse.jst.jsp.ui" fragment="false" />
- <package name="org.eclipse.jst.jsp.ui" api="false">
- <type name="StructuredTextViewerConfigurationJSP" subclass="true" instantiate="true" />
- </package>
- <package name="org.eclipse.jst.jsp.ui.views.contentoutline" api="false">
- <type name="JSPContentOutlineConfiguration" subclass="true" instantiate="true" />
- </package>
- <plugin id="org.eclipse.jst.jsp.ui.infopop" fragment="false" />
- <description url="http://eclipse.org/webtools/jst/components/jsp/overview.html" />
-</component> \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/plugin.properties b/bundles/org.eclipse.jst.jsp.core/plugin.properties
deleted file mode 100644
index 556dff585d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/plugin.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-providerName=Eclipse.org
-pluginName=Structured Source JSP Model
-Structured_JSP_Document_Factory_Extension.name=Structured JSP Document Factory Extension
-JSP_Content_Type_Extension_Element.name=JSP
-JSP_Tag_Content_Type_Extension_Element.name=JSP Tag Definition
-JSP_TLD_Content_Type_Extension_Element.name=Tag Library Definition
-JSP_Fragment_Content_Type_Extension_Element.name=JSP Fragment
-JSP_Syntax_Validator.name=JSP Syntax Validator
-JSP_Directive_Validator.name=JSP Directive Validator
-EL_Syntax_Validator.name=EL Syntax Validator
-Structured_JSP_Document_Setup_participant.name=Structured JSP Document Setup Participant
-
-extension-point.name.0 = org.eclipse.jst.jsp.core.eltranslator
-
-contentTypeCSSJSPName=CSS JSP
-contentTypeCSSJSPFName=CSS JSP Fragment
-
-contentTypeCSSDocumentFactoryName=Content Type CSS JSP document factory extension
diff --git a/bundles/org.eclipse.jst.jsp.core/plugin.xml b/bundles/org.eclipse.jst.jsp.core/plugin.xml
deleted file mode 100644
index 636bda6a5f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/plugin.xml
+++ /dev/null
@@ -1,301 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension-point id="elTranslator" name="%extension-point.name.0" schema="schema/eltranslator.exsd"/>
-
- <extension point="org.eclipse.wst.sse.core.modelHandler">
- <modelHandler
- class="org.eclipse.jst.jsp.core.internal.modelhandler.ModelHandlerForJSP"
- associatedContentTypeId="org.eclipse.jst.jsp.core.jspsource"
- id="org.eclipse.jst.jsp.core.internal.modelhandler">
- </modelHandler>
- <modelHandler
- class="org.eclipse.jst.jsp.core.internal.modelhandler.ModelHandlerForJSP"
- associatedContentTypeId="org.eclipse.jst.jsp.core.jspfragmentsource"
- id="org.eclipse.jst.jsp.core.internal.modelhandler">
- </modelHandler>
- </extension>
-
- <extension point="org.eclipse.wst.xml.core.documentFactories">
- <factory
- type="tld"
- class="org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentFactoryTLD">
- </factory>
- </extension>
-
- <extension point="org.eclipse.wst.sse.core.taskscanner">
- <scanner
- id="org.eclipse.jst.jsp.core.internal.tasks.JSPFileTaskScanner"
- class="org.eclipse.jst.jsp.core.internal.tasks.JSPFileTaskScanner"
- contentTypeIds="org.eclipse.jst.jsp.core.jspsource" />
- </extension>
-
- <extension
- point="org.eclipse.core.filebuffers.documentCreation"
- id="org.eclipse.jst.jsp.core.documentfactories"
- name="%Structured_JSP_Document_Factory_Extension.name">
- <factory
- contentTypeId="org.eclipse.jst.jsp.core.jspsource"
- class="org.eclipse.wst.sse.core.internal.filebuffers.BasicStructuredDocumentFactory" />
- </extension>
- <extension
- point="org.eclipse.core.filebuffers.documentSetup"
- id="org.eclipse.jst.jsp.core.documentsetup"
- name="%Structured_JSP_Document_Setup_participant.name">
- <participant
- contentTypeId="org.eclipse.jst.jsp.core.jspsource"
- class="org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController" />
- </extension>
- <extension point="org.eclipse.team.core.fileTypes">
- <fileTypes
- type="text"
- extension="jsp">
- </fileTypes>
- <fileTypes
- type="text"
- extension="jspf" />
- <fileTypes
- type="text"
- extension="jspx" />
- <fileTypes
- type="text"
- extension="jsf">
- </fileTypes>
- <fileTypes
- type="text"
- extension="jsv">
- </fileTypes>
- <fileTypes
- type="text"
- extension="jtpl">
- </fileTypes>
- <fileTypes
- type="text"
- extension="tld" />
- <fileTypes
- type="text"
- extension="tag" />
- <fileTypes
- type="text"
- extension="tagx" />
- <fileTypes
- type="text"
- extension="tagf" />
- </extension>
- <extension point="org.eclipse.wst.sse.core.formatProcessors">
- <processor
- class="org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl"
- contentTypeId="org.eclipse.jst.jsp.core.jspsource">
- </processor>
- </extension>
-
- <extension point="org.eclipse.core.runtime.contentTypes">
- <!-- create content type for JSP files -->
- <content-type
- file-extensions="jsp,jsv,jtpl,jspx"
- priority="high"
- name="%JSP_Content_Type_Extension_Element.name"
- id="jspsource"
- base-type="org.eclipse.core.runtime.text"
- default-charset="ISO-8859-1">
- <describer
- class="org.eclipse.jst.jsp.core.internal.contenttype.ContentDescriberForJSP" />
- </content-type>
- <!-- create content type for JSP fragment files -->
- <content-type
- file-extensions="jspf,jsf"
- priority="high"
- name="%JSP_Fragment_Content_Type_Extension_Element.name"
- id="jspfragmentsource"
- base-type="org.eclipse.jst.jsp.core.jspsource"
- default-charset="ISO-8859-1">
- <describer
- class="org.eclipse.jst.jsp.core.internal.contenttype.ContentDescriberForJSP" />
- </content-type>
- <!-- create content type for JSP 2.0 Tag file types -->
- <content-type
- file-extensions="tag,tagx,tagf"
- priority="high"
- name="%JSP_Tag_Content_Type_Extension_Element.name"
- id="tagsource"
- base-type="org.eclipse.jst.jsp.core.jspsource"
- default-charset="UTF-8"/>
- <!-- create content type for .tld files -->
- <content-type
- file-extensions="tld"
- priority="high"
- name="%JSP_TLD_Content_Type_Extension_Element.name"
- id="tldsource"
- base-type="org.eclipse.core.runtime.xml"
- default-charset="UTF-8"/>
- </extension>
-
- <!-- initialize jsp core preferences -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceInitializer" />
- </extension>
-
- <!--======================================================================================-->
- <!-- JSP (unified) batch validation -->
- <!--======================================================================================-->
- <extension
- id="JSPBatchValidator"
- name="%JSP_Syntax_Validator.name"
- point="org.eclipse.wst.validation.validator">
- <validator>
- <projectNature id="org.eclipse.jdt.core.javanature" />
-
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.jsp">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.jspf">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.jsf">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.jsv">
- </filter>
- <filter
- objectClass="org.eclipse.core.resources.IFile"
- nameFilter="*.jtpl">
- </filter>
- <helper
- class="org.eclipse.wst.validation.internal.operations.WorkbenchContext">
- </helper>
- <run
- enabled="true"
- class="org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator">
- </run>
- </validator>
- </extension>
-
- <!--======================================================================================-->
- <!-- individual source (as you type) validation for JSP Java -->
- <!--======================================================================================-->
- <extension point="org.eclipse.wst.sse.ui.sourcevalidation">
- <validator
- scope="total"
- class="org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidator"
- id="org.eclipse.jst.jsp.jspjavavalidator">
- <contentTypeIdentifier
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType id="org.eclipse.jst.jsp.DEFAULT_JSP">
- </partitionType>
- <partitionType id="org.eclipse.jst.jsp.SCRIPT.JAVA">
- </partitionType>
- <partitionType id="org.eclipse.jst.jsp.SCRIPT.DELIMITER">
- </partitionType>
- <partitionType id="org.eclipse.jst.jsp.JSP_DIRECTIVE">
- </partitionType>
- </contentTypeIdentifier>
- </validator>
- <!--======================================================================================-->
- <!-- individual source (as you type) validation for JSP EL -->
- <!--======================================================================================-->
- <validator
- scope="total"
- class="org.eclipse.jst.jsp.core.internal.validation.JSPELValidator"
- id="org.eclipse.jst.jsp.jspelvalidator">
- <contentTypeIdentifier
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType id="org.eclipse.jst.jsp.SCRIPT.JSP_EL">
- </partitionType>
- </contentTypeIdentifier>
- </validator>
- <!--====================================================================================-->
- <!-- individual source (as you type) validation for JSP directives -->
- <!--====================================================================================-->
- <validator
- scope="partial"
- class="org.eclipse.jst.jsp.core.internal.validation.JSPDirectiveValidator"
- id="org.eclipse.jst.jsp.tldsourcevalidator">
- <contentTypeIdentifier
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType id="org.eclipse.jst.jsp.DEFAULT_JSP">
- </partitionType>
- <partitionType id="org.eclipse.jst.jsp.JSP_DIRECTIVE">
- </partitionType>
- </contentTypeIdentifier>
- </validator>
- </extension>
-
- <extension
- point="org.eclipse.jst.jsp.core.elTranslator">
- <elTranslator
- class="org.eclipse.jst.jsp.core.internal.java.jspel.JSPELTranslator"
- name="Default JSP 2.0 EL Translator"
- id="org.eclipse.jst.jsp.defaultJSP20"/>
- </extension>
-
- <!--======================================================================================-->
- <!-- minimal content-type css jsp support -->
- <!--======================================================================================-->
- <extension
- point="org.eclipse.core.runtime.contentTypes">
- <content-type
- file-extensions="jsp"
- priority="high"
- name="%contentTypeCSSJSPName"
- id="cssjspsource"
- base-type="org.eclipse.jst.jsp.core.jspsource">
- <describer
- class="org.eclipse.jst.jsp.css.core.internal.contenttype.ContentDescriberForJSPedCSS" />
- </content-type>
- <content-type
- file-extensions="jspf"
- priority="high"
- name="%contentTypeCSSJSPFName"
- id="cssjspfragmentsource"
- base-type="org.eclipse.jst.jsp.core.cssjspsource">
- <describer
- class="org.eclipse.jst.jsp.css.core.internal.contenttype.ContentDescriberForJSPedCSS" />
- </content-type>
- </extension>
-
- <extension point="org.eclipse.wst.sse.core.modelHandler">
- <modelHandler
- class="org.eclipse.jst.jsp.css.core.internal.modelhandler.ModelHandlerForJSPedCSS"
- associatedContentTypeId="org.eclipse.jst.jsp.core.cssjspsource"
- id="org.eclipse.jst.jsp.css.core.modelhandler">
- </modelHandler>
- <modelHandler
- class="org.eclipse.jst.jsp.css.core.internal.modelhandler.ModelHandlerForJSPedCSS"
- associatedContentTypeId="org.eclipse.jst.jsp.core.cssjspfragmentsource"
- id="org.eclipse.jst.jsp.css.core.modelhandler">
- </modelHandler>
- </extension>
-
- <extension
- point="org.eclipse.core.filebuffers.documentCreation"
- id="org.eclipse.jst.jsp.css.core.internal.documentfactories"
- name="%contentTypeCSSDocumentFactoryName">
- <factory
- contentTypeId="org.eclipse.jst.jsp.core.cssjspsource"
- class="org.eclipse.wst.sse.core.internal.filebuffers.BasicStructuredDocumentFactory" />
- </extension>
- <extension
- point="org.eclipse.core.filebuffers.documentSetup"
- id="org.eclipse.jst.jsp.css.core.documentsetup"
- name="%Structured_JSP_Document_Setup_participant.name">
- <participant
- contentTypeId="org.eclipse.jst.jsp.core.cssjspsource"
- class="org.eclipse.jst.jsp.css.core.internal.contentmodel.JSPedCSSTaglibController" />
- </extension>
- <!--
- <extension
- point="org.eclipse.core.filebuffers.documentCreation"
- id="org.eclipse.jst.jsp.css.core.internal.documentfactories.fragment"
- name="%contentTypeCSSDocumentFactoryName">
- <factory
- contentTypeId="org.eclipse.jst.jsp.core.cssjspfragmentsource"
- class="org.eclipse.wst.sse.core.internal.filebuffers.BasicStructuredDocumentFactory" />
- </extension>
- -->
-</plugin>
diff --git a/bundles/org.eclipse.jst.jsp.core/schema/eltranslator.exsd b/bundles/org.eclipse.jst.jsp.core/schema/eltranslator.exsd
deleted file mode 100644
index 34e412b6dc..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/schema/eltranslator.exsd
+++ /dev/null
@@ -1,121 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jst.jsp.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.jst.jsp.core" id="elTranslator" name="JSP EL Translator"/>
- </appInfo>
- <documentation>
- Extension point to customer JSP Expression Language Generation
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="elTranslator"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- A fully qualified identifier of the target extension point.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- An optional identifier of the extension instance.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- An optional name of the extension instance.
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="elTranslator">
- <annotation>
- <appInfo>
- <meta.element labelAttribute="name"/>
- </appInfo>
- </annotation>
- <complexType>
- <attribute name="class" type="string" use="required">
- <annotation>
- <documentation>
- Fully qualified class name for the EL Translator. Must be an implementor of org.eclipse.jst.jsp.core.jspel.IJSPELTranslator.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- The name of the EL translator.
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string" use="required">
- <annotation>
- <documentation>
- A unique string identifier for an EL Translator.
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="copyright"/>
- </appInfo>
- <documentation>
-
- </documentation>
- </annotation>
-
-</schema>
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/Assert.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/Assert.java
deleted file mode 100644
index 96c0c9daf7..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/Assert.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal;
-
-
-
-/**
- * <code>Assert</code> is useful for for embedding runtime sanity checks in
- * code. The predicate methods all test a condition and throw some type of
- * unchecked exception if the condition does not hold.
- * <p>
- * Assertion failure exceptions, like most runtime exceptions, are thrown when
- * something is misbehaving. Assertion failures are invariably unspecified
- * behavior; consequently, clients should never rely on these being thrown
- * (and certainly should not being catching them specifically).
- * </p>
- */
-public final class Assert {
-
- /**
- * <code>AssertionFailedException</code> is a runtime exception thrown
- * by some of the methods in <code>Assert</code>.
- * <p>
- * This class is not declared public to prevent some misuses; programs
- * that catch or otherwise depend on assertion failures are susceptible to
- * unexpected breakage when assertions in the code are added or removed.
- * </p>
- */
- class AssertionFailedException extends RuntimeException {
- /**
- * Comment for <code>serialVersionUID</code>
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * Constructs a new exception.
- */
- public AssertionFailedException() {
- super();
- }
-
- /**
- * Constructs a new exception with the given message.
- */
- public AssertionFailedException(String detail) {
- super(detail);
- }
- }
-
- /**
- * Asserts that an argument is legal. If the given boolean is not
- * <code>true</code>, an <code>IllegalArgumentException</code> is
- * thrown. The given message is included in that exception, to aid
- * debugging.
- *
- * @param expression
- * the outcode of the check
- * @param message
- * the message to include in the exception
- * @return <code>true</code> if the check passes (does not return if the
- * check fails)
- * @exception IllegalArgumentException
- * if the legality test failed
- */
- public static boolean isLegal(boolean expression, String message) {
- if (!expression)
- throw new IllegalArgumentException(message);
- return expression;
- }
-
- /**
- * Asserts that the given object is not <code>null</code>. If this is
- * not the case, some kind of unchecked exception is thrown. The given
- * message is included in that exception, to aid debugging.
- *
- * @param object
- * the value to test
- * @param message
- * the message to include in the exception
- * @exception IllegalArgumentException
- * if the object is <code>null</code>
- */
- public static void isNotNull(Object object, String message) {
- if (object == null) {
- throw new Assert().new AssertionFailedException(message);
- }
- }
-
- /**
- * Asserts that the given boolean is <code>true</code>. If this is not
- * the case, some kind of unchecked exception is thrown. The given message
- * is included in that exception, to aid debugging.
- *
- * @param expression
- * the outcode of the check
- * @param message
- * the message to include in the exception
- * @return <code>true</code> if the check passes (does not return if the
- * check fails)
- */
- public static boolean isTrue(boolean expression, String message) {
- if (!expression) {
- throw new Assert().new AssertionFailedException(message);
- }
- return expression;
- }
-
- /* This class is not intended to be instantiated. */
- private Assert() {
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCoreMessages.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCoreMessages.java
deleted file mode 100644
index 4c35f25294..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCoreMessages.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by JSP Core
- *
- * @plannedfor 1.0
- */
-public class JSPCoreMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.jst.jsp.core.internal.JSPCorePluginResources"; //$NON-NLS-1$
-
- public static String JSPDirectiveValidator_0;
- public static String JSPDirectiveValidator_2;
- public static String MESSAGE_JSP_VALIDATING_MESSAGE_UI_;
- public static String JSPIndexManager_0;
- public static String JSPIndexManager_2;
- public static String JSP_Search;
- public static String JSPEL_Syntax;
- public static String JSPEL_Token;
- public static String JSPDocumentLoader_1;
- public static String JSPFContentPropertiesManager_Updating;
- public static String JSPFContentPropertiesManager_Problems_Updating;
-
- private JSPCoreMessages() {
- }
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, JSPCoreMessages.class);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePlugin.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePlugin.java
deleted file mode 100644
index 3956bb3cdd..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePlugin.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal;
-
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
-import org.eclipse.jst.jsp.core.internal.contentproperties.JSPFContentPropertiesManager;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPIndexManager;
-import org.eclipse.jst.jsp.core.internal.taglib.TaglibHelperManager;
-import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class JSPCorePlugin extends Plugin {
- // The shared instance.
- private static JSPCorePlugin plugin;
-
- /**
- * The constructor.
- */
- public JSPCorePlugin() {
- super();
- plugin = this;
- }
-
- /**
- * Returns the shared instance.
- *
- * @deprecated - will be removed. Currently used to get "model
- * preferences", but there are other, better ways.
- */
- public static JSPCorePlugin getDefault() {
- return plugin;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
-
- TaglibIndex.startup();
- // JSPIndexManager depends on TaglibController, so TaglibController
- // should be started first
- TaglibController.startup();
-
- // listen for classpath changes
- JavaCore.addElementChangedListener(TaglibHelperManager.getInstance());
-
-
- JSPIndexManager.getInstance().initialize();
-
- // listen for resource changes to update content properties keys
- JSPFContentPropertiesManager.startup();
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- // stop listenning for resource changes to update content properties
- // keys
- JSPFContentPropertiesManager.shutdown();
-
- // stop any indexing
- JSPIndexManager.getInstance().shutdown();
-
- // stop listening for classpath changes
- JavaCore.removeElementChangedListener(TaglibHelperManager.getInstance());
-
- // stop taglib controller
- TaglibController.shutdown();
- TaglibIndex.shutdown();
-
- super.stop(context);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties
deleted file mode 100644
index 970a9e9b64..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2004 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-JSPIndexManager_0=Updating JSP Index
-JSPIndexManager_2=JSP Indexer indexing {0} files
-JSP_Search=JSP Search -
-JSPDocumentLoader_1=Program Error: structured model had no structuredDocument
-JSPEL_Syntax=EL Syntax Error
-JSPEL_Token=Unable to analyse EL expression due to lexical analysis error
-MESSAGE_JSP_VALIDATING_MESSAGE_UI_=JSP Validator validating {0}
-JSPFContentPropertiesManager_Updating=Updating JSP Fragment Content Settings
-JSPFContentPropertiesManager_Problems_Updating=Problem saving JSP Fragment Content Settings for {0}
-JSPDirectiveValidator_0=Reserved prefix '
-JSPDirectiveValidator_2=Duplicate prefix '
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/Logger.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/Logger.java
deleted file mode 100644
index d67a9a4671..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/Logger.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal;
-
-import com.ibm.icu.util.StringTokenizer;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.Bundle;
-
-/**
- * Small convenience class to log messages to plugin's log file and also, if desired,
- * the console. This class should only be used by classes in this plugin. Other
- * plugins should make their own copy, with appropriate ID.
- */
-public class Logger {
- private static final String PLUGIN_ID = "org.eclipse.jst.jsp.core"; //$NON-NLS-1$
-
- private static final String TRACEFILTER_LOCATION = "/debug/tracefilter"; //$NON-NLS-1$
-
- public static final int OK = IStatus.OK; // 0
- public static final int INFO = IStatus.INFO; // 1
- public static final int WARNING = IStatus.WARNING; // 2
- public static final int ERROR = IStatus.ERROR; // 4
-
- public static final int OK_DEBUG = 200 + OK;
- public static final int INFO_DEBUG = 200 + INFO;
- public static final int WARNING_DEBUG = 200 + WARNING;
- public static final int ERROR_DEBUG = 200 + ERROR;
-
- /**
- * Adds message to log.
- * @param level severity level of the message (OK, INFO, WARNING, ERROR, OK_DEBUG, INFO_DEBUG, WARNING_DEBUG, ERROR_DEBUG)
- * @param message text to add to the log
- * @param exception exception thrown
- */
- protected static void _log(int level, String message, Throwable exception) {
- if (level == OK_DEBUG || level == INFO_DEBUG || level == WARNING_DEBUG || level == ERROR_DEBUG) {
- if (!isDebugging())
- return;
- }
-
- int severity = IStatus.OK;
- switch (level) {
- case INFO_DEBUG :
- case INFO :
- severity = IStatus.INFO;
- break;
- case WARNING_DEBUG :
- case WARNING :
- severity = IStatus.WARNING;
- break;
- case ERROR_DEBUG :
- case ERROR :
- severity = IStatus.ERROR;
- }
- message = (message != null) ? message : "null"; //$NON-NLS-1$
- Status statusObj = new Status(severity, PLUGIN_ID, severity, message, exception);
- Bundle bundle = Platform.getBundle(PLUGIN_ID);
- if (bundle != null)
- Platform.getLog(bundle).log(statusObj);
- }
-
- /**
- * Prints message to log if category matches /debug/tracefilter option.
- * @param message text to print
- * @param category category of the message, to be compared with /debug/tracefilter
- */
- protected static void _trace(String category, String message, Throwable exception) {
- if (isTracing(category)) {
- message = (message != null) ? message : "null"; //$NON-NLS-1$
- Status statusObj = new Status(IStatus.OK, PLUGIN_ID, IStatus.OK, message, exception);
- Bundle bundle = Platform.getBundle(PLUGIN_ID);
- if (bundle != null)
- Platform.getLog(bundle).log(statusObj);
- }
- }
-
- /**
- * @return true if the platform is debugging
- */
- public static boolean isDebugging() {
- return Platform.inDebugMode();
- }
-
- /**
- * Determines if currently tracing a category
- * @param category
- * @return true if tracing category, false otherwise
- */
- public static boolean isTracing(String category) {
- if (!isDebugging())
- return false;
-
- String traceFilter = Platform.getDebugOption(PLUGIN_ID + TRACEFILTER_LOCATION);
- if (traceFilter != null) {
- StringTokenizer tokenizer = new StringTokenizer(traceFilter, ","); //$NON-NLS-1$
- while (tokenizer.hasMoreTokens()) {
- String cat = tokenizer.nextToken().trim();
- if (category.equals(cat)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public static void log(int level, String message) {
- _log(level, message, null);
- }
-
- public static void log(int level, String message, Throwable exception) {
- _log(level, message, exception);
- }
-
- public static void logException(String message, Throwable exception) {
- _log(ERROR, message, exception);
- }
-
- public static void logException(Throwable exception) {
- _log(ERROR, exception.getMessage(), exception);
- }
-
- public static void traceException(String category, String message, Throwable exception) {
- _trace(category, message, exception);
- }
-
- public static void traceException(String category, Throwable exception) {
- _trace(category, exception.getMessage(), exception);
- }
-
- public static void trace(String category, String message) {
- _trace(category, message, null);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMContentWrapperImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMContentWrapperImpl.java
deleted file mode 100644
index ed398334bb..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMContentWrapperImpl.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-public class CMContentWrapperImpl extends CMNodeWrapperImpl implements CMContent {
-
- private CMContent fCMContent = null;
-
- /**
- * CMContentWrapper constructor comment.
- * @param prefix java.lang.String
- * @param node org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- public CMContentWrapperImpl(String prefix, org.eclipse.wst.xml.core.internal.contentmodel.CMContent node) {
- super(prefix, node);
- fCMContent = node;
- }
-
- /**
- * getMaxOccur method
- * @return int
- *
- * If -1, it's UNBOUNDED.
- */
- public int getMaxOccur() {
- return fCMContent.getMaxOccur();
- }
-
- /**
- * getMinOccur method
- * @return int
- *
- * If 0, it's OPTIONAL.
- * If 1, it's REQUIRED.
- */
- public int getMinOccur() {
- return fCMContent.getMinOccur();
- }
-
- public CMNode getOriginNode() {
- return fCMContent;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMDocumentWrapperImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMDocumentWrapperImpl.java
deleted file mode 100644
index 1ab27a73d4..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMDocumentWrapperImpl.java
+++ /dev/null
@@ -1,216 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel;
-
-
-
-import java.util.Hashtable;
-import java.util.Iterator;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMNodeWrapper;
-
-public class CMDocumentWrapperImpl implements CMDocument, CMNodeWrapper {
-
- class CMNamedNodeMapImpl implements CMNamedNodeMap {
-
- protected Hashtable table = new Hashtable();
-
- public CMNamedNodeMapImpl() {
- super();
- }
-
- Hashtable getHashtable() {
- return table;
- }
-
- public int getLength() {
- return table.size();
- }
-
- public CMNode getNamedItem(String name) {
- return (CMNode) table.get(name);
- }
-
- public CMNode item(int index) {
- Object result = null;
- int size = table.size();
- if (index < size) {
- Iterator values = iterator();
- for (int i = 0; i <= index; i++) {
- result = values.next();
- }
- }
- return (CMNode) result;
- }
-
- public Iterator iterator() {
- return table.values().iterator();
- }
-
- public void setNamedItem(String name, CMNode aNode) {
- if (name != null && aNode != null)
- table.put(name, aNode);
- }
- }
-
- public class CMNamespaceImpl implements CMNamespace {
- public String getNodeName() {
- return CMDocumentWrapperImpl.this.getURI();
- }
-
- public int getNodeType() {
- return CMNode.NAME_SPACE;
- }
-
- public String getPrefix() {
- return CMDocumentWrapperImpl.this.getPrefix();
- }
-
- public Object getProperty(String property) {
- return null;
- }
-
- public String getURI() {
- return CMDocumentWrapperImpl.this.getURI();
- }
-
- public boolean supports(String feature) {
- return false;
- }
- }
-
- private CMDocument fDocument;
- private CMNamedNodeMap fElements = null;
- private CMNamedNodeMap fEntities = null;
- private CMNamespace fNamespace = new CMNamespaceImpl();
- private String fPrefix;
- private String fURI;
-
- public CMDocumentWrapperImpl(String newURI, String newPrefix, CMDocument tld) {
- fURI = newURI;
- fPrefix = newPrefix;
- fDocument = tld;
- }
-
- /**
- *
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMDocument
- */
- public CMDocument getDocument() {
- return fDocument;
- }
-
- /**
- * getElements method
- * @return CMNamedNodeMap
- *
- * Returns CMNamedNodeMap of ElementDeclaration
- */
- public CMNamedNodeMap getElements() {
- if (fElements == null) {
- int length = getDocument().getElements().getLength();
- CMNamedNodeMapImpl elements = new CMNamedNodeMapImpl();
- for (int i = 0; i < length; i++) {
- CMElementDeclaration ed = new CMElementDeclarationWrapperImpl(fPrefix, (CMElementDeclaration) getDocument().getElements().item(i));
- elements.setNamedItem(ed.getNodeName(), ed);
- }
- fElements = elements;
- }
- return fElements;
- }
-
- /**
- * getEntities method
- * @return CMNamedNodeMap
- *
- * Returns CMNamedNodeMap of EntityDeclaration
- */
- public CMNamedNodeMap getEntities() {
- if (fEntities == null) {
- fEntities = getDocument().getEntities();
- }
- return fEntities;
- }
-
- /**
- * getNamespace method
- * @return CMNamespace
- */
- public CMNamespace getNamespace() {
- return fNamespace;
- }
-
- /**
- * getNodeName method
- * @return java.lang.String
- */
- public String getNodeName() {
- return getDocument().getNodeName();
- }
-
- /**
- * getNodeType method
- * @return int
- *
- * Returns one of :
- *
- */
- public int getNodeType() {
- return getDocument().getNodeType();
- }
-
- public CMNode getOriginNode() {
- return fDocument;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getPrefix() {
- return fPrefix;
- }
-
- /**
- * getProperty method
- * @return java.lang.Object
- *
- * Returns the object property desciped by the propertyName
- *
- */
- public Object getProperty(String propertyName) {
- return getDocument().getProperty(propertyName);
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getURI() {
- return fURI;
- }
-
- /**
- * supports method
- * @return boolean
- *
- * Returns true if the CMNode supports a specified property
- *
- */
- public boolean supports(String propertyName) {
- return getDocument().supports(propertyName);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMElementDeclarationWrapperImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMElementDeclarationWrapperImpl.java
deleted file mode 100644
index 86368f00c6..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMElementDeclarationWrapperImpl.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-public class CMElementDeclarationWrapperImpl extends CMNodeWrapperImpl implements CMElementDeclaration {
- private CMContent fCMContent = null;
-
- protected CMElementDeclaration fElementDecl = null;
-
- /**
- * CMElementDeclarationWrapper constructor comment.
- * @param prefix java.lang.String
- * @param node org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- public CMElementDeclarationWrapperImpl(String prefix, CMElementDeclaration node) {
- super(prefix, node);
- fElementDecl = node;
- }
-
- /**
- * getAttributes method
- * @return CMNamedNodeMap
- *
- * Returns CMNamedNodeMap of AttributeDeclaration
- */
- public CMNamedNodeMap getAttributes() {
- return fElementDecl.getAttributes();
- }
-
- /**
- * getCMContent method
- * @return CMContent
- *
- * Returns the root node of this element's content model.
- * This can be an CMElementDeclaration or a CMGroup
- */
- public CMContent getContent() {
- if (fCMContent == null) {
- CMContent content = fElementDecl.getContent();
- if (content == null)
- return null;
- if (content instanceof CMGroup)
- fCMContent = new CMGroupWrapperImpl(fPrefix, (CMGroup) content);
- else
- fCMContent = new CMContentWrapperImpl(fPrefix, content);
- }
- return fCMContent;
- }
-
- /**
- * getContentType method
- * @return int
- *
- * Returns one of :
- * ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA.
- */
- public int getContentType() {
- return fElementDecl.getContentType();
- }
-
- /**
- * getDataType method
- * @return java.lang.String
- */
- public CMDataType getDataType() {
- return fElementDecl.getDataType();
- }
-
- /**
- * getElementName method
- * @return java.lang.String
- */
- public String getElementName() {
- return getNodeName();
- }
-
- /**
- * getLocalElements method
- * @return CMNamedNodeMap
- *
- * Returns a list of locally defined elements.
- */
- public CMNamedNodeMap getLocalElements() {
- return fElementDecl.getLocalElements();
- }
-
- /**
- * getMaxOccur method
- * @return int
- *
- * If -1, it's UNBOUNDED.
- */
- public int getMaxOccur() {
- return fElementDecl.getMaxOccur();
- }
-
- /**
- * getMinOccur method
- * @return int
- *
- * If 0, it's OPTIONAL.
- * If 1, it's REQUIRED.
- */
- public int getMinOccur() {
- return fElementDecl.getMinOccur();
- }
-
- public CMNode getOriginNode() {
- return fElementDecl;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMGroupWrapperImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMGroupWrapperImpl.java
deleted file mode 100644
index 714c547769..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMGroupWrapperImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMGroup;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList;
-
-public class CMGroupWrapperImpl extends CMContentWrapperImpl implements CMGroup {
- class CMNodeListImpl implements CMNodeList {
- private List nodes = null;
-
- /**
- * CMNodeListImpl constructor comment.
- */
- public CMNodeListImpl() {
- super();
- nodes = new ArrayList();
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- * @param node org.eclipse.wst.xml.core.internal.contentmodel.CMNode
- */
- public void appendItem(CMNode node) {
- nodes.add(node);
- }
-
- /**
- * getLength method
- * @return int
- */
- public int getLength() {
- return nodes.size();
- }
-
- /**
- * item method
- * @return CMNode
- * @param index int
- */
- public CMNode item(int index) {
- if (index < 0 || index >= nodes.size())
- return null;
- return (CMNode) nodes.get(index);
- }
- }
-
- private CMNodeList fChildNodes = null;
- private CMGroup fGroup = null;
-
- /**
- * CMGroupWrapper constructor comment.
- * @param prefix java.lang.String
- * @param node org.eclipse.wst.xml.core.internal.contentmodel.CMContent
- */
- public CMGroupWrapperImpl(String prefix, CMGroup node) {
- super(prefix, node);
- }
-
- /**
- * getChildNodes method
- * @return CMNodeList
- *
- * Returns child CMNodeList, which includes ElementDefinition or CMElement.
- */
- public CMNodeList getChildNodes() {
- if (fChildNodes == null) {
- CMNodeListImpl childNodes = new CMNodeListImpl();
- CMNodeList children = fGroup.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- CMNode child = children.item(i);
- if (child instanceof CMGroup)
- childNodes.appendItem(new CMGroupWrapperImpl(fPrefix, (CMGroup) child));
- else if (child instanceof CMElementDeclaration)
- childNodes.appendItem(new CMElementDeclarationWrapperImpl(fPrefix, (CMElementDeclaration) child));
- else
- // error?
- childNodes.appendItem(new CMNodeWrapperImpl(fPrefix, child));
- }
- fChildNodes = childNodes;
- }
- return fChildNodes;
- }
-
- /**
- * getOperation method
- * @return int
- *
- * Returns one of :
- * ALONE (a), SEQUENCE (a,b), CHOICE (a|b), ALL (a&b).
- */
- public int getOperator() {
- return fGroup.getOperator();
- }
-
- public CMNode getOriginNode() {
- return fGroup;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMNodeWrapperImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMNodeWrapperImpl.java
deleted file mode 100644
index 0f117ff438..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/CMNodeWrapperImpl.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMNodeWrapper;
-
-public class CMNodeWrapperImpl implements CMNode, CMNodeWrapper {
- private CMNode fNode = null;
- private String fNodeName = null;
-
- protected String fPrefix = null;
-
- /**
- * CMNodeWrapper constructor comment.
- */
- public CMNodeWrapperImpl(String prefix, CMNode node) {
- super();
- fPrefix = prefix;
- fNode = node;
-
- fNodeName = fPrefix + ":" + fNode.getNodeName(); //$NON-NLS-1$
- }
-
- /**
- * getNodeName method
- * @return java.lang.String
- */
- public String getNodeName() {
- return fNodeName;
- }
-
- /**
- * getNodeType method
- * @return int
- *
- * Returns one of :
- *
- */
- public int getNodeType() {
- return fNode.getNodeType();
- }
-
- public CMNode getOriginNode() {
- return fNode;
- }
-
- /**
- * getProperty method
- * @return java.lang.Object
- *
- * Returns the object property desciped by the propertyName
- *
- */
- public Object getProperty(String propertyName) {
- return fNode.getProperty(propertyName);
- }
-
- /**
- * supports method
- * @return boolean
- *
- * Returns true if the CMNode supports a specified property
- *
- */
- public boolean supports(String propertyName) {
- return fNode.supports(propertyName);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/JSPCMDocumentFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/JSPCMDocumentFactory.java
deleted file mode 100644
index a75e1cec0a..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/JSPCMDocumentFactory.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel;
-
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLCMDocumentFactory;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamespace;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocType;
-
-/**
- * CMDocument factory for JSP documents.
- */
-public final class JSPCMDocumentFactory {
-
- static class CMDocImpl implements CMDocument {
- public CMDocImpl() {
- super();
- }
-
- private static CMDocument jcm = HTMLCMDocumentFactory.getCMDocument(CMDocType.JSP11_DOC_TYPE);
-
- public String getNodeName() {
- return jcm.getNodeName();
- }
-
- public int getNodeType() {
- return jcm.getNodeType();
- }
-
- public CMNamedNodeMap getElements() {
- return jcm.getElements();
- }
-
- public CMNamedNodeMap getEntities() {
- return jcm.getEntities();
- }
-
- public CMNamespace getNamespace() {
- return jcm.getNamespace();
- }
-
- public Object getProperty(String propertyName) {
- return null;
- }
-
- public boolean supports(String propertyName) {
- return false;
- }
- }
-
- private static CMDocument mycm;
-
- private JSPCMDocumentFactory() {
- super();
- }
-
- public static CMDocument getCMDocument() {
- if (mycm == null) {
- mycm = new CMDocImpl();
- }
- return mycm;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/TaglibController.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/TaglibController.java
deleted file mode 100644
index 48e22bb1cd..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/TaglibController.java
+++ /dev/null
@@ -1,311 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.filebuffers.IDocumentSetupParticipant;
-import org.eclipse.core.filebuffers.IFileBuffer;
-import org.eclipse.core.filebuffers.IFileBufferListener;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
-import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.taglib.ITaglibIndexListener;
-import org.eclipse.jst.jsp.core.taglib.ITaglibRecordEvent;
-import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
-import org.eclipse.wst.sse.core.internal.util.Assert;
-
-/**
- * Provides a direct mapping from IStructuredDocument to supporting
- * TLDCMDocumentManager.
- *
- * Listens to the creation of JSP type TextFileBuffers and forces a text-less
- * reparse after connecting taglib-supporting listeners. Connecting the
- * listeners before the text is set would be ideal, but there is no way to
- * look up taglib references since the location is not yet knowable. Since
- * taglibs can affect the parsing of the document, a reparse is currently
- * required to react to custom tags with tagdependent content.
- *
- * TODO: Remove the reparse penalty.
- */
-public class TaglibController implements IDocumentSetupParticipant {
-
- class DocumentInfo implements ITaglibIndexListener {
- IStructuredDocument document;
- ITextFileBuffer textFileBuffer;
- TLDCMDocumentManager tldDocumentManager;
-
- public void indexChanged(ITaglibRecordEvent event) {
- int type = event.getType();
- if (type == ITaglibRecordEvent.CHANGED || type == ITaglibRecordEvent.REMOVED) {
- Object key = TLDCMDocumentManager.getUniqueIdentifier(event.getTaglibRecord());
- if (tldDocumentManager.getDocuments().containsKey(key)) {
- if (_debugCache) {
- System.out.println("TLDCMDocumentManager cleared its private CMDocument cache"); //$NON-NLS-1$
- }
- tldDocumentManager.getDocuments().remove(key);
- tldDocumentManager.getSourceParser().resetHandlers();
-
- if (document instanceof BasicStructuredDocument) {
- ((BasicStructuredDocument) document).reparse(this);
- }
- }
- }
- tldDocumentManager.indexChanged(event);
- }
- }
-
- static final boolean _debugCache = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/tldcmdocument/cache")); //$NON-NLS-1$ //$NON-NLS-2$
-
- class FileBufferListener implements IFileBufferListener {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IFileBufferListener#bufferContentAboutToBeReplaced(org.eclipse.core.filebuffers.IFileBuffer)
- */
- public void bufferContentAboutToBeReplaced(IFileBuffer buffer) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IFileBufferListener#bufferContentReplaced(org.eclipse.core.filebuffers.IFileBuffer)
- */
- public void bufferContentReplaced(IFileBuffer buffer) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IFileBufferListener#bufferCreated(org.eclipse.core.filebuffers.IFileBuffer)
- */
- public void bufferCreated(IFileBuffer buffer) {
- if (buffer instanceof ITextFileBuffer) {
- IDocument document = ((ITextFileBuffer) buffer).getDocument();
- // ignore non-JSP documents
- synchronized (_instance.fJSPdocuments) {
- if (!_instance.fJSPdocuments.contains(document))
- return;
- }
- Assert.isTrue(document instanceof IStructuredDocument, getClass().getName() + " SetupParticipant was called for non-IStructuredDocument"); //$NON-NLS-1$
- DocumentInfo info = new DocumentInfo();
- info.document = (IStructuredDocument) document;
- info.textFileBuffer = (ITextFileBuffer) buffer;
- info.tldDocumentManager = new TLDCMDocumentManager();
- info.tldDocumentManager.setSourceParser((JSPSourceParser) info.document.getParser());
- synchronized (_instance.fDocumentMap) {
- _instance.fDocumentMap.put(document, info);
- }
- TaglibIndex.addTaglibIndexListener(info);
- if (document instanceof BasicStructuredDocument) {
- ((BasicStructuredDocument) document).reparse(this);
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IFileBufferListener#bufferDisposed(org.eclipse.core.filebuffers.IFileBuffer)
- */
- public void bufferDisposed(IFileBuffer buffer) {
- if (buffer instanceof ITextFileBuffer) {
- IDocument document = ((ITextFileBuffer) buffer).getDocument();
- synchronized (_instance.fJSPdocuments) {
- if (!_instance.fJSPdocuments.remove(document))
- return;
- }
- }
- DocumentInfo info = null;
- synchronized (fDocumentMap) {
- Object[] keys = fDocumentMap.keySet().toArray();
- for (int i = 0; i < keys.length; i++) {
- info = (DocumentInfo) fDocumentMap.get(keys[i]);
- if (info != null && info.textFileBuffer.equals(buffer)) {
- fDocumentMap.remove(keys[i]);
- break;
- }
- }
- }
- if (info != null) {
- info.tldDocumentManager.clearCache();
- TaglibIndex.removeTaglibIndexListener(info);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IFileBufferListener#dirtyStateChanged(org.eclipse.core.filebuffers.IFileBuffer,
- * boolean)
- */
- public void dirtyStateChanged(IFileBuffer buffer, boolean isDirty) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IFileBufferListener#stateChangeFailed(org.eclipse.core.filebuffers.IFileBuffer)
- */
- public void stateChangeFailed(IFileBuffer buffer) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IFileBufferListener#stateChanging(org.eclipse.core.filebuffers.IFileBuffer)
- */
- public void stateChanging(IFileBuffer buffer) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IFileBufferListener#stateValidationChanged(org.eclipse.core.filebuffers.IFileBuffer,
- * boolean)
- */
- public void stateValidationChanged(IFileBuffer buffer, boolean isStateValidated) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IFileBufferListener#underlyingFileDeleted(org.eclipse.core.filebuffers.IFileBuffer)
- */
- public void underlyingFileDeleted(IFileBuffer buffer) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IFileBufferListener#underlyingFileMoved(org.eclipse.core.filebuffers.IFileBuffer,
- * org.eclipse.core.runtime.IPath)
- */
- public void underlyingFileMoved(IFileBuffer buffer, IPath path) {
- }
-
-
- }
-
- static TaglibController _instance = null;
- static private boolean fIsShutdown = false;
-
- public static ITextFileBuffer getFileBuffer(IDocument document) {
- synchronized (_instance.fDocumentMap) {
- DocumentInfo info = (DocumentInfo) _instance.fDocumentMap.get(document);
- if (info != null)
- return info.textFileBuffer;
- return null;
- }
- }
-
- /**
- * @param manager
- * @return
- */
- public static ITextFileBuffer getFileBuffer(TLDCMDocumentManager manager) {
- // if _instance is null, we are already shutting donw
- if (_instance == null)
- return null;
-
- ITextFileBuffer buffer = null;
- synchronized (_instance.fDocumentMap) {
- Iterator docInfos = _instance.fDocumentMap.values().iterator();
- while (docInfos.hasNext() && buffer == null) {
- DocumentInfo info = (DocumentInfo) docInfos.next();
- if (info.tldDocumentManager.equals(manager))
- buffer = info.textFileBuffer;
- }
- }
- return buffer;
- }
-
- public static TLDCMDocumentManager getTLDCMDocumentManager(IDocument document) {
- // if _instance is null, we are already shutting donw
- if (_instance == null)
- return null;
- synchronized (_instance.fDocumentMap) {
- DocumentInfo info = (DocumentInfo) _instance.fDocumentMap.get(document);
- if (info != null)
- return info.tldDocumentManager;
- return null;
-
- }
- }
-
- private static synchronized boolean isShutdown() {
- return fIsShutdown;
- }
-
- private static synchronized void setShutdown(boolean isShutdown) {
- fIsShutdown = isShutdown;
- }
-
- public synchronized static void shutdown() {
- setShutdown(true);
- FileBuffers.getTextFileBufferManager().removeFileBufferListener(_instance.fBufferListener);
- _instance = null;
- }
-
- public synchronized static void startup() {
- if (_instance == null) {
- _instance = new TaglibController();
- FileBuffers.getTextFileBufferManager().addFileBufferListener(_instance.fBufferListener);
- }
- setShutdown(false);
- }
-
- IFileBufferListener fBufferListener;
-
- Map fDocumentMap;
-
- List fJSPdocuments;
-
- /*
- * This constructor is only to be called as part of the FileBuffer
- * framework
- */
- public TaglibController() {
- super();
- fBufferListener = new FileBufferListener();
- fJSPdocuments = new ArrayList(1);
- fDocumentMap = new HashMap(1);
- }
-
-
- /*
- * This method is only to be called as part of the FileBuffer framework
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IDocumentSetupParticipant#setup(org.eclipse.jface.text.IDocument)
- */
- public void setup(IDocument document) {
- // if we've already shutdown, just ignore
- if (isShutdown())
- return;
- // reference the shared instance's documents directly
- synchronized (_instance.fJSPdocuments) {
- _instance.fJSPdocuments.add(document);
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMAttributeDeclarationImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMAttributeDeclarationImpl.java
deleted file mode 100644
index ea5999ef5d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMAttributeDeclarationImpl.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-
-
-import java.util.Enumeration;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDAttributeDeclaration;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDDocument;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-public class CMAttributeDeclarationImpl implements TLDAttributeDeclaration {
-
- private CMDataType attrType = new CMDataTypeImpl(CMDataType.CDATA);
- private String fDescription;
-
- //
- private boolean fIsFragment = false;
-
- private CMDocument fOwnerDocument;
- // optional id
- private String id = null;
-
- // required name
- private String name = null;
- // optional "required" element present, defaults to not present
- private boolean required = false;
-
- // optional run-time (scriplet derived) value of attributes, defaults to none/false
- private String rtexprvalue = null;
-
- private String type = null;
-
- /**
- * CMAttributeDeclarationImpl constructor comment.
- */
- public CMAttributeDeclarationImpl(CMDocument owner) {
- super();
- fOwnerDocument = owner;
- }
-
- /**
- * getAttrName method
- * @return java.lang.String
- */
- public String getAttrName() {
- return getNodeName();
- }
-
- /**
- * getAttrType method
- * @return CMDataType
- */
- public CMDataType getAttrType() {
- return attrType;
- }
-
- /**
- * @deprecated in superclass
- */
- public String getDefaultValue() {
- return ""; //$NON-NLS-1$
- }
- /**
- * @return Returns the description.
- */
- public String getDescription() {
- return fDescription;
- }
-
- /**
- * @deprecated in superclass
- */
- public Enumeration getEnumAttr() {
- return null;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getId() {
- return id;
- }
-
- /**
- * getNodeName method
- * @return java.lang.String
- */
- public String getNodeName() {
- return name;
- }
-
- /**
- * getNodeType method
- * @return int
- *
- * Returns one of :
- *
- */
- public int getNodeType() {
- return CMNode.ATTRIBUTE_DECLARATION;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.jsp.core.contentmodel.tld.TLDAttributeDeclaration#getOwnerDocument()
- */
- public CMDocument getOwnerDocument() {
- return fOwnerDocument;
- }
-
- /**
- * getProperty method
- * @return java.lang.Object
- *
- * Returns the object property desciped by the propertyName
- *
- */
- public Object getProperty(String propertyName) {
- if (propertyName != null && propertyName.equals(JSP12TLDNames.DESCRIPTION)) {
- return getDescription(); // return attribute description
- }
- else if (propertyName.equals(TLDDocument.CM_KIND)) {
- return TLDDocument.JSP_TLD;
- }
- else if (propertyName.equals(JSP12TLDNames.SMALL_ICON) || propertyName.equals(JSP12TLDNames.LARGE_ICON)) {
- return getOwnerDocument().getProperty(propertyName);
- }
- return null;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public java.lang.String getRtexprvalue() {
- return rtexprvalue;
- }
-
- public String getType() {
- return type;
- }
-
- /**
- * getUsage method
- * @return int
- * OPTIONAL|REQUIRED
- */
- public int getUsage() {
- return required ? REQUIRED : OPTIONAL;
- }
- /**
- * @return Returns the isFragment.
- */
- public boolean isFragment() {
- return fIsFragment;
- }
-
- /**
- *
- * @return boolean
- */
- public boolean isRequired() {
- return required;
- }
- /**
- * @param description The description to set.
- */
- public void setDescription(String description) {
- fDescription = description;
- }
- /**
- * @param isFragment The isFragment to set.
- */
- public void setFragment(boolean isFragment) {
- fIsFragment = isFragment;
- }
-
- /**
- *
- * @param newId java.lang.String
- */
- public void setId(String newId) {
- id = newId;
- }
-
- public void setNodeName(String string) {
- name = string;
- }
-
- /**
- *
- * @param newRequired boolean
- */
- public void setRequired(boolean newRequired) {
- required = newRequired;
- }
-
- /**
- *
- * @param newRequired boolean
- */
- public void setRequiredString(String newRequired) {
- if (newRequired.equalsIgnoreCase("true") || newRequired.equalsIgnoreCase("yes")) //$NON-NLS-2$//$NON-NLS-1$
- setRequired(true);
- else if (newRequired.equalsIgnoreCase("false") || newRequired.equalsIgnoreCase("no")) //$NON-NLS-2$//$NON-NLS-1$
- setRequired(false);
- }
-
- /**
- *
- * @param newRtexprvalue java.lang.String
- */
- public void setRtexprvalue(String newRtexprvalue) {
- rtexprvalue = newRtexprvalue;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- /**
- * supports method
- *
- * @return boolean
- *
- * Returns true if the CMNode supports a specified property
- *
- */
- public boolean supports(String propertyName) {
- return propertyName == null || propertyName.equals(JSP12TLDNames.DESCRIPTION) || propertyName.equals(TLDDocument.CM_KIND) || propertyName.equals(JSP12TLDNames.SMALL_ICON) || propertyName.equals(JSP12TLDNames.LARGE_ICON);
- }
-
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("\n\t " + super.toString()); //$NON-NLS-1$
- buffer.append("\n\t name:" + StringUtils.escape(getNodeName())); //$NON-NLS-1$
- // Boolean.toString(boolean) is introduced in 1.4
- //buffer.append("\n\t required:" + StringUtils.escape(Boolean.toString(isRequired())));
- buffer.append("\n\t required:" + StringUtils.toString(isRequired())); //$NON-NLS-1$
- buffer.append("\n\t rtexpr:" + StringUtils.escape(getRtexprvalue())); //$NON-NLS-1$
- if (getId() != null)
- buffer.append("\n\t id:" + StringUtils.escape(getId())); //$NON-NLS-1$
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDataTypeImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDataTypeImpl.java
deleted file mode 100644
index 06e08170b7..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDataTypeImpl.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-public class CMDataTypeImpl implements CMDataType {
-
- protected String dataTypeName;
-
- public CMDataTypeImpl(String dataTypeName) {
- this.dataTypeName = dataTypeName;
- }
-
- /**
- * getTypeName method
- * @return java.lang.String
- *
- * This method returns a suitable default value that can be used when an instance of the data type is created.
- * This returns null of a suitable default is not available.
- */
- public String generateInstanceValue() {
- return null;
- }
-
- public String getDataTypeName() {
- return dataTypeName;
- }
-
- /**
- * getTypeName method
- * @return java.lang.String[]
- *
- */
- public String[] getEnumeratedValues() {
- return null;
- }
-
- /**
- * getTypeName method
- * @return java.lang.String
- *
- * Returns the implied value or null if none exists.
- */
- public String getImpliedValue() {
- return null;
- }
-
- /**
- * getImpliedValueKind method
- * @return int
- *
- * Returns one of :
- * IMPLIED_VALUE_NONE, IMPLIED_VALUE_FIXED, IMPLIED_VALUE_DEFAULT.
- */
- public int getImpliedValueKind() {
- return IMPLIED_VALUE_NONE;
- }
-
- public String getNodeName() {
- return dataTypeName;
- }
-
- public int getNodeType() {
- return CMNode.DATA_TYPE;
- }
-
- /**
- * getProperty method
- * @return java.lang.Object
- *
- * Returns the object property described by the propertyName
- *
- */
- public Object getProperty(String propertyName) {
- return null;
- }
-
- /**
- * supports method
- * @return boolean
- *
- * Returns true if the CMNode supports a specified property
- *
- */
- public boolean supports(String propertyName) {
- return false;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java
deleted file mode 100644
index 12a38acdc5..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java
+++ /dev/null
@@ -1,676 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP11TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP20TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDDocument;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDFunction;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDInitParam;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDListener;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDValidator;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDVariable;
-import org.eclipse.jst.jsp.core.internal.util.DocumentProvider;
-import org.eclipse.jst.jsp.core.taglib.IJarRecord;
-import org.eclipse.jst.jsp.core.taglib.ITLDRecord;
-import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
-import org.eclipse.jst.jsp.core.taglib.IURLRecord;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.sse.core.internal.util.JarUtilities;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.factory.CMDocumentFactory;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * CMDocumentBuilder for Taglib Descriptors
- *
- * Returns namespace-less CMDocuments for a taglib descriptor, loading it
- * directly from a file or extracted from a JAR archive. Content Model objects
- * will implement the TLDCMDocument, TLDElementDeclaration, and
- * TLDAttributeDeclaration interfaces for extended properties.
- */
-public class CMDocumentFactoryTLD implements CMDocumentFactory {
-
- static final boolean _debug = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/tldcmdocument/factory")); //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * CMDocumentFactoryTLD constructor comment.
- */
- public CMDocumentFactoryTLD() {
- super();
- }
-
- /**
- * NOT API
- *
- * @param baselocation
- * @param input
- * @return
- */
- public CMDocument buildCMDocument(String baselocation, InputStream input) {
- DocumentProvider provider = new DocumentProvider();
- provider.setValidating(false);
- provider.setRootElementName(JSP11TLDNames.TAGLIB);
- provider.setInputStream(input);
- if (baselocation != null)
- provider.setBaseReference(baselocation);
- return loadDocument(baselocation, provider.getRootElement());
- }
-
- /**
- * @param fileName
- * @return
- */
- private CMDocument buildCMDocumentFromDirectory(File directory) {
- if (_debug) {
- System.out.println("not implemented: tagdir loading for " + directory.getAbsolutePath()); //$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * NOT API
- *
- * @param fileName
- * @return
- */
- protected CMDocument buildCMDocumentFromFile(String fileName) {
- // load the taglib descriptor file
- DocumentProvider provider = new DocumentProvider();
- provider.setValidating(false);
- provider.setBaseReference(fileName);
- provider.setRootElementName(JSP11TLDNames.TAGLIB);
- provider.setFileName(fileName);
- Node rootElement = provider.getRootElement();
- return loadDocument(fileName, rootElement);
- }
-
- /**
- * Builds a CMDocument assuming the JSP v1.1 default path
- *
- * @param jarFileName -
- * the name of the containing JAR file
- */
- protected CMDocument buildCMDocumentFromJar(String jarFileName) {
- // load the taglib descriptor file
- return buildCMDocumentFromJar(jarFileName, JarUtilities.JSP11_TAGLIB);
- }
-
- /**
- * Builds a CMDocument
- *
- * @param jarFileName -
- * the name of the containing JAR file
- * @param contentFileName -
- * the path within the JAR for a valid taglib descriptor
- */
- protected CMDocument buildCMDocumentFromJar(String jarFileName, String contentFileName) {
- // load the taglib descriptor file
- DocumentProvider provider = new DocumentProvider();
- provider.setValidating(false);
- provider.setBaseReference(jarFileName);
- provider.setRootElementName(JSP11TLDNames.TAGLIB);
- provider.setJarFileName(jarFileName);
- provider.setFileName(contentFileName);
- CMDocument document = loadDocument("jar:file://" + jarFileName + "!" + contentFileName, provider.getRootElement()); //$NON-NLS-1$ //$NON-NLS-2$
- // TODO: Add the tags declared in META-INF/tags, see JSP 2.0 section
- // 8.4.1
- return document;
- }
-
- protected CMAttributeDeclaration createAttributeDeclaration(CMDocument document, Node attrNode) {
- CMAttributeDeclarationImpl attr = new CMAttributeDeclarationImpl(document);
-
- Node child = attrNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- if (child.getNodeName().equals(JSP11TLDNames.NAME) && child.hasChildNodes()) {
- attr.setNodeName(getContainedText(child));
- }
- else if (child.getNodeName().equals(JSP12TLDNames.DESCRIPTION) && child.hasChildNodes()) {
- attr.setDescription(getContainedText(child));
- }
- else if (child.getNodeName().equals(JSP11TLDNames.ID) && child.hasChildNodes()) {
- attr.setId(getContainedText(child));
- }
- else if (child.getNodeName().equals(JSP11TLDNames.REQUIRED) && child.hasChildNodes()) {
- attr.setRequiredString(getContainedText(child));
- }
- else if (child.getNodeName().equals(JSP11TLDNames.RTEXPRVALUE) && child.hasChildNodes()) {
- attr.setRtexprvalue(getContainedText(child));
- }
- else if (child.getNodeName().equals(JSP20TLDNames.FRAGMENT) && child.hasChildNodes()) {
- attr.setFragment(Boolean.valueOf(getContainedText(child)).booleanValue());
- }
- }
- child = child.getNextSibling();
- }
-
- return attr;
- }
-
- /**
- * Builds a CMDocument from a taglib descriptor
- *
- * @param uri -
- * the location of a valid taglib descriptor
- */
- public CMDocument createCMDocument(String uri) {
- CMDocument result = null;
- URL url = null;
- try {
- url = new URL(uri);
- }
- catch (MalformedURLException e) {
- result = createCMDocumentFromFile(uri);
- }
- if (result == null && url != null) {
- if (url.getProtocol().equals("file")) { //$NON-NLS-1$
- result = createCMDocumentFromFile(url.getFile());
- }
- else {
- /**
- * Skip anything else since trying to load a TLD from a remote
- * location has unpredictable performance impact.
- */
- }
- }
- if (result == null)
- result = new CMDocumentImpl();
- return result;
- }
-
- /**
- * @param fileName
- * @return
- */
- private CMDocument createCMDocumentFromFile(String fileName) {
- CMDocument result = null;
- File file = new File(fileName);
- try {
- if (file.isDirectory()) {
- result = buildCMDocumentFromDirectory(file);
- }
- }
- catch (SecurityException e) {
- result = null;
- }
- if (result == null) {
- if (fileName.endsWith(".jar")) { //$NON-NLS-1$
- result = buildCMDocumentFromJar(fileName);
- }
- else {
- result = buildCMDocumentFromFile(fileName);
- }
- }
- return result;
- }
-
- protected CMElementDeclaration createElementDeclaration(CMDocument cmdocument, Element tagFileNode, String path) {
- CMElementDeclarationImpl ed = new CMElementDeclarationImpl(cmdocument);
- boolean hasName = false;
-
- // load information declared within the .tld
- Node child = tagFileNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP12TLDNames.DESCRIPTION) && child.hasChildNodes()) {
- ed.setDescription(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.DISPLAY_NAME) && child.hasChildNodes()) {
- ed.setDisplayName(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.EXAMPLE) && child.hasChildNodes()) {
- ed.setExample(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.ICON) && child.hasChildNodes()) {
- ed.setSmallIcon(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.NAME) && child.hasChildNodes()) {
- ed.setNodeName(getContainedText(child));
- hasName = ed.getNodeName().trim().length() > 0;
- }
- else if (nodeName.equals(JSP20TLDNames.PATH) && child.hasChildNodes()) {
- ed.setPath(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.TAG_EXTENSION)) {
- ed.getExtensions().add(child);
- }
- }
- child = child.getNextSibling();
- }
- if (hasName) {
- // load information declared within the .tag(x) file
- // JSP2_TODO: implement for JSP 2.0
- return ed;
- }
- return null;
- }
-
- protected CMElementDeclaration createElementDeclaration(CMDocument document, Node tagNode) {
- CMElementDeclarationImpl ed = new CMElementDeclarationImpl(document);
-
- Node child = tagNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- // tag information
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP11TLDNames.NAME) && child.hasChildNodes()) {
- ed.setNodeName(getContainedText(child));
- }
- else if ((nodeName.equals(JSP11TLDNames.TAGCLASS) || nodeName.equals(JSP12TLDNames.TAG_CLASS)) && child.hasChildNodes()) {
- ed.setTagclass(getContainedText(child));
- }
- else if ((nodeName.equals(JSP11TLDNames.TEICLASS) || nodeName.equals(JSP12TLDNames.TEI_CLASS)) && child.hasChildNodes()) {
- ed.setTeiclass(getContainedText(child));
- }
- else if ((nodeName.equals(JSP11TLDNames.BODYCONTENT) || nodeName.equals(JSP12TLDNames.BODY_CONTENT)) && child.hasChildNodes()) {
- String bodycontent = getContainedText(child);
- // Apparently, Apache Tomcat is not case sensitive about
- // these values
- if (bodycontent.equalsIgnoreCase(JSP11TLDNames.CONTENT_JSP))
- ed.setBodycontent(JSP11TLDNames.CONTENT_JSP);
- else if (bodycontent.equalsIgnoreCase(JSP11TLDNames.CONTENT_TAGDEPENDENT))
- ed.setBodycontent(JSP11TLDNames.CONTENT_TAGDEPENDENT);
- else if (bodycontent.equalsIgnoreCase(JSP11TLDNames.CONTENT_EMPTY))
- ed.setBodycontent(JSP11TLDNames.CONTENT_EMPTY);
- else if (bodycontent.equalsIgnoreCase(JSP20TLDNames.CONTENT_SCRIPTLESS))
- ed.setBodycontent(JSP20TLDNames.CONTENT_SCRIPTLESS);
- }
- // info (1.1 only) or description (1.2 only)
- else if ((nodeName.equals(JSP11TLDNames.INFO) || nodeName.equals(JSP12TLDNames.DESCRIPTION)) && child.hasChildNodes()) {
- ed.setDescription(getContainedText(child));
- }
- // attributes
- else if (nodeName.equals(JSP11TLDNames.ATTRIBUTE)) {
- CMAttributeDeclaration attr = createAttributeDeclaration(document, child);
- ed.fAttributes.setNamedItem(attr.getAttrName(), attr);
- }
- // variables
- else if (nodeName.equals(JSP12TLDNames.VARIABLE)) {
- ed.getVariables().add(createVariable(child));
- }
- else if (nodeName.equals(JSP12TLDNames.LARGE_ICON) && child.hasChildNodes()) {
- ed.setLargeIcon(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.SMALL_ICON) && child.hasChildNodes()) {
- ed.setSmallIcon(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.TAG_EXTENSION) && child.getNodeType() == Node.ELEMENT_NODE) {
- ed.getExtensions().add(child);
- }
- }
- child = child.getNextSibling();
- }
- return ed;
- }
-
- protected TLDFunction createFunction(CMDocument document, Node functionNode) {
- TLDFunctionImpl function = new TLDFunctionImpl(document);
- boolean hasName = false;
-
- Node child = functionNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- // tag information
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP12TLDNames.DESCRIPTION) && child.hasChildNodes()) {
- function.setDescription(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.DISPLAY_NAME) && child.hasChildNodes()) {
- function.setName(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.EXAMPLE) && child.hasChildNodes()) {
- function.setExample(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.FUNCTION_CLASS) && child.hasChildNodes()) {
- function.setClassName(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.FUNCTION_EXTENSION) && child.hasChildNodes()) {
- function.getExtensions().add(child);
- }
- else if (nodeName.equals(JSP20TLDNames.FUNCTION_SIGNATURE) && child.hasChildNodes()) {
- function.setSignature(getContainedText(child));
- }
- else if (nodeName.equals(JSP20TLDNames.ICON) && child.hasChildNodes()) {
- function.setIcon(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.NAME) && child.hasChildNodes()) {
- function.setName(getContainedText(child));
- hasName = function.getName().trim().length() > 0;
- }
- }
- child = child.getNextSibling();
- }
- if (hasName) {
- return function;
- }
- return null;
- }
-
- protected TLDInitParam createInitParam(Node initParamNode) {
- TLDInitParamImpl initParam = new TLDInitParamImpl();
- Node child = initParamNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP12TLDNames.VALIDATOR_PARAM_NAME) && child.hasChildNodes()) {
- initParam.setName(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.VALIDATOR_PARAM_VALUE) && child.hasChildNodes()) {
- initParam.setValue(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.DESCRIPTION) && child.hasChildNodes()) {
- initParam.setDescription(getContainedText(child));
- }
- }
- child = child.getNextSibling();
- }
- return initParam;
- }
-
- protected TLDListener createListener(Node listenerNode) {
- TLDListenerImpl listener = new TLDListenerImpl();
- Node child = listenerNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP12TLDNames.LISTENER_CLASS) && child.hasChildNodes()) {
- listener.setListenerClass(getContainedText(child));
- }
- }
- child = child.getNextSibling();
- }
- return listener;
- }
-
- protected TLDValidator createValidator(Node validatorNode) {
- TLDValidatorImpl validator = new TLDValidatorImpl();
- Node child = validatorNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP12TLDNames.VALIDATOR_CLASS) && child.hasChildNodes()) {
- validator.setValidatorClass(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.VALIDATOR_INIT_PARAM) && child.hasChildNodes()) {
- validator.getInitParams().add(createInitParam(child));
- }
- }
- child = child.getNextSibling();
- }
- return validator;
- }
-
- protected TLDVariable createVariable(Node variableNode) {
- TLDVariableImpl variable = new TLDVariableImpl();
- Node child = variableNode.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- String nodeName = child.getNodeName();
- if (nodeName.equals(JSP12TLDNames.VARIABLE_CLASS) && child.hasChildNodes()) {
- variable.setVariableClass(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.VARIABLE_DECLARE) && child.hasChildNodes()) {
- variable.setDeclareString(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.VARIABLE_NAME_FROM_ATTRIBUTE) && child.hasChildNodes()) {
- variable.setNameFromAttribute(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.VARIABLE_NAME_GIVEN) && child.hasChildNodes()) {
- variable.setNameGiven(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.VARIABLE_SCOPE) && child.hasChildNodes()) {
- variable.setScope(getContainedText(child));
- }
- else if (nodeName.equals(JSP12TLDNames.DESCRIPTION) && child.hasChildNodes()) {
- variable.setDescription(getContainedText(child));
- }
- }
- child = child.getNextSibling();
- }
- return variable;
- }
-
- protected String getContainedText(Node parent) {
- NodeList children = parent.getChildNodes();
- if (children.getLength() == 1) {
- return children.item(0).getNodeValue().trim();
- }
- StringBuffer s = new StringBuffer();
- Node child = parent.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ENTITY_REFERENCE_NODE) {
- String reference = ((EntityReference) child).getNodeValue();
- if (reference == null && child.getNodeName() != null) {
- reference = "&" + child.getNodeName() + ";"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (reference != null) {
- s.append(reference.trim());
- }
- }
- else {
- s.append(child.getNodeValue().trim());
- }
- child = child.getNextSibling();
- }
- return s.toString().trim();
- }
-
- public boolean isBuilderForGrammar(String grammarFileName) {
- String fileName = grammarFileName.toLowerCase();
- return fileName.endsWith(".tld") || fileName.endsWith(".jar"); //$NON-NLS-2$//$NON-NLS-1$
- }
-
- private CMDocument loadDocument(String baseLocation, Node taglib) {
- Node root = taglib;
-
- // create the CMDocument
- CMDocumentImpl document = new CMDocumentImpl();
- document.setBaseLocation(baseLocation);
-
- if (root == null) {
- if (_debug) {
- System.out.println("null \"taglib\" element for TLD " + baseLocation); //$NON-NLS-1$
- }
- return document;
- }
-
- // populate the CMDocument
- Node child = root.getFirstChild();
- while (child != null) {
- if (child.getNodeType() != Node.ELEMENT_NODE) {
- child = child.getNextSibling();
- continue;
- }
- String nodeName = child.getNodeName();
- // tag
- if (nodeName.equals(JSP11TLDNames.TAG)) {
- CMElementDeclaration ed = createElementDeclaration(document, child);
- if (ed != null) {
- document.fElements.setNamedItem(ed.getNodeName(), ed);
- }
- }
- // tag-file
- else if (nodeName.equals(JSP20TLDNames.TAG_FILE) && child.getNodeType() == Node.ELEMENT_NODE && child.hasChildNodes()) {
- Element tagFileElement = (Element) child;
- String path = tagFileElement.getAttribute(JSP20TLDNames.PATH);
-
- CMElementDeclarationImpl ed = (CMElementDeclarationImpl) createElementDeclaration(document, tagFileElement, path);
- if (ed != null) {
- document.fElements.setNamedItem(ed.getNodeName(), ed);
- }
- }
- // other one-of-a-kind children
- // JSP version
- else if ((nodeName.equals(JSP11TLDNames.JSPVERSION) || nodeName.equals(JSP12TLDNames.JSP_VERSION)) && child.hasChildNodes()) {
- document.setJspversion(getContainedText(child));
- }
- // tag library version
- else if ((nodeName.equals(JSP11TLDNames.TLIBVERSION) || nodeName.equals(JSP12TLDNames.TLIB_VERSION)) && child.hasChildNodes()) {
- document.setTlibversion(getContainedText(child));
- }
- // short name
- else if ((nodeName.equals(JSP11TLDNames.SHORTNAME) || nodeName.equals(JSP12TLDNames.SHORT_NAME)) && child.hasChildNodes()) {
- document.setShortname(getContainedText(child));
- }
- // URI/URN
- else if ((nodeName.equals(JSP11TLDNames.URI) || nodeName.equals(JSP11TLDNames.URN)) && child.hasChildNodes()) { //$NON-NLS-1$
- document.setUri(getContainedText(child));
- }
- // info
- else if (nodeName.equals(JSP11TLDNames.INFO) && child.hasChildNodes()) {
- document.setInfo(getContainedText(child));
- }
- // New JSP 1.2
- // description
- else if (nodeName.equals(JSP12TLDNames.DESCRIPTION)) {
- document.setDescription(getContainedText(child));
- }
- // display name
- else if (nodeName.equals(JSP12TLDNames.DISPLAY_NAME) && child.hasChildNodes()) {
- document.setDisplayName(getContainedText(child));
- }
- // large icon
- else if (nodeName.equals(JSP12TLDNames.LARGE_ICON) && child.hasChildNodes()) {
- document.setLargeIcon(getContainedText(child));
- }
- // small icon
- else if (nodeName.equals(JSP12TLDNames.SMALL_ICON) && child.hasChildNodes()) {
- document.setSmallIcon(getContainedText(child));
- }
- // validator
- else if (nodeName.equals(JSP12TLDNames.VALIDATOR)) {
- document.setValidator(createValidator(child));
- }
- // listener
- else if (nodeName.equals(JSP12TLDNames.LISTENER)) {
- document.getListeners().add(createListener(child));
- }
- else if (nodeName.equals(JSP20TLDNames.FUNCTION)) {
- TLDFunction function = createFunction(document, child);
- if (function != null) {
- document.getFunctions().add(function);
- }
- }
- else if (nodeName.equals(JSP20TLDNames.TAGLIB_EXTENSION)) {
- document.getExtensions().add(child);
- }
-
- child = child.getNextSibling();
- }
- return document;
- }
-
- /**
- * @param reference
- * @return
- */
- public CMDocument createCMDocument(ITaglibRecord reference) {
- CMDocumentImpl document = null;
- switch (reference.getRecordType()) {
- case (ITaglibRecord.TLD) : {
- ITLDRecord record = (ITLDRecord) reference;
- IResource file = ResourcesPlugin.getWorkspace().getRoot().getFile(record.getPath());
- if (file.getLocation() != null) {
- document = (CMDocumentImpl) buildCMDocumentFromFile(file.getLocation().toString());
- if (_debug && document != null && document.getElements().getLength() == 0) {
- System.out.println("failure parsing " + record.getPath()); //$NON-NLS-1$
- }
-
- if (document.getSmallIcon() != null) {
- String iconPath = URIHelper.normalize(((TLDDocument) document).getSmallIcon(), file.getLocation().toString(), "/"); //$NON-NLS-1$
- document.setProperty(JSP12TLDNames.SMALL_ICON, "file:" + iconPath); //$NON-NLS-1$
- }
- if (document.getLargeIcon() != null) {
- String iconPath = URIHelper.normalize(((TLDDocument) document).getLargeIcon(), file.getLocation().toString(), "/"); //$NON-NLS-1$
- document.setProperty(JSP12TLDNames.LARGE_ICON, "file:" + iconPath); //$NON-NLS-1$
- }
- }
- }
- break;
- case (ITaglibRecord.JAR) : {
- IJarRecord record = (IJarRecord) reference;
- document = (CMDocumentImpl) buildCMDocumentFromJar(record.getLocation().toString());
- if (document.getSmallIcon() != null) {
- String iconPath = URIHelper.normalize(((TLDDocument) document).getSmallIcon(), record.getLocation().toString() + "!META-INF/", "/"); //$NON-NLS-1$ //$NON-NLS-2$
- document.setProperty(JSP12TLDNames.SMALL_ICON, "jar:file:" + iconPath); //$NON-NLS-1$
- }
- if (document.getLargeIcon() != null) {
- String iconPath = URIHelper.normalize(((TLDDocument) document).getLargeIcon(), record.getLocation().toString() + "!META-INF/", "/"); //$NON-NLS-1$ //$NON-NLS-2$
- document.setProperty(JSP12TLDNames.LARGE_ICON, "jar:file:" + iconPath); //$NON-NLS-1$
- }
- if (document != null && document.getElements().getLength() == 0) {
- System.out.println("failure parsing " + record.getLocation()); //$NON-NLS-1$
- }
- }
- break;
- case (ITaglibRecord.TAGDIR) : {
- // TagDirRecord record = (TagDirRecord) reference;
- // document =
- // buildCMDocumentFromDirectory(record.getLocation().toFile());
- }
- break;
- case (ITaglibRecord.URL) : {
- IURLRecord record = (IURLRecord) reference;
- InputStream urlContents = null;
- URLConnection connection = null;
- try {
- connection = record.getURL().openConnection();
- if (connection != null) {
- connection.setUseCaches(false);
- urlContents = connection.getInputStream();
- document = (CMDocumentImpl) buildCMDocument(record.getBaseLocation(), urlContents);
- if (document.getSmallIcon() != null) {
- String iconPath = URIHelper.normalize(((TLDDocument) document).getSmallIcon(), record.getURL().toString(), "/"); //$NON-NLS-1$
- document.setProperty(JSP12TLDNames.SMALL_ICON, iconPath);
- }
- if (document.getLargeIcon() != null) {
- String iconPath = URIHelper.normalize(((TLDDocument) document).getLargeIcon(), record.getURL().toString(), "/"); //$NON-NLS-1$
- document.setProperty(JSP12TLDNames.LARGE_ICON, iconPath);
- }
- }
- }
- catch (IOException e) {
- // not uncommon given invalid URLs
- }
- finally {
- if (urlContents != null) {
- try {
- urlContents.close();
- }
- catch (IOException e) {
- }
- }
- }
- }
- break;
- }
- return document;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentImpl.java
deleted file mode 100644
index 9f47c7b123..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentImpl.java
+++ /dev/null
@@ -1,445 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDDocument;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDValidator;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamespace;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.ContentModelManager;
-import org.eclipse.wst.xml.core.internal.contentmodel.annotation.AnnotationMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.internal.annotation.AnnotationFileInfo;
-import org.eclipse.wst.xml.core.internal.contentmodel.internal.annotation.AnnotationFileParser;
-
-public class CMDocumentImpl implements TLDDocument {
-
- /** Contains taginfo and/or any other misc properties*/
- private AnnotationMap fAnnotationMap = null;
-
- private Map fProperties = new HashMap(0);
-
- /**
- * Records from where this document was created
- */
- private String fBaseLocation;
- /**
- * since JSP 1.2
- */
- private String fDescription;
-
- private String fDisplayName;
-
- /**
- * NOT public API
- */
- public CMNamedNodeMapImpl fElements = new CMNamedNodeMapImpl();
-
- private List fFunctions = new ArrayList(0);
-
- // id of the taglib
- private String fId = null;
- /**
- * Children of "taglib" within a .tld file each allow
- * one Text node (#PCDATA) beneath them. Store the values
- * here for simplicity.
- */
- // The JSP specification required for this taglib to function
- private String fJSPVersion = null;
-
- private String fLargeIcon;
-
- private List fListeners;
-
- private String fParentURI = null;
- // A short name suggested as the default prefix for tags within the lib
- private String fShortName = null;
-
- private String fSmallIcon;
-
- /**
- * since JSP 2.0
- *
- * The entire element is stored here since its layout is undefined
- */
- private List fTaglibExtensions = new ArrayList(0);
-
- // Version information for the taglib itself
- private String fTLibVersion = null;
-
- // A unique public URI describing this taglib. Recommended to be the URL
- // to the descriptor
- private String fURI = null;
-
- protected TLDValidator validator;
-
- /**
- * CMDocumentImpl constructor comment.
- */
- public CMDocumentImpl() {
- super();
- }
-
- /**
- * Get the annotation map associated with this document. Lazily creates
- * and loads annotation map.
- * @return AnnotationMap
- */
- private AnnotationMap getAnnotationMap() {
- // create a new annotation map and load it up
- if (fAnnotationMap == null) {
- fAnnotationMap = new AnnotationMap();
-
- List annotationFiles = ContentModelManager.getInstance().getAnnotationFilesInfos(getUri());
- for (Iterator i = annotationFiles.iterator(); i.hasNext();) {
- try {
- AnnotationFileInfo fileInfo = (AnnotationFileInfo) i.next();
- AnnotationFileParser parser = new AnnotationFileParser();
- parser.parse(fAnnotationMap, fileInfo);
- } catch (Exception e) {
- Logger.log(Logger.WARNING_DEBUG, "Exception thrown in CMDocumentImpl#getAnnotationMap", e); //$NON-NLS-1$
- }
- }
- }
- return fAnnotationMap;
- }
- /**
- * @return Returns the baseLocation.
- */
- public String getBaseLocation() {
- return fBaseLocation;
- }
-
- /**
- * Gets the description.
- * @return Returns a String
- */
- public String getDescription() {
- return fDescription;
- }
-
- /**
- * Gets the displayName.
- * @return Returns a String
- */
- public String getDisplayName() {
- return fDisplayName;
- }
-
- /**
- * getElements method
- * @return CMNamedNodeMap
- *
- * Returns CMNamedNodeMap of ElementDeclaration
- */
- public CMNamedNodeMap getElements() {
- return fElements;
- }
-
- /**
- * getEntities method
- * @return CMNamedNodeMap
- *
- * Returns CMNamedNodeMap of EntityDeclaration
- */
- public CMNamedNodeMap getEntities() {
- return null;
- }
-
- public List getExtensions() {
- return fTaglibExtensions;
- }
- /**
- * @return Returns the functions.
- */
- public List getFunctions() {
- return fFunctions;
- }
-
- /**
- * Gets the id.
- * @return Returns a String
- */
- public String getId() {
- return fId;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getInfo() {
- return getDescription();
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getJspversion() {
- return fJSPVersion;
- }
-
- /**
- * Gets the largeIcon.
- * @return Returns a String
- */
- public String getLargeIcon() {
- return fLargeIcon;
- }
-
- public List getListeners() {
- if (fListeners == null)
- fListeners = new ArrayList();
- return fListeners;
- }
-
- /**
- * getNamespace method
- * @return CMNamespace
- */
- public CMNamespace getNamespace() {
- return null;
- }
-
- /**
- * getNodeName method
- * @return java.lang.String
- */
- public String getNodeName() {
- return "#cmdocument"; //$NON-NLS-1$
- }
-
- /**
- * getNodeType method
- * @return int
- *
- * Returns one of :
- *
- */
- public int getNodeType() {
- return CMNode.DOCUMENT;
- }
- /**
- * @return Returns the parentURI.
- */
- public String getParentURI() {
- return fParentURI;
- }
-
- /**
- * getProperty method
- * @return java.lang.Object
- *
- * Returns the object property desciped by the propertyName
- *
- */
- public Object getProperty(String propertyName) {
- if (propertyName.equals(TLDDocument.CM_KIND)) {
- return TLDDocument.JSP_TLD;
- }
- else if (propertyName.equals("annotationMap")) { //$NON-NLS-1$
- return getAnnotationMap();
- }
- return fProperties.get(propertyName);
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getShortname() {
- return fShortName;
- }
-
- /**
- * Gets the smallIcon.
- * @return Returns a String
- */
- public String getSmallIcon() {
- return fSmallIcon;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getTlibversion() {
- return fTLibVersion;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getUri() {
- return fURI;
- }
-
- /*
- * @see TLDDocument#getValidator()
- */
- public TLDValidator getValidator() {
- return validator;
- }
- /**
- * @param baseLocation The baseLocation to set.
- */
- public void setBaseLocation(String baseLocation) {
- fBaseLocation = baseLocation;
- }
-
- /**
- * Sets the description.
- * @param description The description to set
- */
- public void setDescription(String description) {
- this.fDescription = description;
- }
-
- /**
- * Sets the displayName.
- * @param displayName The displayName to set
- */
- public void setDisplayName(String displayName) {
- this.fDisplayName = displayName;
- }
-
- /**
- * Sets the id.
- * @param id The id to set
- */
- public void setId(String id) {
- this.fId = id;
- }
-
- /**
- *
- * @param newInfo java.lang.String
- */
- public void setInfo(String newInfo) {
- setDescription(newInfo);
- }
-
- /**
- *
- * @param newJspversion java.lang.String
- */
- public void setJspversion(String newJspversion) {
- fJSPVersion = newJspversion;
- }
-
- /**
- * Sets the largeIcon.
- * @param largeIcon The largeIcon to set
- */
- public void setLargeIcon(String largeIcon) {
- this.fLargeIcon = largeIcon;
- }
-
- public void setListeners(List listeners) {
- this.fListeners = listeners;
- }
- /**
- * @param parentURI The parentURI to set.
- */
- public void setParentURI(String parentURI) {
- fParentURI = parentURI;
- }
-
- public void setProperty(String property, Object value) {
- fProperties.put(property, value);
- }
-
- /**
- *
- * @param newShortname java.lang.String
- */
- public void setShortname(String newShortname) {
- fShortName = newShortname;
- }
-
- /**
- * Sets the smallIcon.
- * @param smallIcon The smallIcon to set
- */
- public void setSmallIcon(String smallIcon) {
- this.fSmallIcon = smallIcon;
- }
-
- /**
- *
- * @param newTlibversion java.lang.String
- */
- public void setTlibversion(String newTlibversion) {
- fTLibVersion = newTlibversion;
- }
-
- /**
- *
- * @param newUri java.lang.String
- */
- public void setUri(String newUri) {
- fURI = newUri;
- }
-
- public void setValidator(TLDValidator validator) {
- this.validator = validator;
- }
-
- /**
- * supports method
- * @return boolean
- *
- * Returns true if the CMNode supports a specified property
- *
- */
- public boolean supports(String propertyName) {
- if (TLDDocument.CM_KIND.equals(propertyName) || "annotationMap".equals(propertyName)) //$NON-NLS-1$
- return true;
- return fProperties.containsKey(propertyName);
- }
-
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(super.toString());
- buffer.append("\n\t short name:" + StringUtils.escape(getShortname())); //$NON-NLS-1$
- buffer.append("\n\t display name:" + StringUtils.escape(getDisplayName())); //$NON-NLS-1$
- buffer.append("\n\t description (info):" + StringUtils.escape(getDescription())); //$NON-NLS-1$
- buffer.append("\n\t URI:" + StringUtils.escape(getUri())); //$NON-NLS-1$
- buffer.append("\n\t jsp version:" + StringUtils.escape(getJspversion())); //$NON-NLS-1$
- buffer.append("\n\t taglib version:" + StringUtils.escape(getTlibversion())); //$NON-NLS-1$
- buffer.append("\n\t small icon:" + StringUtils.escape(getSmallIcon())); //$NON-NLS-1$
- buffer.append("\n\t large icon:" + StringUtils.escape(getLargeIcon())); //$NON-NLS-1$
- if (getValidator() != null)
- buffer.append("\n\t validator:" + StringUtils.replace(getValidator().toString(), "\n", "\n\t\t")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- buffer.append("\n\t listeners:"); //$NON-NLS-1$
- for (int i = 0; i < getListeners().size(); i++) {
- buffer.append("\n" + StringUtils.replace(getListeners().get(i).toString(), "\n", "\n\t\t")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- buffer.append("\n\t elements:"); //$NON-NLS-1$
- CMNamedNodeMap elements = getElements();
- for (int i = 0; i < elements.getLength(); i++) {
- buffer.append(StringUtils.replace(elements.item(i).toString(), "\n", "\n\t\t")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMElementDeclarationImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMElementDeclarationImpl.java
deleted file mode 100644
index 9866be33e6..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMElementDeclarationImpl.java
+++ /dev/null
@@ -1,461 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP11TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDDocument;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDataType;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.annotation.AnnotationMap;
-
-public class CMElementDeclarationImpl implements TLDElementDeclaration {
-
- // optional attributes
- CMNamedNodeMapImpl fAttributes = new CMNamedNodeMapImpl();
- // (empty|JSP|tagdependant|scriptless) - optional, defaults to JSP
- private String bodycontent = JSP11TLDNames.CONTENT_JSP;
-
- /**
- * since JSP 1.2
- *
- * Usage information
- */
- private String description;
-
- /**
- * since JSP 1.2
- */
- private String displayName;
-
- /**
- * since JSP 2.0
- */
- private String fExample;
-
- private CMDocument fOwnerDocument;
-
- private String fPath = null;
-
- private List fTagExtensions = new ArrayList(0);
- /**
- * since JSP 1.2
- */
- private String largeIcon;
-
-
- private int maxOccur = -1;
- private int minOccur = 0;
-
- // required tag name
- private String nodeName = null;
-
- /**
- * since JSP 1.2
- */
- private String smallIcon;
-
- // tag handler class - required
- private String tagclass = null;
-
- // tag extra info class (subclass of javax.servlet.jsp.TagExtraInfo) - optional
- private String teiclass = null;
-
- /**
- * since JSP 1.2
- */
- private List variables;
-
- /**
- * CMElementDeclarationImpl constructor comment.
- */
- public CMElementDeclarationImpl(CMDocument owner) {
- super();
- fOwnerDocument = owner;
- }
-
- /**
- * getAttributes method
- * @return CMNamedNodeMap
- *
- * Returns CMNamedNodeMap of AttributeDeclaration
- */
- public CMNamedNodeMap getAttributes() {
- return fAttributes;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getBodycontent() {
- return bodycontent;
- }
-
- /**
- * getCMContent method
- * @return CMContent
- *
- * Returns the root node of this element's content model.
- * This can be an CMElementDeclaration or a CMGroup
- */
- public CMContent getContent() {
- return null;
- }
-
- /**
- * getContentType method
- * @return int
- *
- * Returns one of :
- * ANY, EMPTY, ELEMENT, MIXED, PCDATA, CDATA.
- */
- public int getContentType() {
- if (bodycontent.equals(JSP11TLDNames.CONTENT_EMPTY))
- return EMPTY;
- if (bodycontent.equals(JSP11TLDNames.CONTENT_TAGDEPENDENT))
- return PCDATA;
- else
- // JSP
- return ANY;
- }
-
- /**
- * getDataType method
- * @return java.lang.String
- */
- public CMDataType getDataType() {
- return new CMDataTypeImpl(CMDataType.CDATA);
- }
-
- /**
- * Gets the description.
- * @return Returns a String
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * Gets the displayName.
- * @return Returns a String
- */
- public String getDisplayName() {
- return displayName;
- }
-
- /**
- * getElementName method
- * @return java.lang.String
- */
- public String getElementName() {
- return getNodeName();
- }
- /**
- * @return Returns the example.
- */
- public String getExample() {
- return fExample;
- }
- /**
- * @return Returns the extensions.
- */
- public List getExtensions() {
- return fTagExtensions;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getInfo() {
- return getDescription();
- }
-
- /**
- * Gets the largeIcon.
- * @return Returns a String
- */
- public String getLargeIcon() {
- return largeIcon;
- }
-
- /**
- * getLocalElements method
- * @return CMNamedNodeMap
- *
- * Returns a list of locally defined elements.
- */
- public CMNamedNodeMap getLocalElements() {
- return null;
- }
-
- /**
- * getMaxOccur method
- * @return int
- *
- * If -1, it's UNBOUNDED.
- */
- public int getMaxOccur() {
- return maxOccur;
- }
-
- /**
- * getMinOccur method
- * @return int
- *
- * If 0, it's OPTIONAL.
- * If 1, it's REQUIRED.
- */
- public int getMinOccur() {
- return minOccur;
- }
-
- /**
- * getNodeName method
- * @return java.lang.String
- */
- public String getNodeName() {
- return nodeName;
- }
-
- /**
- * getNodeType method
- * @return int
- *
- * Returns one of :
- *
- */
- public int getNodeType() {
- return CMNode.ELEMENT_DECLARATION;
- }
-
- /**
- * @return
- */
- public CMDocument getOwnerDocument() {
- return fOwnerDocument;
- }
- /**
- * @return Returns the path.
- */
- public String getPath() {
- return fPath;
- }
-
- /**
- * getProperty method
- * @return java.lang.Object
- *
- * Returns the object property described by the propertyName
- *
- */
- public Object getProperty(String propertyName) {
- if (propertyName != null && propertyName.equals("tagInfo")) { //$NON-NLS-1$
- return getTagInfo(); // return tag info
- // bug88336 no need to restore markers
- // return StringUtils.restoreMarkers(getTagInfo()); // return tag description
- }
- else if (propertyName != null && propertyName.equals("description")) { //$NON-NLS-1$
- return getDescription();
- // bug88336 no need to restore markers
- // return StringUtils.restoreMarkers(getDescription()); // return tag description
- }
- else if (propertyName.equals(TLDDocument.CM_KIND)) {
- return TLDDocument.JSP_TLD;
- }
- else if (propertyName.equals(JSP12TLDNames.SMALL_ICON) || propertyName.equals(JSP12TLDNames.LARGE_ICON)) {
- return getOwnerDocument().getProperty(propertyName);
- }
- return null;
- }
-
- /**
- * Gets the smallIcon.
- * @return Returns a String
- */
- public String getSmallIcon() {
- return smallIcon;
- }
-
- /**
- * Returns the XPath of this element
- * (currently just returns the node name)
- * @return
- */
- private String getSpec() {
- return getNodeName();
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getTagclass() {
- return tagclass;
- }
-
- /**
- * Get the taginfo for this current element
- * @return String taginfo if it exists, null otherwise
- */
- private String getTagInfo() {
- if (getOwnerDocument().supports("annotationMap")) { //$NON-NLS-1$
- AnnotationMap map = (AnnotationMap)getOwnerDocument().getProperty("annotationMap"); //$NON-NLS-1$
- String spec = getSpec();
- String result = map.getProperty(spec, "tagInfo"); //$NON-NLS-1$
- return result;
- // bug88336 no need to restore markers
- // return StringUtils.restoreMarkers(result); // return tag info
- }
- return null;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getTeiclass() {
- return teiclass;
- }
-
- /**
- * Gets the variables.
- * @return Returns a List
- */
- public List getVariables() {
- if (variables == null)
- variables = new ArrayList();
- return variables;
- }
-
- /**
- *
- * @param newBodycontent java.lang.String
- */
- public void setBodycontent(String newBodycontent) {
- bodycontent = newBodycontent;
- }
-
- /**
- * Sets the description.
- * @param description The description to set
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * Sets the displayName.
- * @param displayName The displayName to set
- */
- public void setDisplayName(String displayName) {
- this.displayName = displayName;
- }
- /**
- * @param example The example to set.
- */
- public void setExample(String example) {
- fExample = example;
- }
-
- /**
- * Sets the largeIcon.
- * @param largeIcon The largeIcon to set
- */
- public void setLargeIcon(String largeIcon) {
- this.largeIcon = largeIcon;
- }
-
- public void setNodeName(String string) {
- nodeName = string;
- }
- /**
- * @param path The path to set.
- */
- public void setPath(String path) {
- fPath = path;
- }
-
- /**
- * Sets the smallIcon.
- * @param smallIcon The smallIcon to set
- */
- public void setSmallIcon(String smallIcon) {
- this.smallIcon = smallIcon;
- }
-
- /**
- *
- * @param newTagclass java.lang.String
- */
- public void setTagclass(String newTagclass) {
- tagclass = newTagclass;
- }
-
- /**
- *
- * @param newTeiclass java.lang.String
- */
- public void setTeiclass(String newTeiclass) {
- teiclass = newTeiclass;
- }
-
- /**
- * Sets the variables.
- * @param variables The variables to set
- */
- public void setVariables(List variables) {
- this.variables = variables;
- }
-
- /**
- * supports method
- *
- * @return boolean
- *
- * Returns true if the CMNode supports a specified property
- *
- */
- public boolean supports(String propertyName) {
- return propertyName == null || propertyName.equals("tagInfo") || propertyName.equals(JSP12TLDNames.DESCRIPTION) || propertyName.equals(TLDDocument.CM_KIND) || propertyName.equals(JSP12TLDNames.SMALL_ICON) || propertyName.equals(JSP12TLDNames.LARGE_ICON);//$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append("\n\t " + super.toString()); //$NON-NLS-1$
- buffer.append("\n\t name:" + StringUtils.escape(getNodeName())); //$NON-NLS-1$
- buffer.append("\n\t tag class:" + StringUtils.escape(getTagclass())); //$NON-NLS-1$
- buffer.append("\n\t tei class:" + StringUtils.escape(getTeiclass())); //$NON-NLS-1$
- buffer.append("\n\t body content:" + StringUtils.escape(getBodycontent())); //$NON-NLS-1$
- buffer.append("\n\t description (info):" + StringUtils.escape(getDescription())); //$NON-NLS-1$
- buffer.append("\n\t attributes:"); //$NON-NLS-1$
- CMNamedNodeMap attributes = getAttributes();
- for (int i = 0; i < attributes.getLength(); i++) {
- buffer.append("\n\t\t" + StringUtils.replace(attributes.item(i).toString(), "\n", "\n\t\t")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- buffer.append("\n\t variables:"); //$NON-NLS-1$
- for (int i = 0; i < getVariables().size(); i++) {
- buffer.append("\n\t\t" + StringUtils.replace(getVariables().get(i).toString(), "\n", "\n\t\t")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNamedNodeMapImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNamedNodeMapImpl.java
deleted file mode 100644
index 38613f954d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNamedNodeMapImpl.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-
-
-import java.util.Hashtable;
-import java.util.Iterator;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-
-public class CMNamedNodeMapImpl implements CMNamedNodeMap {
-
- public static CMNamedNodeMapImpl EMPTY_NAMED_NODE_MAP = new CMNamedNodeMapImpl();
- protected Hashtable table = new Hashtable();
-
- /**
- * CMNamedNodeMapImpl constructor comment.
- */
- public CMNamedNodeMapImpl() {
- super();
- }
-
- Hashtable getHashtable() {
- return table;
- }
-
- /**
- * getLength method
- * @return int
- */
- public int getLength() {
- return table.size();
- }
-
- /**
- * getNamedItem method
- * @return CMNode
- * @param name java.lang.String
- */
- public CMNode getNamedItem(String name) {
- return (CMNode) table.get(name);
- }
-
- /**
- * item method
- * @return CMNode
- * @param index int
- */
- public CMNode item(int index) {
- Object result = null;
- int size = table.size();
- if (index < size) {
- Iterator values = iterator();
- for (int i = 0; i <= index; i++) {
- result = values.next();
- }
- }
- return (CMNode) result;
- }
-
- public Iterator iterator() {
- return table.values().iterator();
- }
-
- /**
- * getNamedItem method
- * @return
- * @param name java.lang.String
- * @param aNode CMNode
- */
- public void setNamedItem(String name, CMNode aNode) {
- if (name != null && aNode != null)
- table.put(name, aNode);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNodeListImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNodeListImpl.java
deleted file mode 100644
index b066cf70fb..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMNodeListImpl.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNodeList;
-
-public class CMNodeListImpl implements CMNodeList {
- static CMNodeListImpl EMPTY_NODE_LIST = new CMNodeListImpl(Collections.EMPTY_LIST);
- protected List list;
-
- public CMNodeListImpl() {
- this(new ArrayList());
- }
-
- public CMNodeListImpl(List list) {
- this.list = list;
- }
-
- public void appendItem(CMNode node) {
- list.add(node);
- }
-
- /**
- * getLength method
- * @return int
- */
- public int getLength() {
- return list.size();
- }
-
- public List getList() {
- return list;
- }
-
- /**
- * item method
- * @return CMNode
- * @param index int
- */
- public CMNode item(int index) {
- return (CMNode) list.get(index);
- }
-
- public Iterator iterator() {
- return list.iterator();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java
deleted file mode 100644
index 21161c33ad..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java
+++ /dev/null
@@ -1,1202 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Stack;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP11TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP20TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDDocument;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration;
-import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.taglib.IJarRecord;
-import org.eclipse.jst.jsp.core.taglib.ITLDRecord;
-import org.eclipse.jst.jsp.core.taglib.ITaglibIndexListener;
-import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
-import org.eclipse.jst.jsp.core.taglib.ITaglibRecordEvent;
-import org.eclipse.jst.jsp.core.taglib.IURLRecord;
-import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolverPlugin;
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker;
-import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionHandler;
-import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionHandlerExtension;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.util.Assert;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-public class TLDCMDocumentManager implements ITaglibIndexListener {
-
- protected class DirectiveStructuredDocumentRegionHandler implements StructuredDocumentRegionHandler, StructuredDocumentRegionHandlerExtension {
-
- /**
- * Adds a block tagname (fully namespace qualified) into the list of
- * block tag names for the parser. The marker
- * IStructuredDocumentRegion along with position cues during reparses
- * allow the JSPSourceParser to enable/ignore the tags as blocks.
- */
- protected void addBlockTag(String tagnameNS, IStructuredDocumentRegion marker) {
- if (getParser() == null)
- return;
- if (getParser().getBlockMarker(tagnameNS) == null) {
- getParser().addBlockMarker(new BlockMarker(tagnameNS, marker, DOMRegionContext.BLOCK_TEXT, true, false));
- if (_debug) {
- System.out.println("TLDCMDocumentManager added block marker: " + tagnameNS + "@" + marker.getStartOffset()); //$NON-NLS-2$//$NON-NLS-1$
- }
- }
- }
-
- protected void addTaglibTracker(String prefix, String uri, IStructuredDocumentRegion anchorStructuredDocumentRegion, CMDocument tldCMDocument) {
- getTaglibTrackers().add(new TaglibTracker(uri, prefix, tldCMDocument, anchorStructuredDocumentRegion));
- }
-
- /**
- * Enables a TLD owning the given prefix loaded from the given URI at
- * the anchorStructuredDocumentRegion. The list of
- * additionalCMDocuments will claim to not know any of its tags at
- * positions earlier than that IStructuredDocumentRegion's position.
- *
- * For taglib directives, the taglib is the anchor while taglibs
- * registered through include directives use the parent document's
- * include directive as their anchor.
- *
- * @param prefix
- * @param uri
- * @param anchorStructuredDocumentRegion
- */
- protected void enableTaglibFromURI(String prefix, String uri, IStructuredDocumentRegion anchorStructuredDocumentRegion) {
- if (prefix == null || uri == null || bannedPrefixes.contains(prefix))
- return;
- // Try to load the CMDocument for this URI
- CMDocument tld = getCMDocument(uri);
- if (tld == null || !(tld instanceof TLDDocument)) {
- if (_debug) {
- System.out.println("TLDCMDocumentManager failed to create a CMDocument for " + uri); //$NON-NLS-1$
- }
- return;
- }
- registerTaglib(prefix, uri, anchorStructuredDocumentRegion, tld);
- if (_debug) {
- System.out.println("TLDCMDocumentManager registered a tracker for " + uri + " with prefix " + prefix); //$NON-NLS-2$//$NON-NLS-1$
- }
- }
-
- /**
- * Enables a TLD owning the given prefix loaded from the given URI at
- * the anchorStructuredDocumentRegion. The list of
- * additionalCMDocuments will claim to not know any of its tags at
- * positions earlier than that IStructuredDocumentRegion's position.
- *
- * For taglib directives, the taglib is the anchor while taglibs
- * registered through include directives use the parent document's
- * include directive as their anchor.
- *
- * @param prefix
- * @param uri
- * @param taglibStructuredDocumentRegion
- */
- protected void enableTagsInDir(String prefix, String tagdir, IStructuredDocumentRegion taglibStructuredDocumentRegion) {
- if (prefix == null || tagdir == null || bannedPrefixes.contains(prefix))
- return;
- if (_debug) {
- System.out.println("TLDCMDocumentManager enabling tags from directory" + tagdir + " for prefix " + prefix); //$NON-NLS-2$//$NON-NLS-1$
- }
- // Try to load the CMDocument for this URI
- CMDocument tld = getImplicitCMDocument(tagdir);
- if (tld == null || !(tld instanceof TLDDocument)) {
- if (_debug) {
- System.out.println("TLDCMDocumentManager failed to create a CMDocument for director " + tagdir); //$NON-NLS-1$
- }
- return;
- }
- registerTaglib(prefix, tagdir, taglibStructuredDocumentRegion, tld);
- if (_debug) {
- System.out.println("TLDCMDocumentManager registered a tracker for directory" + tagdir + " with prefix " + prefix); //$NON-NLS-2$//$NON-NLS-1$
- }
- }
-
- public void nodeParsed(IStructuredDocumentRegion aCoreStructuredDocumentRegion) {
- // could test > 1, but since we only care if there are 8 (<%@,
- // taglib, uri, =, where, prefix, =, what) [or 4 for includes]
- if (aCoreStructuredDocumentRegion.getNumberOfRegions() > 4 && aCoreStructuredDocumentRegion.getRegions().get(1).getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- ITextRegion name = aCoreStructuredDocumentRegion.getRegions().get(1);
- try {
- if (getParser() == null) {
- Logger.log(Logger.WARNING, "Warning: parser text was requested by " + getClass().getName() + " but none was available; taglib support disabled"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- boolean taglibDetected = false;
- boolean taglibDirectiveDetected = false;
- boolean includeDetected = false;
- boolean includeDirectiveDetected = false;
- int startOffset = aCoreStructuredDocumentRegion.getStartOffset(name);
- int textLength = name.getTextLength();
-
- if (getParser() != null) {
- taglibDetected = getParser().regionMatches(startOffset, textLength, JSP12TLDNames.TAGLIB);
- taglibDirectiveDetected = getParser().regionMatches(startOffset, textLength, JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
- includeDetected = getParser().regionMatches(startOffset, textLength, JSP12TLDNames.INCLUDE);
- includeDirectiveDetected = getParser().regionMatches(startOffset, textLength, JSP12Namespace.ElementName.DIRECTIVE_INCLUDE);
- }
- else {
- // old fashioned way
- String directiveName = getParser().getText(startOffset, textLength);
- taglibDetected = directiveName.equals(JSP12TLDNames.TAGLIB);
- taglibDirectiveDetected = directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
- includeDetected = directiveName.equals(JSP12TLDNames.INCLUDE);
- includeDirectiveDetected = directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_INCLUDE);
- }
- if (taglibDetected || taglibDirectiveDetected) {
- processTaglib(aCoreStructuredDocumentRegion);
- }
- else if (includeDetected || includeDirectiveDetected) {
- processInclude(aCoreStructuredDocumentRegion);
- }
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // do nothing
- }
- }
- // could test > 1, but since we only care if there are 5 (<,
- // jsp:root, xmlns:prefix, =, where)
- else if (aCoreStructuredDocumentRegion.getNumberOfRegions() > 4 && aCoreStructuredDocumentRegion.getRegions().get(1).getType() == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME) {
- if (getParser() == null) {
- Logger.log(Logger.WARNING, "Warning: parser text was requested by " + getClass().getName() + " but none was available; taglib support disabled"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- processJSPRoot(aCoreStructuredDocumentRegion);
- }
- }
- }
-
- protected void processInclude(IStructuredDocumentRegion aCoreStructuredDocumentRegion) {
- processInclude(aCoreStructuredDocumentRegion, aCoreStructuredDocumentRegion, getParser());
- }
-
- /**
- * Process an include directive found by the textSource parser and
- * anchor any taglibs found within at the
- * anchorStructuredDocumentRegion. Includes use the including file as
- * the point of reference, not necessarily the "top" file.
- */
- protected void processInclude(IStructuredDocumentRegion includeStructuredDocumentRegion, IStructuredDocumentRegion anchorStructuredDocumentRegion, JSPSourceParser textSource) {
- ITextRegionList regions = includeStructuredDocumentRegion.getRegions();
- String includedFile = null;
- boolean isFilename = false;
- try {
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- if (textSource.getText(includeStructuredDocumentRegion.getStartOffset(region), region.getTextLength()).equals(JSP12TLDNames.FILE)) {
- isFilename = true;
- }
- else {
- isFilename = false;
- }
- }
- else if (isFilename && region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- includedFile = textSource.getText(includeStructuredDocumentRegion.getStartOffset(region), region.getTextLength());
- isFilename = false;
- }
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // nothing to be done
- includedFile = null;
- }
-
- if (includedFile != null) {
- // strip any extraneous quotes and white space
- includedFile = StringUtils.strip(includedFile).trim();
- IPath filePath = null;
- if (includedFile.startsWith("/")) { //$NON-NLS-1$
- IPath contextRoot = TaglibIndex.getContextRoot(TaglibController.getFileBuffer(TLDCMDocumentManager.this).getLocation());
- filePath = contextRoot.append(includedFile);
- }
- else {
- if (getIncludes().isEmpty())
- filePath = TaglibController.getFileBuffer(TLDCMDocumentManager.this).getLocation().removeLastSegments(1).append(includedFile);
- else
- filePath = ((IPath) getIncludes().peek()).removeLastSegments(1).append(includedFile);
- }
- // check for "loops"
- if (filePath != null && !getIncludes().contains(filePath) && !filePath.equals(TaglibController.getFileBuffer(TLDCMDocumentManager.this).getLocation())) {
- /*
- * Prevent slow performance when editing scriptlet part of
- * the JSP by only processing includes if they've been
- * modified. The IncludeHelper remembers any CMDocuments
- * created from the files it parses. Caching the URI and
- * prefix/tagdir allows us to just enable the CMDocument
- * when the previously parsed files.
- *
- * REMAINING PROBLEM: fTLDCMReferencesMap does not map
- * from a fragment's path and also include all of the CM
- * references in fragments that *it* includes. The
- * fragments that it includes won't have its CM references
- * loaded, but then we'd need to record the URI and
- * location of the included fragment to resolve them
- * correctly, modifying enableTaglib() to also take a base
- * path and resolve the URI appropriately.
- */
- if (hasAnyIncludeBeenModified(filePath)) {
- getIncludes().push(filePath);
- if (getParser() != null) {
- IncludeHelper includeHelper = new IncludeHelper(anchorStructuredDocumentRegion, getParser());
- includeHelper.parse(filePath);
- List references = includeHelper.taglibReferences;
- fTLDCMReferencesMap.put(filePath, references);
- /*
- * TODO: walk up the include hierarchy and add
- * these references to each of the parents.
- */
- }
- else
- Logger.log(Logger.WARNING, "Warning: parser text was requested by " + getClass().getName() + " but none was available; taglib support disabled"); //$NON-NLS-1$ //$NON-NLS-2$
- getIncludes().pop();
- }
- else {
- // Add from that saved list of uris/prefixes/documents
- List references = (List) fTLDCMReferencesMap.get(filePath);
- for (int i = 0; references != null && i < references.size(); i++) {
- TLDCMDocumentReference reference = (TLDCMDocumentReference) references.get(i);
- /*
- * The uri might not be resolved properly if
- * relative to the JSP fragment.
- */
- enableTaglibFromURI(reference.prefix, reference.uri, includeStructuredDocumentRegion);
-
- }
- }
- }
- else {
- if (Debug.debugTokenizer)
- System.out.println("LOOP IN @INCLUDES FOUND: " + filePath); //$NON-NLS-1$
- }
- }
- }
-
- // Pulls the URI and prefix from the given jsp:root
- // IStructuredDocumentRegion and
- // makes sure the tags are known.
- protected void processJSPRoot(IStructuredDocumentRegion jspRootStructuredDocumentRegion) {
- processJSPRoot(jspRootStructuredDocumentRegion, jspRootStructuredDocumentRegion, getParser());
- }
-
- protected void processJSPRoot(IStructuredDocumentRegion taglibStructuredDocumentRegion, IStructuredDocumentRegion anchorStructuredDocumentRegion, JSPSourceParser textSource) {
- ITextRegionList regions = taglibStructuredDocumentRegion.getRegions();
- String uri = null;
- String prefix = null;
- boolean taglib = false;
- try {
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- String name = textSource.getText(taglibStructuredDocumentRegion.getStartOffset(region), region.getTextLength());
- if (name.startsWith(XMLNS)) { //$NON-NLS-1$
- prefix = name.substring(XMLNS_LENGTH);
- if (!bannedPrefixes.contains(prefix))
- taglib = true;
- }
- else {
- prefix = null;
- taglib = false;
- }
- }
- else if (taglib && region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- uri = textSource.getText(taglibStructuredDocumentRegion.getStartOffset(region), region.getTextLength());
- if (uri != null && prefix != null && (StringUtils.strip(uri).length() > 0) && (StringUtils.strip(prefix).length() > 0)) {
- if (anchorStructuredDocumentRegion == null)
- enableTaglibFromURI(StringUtils.strip(prefix), StringUtils.strip(uri), taglibStructuredDocumentRegion);
- else
- enableTaglibFromURI(StringUtils.strip(prefix), StringUtils.strip(uri), anchorStructuredDocumentRegion);
- uri = null;
- prefix = null;
- }
- }
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // nothing to be done
- uri = null;
- prefix = null;
- }
- }
-
- protected void processTaglib(IStructuredDocumentRegion taglibStructuredDocumentRegion) {
- processTaglib(taglibStructuredDocumentRegion, taglibStructuredDocumentRegion, getParser());
- }
-
- /**
- * Pulls the URI and prefix from the given taglib directive
- * IStructuredDocumentRegion and makes sure the tags are known.
- */
- protected void processTaglib(IStructuredDocumentRegion taglibStructuredDocumentRegion, IStructuredDocumentRegion anchorStructuredDocumentRegion, JSPSourceParser textSource) {
- ITextRegionList regions = taglibStructuredDocumentRegion.getRegions();
- String uri = null;
- String prefix = null;
- String tagdir = null;
- String attrName = null;
- try {
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- // remember attribute name
- int startOffset = taglibStructuredDocumentRegion.getStartOffset(region);
- int textLength = region.getTextLength();
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- // String name = textSource.getText(startOffset,
- // textLength);
- if (textSource.regionMatches(startOffset, textLength, JSP11TLDNames.PREFIX)) {
- attrName = JSP11TLDNames.PREFIX;
- }
- else if (textSource.regionMatches(startOffset, textLength, JSP12TLDNames.URI)) {
- attrName = JSP11TLDNames.URI;
- }
- else if (textSource.regionMatches(startOffset, textLength, JSP20TLDNames.TAGDIR)) {
- attrName = JSP20TLDNames.TAGDIR;
- }
- else {
- attrName = null;
- }
- }
- // process value
- else if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- if (JSP11TLDNames.PREFIX.equals(attrName))
- prefix = textSource.getText(startOffset, textLength);
- else if (JSP11TLDNames.URI.equals(attrName))
- uri = textSource.getText(startOffset, textLength);
- else if (JSP20TLDNames.TAGDIR.equals(attrName))
- tagdir = textSource.getText(startOffset, textLength);
- }
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // nothing to be done
- uri = null;
- prefix = null;
- }
- if (uri != null && prefix != null && (StringUtils.strip(uri).length() > 0) && (StringUtils.strip(prefix).length() > 0)) {
- if (anchorStructuredDocumentRegion == null)
- enableTaglibFromURI(StringUtils.strip(prefix), StringUtils.strip(uri), taglibStructuredDocumentRegion);
- else
- enableTaglibFromURI(StringUtils.strip(prefix), StringUtils.strip(uri), anchorStructuredDocumentRegion);
- }
- else if (tagdir != null && prefix != null && (StringUtils.strip(tagdir).length() > 0) && (StringUtils.strip(prefix).length() > 0)) {
- if (anchorStructuredDocumentRegion == null)
- enableTagsInDir(StringUtils.strip(prefix), StringUtils.strip(tagdir), taglibStructuredDocumentRegion);
- else
- enableTagsInDir(StringUtils.strip(prefix), StringUtils.strip(tagdir), anchorStructuredDocumentRegion);
- }
- }
-
- private void registerTaglib(String prefix, String uri, IStructuredDocumentRegion anchorStructuredDocumentRegion, CMDocument tld) {
- CMNamedNodeMap elements = tld.getElements();
- /*
- * Go through the CMDocument for any tags that must be marked as
- * block tags starting at the anchoring IStructuredDocumentRegion.
- * As the document is edited and the IStructuredDocumentRegion
- * moved around, the block tag enablement will automatically
- * follow it.
- */
- for (int i = 0; i < elements.getLength(); i++) {
- TLDElementDeclaration ed = (TLDElementDeclaration) elements.item(i);
- if (ed.getBodycontent() == JSP12TLDNames.CONTENT_TAGDEPENDENT)
- addBlockTag(prefix + ":" + ed.getNodeName(), anchorStructuredDocumentRegion); //$NON-NLS-1$
- }
- /*
- * Since modifications to StructuredDocumentRegions adjacent to a
- * taglib directive can cause that IStructuredDocumentRegion to be
- * reported, filter out any duplicated URIs. When the taglib is
- * actually modified, a full rebuild will occur and no duplicates
- * will/should be found.
- */
- boolean doTrack = true;
- List trackers = getTaglibTrackers();
- for (int i = 0; i < trackers.size(); i++) {
- TaglibTracker tracker = (TaglibTracker) trackers.get(i);
- if (tracker.getPrefix().equals(prefix) && tracker.getURI().equals(uri)) {
- doTrack = false;
- }
- }
- if (doTrack) {
- addTaglibTracker(prefix, uri, anchorStructuredDocumentRegion, tld);
- }
- }
-
- private void resetBlockTags() {
- if (getParser() == null)
- return;
- Iterator names = getParser().getBlockMarkers().iterator();
- while (names.hasNext()) {
- BlockMarker marker = (BlockMarker) names.next();
- if (!marker.isGlobal() && marker.getContext() == DOMRegionContext.BLOCK_TEXT) {
- if (_debug) {
- System.out.println("TLDCMDocumentManager removing block tag named: " + marker.getTagName()); //$NON-NLS-1$
- }
- names.remove();
- }
- }
- }
-
- public void resetNodes() {
- if (Debug.debugTaglibs)
- System.out.println(getClass().getName() + ": resetting"); //$NON-NLS-1$
- getIncludes().clear();
- resetBlockTags();
- resetTaglibTrackers();
- }
-
- public void setStructuredDocument(IStructuredDocument newDocument) {
- Assert.isTrue(newDocument != null, "null document"); //$NON-NLS-1$
- Assert.isTrue(newDocument.getParser() != null, "null document parser"); //$NON-NLS-1$
- Assert.isTrue(newDocument.getParser() instanceof JSPSourceParser, "can only listen to document with a JSPSourceParser"); //$NON-NLS-1$
- getSourceParser().removeStructuredDocumentRegionHandler(this);
- setSourceParser((JSPSourceParser) newDocument.getParser());
- getSourceParser().addStructuredDocumentRegionHandler(this);
- }
- }
-
- protected class IncludeHelper extends DirectiveStructuredDocumentRegionHandler {
- protected IStructuredDocumentRegion fAnchor = null;
- protected JSPSourceParser fLocalParser = null;
- protected JSPSourceParser fParentParser = null;
- List taglibReferences = null;
-
- public IncludeHelper(IStructuredDocumentRegion anchor, JSPSourceParser rootParser) {
- super();
- fAnchor = anchor;
- fParentParser = rootParser;
- taglibReferences = new ArrayList(0);
- }
-
- protected void addTaglibTracker(String prefix, String uri, IStructuredDocumentRegion anchorStructuredDocumentRegion, CMDocument tldCMDocument) {
- super.addTaglibTracker(prefix, uri, anchorStructuredDocumentRegion, tldCMDocument);
- TLDCMDocumentReference reference = new TLDCMDocumentReference();
- reference.prefix = prefix;
- reference.uri = uri;
- taglibReferences.add(reference);
- }
-
- private String detectCharset(IFile file) {
- if (file.getType() == IResource.FILE && file.isAccessible()) {
- IContentDescription d = null;
- try {
- // optimized description lookup, might not succeed
- d = file.getContentDescription();
- if (d != null)
- return d.getCharset();
- }
- catch (CoreException e) {
- // should not be possible given the accessible and file
- // type
- // check above
- }
- InputStream contents = null;
- try {
- contents = file.getContents();
- IContentDescription description = Platform.getContentTypeManager().getDescriptionFor(contents, file.getName(), new QualifiedName[]{IContentDescription.CHARSET});
- if (description != null) {
- return description.getCharset();
- }
- }
- catch (IOException e) {
- // will try to cleanup in finally
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- finally {
- if (contents != null) {
- try {
- contents.close();
- }
- catch (Exception e) {
- // not sure how to recover at this point
- }
- }
- }
- }
- return ResourcesPlugin.getEncoding();
- }
-
- protected String getContents(IPath filePath) {
- StringBuffer s = new StringBuffer();
- IFile iFile = ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
- if (iFile != null && iFile.exists()) {
- String charset = detectCharset(iFile);
- InputStream contents = null;
- try {
- contents = iFile.getContents();
- Reader reader = new InputStreamReader(contents, charset);
- char[] readBuffer = new char[2048];
- int n = reader.read(readBuffer);
- while (n > 0) {
- s.append(readBuffer, 0, n);
- n = reader.read(readBuffer);
- }
- }
- catch (Exception e) {
- if (Debug.debugStructuredDocument)
- Logger.log(Logger.WARNING, "An exception occured while scanning " + filePath, e); //$NON-NLS-1$
- }
- finally {
- try {
- if (contents != null) {
- contents.close();
- }
- }
- catch (Exception e) {
- // nothing to do
- }
- }
- }
- else {
- int c = 0;
- int length = 0;
- int count = 0;
- File file = null;
- FileInputStream fis = null;
- try {
- file = new File(filePath.toString());
- length = (int) file.length();
- fis = new FileInputStream(file);
- while (((c = fis.read()) >= 0) && (count < length)) {
- count++;
- s.append((char) c);
- }
- }
- catch (FileNotFoundException e) {
- if (Debug.debugStructuredDocument)
- System.out.println("File not found : \"" + filePath + "\""); //$NON-NLS-2$//$NON-NLS-1$
- }
- catch (ArrayIndexOutOfBoundsException e) {
- if (Debug.debugStructuredDocument)
- System.out.println("Usage wrong: specify inputfile"); //$NON-NLS-1$
- //$NON-NLS-1$
- }
- catch (IOException e) {
- if (Debug.debugStructuredDocument)
- System.out.println("An I/O error occured while scanning :"); //$NON-NLS-1$
- //$NON-NLS-1$
- }
- catch (Exception e) {
- if (Debug.debugStructuredDocument)
- e.printStackTrace();
- }
- finally {
- try {
- if (fis != null) {
- fis.close();
- }
- }
- catch (Exception e) {
- // nothing to do
- }
- }
- }
- return s.toString();
- }
-
- public void nodeParsed(IStructuredDocumentRegion aCoreStructuredDocumentRegion) {
- // could test > 1, but since we only care if there are 8 (<%@,
- // taglib, uri, =, where, prefix, =, what)
- if (aCoreStructuredDocumentRegion.getNumberOfRegions() > 1 && aCoreStructuredDocumentRegion.getRegions().get(1).getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- ITextRegion name = aCoreStructuredDocumentRegion.getRegions().get(1);
- try {
- String directiveName = fLocalParser.getText(aCoreStructuredDocumentRegion.getStartOffset(name), name.getTextLength());
- if (directiveName.equals(JSP12TLDNames.TAGLIB) || directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB)) {
- processTaglib(aCoreStructuredDocumentRegion, fAnchor, fLocalParser);
- }
- if (directiveName.equals(JSP12TLDNames.INCLUDE) || directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_INCLUDE)) {
- processInclude(aCoreStructuredDocumentRegion, fAnchor, fLocalParser);
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // do nothing
- }
- }
- // could test > 1, but since we only care if there are 5 (<,
- // jsp:root, xmlns:prefix, =, where)
- else if (aCoreStructuredDocumentRegion.getNumberOfRegions() > 4 && aCoreStructuredDocumentRegion.getRegions().get(1).getType() == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME) {
- processJSPRoot(aCoreStructuredDocumentRegion, fAnchor, fLocalParser);
- }
- }
-
- /**
- * @param path -
- * the fullpath for the resource to be parsed
- */
- void parse(IPath path) {
- JSPSourceParser p = new JSPSourceParser();
- fLocalParser = p;
- List blockTags = fParentParser.getBlockMarkers();
- String s = getContents(path);
- fLocalParser.addStructuredDocumentRegionHandler(this);
- fLocalParser.reset(s);
- for (int i = 0; i < blockTags.size(); i++) {
- BlockMarker marker = (BlockMarker) blockTags.get(i);
- fLocalParser.addBlockMarker(new BlockMarker(marker.getTagName(), null, marker.getContext(), marker.isCaseSensitive()));
- }
- // force parse
- fLocalParser.getDocumentRegions();
- fLocalParser = null;
- }
-
- public void resetNodes() {
- }
- }
-
- /**
- * An entry in the shared cache map
- */
- static class TLDCacheEntry {
- CMDocument document;
- int referenceCount;
- }
-
- private static class TLDCMDocumentDescriptor {
- Object cacheKey;
- CMDocument document;
-
- TLDCMDocumentDescriptor() {
- super();
- }
- }
-
- private class TLDCMDocumentReference {
- String prefix;
- String uri;
- }
-
- static final boolean _debug = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/tldcmdocument/manager")); //$NON-NLS-1$ //$NON-NLS-2$
- static final boolean _debugCache = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/tldcmdocument/cache")); //$NON-NLS-1$ //$NON-NLS-2$
- // will hold the prefixes banned by the specification; taglibs may not use
- // them
- protected static List bannedPrefixes = null;
-
- private static Hashtable fCache = null;
- static final String XMLNS = "xmlns:"; //$NON-NLS-1$
-
- static final int XMLNS_LENGTH = XMLNS.length();
-
- static {
- bannedPrefixes = new ArrayList(7);
- bannedPrefixes.add("jsp"); //$NON-NLS-1$
- bannedPrefixes.add("jspx"); //$NON-NLS-1$
- bannedPrefixes.add("java"); //$NON-NLS-1$
- bannedPrefixes.add("javax"); //$NON-NLS-1$
- bannedPrefixes.add("servlet"); //$NON-NLS-1$
- bannedPrefixes.add("sun"); //$NON-NLS-1$
- bannedPrefixes.add("sunw"); //$NON-NLS-1$
- }
-
- /**
- * Gets all of the known documents.
- *
- * @return Returns a Hashtable of either TLDCacheEntrys or WeakReferences
- * to TLD CMDocuments
- */
- public static Hashtable getSharedDocumentCache() {
- if (fCache == null) {
- fCache = new Hashtable();
- }
- return fCache;
- }
-
-
- public static Object getUniqueIdentifier(ITaglibRecord reference) {
- Object identifier = null;
- switch (reference.getRecordType()) {
- case (ITaglibRecord.TLD) : {
- ITLDRecord record = (ITLDRecord) reference;
- identifier = record.getPath();
- }
- break;
- case (ITaglibRecord.JAR) : {
- IJarRecord record = (IJarRecord) reference;
- identifier = record.getLocation();
- }
- break;
- case (ITaglibRecord.TAGDIR) : {
- // TagDirRecord record = (TagDirRecord) reference;
- // document =
- // buildCMDocumentFromDirectory(record.getLocation().toFile());
- }
- break;
- case (ITaglibRecord.URL) : {
- IURLRecord record = (IURLRecord) reference;
- identifier = record.getURL();
- }
- break;
- default :
- identifier = reference;
- break;
- }
- return identifier;
- }
- private CMDocumentFactoryTLD fCMDocumentBuilder = null;
-
- private DirectiveStructuredDocumentRegionHandler fDirectiveHandler = null;
-
- /**
- * The locally-know list of CMDocuments
- */
- private Hashtable fDocuments = null;
-
- // timestamp cache to prevent excessive reparsing
- // of included files
- // IPath (filepath) > Long (modification stamp)
- HashMap fInclude2TimestampMap = new HashMap();
-
- private Stack fIncludes = null;
-
- private JSPSourceParser fParser = null;
-
- private List fTaglibTrackers = null;
-
- Map fTLDCMReferencesMap = new HashMap();
-
- public TLDCMDocumentManager() {
- super();
- }
-
- public void clearCache() {
- if (_debugCache) {
- System.out.println("TLDCMDocumentManager cleared its private CMDocument cache"); //$NON-NLS-1$
- }
- for (Iterator iter = getDocuments().keySet().iterator(); iter.hasNext();) {
- Object key = iter.next();
- synchronized (getSharedDocumentCache()) {
- Object o = getSharedDocumentCache().get(key);
- if (o instanceof TLDCacheEntry) {
- TLDCacheEntry entry = (TLDCacheEntry) o;
- entry.referenceCount--;
- if (entry.referenceCount <= 0) {
- getSharedDocumentCache().put(key, new WeakReference(entry.document));
- }
- }
- }
- }
- }
-
- /**
- * Derives an unique cache key for the give URI. The URI is "resolved"
- * and a unique value generated from the result. This ensures that two
- * different relative references from different files do not have overlapping
- * TLD records in the shared cache if they don't resolve to the same TLD.
- *
- * @param uri
- * @return
- */
- protected Object getCacheKey(String uri) {
- ITaglibRecord record = TaglibIndex.resolve(getCurrentParserPath().toString(), uri, false);
- if (record != null) {
- return getUniqueIdentifier(record);
- }
- String location = URIResolverPlugin.createResolver().resolve(getCurrentBaseLocation().toString(), null, uri);
- return location;
- }
-
- /**
- * Return the CMDocument at the uri (cached)
- */
- protected CMDocument getCMDocument(String uri) {
- if (uri == null || uri.length() == 0)
- return null;
- String reference = uri;
- /**
- * JSP 1.2 Specification, section 5.2.2 jsp-1_2-fcs-spec.pdf, page 87
- */
- String URNprefix = "urn:jsptld:"; //$NON-NLS-1$
- if (reference.startsWith(URNprefix)) {
- /**
- * @see section 7.3.2
- */
- if (reference.length() > URNprefix.length())
- reference = reference.substring(11);
- }
- else {
- /**
- * @see section 7.3.6
- */
- }
- Object cacheKey = getCacheKey(reference);
- CMDocument doc = (CMDocument) getDocuments().get(cacheKey);
- if (doc == null) {
- /*
- * If hasn't been moved into the local table, do so and increment
- * the count. A local URI reference can be different depending on
- * the file from which it was referenced. Use a computed key to
- * keep them straight.
- */
- Object o = getSharedDocumentCache().get(cacheKey);
- if (o != null) {
- if (o instanceof TLDCacheEntry) {
- TLDCacheEntry entry = (TLDCacheEntry) o;
- if (_debugCache) {
- System.out.println("TLDCMDocument cache hit on " + cacheKey);
- }
- doc = entry.document;
- entry.referenceCount++;
- }
- else if (o instanceof WeakReference) {
- doc = (CMDocument) ((WeakReference) o).get();
- if (doc != null) {
- TLDCacheEntry entry = new TLDCacheEntry();
- entry.document = doc;
- entry.referenceCount = 1;
- getSharedDocumentCache().put(cacheKey, entry);
- }
- }
- }
- /* No document was found cached, create a new one and share it */
- if (doc == null) {
- if (_debugCache) {
- System.out.println("TLDCMDocument cache miss on " + cacheKey);
- }
- TLDCMDocumentDescriptor descriptor = loadTaglib(reference);
- if (descriptor != null) {
- TLDCacheEntry entry = new TLDCacheEntry();
- doc = entry.document = descriptor.document;
- entry.referenceCount = 1;
- getSharedDocumentCache().put(cacheKey, entry);
- }
- }
- if (doc != null) {
- getDocuments().put(cacheKey, doc);
- }
- }
- return doc;
- }
-
- /**
- * Gets the cMDocumentBuilder.
- *
- * @return Returns a CMDocumentFactoryTLD, since it has more builder
- * methods
- */
- protected CMDocumentFactoryTLD getCMDocumentBuilder() {
- if (fCMDocumentBuilder == null)
- fCMDocumentBuilder = new CMDocumentFactoryTLD();
- return fCMDocumentBuilder;
- }
-
- public List getCMDocumentTrackers(int offset) {
- List validDocs = new ArrayList();
- Iterator alldocs = getTaglibTrackers().iterator();
- while (alldocs.hasNext()) {
- TaglibTracker aTracker = (TaglibTracker) alldocs.next();
- if (aTracker.getStructuredDocumentRegion().getStartOffset() < offset || offset < 0) {
- validDocs.add(aTracker);
- }
- }
- return validDocs;
- }
-
- public List getCMDocumentTrackers(String prefix, int offset) {
- List validDocs = new ArrayList();
- Iterator alldocs = getTaglibTrackers().iterator();
- while (alldocs.hasNext()) {
- TaglibTracker aTracker = (TaglibTracker) alldocs.next();
- if ((aTracker.getStructuredDocumentRegion().getStartOffset() < offset || offset < 0) && aTracker.getPrefix().equals(prefix)) {
- validDocs.add(aTracker);
- }
- }
- return validDocs;
- }
-
- /**
- * Return the filesystem location in the current parser. This method is
- * called while recursing through included fragments, so it much check the
- * include stack. The filesystem location is needed for common URI
- * resolution in case the Taglib Index doesn't know the URI being loaded.
- *
- * @return
- */
- IPath getCurrentBaseLocation() {
- IPath baseLocation = null;
- IPath path = getCurrentParserPath();
- baseLocation = ResourcesPlugin.getWorkspace().getRoot().getFile(path).getLocation();
- if (baseLocation == null) {
- baseLocation = path;
- }
- return baseLocation;
- }
-
- /**
- * Return the path used in the current parser. This method is called while
- * recursing through included fragments, so it much check the include
- * stack.
- *
- * @return
- */
- IPath getCurrentParserPath() {
- IPath path = null;
- if (!getIncludes().isEmpty()) {
- path = (IPath) getIncludes().peek();
- }
- else {
- path = TaglibController.getFileBuffer(this).getLocation();
- }
-
- return path;
- }
-
- protected DirectiveStructuredDocumentRegionHandler getDirectiveStructuredDocumentRegionHandler() {
- if (fDirectiveHandler == null)
- fDirectiveHandler = new DirectiveStructuredDocumentRegionHandler();
- return fDirectiveHandler;
- }
-
- /**
- * Gets the documents.
- *
- * @return Returns a java.util.Hashtable
- */
- public Hashtable getDocuments() {
- if (fDocuments == null)
- fDocuments = new Hashtable();
- return fDocuments;
- }
-
- /**
- * Return the CMDocument at the tagdir (cached)
- */
- protected CMDocument getImplicitCMDocument(String tagdir) {
- if (tagdir == null || tagdir.length() == 0)
- return null;
- String reference = tagdir;
- /**
- * JSP 1.2 Specification, section 5.2.2 jsp-1_2-fcs-spec.pdf, page 87
- */
- String URNprefix = "urn:jsptld:"; //$NON-NLS-1$
- if (reference.startsWith(URNprefix)) {
- /**
- * @see section 7.3.2
- */
- if (reference.length() > URNprefix.length())
- reference = reference.substring(11);
- }
- else {
- /**
- * @see section 7.3.6
- */
- }
- CMDocument doc = (CMDocument) getDocuments().get(reference);
- if (doc == null) {
- doc = loadTagDir(reference);
- if (doc != null)
- getDocuments().put(reference, doc);
- }
- return doc;
- }
-
- /**
- * Gets the includes.
- *
- * @return Returns a Stack
- */
- protected Stack getIncludes() {
- if (fIncludes == null)
- fIncludes = new Stack();
- return fIncludes;
- }
-
- JSPSourceParser getParser() {
- return fParser;
- }
-
- public JSPSourceParser getSourceParser() {
- return fParser;
- }
-
- public StructuredDocumentRegionHandler getStructuredDocumentRegionHandler() {
- return getDirectiveStructuredDocumentRegionHandler();
- }
-
- /**
- *
- * @return java.util.List
- */
- public List getTaglibTrackers() {
- if (fTaglibTrackers == null)
- fTaglibTrackers = new ArrayList();
- return fTaglibTrackers;
- }
-
- /**
- * @param filePath
- * the path to check for modification
- */
- boolean hasAnyIncludeBeenModified(IPath filePath) {
- boolean result = false;
- // check the top level
- if (hasBeenModified(filePath)) {
- result = true;
- }
- else {
- // check all includees
- Iterator iter = fInclude2TimestampMap.keySet().iterator();
- while (iter.hasNext()) {
- if (hasBeenModified((IPath) iter.next())) {
- result = true;
- break;
- }
- }
- }
- return result;
- }
-
- /**
- * @param filename
- * @return
- */
- boolean hasBeenModified(IPath filePath) {
- boolean result = false;
- // quick filename/timestamp cache check here...
- IFile f = null;
- if (f == null && filePath.segmentCount() > 1) {
- f = ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
- }
- if (f != null && f.exists()) {
- Long currentStamp = new Long(f.getModificationStamp());
- Object o = fInclude2TimestampMap.get(filePath);
- if (o != null) {
- Long previousStamp = (Long) o;
- // stamps don't match, file changed
- if (currentStamp.longValue() != previousStamp.longValue()) {
- result = true;
- // store for next time
- fInclude2TimestampMap.put(filePath, currentStamp);
- }
- }
- else {
- // return true, since we've not encountered this file yet.
- result = true;
- // store for next time
- fInclude2TimestampMap.put(filePath, currentStamp);
- }
- }
- return result;
- }
-
- public void indexChanged(ITaglibRecordEvent event) {}
-
- /**
- * Loads the tags from the specified URI. It must point to a URL of valid
- * tag files to work.
- */
- protected CMDocument loadTagDir(String uri) {
- ITaglibRecord reference = TaglibIndex.resolve(getCurrentParserPath().toString(), uri, false);
- if (reference != null) {
- CMDocument document = getCMDocumentBuilder().createCMDocument(reference);
- if (document != null) {
- return document;
- }
- }
- // JSP2_TODO: implement for JSP 2.0
- String location = URIResolverPlugin.createResolver().resolve(getCurrentBaseLocation().toString(), null, uri);
- if (location == null)
- return null;
- if (_debug) {
- System.out.println("Loading tags from dir" + uri + " at " + location); //$NON-NLS-2$//$NON-NLS-1$
- }
- return getCMDocumentBuilder().createCMDocument(location);
- }
-
- /**
- * Loads the taglib from the specified URI. It must point to a valid
- * taglib descriptor to work.
- */
- protected TLDCMDocumentDescriptor loadTaglib(String uri) {
- TLDCMDocumentDescriptor entry = null;
- IPath currentPath = getCurrentParserPath();
- if (currentPath != null) {
- CMDocument document = null;
- ITaglibRecord record = TaglibIndex.resolve(currentPath.toString(), uri, false);
- if (record != null) {
- document = getCMDocumentBuilder().createCMDocument(record);
- if (document != null) {
- entry = new TLDCMDocumentDescriptor();
- entry.document = document;
- entry.cacheKey = getUniqueIdentifier(record);
- }
- }
- else {
- /* Not a very-often used code path (we hope) */
- IPath currentBaseLocation = getCurrentBaseLocation();
- if (currentBaseLocation != null) {
- String location = URIResolverPlugin.createResolver().resolve(currentBaseLocation.toString(), null, uri);
- if (location != null) {
- if (_debug) {
- System.out.println("Loading tags from " + uri + " at " + location); //$NON-NLS-2$//$NON-NLS-1$
- }
- document = getCMDocumentBuilder().createCMDocument(location);
- entry = new TLDCMDocumentDescriptor();
- entry.document = document;
- entry.cacheKey = location;
- }
- }
- }
- }
- return entry;
- }
-
- protected void resetTaglibTrackers() {
- if (_debug) {
- System.out.println("TLDCMDocumentManager cleared its taglib trackers\n"); //$NON-NLS-1$
- }
- getTaglibTrackers().clear();
- }
-
- public void setSourceParser(JSPSourceParser parser) {
- if (fParser != null)
- fParser.removeStructuredDocumentRegionHandler(getStructuredDocumentRegionHandler());
- fParser = parser;
- if (fParser != null)
- fParser.addStructuredDocumentRegionHandler(getStructuredDocumentRegionHandler());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDFunctionImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDFunctionImpl.java
deleted file mode 100644
index 65c7de02ce..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDFunctionImpl.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDFunction;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-
-public class TLDFunctionImpl implements TLDFunction {
- private String fClassName = null;
- private String fDescription = null;
- private String fDisplayName = null;
- private String fExample = null;
- private List fExtensions = new ArrayList(0);
- private String fIcon = null;
- private String fName = null;
-
- private CMDocument fOwnerDocument = null;
- private String fSignature = null;
-
- public TLDFunctionImpl(CMDocument owner) {
- super();
- fOwnerDocument = owner;
- }
-
- /**
- * @return Returns the className.
- */
- public String getClassName() {
- return fClassName;
- }
- /**
- * @return Returns the description.
- */
- public String getDescription() {
- return fDescription;
- }
-
- /**
- * @return Returns the displayName.
- */
- public String getDisplayName() {
- return fDisplayName;
- }
-
- /**
- * @return Returns the example.
- */
- public String getExample() {
- return fExample;
- }
-
- /**
- * @return Returns the extensions.
- */
- public List getExtensions() {
- return fExtensions;
- }
-
- /**
- * @return Returns the icon.
- */
- public String getIcon() {
- return fIcon;
- }
-
- /**
- * @return Returns the name.
- */
- public String getName() {
- return fName;
- }
-
- /**
- * @return Returns the ownerDocument.
- */
- public CMDocument getOwnerDocument() {
- return fOwnerDocument;
- }
-
- /**
- * @return Returns the signature.
- */
- public String getSignature() {
- return fSignature;
- }
-
- /**
- * @param className
- * The className to set.
- */
- public void setClassName(String className) {
- fClassName = className;
- }
- /**
- * @param description The description to set.
- */
- public void setDescription(String description) {
- fDescription = description;
- }
-
- /**
- * @param displayName
- * The displayName to set.
- */
- public void setDisplayName(String displayName) {
- fDisplayName = displayName;
- }
-
- /**
- * @param example
- * The example to set.
- */
- public void setExample(String example) {
- fExample = example;
- }
-
- /**
- * @param icon
- * The icon to set.
- */
- public void setIcon(String icon) {
- fIcon = icon;
- }
-
- /**
- * @param name
- * The name to set.
- */
- public void setName(String name) {
- fName = name;
- }
-
- /**
- * @param signature
- * The signature to set.
- */
- public void setSignature(String signature) {
- fSignature = signature;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDInitParamImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDInitParamImpl.java
deleted file mode 100644
index 451b2a2e20..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDInitParamImpl.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 9, 2003
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDInitParam;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-
-
-public class TLDInitParamImpl implements TLDInitParam {
- private String description;
- private String name;
- private String value;
-
- public TLDInitParamImpl() {
- super();
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getName() {
- return name;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(super.toString());
- buffer.append("\n\t name:" + StringUtils.escape(getName())); //$NON-NLS-1$
- buffer.append("\n\t description:" + StringUtils.escape(getDescription())); //$NON-NLS-1$
- buffer.append("\n\t value:" + StringUtils.escape(getValue())); //$NON-NLS-1$
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDListenerImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDListenerImpl.java
deleted file mode 100644
index 011ae6fbfd..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDListenerImpl.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 9, 2003
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDListener;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-
-
-public class TLDListenerImpl implements TLDListener {
- protected String listenerClass;
-
- public String getListenerClass() {
- return listenerClass;
- }
-
- public void setListenerClass(String className) {
- listenerClass = className;
- }
-
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(super.toString());
- buffer.append("\n\t listener class:" + StringUtils.escape(getListenerClass())); //$NON-NLS-1$
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDValidatorImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDValidatorImpl.java
deleted file mode 100644
index 16b6f2009d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDValidatorImpl.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Sep 9, 2003
- *
- * To change the template for this generated file go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
- */
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDValidator;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-
-
-public class TLDValidatorImpl implements TLDValidator {
- protected List initParams;
- protected String validatorClass;
-
- public List getInitParams() {
- if (initParams == null)
- initParams = new ArrayList();
- return initParams;
- }
-
- public String getValidatorClass() {
- return validatorClass;
- }
-
- public void setInitParams(List initParams) {
- this.initParams = initParams;
- }
-
- public void setValidatorClass(String validatorClass) {
- this.validatorClass = validatorClass;
- }
-
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(super.toString());
- buffer.append("\n\t validator class:" + StringUtils.escape(getValidatorClass())); //$NON-NLS-1$
- buffer.append("\n\t init-parms:"); //$NON-NLS-1$
- for (int i = 0; i < getInitParams().size(); i++) {
- buffer.append("\n" + StringUtils.replace(getInitParams().get(i).toString(), "\n", "\n\t\t")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDVariableImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDVariableImpl.java
deleted file mode 100644
index 7998305831..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDVariableImpl.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDVariable;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-
-
-public class TLDVariableImpl implements TLDVariable {
- // optional - defaults to true
- private boolean declare = true;
-
- private String fDescription;
- // required
- private String nameFromAttribute;
- // required
- private String nameGiven;
- // optional - defaults to NESTED
- private String scope = JSP12TLDNames.VARIABLE_SCOPE_NESTED;
- // required - defaults to a String
- private String variableClass = "java.lang.String"; //$NON-NLS-1$
-
- public boolean getDeclare() {
- return declare;
- }
-
- /**
- * @return Returns the description.
- */
- public String getDescription() {
- return fDescription;
- }
-
- public String getNameFromAttribute() {
- return nameFromAttribute;
- }
-
- public String getNameGiven() {
- return nameGiven;
- }
-
- public String getScope() {
- return scope;
- }
-
- public String getVariableClass() {
- return variableClass;
- }
-
- public void setDeclare(boolean declare) {
- this.declare = declare;
- }
-
- public void setDeclareString(String decl) {
- setDeclare(decl.equals(JSP12TLDNames.TRUE) || decl.equals(JSP12TLDNames.YES));
- }
- /**
- * @param description The description to set.
- */
- public void setDescription(String description) {
- fDescription = description;
- }
-
- public void setNameFromAttribute(String nameFromAttribute) {
- this.nameFromAttribute = nameFromAttribute;
- }
-
- public void setNameGiven(String nameGiven) {
- this.nameGiven = nameGiven;
- }
-
- public void setScope(String scope) {
- this.scope = scope;
- }
-
- public void setVariableClass(String variableClass) {
- this.variableClass = variableClass;
- }
-
- public String toString() {
- StringBuffer buffer = new StringBuffer();
- buffer.append(super.toString());
- buffer.append("\n\t name given:" + StringUtils.escape(getNameGiven())); //$NON-NLS-1$
- buffer.append("\n\t name from attribute:" + StringUtils.escape(getNameFromAttribute())); //$NON-NLS-1$
- // Boolean.toString(boolean) is introduced in JDK 1.4
- //buffer.append("\n\t declare:" + StringUtils.escape(Boolean.toString(getDeclare())));
- buffer.append("\n\t declare:" + StringUtils.toString(getDeclare())); //$NON-NLS-1$
- buffer.append("\n\t scope:" + StringUtils.escape(getScope())); //$NON-NLS-1$
- buffer.append("\n\t variable class:" + StringUtils.escape(getVariableClass())); //$NON-NLS-1$
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TaglibTracker.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TaglibTracker.java
deleted file mode 100644
index fcd90af475..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TaglibTracker.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld;
-
-
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.CMDocumentWrapperImpl;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocumentTracker;
-
-/**
- * TaglibTracker class
- */
-public class TaglibTracker extends CMDocumentWrapperImpl implements CMDocumentTracker {
-
- private IStructuredDocumentRegion fStructuredDocumentRegion;
-
- public TaglibTracker(String newURI, String newPrefix, CMDocument tld, IStructuredDocumentRegion aStructuredDocumentRegion) {
- super(newURI, newPrefix, tld);
- fStructuredDocumentRegion = aStructuredDocumentRegion;
- }
-
- public IStructuredDocumentRegion getStructuredDocumentRegion() {
- return fStructuredDocumentRegion;
- }
-
- public String toString() {
- if (getStructuredDocumentRegion() != null)
- return getPrefix() + "@" + getStructuredDocumentRegion().getStartOffset(); //$NON-NLS-1$
- return super.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP11TLDNames.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP11TLDNames.java
deleted file mode 100644
index 6a484dc6a7..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP11TLDNames.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*nlsXXX*/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional;
-
-public interface JSP11TLDNames {
-
- String TAGLIB = "taglib"; //$NON-NLS-1$
-
- String CONTENT_JSP = "JSP"; //$NON-NLS-1$
- String CONTENT_EMPTY = "empty"; //$NON-NLS-1$
- String CONTENT_TAGDEPENDENT = "tagdependent"; //$NON-NLS-1$
-
- String TAG = "tag"; //$NON-NLS-1$
- String JSPVERSION = "jspversion"; //$NON-NLS-1$
- String TLIBVERSION = "tlibversion"; //$NON-NLS-1$
- String SHORTNAME = "shortname"; //$NON-NLS-1$
- String URI = "uri"; //$NON-NLS-1$
- String URN = "urn"; //$NON-NLS-1$
- String INFO = "info"; //$NON-NLS-1$
-
- String NAME = "name"; //$NON-NLS-1$
- String TEICLASS = "teiclass"; //$NON-NLS-1$
- String TAGCLASS = "tagclass"; //$NON-NLS-1$
- String BODYCONTENT = "bodycontent"; //$NON-NLS-1$
- String ATTRIBUTE = "attribute"; //$NON-NLS-1$
-
- String ID = "id"; //$NON-NLS-1$
- String REQUIRED = "required"; //$NON-NLS-1$
- String RTEXPRVALUE = "rtexprvalue"; //$NON-NLS-1$
-
- String PREFIX = "prefix"; //$NON-NLS-1$
-
- String INCLUDE = "include"; //$NON-NLS-1$
- String FILE = "file"; //$NON-NLS-1$
-
- String TRUE = "true"; //$NON-NLS-1$
- String FALSE = "false"; //$NON-NLS-1$
- String YES = "yes"; //$NON-NLS-1$
- String NO = "no"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP12TLDNames.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP12TLDNames.java
deleted file mode 100644
index 7072988780..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP12TLDNames.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*nlsXXX*/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional;
-
-public interface JSP12TLDNames {
-
- String TAGLIB = JSP11TLDNames.TAGLIB;
-
- String CONTENT_JSP = JSP11TLDNames.CONTENT_JSP;
- String CONTENT_EMPTY = JSP11TLDNames.CONTENT_EMPTY;
- String CONTENT_TAGDEPENDENT = JSP11TLDNames.CONTENT_TAGDEPENDENT;
-
- String TAG = JSP11TLDNames.TAG;
- String JSP_VERSION = "jsp-version"; //$NON-NLS-1$
- String TLIB_VERSION = "tlib-version"; //$NON-NLS-1$
- String SHORT_NAME = "short-name"; //$NON-NLS-1$
- String URI = JSP11TLDNames.URI;
- String URN = JSP11TLDNames.URN;
-
- String NAME = JSP11TLDNames.NAME;
- String TEI_CLASS = "tei-class"; //$NON-NLS-1$
- String TAG_CLASS = "tag-class"; //$NON-NLS-1$
- String BODY_CONTENT = "body-content"; //$NON-NLS-1$
- String ATTRIBUTE = JSP11TLDNames.ATTRIBUTE;
-
- String ID = JSP11TLDNames.ID;
- String REQUIRED = JSP11TLDNames.REQUIRED;
- String RTEXPRVALUE = JSP11TLDNames.RTEXPRVALUE;
-
- String PREFIX = JSP11TLDNames.PREFIX;
-
- String INCLUDE = JSP11TLDNames.INCLUDE;
- String FILE = JSP11TLDNames.FILE;
-
- String TRUE = JSP11TLDNames.TRUE;
- String FALSE = JSP11TLDNames.FALSE;
- String YES = JSP11TLDNames.YES;
- String NO = JSP11TLDNames.NO;
-
- /*
- * @see Eclipse JSP 1.2
- */
- String DESCRIPTION = "description"; //$NON-NLS-1$
- String DISPLAY_NAME = "display-name"; //$NON-NLS-1$
- String SMALL_ICON = "small-icon"; //$NON-NLS-1$
- String LARGE_ICON = "large-icon"; //$NON-NLS-1$
-
-
- String VALIDATOR = "validator"; //$NON-NLS-1$
- String VALIDATOR_CLASS = "validator-class"; //$NON-NLS-1$
- String VALIDATOR_INIT_PARAM = "init-param"; //$NON-NLS-1$
- String VALIDATOR_PARAM_NAME = "param-name"; //$NON-NLS-1$
- String VALIDATOR_PARAM_VALUE = "param-value"; //$NON-NLS-1$
-
-
- String LISTENER = "listener"; //$NON-NLS-1$
- String LISTENER_CLASS = "listener-class"; //$NON-NLS-1$
-
- String VARIABLE = "variable"; //$NON-NLS-1$
- String VARIABLE_NAME_GIVEN = "name-given"; //$NON-NLS-1$
- String VARIABLE_NAME_FROM_ATTRIBUTE = "name-from-attribute"; //$NON-NLS-1$
- String VARIABLE_CLASS = "variable-class"; //$NON-NLS-1$
- String VARIABLE_DECLARE = "declare"; //$NON-NLS-1$
- String VARIABLE_SCOPE = "scope"; //$NON-NLS-1$
- String VARIABLE_SCOPE_NESTED = "NESTED"; //$NON-NLS-1$
- String VARIABLE_SCOPE_AT_BEGIN = "AT_BEGIN"; //$NON-NLS-1$
- String VARIABLE_SCOPE_AT_END = "AT_END"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP20TLDNames.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP20TLDNames.java
deleted file mode 100644
index ea51e195c4..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP20TLDNames.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional;
-
-/*nlsXXX*/
-public interface JSP20TLDNames extends JSP12TLDNames {
- String CONTENT_SCRIPTLESS = "scriptless"; //$NON-NLS-1$
- String EXAMPLE = "example"; //$NON-NLS-1$
- String FRAGMENT = "fragment"; //$NON-NLS-1$
- String FUNCTION = "function"; //$NON-NLS-1$
- String FUNCTION_CLASS = "function-class"; //$NON-NLS-1$
- String FUNCTION_EXTENSION = "function-extension"; //$NON-NLS-1$
- String FUNCTION_SIGNATURE = "function-signature"; //$NON-NLS-1$
- String ICON = "icon"; //$NON-NLS-1$
- String PATH = "path"; //$NON-NLS-1$
- String TAG_EXTENSION = "tag-extension"; //$NON-NLS-1$
- String TAG_FILE = "tag-file"; //$NON-NLS-1$
-
- String TAGDIR = "tagdir"; //$NON-NLS-1$
-
- String TAGLIB_EXTENSION = "taglib-extension"; //$NON-NLS-1$
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDAttributeDeclaration.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDAttributeDeclaration.java
deleted file mode 100644
index af38bf9edf..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDAttributeDeclaration.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional;
-
-
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-
-/**
- * Represents an attribute definition from a TLD
- */
-public interface TLDAttributeDeclaration extends CMAttributeDeclaration {
-
- /**
- * a description of the attribute
- * @return String
- * @see JSP 2.0
- */
- String getDescription();
-
- /**
- * the attribute's name
- * @see JSP 1.1
- */
- String getId();
-
- CMDocument getOwnerDocument();
-
- /**
- * whether the attribute's value may be dynamically calculated at runtime by an expression
- * @see JSP 1.1
- */
- String getRtexprvalue();
-
- /**
- * the type of the attribute's value
- * @see JSP 1.2
- */
- String getType();
-
- /**
- * whether this attribute is a fragment
- *
- * @return boolean
- */
- boolean isFragment();
-
- /**
- * if the attribute is required or optional
- * @see JSP 1.1
- */
- boolean isRequired();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDDocument.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDDocument.java
deleted file mode 100644
index 821a6bc8f1..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDDocument.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional;
-
-import java.util.List;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-
-public interface TLDDocument extends CMDocument {
-
- String CM_KIND = "Content Model Kind"; //$NON-NLS-1$
- String JSP_TLD = "JSP Tag Library Descriptor"; //$NON-NLS-1$
-
- /**
- * @see JSP 2.0
- *
- * @return
- */
- String getBaseLocation();
-
- /**
- * @return String - The contents of the "description" element of a JSP 1.2 tag library descriptor; a simple string describing the "use" of this taglib, should be user discernable.
- * @see JSP 1.2
- */
- String getDescription();
-
- /**
- * @return String - The contents of the "display-name" element of a JSP 1.2 tag library descriptor; it is a short name that is intended to be displayed by tools
- * @see JSP 1.2
- */
- String getDisplayName();
-
- /**
- * @return List - A list of extension elements describing the tag library
- * @see JSP 2.0
- */
- List getExtensions();
-
- /**
- * @return List - A list of TLDFunctions describing the declared functions
- * @see JSP 2.0
- */
- List getFunctions();
-
- /**
- * @return String - The contents of the "info" element of a JSP 1.1 tag library descriptor; a simple string describing the "use" of this taglib, should be user discernable.
- * @see JSP 1.1
- */
- String getInfo();
-
- /**
- * @return String - The version of JSP the tag library depends upon
- * @see JSP 1.1
- */
- String getJspversion();
-
- /**
- * @return String - The contents of the "large-icon" element of a JSP 1.2 tag library descriptor; optional large-icon that can be used by tools
- * @see JSP 1.2
- */
- String getLargeIcon();
-
- /**
- * @see JSP 1.2
- * @return List - a List of TLDListeners
- */
- List getListeners();
-
- /**
- * @return String - A simple default short name that could be used by a JSP authoring tool to create names with a mnemonic value; for example, it may be used as the preferred prefix value in taglib directives
- * @see JSP 1.1
- */
- String getShortname();
-
- /**
- * @return String - The contents of the "small-icon" element of a JSP 1.2 tag library descriptor; optional small-icon that can be used by tools
- * @see JSP 1.2
- */
- String getSmallIcon();
-
- /**
- * @return String - The version of the tag library (it's implementation)
- * @see JSP 1.1
- */
- String getTlibversion();
-
- /**
- * @return String - the URI declared within the descriptor
- * @see JSP 1.1
- */
- String getUri();
-
- /**
- * @see JSP 1.2
- */
- TLDValidator getValidator();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDElementDeclaration.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDElementDeclaration.java
deleted file mode 100644
index dd1ac340ca..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDElementDeclaration.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional;
-
-import java.util.List;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-
-public interface TLDElementDeclaration extends CMElementDeclaration {
-
- /**
- * The body content type
- *
- * @see JSP 1.1
- */
- String getBodycontent();
-
- /**
- * Optional tag-specific information
- *
- * @see JSP 1.2
- */
- String getDescription();
-
- /**
- * A short name that is intended to be displayed by tools
- *
- * @see JSP 1.2
- */
- String getDisplayName();
-
- /**
- * Optional informal description of an example of a use of this tag
- *
- * @see JSP 2.0
- */
- String getExample();
-
- /**
- * Zero or more extensions that provide extra information about this tag,
- * for tool consumption
- *
- * @see JSP 2.0
- */
- List getExtensions();
-
- /**
- * Optional tag-specific information
- *
- * @see JSP 1.1
- */
- String getInfo();
-
- /**
- * Name of an optional large icon that can be used by tools
- *
- * @see JSP 1.2
- */
- String getLargeIcon();
-
- CMDocument getOwnerDocument();
-
- /**
- * Where to find the .tag file implementing this action, relative to the
- * root of the web application or the root of the JAR file for a tag
- * library packaged in a JAR. This must begin with /WEB-INF/tags if the
- * .tag file resides in the WAR, or /META-INF/tags if the .tag file
- * resides in a JAR.
- *
- *
- * @return the path to the .tag(x) file as defined in the .tld file, null
- * if internal to the .tld
- * @see JSP 2.0
- */
- String getPath();
-
- /**
- * Name of an optional small icon that can be used by tools
- *
- * @see JSP 1.2
- */
- String getSmallIcon();
-
- /**
- * The name of the tag handler class implementing
- * javax.servlet.jsp.tagext.Tag
- *
- * @see JSP 1.1
- */
- String getTagclass();
-
- /**
- * The name of an optional subclass of
- * javax.servlet.jsp.tagext.TagExtraInfo
- *
- * @see JSP 1.1
- */
- String getTeiclass();
-
- /**
- * @see JSP 1.2
- * @return List of TLDVariables
- */
- List getVariables();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDFunction.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDFunction.java
deleted file mode 100644
index 8f2b50ab76..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDFunction.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional;
-
-import java.util.List;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-
-public interface TLDFunction {
-
- String getClassName();
-
- String getDescription();
-
- String getDisplayName();
-
- String getExample();
-
- List getExtensions();
-
- String getIcon();
-
- String getName();
-
- CMDocument getOwnerDocument();
-
- String getSignature();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDInitParam.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDInitParam.java
deleted file mode 100644
index 0e33654d6b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDInitParam.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional;
-
-
-/**
- * A name/value pair as an initialization param along with a description
- * @see JSP 1.2
- */
-public interface TLDInitParam {
- String getDescription();
-
- /**
- * The param-name element contains the name of a parameter.
- */
- String getName();
-
- /**
- * The param-value element contains the name of a parameter.
- */
- String getValue();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDListener.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDListener.java
deleted file mode 100644
index 64915b9623..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDListener.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional;
-
-
-/**
- * Defines an optional event listener object to be instantiated and registered automatically
- * @see JSP 1.2
- */
-public interface TLDListener {
- String getListenerClass();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDValidator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDValidator.java
deleted file mode 100644
index d98a88c123..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDValidator.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional;
-
-import java.util.List;
-
-
-/**
- * Defines an optional validator that can be used to validate the conformance of a JSP page to using this tag library
- * @see JSP 1.2
- */
-public interface TLDValidator {
- /**
- * @return List - a List of TLDInitParams
- */
- List getInitParams();
-
- String getValidatorClass();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDVariable.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDVariable.java
deleted file mode 100644
index 395cbabc8d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDVariable.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional;
-
-/**
- * Information on the scripting variables defined by this tag.
- * @see JSP 1.2
- */
-public interface TLDVariable {
-
- /**
- * Whether the variable is declared or not, true is the default.
- */
- boolean getDeclare();
-
- /**
- * @returnthe the description for this variable
- */
- String getDescription();
-
- /**
- * The name of an attribute whose (translation time) value will give the name of the variable, or null of the name is not to be obtained this way.
- */
- String getNameFromAttribute();
-
- /**
- * The variable name given as a constant, or null of the name is not specified.
- */
- String getNameGiven();
-
- /**
- * The scope of the scripting variable defined.
- */
- String getScope();
-
- /**
- * Name of the class of the variable, java.lang.String if null
- */
- String getVariableClass();
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentproperties/JSPFContentProperties.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentproperties/JSPFContentProperties.java
deleted file mode 100644
index 2ece904611..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentproperties/JSPFContentProperties.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentproperties;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * Properties constants used by JSP Fragments. Clients should only read and
- * modify the JSP Fragment properties programmatically using this class.
- *
- * @since 1.1
- */
-public class JSPFContentProperties {
- static final String JSPCORE_ID = JSPCorePlugin.getDefault().getBundle().getSymbolicName();
- private static final String PROJECT_KEY = "<project>"; //$NON-NLS-1$
-
- /**
- * A named key that controls the default language for JSP Fragments
- * <p>
- * Value is of type <code>String</code>.
- * </p>
- *
- * @since 1.1
- */
- public static final String JSPLANGUAGE = "jsp-language"; //$NON-NLS-1$
- /**
- * A named key that controls the default content type for JSP Fragments
- * <p>
- * Value is of type <code>String</code>.
- * </p>
- *
- * @since 1.1
- */
- public static final String JSPCONTENTTYPE = "jsp-content-type"; //$NON-NLS-1$
- /**
- * Indicates if JSP fragments should be compiled/validated. JSP fragments
- * will be validated when true.
- * <p>
- * Value is of type <code>String</code>.
- * </p>
- *
- * @since 1.1
- */
- public static final String VALIDATE_FRAGMENTS = "validateFragments";//$NON-NLS-1$
-
- /**
- * Generates a preference key based on resourcePath
- *
- * @param resourcePath
- * the path the key will be based off of
- * @return preference key based on resourcePath (basically the
- * resourcePath without the filename); PROJECT_KEY if resourcePath
- * is null
- */
- static String getKeyFor(IPath resourcePath) {
- String key = PROJECT_KEY;
- if (resourcePath != null && resourcePath.segmentCount() > 1) {
- key = resourcePath.removeFirstSegments(1).toString();
- }
- return key;
- }
-
- /**
- * Get the preferences node associated with the given project scope and
- * preference key (subNode) If create is true, the preference node will be
- * created if one does not already exist
- *
- * @param project
- * the project the preference node is under
- * @param preferenceKey
- * the subnode/category the preference node is located in
- * @param create
- * if true, a preference node will be created if one does not
- * already exist
- * @return Preferences associated with the given project scope and
- * preference key. null if one could not be found and create is
- * false
- */
- static Preferences getPreferences(IProject project, String preferenceKey, boolean create) {
- if (create)
- // create all nodes down to the one we are interested in
- return new ProjectScope(project).getNode(JSPCORE_ID).node(preferenceKey);
- // be careful looking up for our node so not to create any nodes as
- // side effect
- Preferences node = Platform.getPreferencesService().getRootNode().node(ProjectScope.SCOPE);
- try {
- // TODO once bug 90500 is fixed, should be as simple as this:
- // String path = project.getName() + IPath.SEPARATOR +
- // ResourcesPlugin.PI_RESOURCES + IPath.SEPARATOR +
- // ENCODING_PREF_NODE;
- // return node.nodeExists(path) ? node.node(path) : null;
- // for now, take the long way
- if (!node.nodeExists(project.getName()))
- return null;
- node = node.node(project.getName());
- if (!node.nodeExists(JSPCORE_ID))
- return null;
- node = node.node(JSPCORE_ID);
- if (!node.nodeExists(preferenceKey))
- return null;
- return node.node(preferenceKey);
- }
- catch (BackingStoreException e) {
- // nodeExists failed
- Logger.log(Logger.WARNING_DEBUG, "Could not retrieve preference node", e); //$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * Returns the value for the given key in the given context.
- *
- * @param key
- * The property key
- * @param resource
- * The current context or <code>null</code> if no context is
- * available and the workspace setting should be taken. Note
- * that passing <code>null</code> should be avoided.
- * @param recurse
- * whether the parent should be queried till property is found
- * @return Returns the current value for the key.
- * @since 1.1
- */
- public static String getProperty(String key, IResource resource, boolean recurse) {
- String val = null;
- if (resource != null) {
- IProject project = resource.getProject();
- if (project != null) {
- Preferences preferences = getPreferences(project, key, false);
- if (preferences != null) {
- val = internalGetProperty(resource, recurse, preferences);
- }
- }
- }
- // no preferences found - for performance reasons,
- // short-circuit
- // lookup by falling back to workspace's default
- // setting
- if (val == null && recurse)
- val = getWorkbenchPreference(key);
- return val;
- }
-
- private static String getWorkbenchPreference(String key) {
- return Platform.getPreferencesService().getString(JSPCORE_ID, key, null, null);
- }
-
- private static String internalGetProperty(IResource resource, boolean recurse, Preferences preferences) {
- String value = preferences.get(getKeyFor(resource.getFullPath()), null);
- if (value == null && resource != resource.getProject() && recurse) {
- value = preferences.get(getKeyFor(null), null);
- }
-
- return value;
- }
-
- /**
- * Sets the value for the given key in the given context.
- *
- * @param key
- * The property key
- * @param resource
- * The current context. Note context cannot be
- * <code>null</code>.
- * @param value
- * The value to set for the key. If value is <code>null</code>
- * the key is removed from properties.
- * @since 1.1
- */
- public static void setProperty(String key, IResource resource, String value) throws CoreException {
- if (resource != null) {
- IProject project = resource.getProject();
- if (project != null) {
- Preferences preferences = getPreferences(project, key, true);
- if (value == null || value.trim().length() == 0)
- preferences.remove(getKeyFor(resource.getFullPath()));
- else
- preferences.put(getKeyFor(resource.getFullPath()), value);
- try {
- // save changes
- preferences.flush();
- }
- catch (BackingStoreException e) {
- throw new CoreException(new Status(IStatus.ERROR, JSPCORE_ID, IStatus.ERROR, "Unable to set property", e)); //$NON-NLS-1$
- }
- }
- }
- // Workbench preference may not be needed so leave out for now
- // just set a preference in the instance scope
- // if (!preferenceFound) {
- // setWorkbenchPreference(key);
- // }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentproperties/JSPFContentPropertiesManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentproperties/JSPFContentPropertiesManager.java
deleted file mode 100644
index d3cd4cff9a..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentproperties/JSPFContentPropertiesManager.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contentproperties;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceStatus;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.Bundle;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-public class JSPFContentPropertiesManager {
- public JSPFContentPropertiesManager() {
- super();
- fResourceChangeListener = new ResourceChangeListener();
- fJob = new ContentPropertiesManagerJob();
- }
-
- private static JSPFContentPropertiesManager _instance = null;
- private IResourceChangeListener fResourceChangeListener;
- ContentPropertiesManagerJob fJob;
-
- /**
- * This job implementation is used to allow the resource change listener
- * to schedule operations that need to modify the workspace.
- */
- private class ContentPropertiesManagerJob extends Job {
- private static final int PROPERTIES_UPDATE_DELAY = 500;
- private List asyncChanges = new ArrayList();
-
- public ContentPropertiesManagerJob() {
- super(JSPCoreMessages.JSPFContentPropertiesManager_Updating);
- setSystem(true);
- setPriority(Job.INTERACTIVE);
- }
-
- public void addChanges(Set newChanges) {
- if (newChanges.isEmpty())
- return;
- synchronized (asyncChanges) {
- asyncChanges.addAll(newChanges);
- asyncChanges.notify();
- }
- schedule(PROPERTIES_UPDATE_DELAY);
- }
-
- public IProject getNextChange() {
- synchronized (asyncChanges) {
- return asyncChanges.isEmpty() ? null : (IProject) asyncChanges.remove(asyncChanges.size() - 1);
- }
- }
-
- protected IStatus run(IProgressMonitor monitor) {
- MultiStatus result = new MultiStatus(JSPFContentProperties.JSPCORE_ID, IResourceStatus.FAILED_SETTING_CHARSET, JSPCoreMessages.JSPFContentPropertiesManager_Updating, null);
- monitor = monitor == null ? new NullProgressMonitor() : monitor;
- try {
- monitor.beginTask(JSPCoreMessages.JSPFContentPropertiesManager_Updating, asyncChanges.size());
- try {
- IProject next;
- while ((next = getNextChange()) != null) {
- // just exit if the system is shutting down or has
- // been shut down
- // it is too late to change the workspace at this
- // point anyway
- if (Platform.getBundle("org.eclipse.osgi").getState() != Bundle.ACTIVE) //$NON-NLS-1$
- return Status.OK_STATUS;
- try {
- // save the preferences nodes
- if (next.isAccessible()) {
- // save content type preferences
- Preferences projectPrefs = JSPFContentProperties.getPreferences(next, JSPFContentProperties.JSPCONTENTTYPE, false);
- if (projectPrefs != null)
- projectPrefs.flush();
- // save language preferences
- projectPrefs = JSPFContentProperties.getPreferences(next, JSPFContentProperties.JSPLANGUAGE, false);
- if (projectPrefs != null)
- projectPrefs.flush();
-
- }
- }
- catch (BackingStoreException e) {
- // we got an error saving
- String detailMessage = NLS.bind(JSPCoreMessages.JSPFContentPropertiesManager_Problems_Updating, next.getFullPath());
- result.add(new Status(1 << (IResourceStatus.FAILED_SETTING_CHARSET % 100 / 33), ResourcesPlugin.PI_RESOURCES, IResourceStatus.FAILED_SETTING_CHARSET, detailMessage, e));
- }
- }
- monitor.worked(1);
- }
- catch (OperationCanceledException e) {
- throw e;
- }
- }
- finally {
- monitor.done();
- }
- return result;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.jobs.Job#shouldRun()
- */
- public boolean shouldRun() {
- synchronized (asyncChanges) {
- return !asyncChanges.isEmpty();
- }
- }
- }
-
- class ResourceChangeListener implements IResourceChangeListener {
- private void processEntryChanges(IResourceDelta projectDelta, Set projectsToSave) {
- // check each resource with jsp fragment setting to see if it has
- // been moved/deleted
- boolean resourceChanges = false;
- boolean resourceChanges2 = false;
-
- // project affected
- IProject currentProject = (IProject) projectDelta.getResource();
-
- resourceChanges = processPreferences(currentProject, JSPFContentProperties.JSPCONTENTTYPE, projectDelta, projectsToSave);
- resourceChanges2 = processPreferences(currentProject, JSPFContentProperties.JSPLANGUAGE, projectDelta, projectsToSave);
-
- // if there was a preference key change, need to save preferences
- if (resourceChanges || resourceChanges2)
- projectsToSave.add(currentProject);
- }
-
- /**
- * Goes through all the resource-dependent preferences associated with
- * currentProject & key and updates the preference keys if needed
- * based on projectDelta
- *
- * @param currentProject
- * current project of the preferences to be looked at
- * @param key
- * current key/subcategory of the preferences to be looked
- * at
- * @param projectDelta
- * the changes to process the preference keys against
- * @param projectsToSave
- * the projects that need to be updated/saved
- * @return true if currentProject's preferences were modified
- */
- private boolean processPreferences(IProject currentProject, String key, IResourceDelta projectDelta, Set projectsToSave) {
- boolean resourceChanges = false;
-
- // get the project-key preference node
- Preferences projectPrefs = JSPFContentProperties.getPreferences(currentProject, key, false);
- if (projectPrefs == null)
- // no preferences for this project-key, just bail
- return false;
- String[] affectedResources;
- try {
- affectedResources = projectPrefs.keys();
- }
- catch (BackingStoreException e) {
- // problems with the project scope... we gonna miss the
- // changes (but will log)
- Logger.log(Logger.WARNING_DEBUG, "Problem retreiving JSP Fragment preferences", e); //$NON-NLS-1$
- return false;
- }
-
- // go through each preference key (which is really a file name)
- for (int i = 0; i < affectedResources.length; i++) {
- // see if preference key/file name was file that was changed
- IResourceDelta memberDelta = projectDelta.findMember(new Path(affectedResources[i]));
- // no changes for the given resource
- if (memberDelta == null)
- continue;
- if (memberDelta.getKind() == IResourceDelta.REMOVED) {
- resourceChanges = true;
- // remove the setting for the original location
- String currentValue = projectPrefs.get(affectedResources[i], null);
- projectPrefs.remove(affectedResources[i]);
- if ((memberDelta.getFlags() & IResourceDelta.MOVED_TO) != 0) {
- // if moving, copy the setting for the new location
- IProject targetProject = ResourcesPlugin.getWorkspace().getRoot().getProject(memberDelta.getMovedToPath().segment(0));
- Preferences targetPrefs = JSPFContentProperties.getPreferences(targetProject, key, true);
- targetPrefs.put(JSPFContentProperties.getKeyFor(memberDelta.getMovedToPath()), currentValue);
- if (targetProject != currentProject)
- projectsToSave.add(targetProject);
- }
- }
- }
- return resourceChanges;
- }
-
- /**
- * For any change to the encoding file or any resource with encoding
- * set, just discard the cache for the corresponding project.
- */
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta delta = event.getDelta();
- if (delta == null)
- return;
- IResourceDelta[] projectDeltas = delta.getAffectedChildren();
- // process each project in the delta
- Set projectsToSave = new HashSet();
- for (int i = 0; i < projectDeltas.length; i++)
- // nothing to do if a project has been added/removed/moved
- if (projectDeltas[i].getKind() == IResourceDelta.CHANGED && (projectDeltas[i].getFlags() & IResourceDelta.OPEN) == 0)
- processEntryChanges(projectDeltas[i], projectsToSave);
- fJob.addChanges(projectsToSave);
- }
- }
-
- public synchronized static void startup() {
- _instance = new JSPFContentPropertiesManager();
- ResourcesPlugin.getWorkspace().addResourceChangeListener(_instance.fResourceChangeListener, IResourceChangeEvent.POST_CHANGE);
- }
-
- public synchronized static void shutdown() {
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(_instance.fResourceChangeListener);
- _instance = null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/ByteReader.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/ByteReader.java
deleted file mode 100644
index 681b0896b6..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/ByteReader.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contenttype;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-
-import org.eclipse.wst.sse.core.internal.encoding.CodedIO;
-
-/**
- * This is an "adapter" class, simply to get in input stream to act like a
- * reader. We could not use InputStreamReader directly because its internal
- * buffers are not controllable, and it sometimes pulls too much out of input
- * stream (even when it wasn't needed for our purposes).
- *
- * The use of this class is highly specialized and by not means meant to be
- * general purpose. Its use is restricted to those cases where the input
- * stream can be regarded as ascii just long enough to determine what the real
- * encoding should be.
- */
-
-public class ByteReader extends Reader {
-
-
- public static final int DEFAULT_BUFFER_SIZE = CodedIO.MAX_BUF_SIZE;
-
- protected byte[] fBuffer;
-
- protected InputStream fInputStream;
-
- protected ByteReader() {
- super();
- }
-
- public ByteReader(InputStream inputStream) {
- this(inputStream, DEFAULT_BUFFER_SIZE);
- if (!inputStream.markSupported()) {
- throw new IllegalArgumentException("ByteReader is required to have a resettable stream"); //$NON-NLS-1$
- }
- }
-
- public ByteReader(InputStream inputStream, int size) {
- this.fInputStream = inputStream;
- if (!inputStream.markSupported()) {
- throw new IllegalArgumentException("ByteReader is required to have a resettable stream"); //$NON-NLS-1$
- }
- this.fBuffer = new byte[size];
-
- }
-
- public void close() throws IOException {
- this.fInputStream.close();
- }
-
- public void mark(int readAheadLimit) {
- this.fInputStream.mark(readAheadLimit);
- }
-
- public boolean markSupported() {
- return true;
- }
-
- public int read() throws IOException {
- int b0 = this.fInputStream.read();
- return (b0 & 0x00FF);
- }
-
- public int read(char ch[], int offset, int length) throws IOException {
- if (length > this.fBuffer.length) {
- length = this.fBuffer.length;
- }
-
- int count = this.fInputStream.read(this.fBuffer, 0, length);
-
- for (int i = 0; i < count; i++) {
- int b0 = this.fBuffer[i];
- // the 0x00FF is to "lose" the negative bits filled in the byte to
- // int conversion
- // (and which would be there if cast directly from byte to char).
- char c0 = (char) (b0 & 0x00FF);
- ch[offset + i] = c0;
- }
- return count;
- }
-
- public boolean ready() throws IOException {
- return this.fInputStream.available() > 0;
- }
-
- public void reset() throws IOException {
- this.fInputStream.reset();
- }
-
- public long skip(long n) throws IOException {
- return this.fInputStream.skip(n);
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/ContentDescriberForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/ContentDescriberForJSP.java
deleted file mode 100644
index 47ec7b919b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/ContentDescriberForJSP.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contenttype;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.content.IContentDescriber;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.ITextContentDescriber;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.IContentDescriptionForJSP;
-import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeFamilyForHTML;
-import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento;
-import org.eclipse.wst.sse.core.internal.encoding.IContentDescriptionExtended;
-import org.eclipse.wst.sse.core.internal.encoding.IResourceCharsetDetector;
-
-public final class ContentDescriberForJSP implements ITextContentDescriber {
- private final static QualifiedName[] SUPPORTED_OPTIONS = {IContentDescription.CHARSET, IContentDescription.BYTE_ORDER_MARK, IContentDescriptionExtended.DETECTED_CHARSET, IContentDescriptionExtended.UNSUPPORTED_CHARSET, IContentDescriptionExtended.APPROPRIATE_DEFAULT, IContentDescriptionForJSP.CONTENT_TYPE_ATTRIBUTE, IContentDescriptionForJSP.LANGUAGE_ATTRIBUTE, IContentDescriptionForJSP.CONTENT_FAMILY_ATTRIBUTE};
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.content.IContentDescriber#describe(java.io.InputStream,
- * org.eclipse.core.runtime.content.IContentDescription)
- */
- public int describe(InputStream contents, IContentDescription description) throws IOException {
- int result = IContentDescriber.INVALID;
-
- // if discription is null, we are just being asked to
- // assess contents validity
- if (description != null) {
- result = calculateSupportedOptions(contents, description);
- }
- else {
- result = determineValidity(contents);
- }
-
- return result;
- }
-
- private int determineValidity(InputStream contents) {
- // There's little to prove, via contents, that
- // a file is JSP, so always return interminant, and
- // let filetypes decide.
- return IContentDescriber.INDETERMINATE;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.content.ITextContentDescriber#describe(java.io.Reader,
- * org.eclipse.core.runtime.content.IContentDescription)
- */
- public int describe(Reader contents, IContentDescription description) throws IOException {
- int result = IContentDescriber.INVALID;
-
- // if discription is null, we are just being asked to
- // assess contents validity
- if (description != null) {
- result = calculateSupportedOptions(contents, description);
- }
- else {
- result = determineValidity(contents);
- }
-
- return result;
- }
-
- private int determineValidity(Reader contents) {
- // There's little to prove, via contents, that
- // a file is JSP, so always return interminant, and
- // let filetypes decide.
- return IContentDescriber.INDETERMINATE;
- }
-
- public QualifiedName[] getSupportedOptions() {
- return SUPPORTED_OPTIONS;
- }
-
- private int calculateSupportedOptions(InputStream contents, IContentDescription description) throws IOException {
- int result = IContentDescriber.INDETERMINATE;
- if (isRelevent(description)) {
- IResourceCharsetDetector detector = getDetector();
- detector.set(contents);
- handleCalculations(description, detector);
- result = IContentDescriber.VALID;
- }
- return result;
- }
-
- /**
- * @param contents
- * @param description
- * @throws IOException
- */
- private int calculateSupportedOptions(Reader contents, IContentDescription description) throws IOException {
- int result = IContentDescriber.INDETERMINATE;
- if (isRelevent(description)) {
- IResourceCharsetDetector detector = getDetector();
- detector.set(contents);
- handleCalculations(description, detector);
- result = IContentDescriber.VALID;
- }
- return result;
- }
-
- private IResourceCharsetDetector getDetector() {
- return new JSPResourceEncodingDetector();
- }
-
- private void handleCalculations(IContentDescription description, IResourceCharsetDetector detector) throws IOException {
- // handle standard ones first, to be sure detector processes
- handleStandardCalculations(description, detector);
- // now do those specific for JSPs
- // note: detector should always be of correct instance, but we'll
- // check, for now.
- if (detector instanceof JSPResourceEncodingDetector) {
- JSPResourceEncodingDetector jspDetector = (JSPResourceEncodingDetector) detector;
- String language = jspDetector.getLanguage();
- if (language != null && language.length() > 0) {
- description.setProperty(IContentDescriptionForJSP.LANGUAGE_ATTRIBUTE, language);
- }
- /*
- * content type is literally the content type that's in the page
- * directive
- */
- String contentTypeAttribute = jspDetector.getContentType();
- if (contentTypeAttribute != null && contentTypeAttribute.length() > 0) {
- description.setProperty(IContentDescriptionForJSP.CONTENT_TYPE_ATTRIBUTE, contentTypeAttribute);
- }
- /*
- * content family is the general class of content, when its
- * different from what's defined by content type
- */
- if (jspDetector.isXHTML() || jspDetector.isWML()) {
- // ISSUE: long term this logic and value should be contributed by extension point
- description.setProperty(IContentDescriptionForJSP.CONTENT_FAMILY_ATTRIBUTE, ContentTypeFamilyForHTML.HTML_FAMILY);
- }
-
-
- }
- }
-
- private void handleDetectedSpecialCase(IContentDescription description, Object detectedCharset, Object javaCharset) {
- if (detectedCharset != null) {
- // Once we detected a charset, we should set the property even
- // though it's the same as javaCharset
- // because there are clients that rely on this property to
- // determine if the charset is actually detected in file or not.
- description.setProperty(IContentDescriptionExtended.DETECTED_CHARSET, detectedCharset);
- }
- }
-
- /**
- * @param description
- * @param detector
- * @throws IOException
- */
- private void handleStandardCalculations(IContentDescription description, IResourceCharsetDetector detector) throws IOException {
- // note: if we're asked for one, we set them all. I need to be sure if
- // called
- // mulitiple times (one for each, say) that we don't waste time
- // processing same
- // content again.
- EncodingMemento encodingMemento = ((JSPResourceEncodingDetector) detector).getEncodingMemento();
- // TODO: I need to verify to see if this BOM work is always done
- // by text type.
- Object detectedByteOrderMark = encodingMemento.getUnicodeBOM();
- if (detectedByteOrderMark != null) {
- Object existingByteOrderMark = description.getProperty(IContentDescription.BYTE_ORDER_MARK);
- // not sure why would ever be different, so if is different, may
- // need to "push" up into base.
- if (!detectedByteOrderMark.equals(existingByteOrderMark))
- description.setProperty(IContentDescription.BYTE_ORDER_MARK, detectedByteOrderMark);
- }
-
-
- if (!encodingMemento.isValid()) {
- // note: after setting here, its the mere presence of
- // IContentDescriptionExtended.UNSUPPORTED_CHARSET
- // in the resource's description that can be used to determine if
- // invalid
- // in those cases, the "detected" property contains an
- // "appropriate default" to use.
- description.setProperty(IContentDescriptionExtended.UNSUPPORTED_CHARSET, encodingMemento.getInvalidEncoding());
- description.setProperty(IContentDescriptionExtended.APPROPRIATE_DEFAULT, encodingMemento.getAppropriateDefault());
- }
-
- Object detectedCharset = encodingMemento.getDetectedCharsetName();
- Object javaCharset = encodingMemento.getJavaCharsetName();
-
- // we always include detected, if its different than java
- handleDetectedSpecialCase(description, detectedCharset, javaCharset);
-
- if (javaCharset != null) {
- Object existingCharset = description.getProperty(IContentDescription.CHARSET);
- if (javaCharset.equals(existingCharset)) {
- handleDetectedSpecialCase(description, detectedCharset, javaCharset);
- }
- else {
- // we may need to add what we found, but only need to add
- // if different from the default.
- Object defaultCharset = detector.getSpecDefaultEncoding();
- if (defaultCharset != null) {
- if (!defaultCharset.equals(javaCharset)) {
- description.setProperty(IContentDescription.CHARSET, javaCharset);
- }
- }
- else {
- // assuming if there is no spec default, we always need to
- // add, I'm assuming
- description.setProperty(IContentDescription.CHARSET, javaCharset);
- }
- }
- }
-
- }
-
- /**
- * @param description
- * @return
- */
- private boolean isRelevent(IContentDescription description) {
- boolean result = false;
- if (description == null)
- result = false;
- else if (description.isRequested(IContentDescription.BYTE_ORDER_MARK))
- result = true;
- else if (description.isRequested(IContentDescription.CHARSET))
- result = true;
- else if (description.isRequested(IContentDescriptionExtended.APPROPRIATE_DEFAULT))
- result = true;
- else if (description.isRequested(IContentDescriptionExtended.DETECTED_CHARSET))
- result = true;
- else if (description.isRequested(IContentDescriptionExtended.UNSUPPORTED_CHARSET))
- result = true;
- else if (description.isRequested(IContentDescriptionForJSP.CONTENT_TYPE_ATTRIBUTE))
- result = true;
- else if (description.isRequested(IContentDescriptionForJSP.LANGUAGE_ATTRIBUTE))
- result = true;
- return result;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/HeadParserToken.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/HeadParserToken.java
deleted file mode 100644
index 5a93e08f6e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/HeadParserToken.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contenttype;
-
-public class HeadParserToken {
- private int fStart;
-
- private String fText;
- private String fType;
-
- protected HeadParserToken() {
- super();
- }
-
- public HeadParserToken(String type, int start, String text) {
- this();
- fType = type;
- fStart = start;
- fText = text;
-
- }
-
- public String getText() {
- return fText;
- }
-
- public String getType() {
- return fType;
- }
-
- public String toString() {
- return ("text: " + fText + " offset: " + fStart + " type: " + fType); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/IntStack.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/IntStack.java
deleted file mode 100644
index e04d0a2109..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/IntStack.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contenttype;
-
-/*
- *
- * A non-resizable class implementing the behavior of java.util.Stack, but
- * directly for the <code> integer </code> primitive.
- */
-import java.util.EmptyStackException;
-
-public class IntStack {
- private int[] list = null;
-
- private int size = 0;
-
- public IntStack() {
- this(100);
- }
-
- public IntStack(int maxdepth) {
- super();
- list = new int[maxdepth];
- initialize();
- }
-
- public void clear() {
- initialize();
- }
-
- public boolean empty() {
- return size == 0;
- }
-
- public int get(int slot) {
- return list[slot];
- }
-
- private void initialize() {
- for (int i = 0; i < list.length; i++)
- list[i] = -1;
- }
-
- /**
- * Returns the int at the top of the stack without removing it
- *
- * @return int at the top of this stack.
- * @exception EmptyStackException
- * when empty.
- */
- public int peek() {
- if (size == 0)
- throw new EmptyStackException();
- return list[size - 1];
- }
-
- /**
- * Removes and returns the int at the top of the stack
- *
- * @return int at the top of this stack.
- * @exception EmptyStackException
- * when empty.
- */
- public int pop() {
- int value = peek();
- list[size - 1] = -1;
- size--;
- return value;
- }
-
- /**
- * Pushes an item onto the top of this stack.
- *
- * @param newValue -
- * the int to be pushed onto this stack.
- * @return the <code>newValue</code> argument.
- */
- public int push(int newValue) {
- if (size == list.length) {
- throw new StackOverflowError();
- }
- list[size++] = newValue;
- return newValue;
- }
-
- public int size() {
- return list.length;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java
deleted file mode 100644
index 7ec777b0a9..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java
+++ /dev/null
@@ -1,2107 +0,0 @@
-/* The following code was generated by JFlex 1.4 on 9/18/06 2:12 PM */
-
-/*******************************************************************************
- * Copyright (c) 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*nlsXXX*/
-package org.eclipse.jst.jsp.core.internal.contenttype;
-import java.io.IOException;
-import java.io.Reader;
-
-import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants;
-import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants;
-
-
-
-
-
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4
- * on 9/18/06 2:12 PM from the specification file
- * <tt>D:/builds/Workspaces/WTP15maintenance/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex</tt>
- */
-public class JSPHeadTokenizer {
-
- /** This character denotes the end of file */
- public static final int YYEOF = -1;
-
- /** initial size of the lookahead buffer */
- private static final int ZZ_BUFFERSIZE = 8192;
-
- /** lexical states */
- public static final int YYINITIAL = 0;
- public static final int UnDelimitedString = 12;
- public static final int DQ_STRING = 8;
- public static final int SQ_STRING = 10;
- public static final int ST_XMLDecl = 2;
- public static final int ST_PAGE_DIRECTIVE = 4;
- public static final int QuotedAttributeValue = 6;
-
- /**
- * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l
- * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l
- * at the beginning of a line
- * l is of the form l = 2*k, k a non negative integer
- */
- private static final int ZZ_LEXSTATE[] = {
- 0, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7
- };
-
- /**
- * Translates characters to character classes
- */
- private static final String ZZ_CMAP_PACKED =
- "\11\0\1\6\1\11\2\0\1\10\22\0\1\34\1\17\1\37\2\0"+
- "\1\51\1\0\1\40\6\0\1\43\1\33\1\0\1\47\1\0\1\44"+
- "\5\0\1\50\1\41\1\0\1\12\1\7\1\56\1\13\1\52\1\53"+
- "\1\31\1\22\1\20\1\26\1\0\1\46\1\27\1\32\1\54\1\0"+
- "\1\16\1\15\1\35\1\21\1\25\1\0\1\45\1\36\1\23\1\30"+
- "\1\55\1\42\1\14\1\24\7\0\1\53\1\31\1\22\1\20\1\26"+
- "\1\0\1\46\1\27\1\32\1\54\1\0\1\16\1\15\1\35\1\21"+
- "\1\25\1\0\1\45\1\36\1\23\1\30\1\55\1\42\1\14\1\24"+
- "\101\0\1\4\3\0\1\5\17\0\1\3\16\0\1\1\20\0\1\3"+
- "\16\0\1\1\1\2\170\0\1\2\ufe87\0";
-
- /**
- * Translates characters to character classes
- */
- private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED);
-
- /**
- * Translates DFA states to action switch labels.
- */
- private static final int [] ZZ_ACTION = zzUnpackAction();
-
- private static final String ZZ_ACTION_PACKED_0 =
- "\10\0\20\1\2\2\1\1\1\3\1\4\1\5\1\6"+
- "\1\5\1\7\2\5\1\7\1\10\2\11\4\0\1\12"+
- "\1\13\6\0\1\14\5\0\1\15\1\16\1\0\1\17"+
- "\1\0\1\20\4\0\1\21\36\0\1\22\20\0\1\23"+
- "\2\0\1\24\6\0\1\25\1\26\22\0\1\27\5\0"+
- "\1\30\52\0\1\31\5\0\1\32\12\0\1\32";
-
- private static int [] zzUnpackAction() {
- int [] result = new int[212];
- int offset = 0;
- offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackAction(String packed, int offset, int [] result) {
- int i = 0; /* index in packed string */
- int j = offset; /* index in unpacked array */
- int l = packed.length();
- while (i < l) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- do result[j++] = value; while (--count > 0);
- }
- return j;
- }
-
-
- /* error codes */
- private static final int ZZ_UNKNOWN_ERROR = 0;
- private static final int ZZ_NO_MATCH = 1;
- private static final int ZZ_PUSHBACK_2BIG = 2;
-
- /* error messages for the codes above */
- private static final String ZZ_ERROR_MSG[] = {
- "Unkown internal scanner error",
- "Error: could not match input",
- "Error: pushback value was too large"
- };
-
- /** the input device */
- private java.io.Reader zzReader;
-
- /** the current state of the DFA */
- private int zzState;
-
- /** the current lexical state */
- private int zzLexicalState = YYINITIAL;
-
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- private char zzBuffer[] = new char[ZZ_BUFFERSIZE];
-
- /** the textposition at the last accepting state */
- private int zzMarkedPos;
-
- /** the textposition at the last state to be included in yytext */
- private int zzPushbackPos;
-
- /** the current text position in the buffer */
- private int zzCurrentPos;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int zzStartRead;
-
- /** endRead marks the last character in the buffer, that has been read
- from input */
- private int zzEndRead;
-
- /** number of newlines encountered up to the start of the matched text */
- //private int yyline;
-
- /** the number of characters up to the start of the matched text */
- private int yychar;
-
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- //private int yycolumn;
-
- /**
- * zzAtBOL == true <=> the scanner is currently at the beginning of a line
- */
- private boolean zzAtBOL = true;
-
- /** zzAtEOF == true <=> the scanner is at the EOF */
- private boolean zzAtEOF;
-
- /** denotes if the user-EOF-code has already been executed */
- private boolean zzEOFDone;
-
- /* user code: */
-
-
-
-
- private boolean hasMore = true;
- private final static int MAX_TO_SCAN = 8000;
- StringBuffer string = new StringBuffer();
- // state stack for easier state handling
- private IntStack fStateStack = new IntStack();
- private String valueText = null;
- private boolean isXHTML;
- private boolean isWML;
-
-
- public JSPHeadTokenizer() {
- super();
- }
-
- public void reset (Reader in) {
- /* the input device */
- zzReader = in;
-
- /* the current state of the DFA */
- zzState = 0;
-
- /* the current lexical state */
- zzLexicalState = YYINITIAL;
-
- /* this buffer contains the current text to be matched and is
- the source of the yytext() string */
- java.util.Arrays.fill(zzBuffer, (char)0);
-
- /* the textposition at the last accepting state */
- zzMarkedPos = 0;
-
- /* the textposition at the last state to be included in yytext */
- zzPushbackPos = 0;
-
- /* the current text position in the buffer */
- zzCurrentPos = 0;
-
- /* startRead marks the beginning of the yytext() string in the buffer */
- zzStartRead = 0;
-
- /**
- * endRead marks the last character in the buffer, that has been read
- * from input
- */
- zzEndRead = 0;
-
- /* number of newlines encountered up to the start of the matched text */
- //yyline = 0;
-
- /* the number of characters up to the start of the matched text */
- yychar = 0;
-
- /**
- * the number of characters from the last newline up to the start
- * of the matched text
- */
- //yycolumn = 0;
-
- /**
- * yy_atBOL == true <=> the scanner is currently at the beginning
- * of a line
- */
- zzAtBOL = true;
-
- /* yy_atEOF == true <=> the scanner has returned a value for EOF */
- zzAtEOF = false;
-
- /* denotes if the user-EOF-code has already been executed */
- zzEOFDone = false;
-
-
- fStateStack.clear();
-
- hasMore = true;
- isXHTML=false;
- isWML=false;
-
-
- }
-
-
- public final HeadParserToken getNextToken() throws IOException {
- String context = null;
- context = primGetNextToken();
- HeadParserToken result = null;
- if (valueText != null) {
- result = createToken(context, yychar, valueText);
- valueText = null;
- } else {
- result = createToken(context, yychar, yytext());
- }
- return result;
- }
-
- public final boolean hasMoreTokens() {
- return hasMore && yychar < MAX_TO_SCAN;
- }
- private void pushCurrentState() {
- fStateStack.push(yystate());
-
- }
-
- private void popState() {
- yybegin(fStateStack.pop());
- }
- private HeadParserToken createToken(String context, int start, String text) {
- return new HeadParserToken(context, start, text);
- }
-
- public boolean isXHTML() {
- return isXHTML;
- }
- public boolean isWML() {
- return isWML;
- }
-
-
-
- /**
- * Creates a new scanner
- * There is also a java.io.InputStream version of this constructor.
- *
- * @param in the java.io.Reader to read input from.
- */
- public JSPHeadTokenizer(java.io.Reader in) {
- this.zzReader = in;
- }
-
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- public JSPHeadTokenizer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
-
- /**
- * Unpacks the compressed character translation table.
- *
- * @param packed the packed character translation table
- * @return the unpacked character translation table
- */
- private static char [] zzUnpackCMap(String packed) {
- char [] map = new char[0x10000];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 192) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do map[j++] = value; while (--count > 0);
- }
- return map;
- }
-
-
- /**
- * Refills the input buffer.
- *
- * @return <code>false</code>, iff there was new input.
- *
- * @exception java.io.IOException if any I/O-Error occurs
- */
- private boolean zzRefill() throws java.io.IOException {
-
- /* first: make room (if you can) */
- if (zzStartRead > 0) {
- System.arraycopy(zzBuffer, zzStartRead,
- zzBuffer, 0,
- zzEndRead-zzStartRead);
-
- /* translate stored positions */
- zzEndRead-= zzStartRead;
- zzCurrentPos-= zzStartRead;
- zzMarkedPos-= zzStartRead;
- zzPushbackPos-= zzStartRead;
- zzStartRead = 0;
- }
-
- /* is the buffer big enough? */
- if (zzCurrentPos >= zzBuffer.length) {
- /* if not: blow it up */
- char newBuffer[] = new char[zzCurrentPos*2];
- System.arraycopy(zzBuffer, 0, newBuffer, 0, zzBuffer.length);
- zzBuffer = newBuffer;
- }
-
- /* finally: fill the buffer with new input */
- int numRead = zzReader.read(zzBuffer, zzEndRead,
- zzBuffer.length-zzEndRead);
-
- if (numRead < 0) {
- return true;
- }
- else {
- zzEndRead+= numRead;
- return false;
- }
- }
-
-
- /**
- * Closes the input stream.
- */
- public final void yyclose() throws java.io.IOException {
- zzAtEOF = true; /* indicate end of file */
- zzEndRead = zzStartRead; /* invalidate buffer */
-
- if (zzReader != null)
- zzReader.close();
- }
-
-
- /**
- * Resets the scanner to read from a new input stream.
- * Does not close the old reader.
- *
- * All internal variables are reset, the old input stream
- * <b>cannot</b> be reused (internal buffer is discarded and lost).
- * Lexical state is set to <tt>ZZ_INITIAL</tt>.
- *
- * @param reader the new input stream
- */
- public final void yyreset(java.io.Reader reader) {
- zzReader = reader;
- zzAtBOL = true;
- zzAtEOF = false;
- zzEndRead = zzStartRead = 0;
- zzCurrentPos = zzMarkedPos = zzPushbackPos = 0;
- //yyline = yychar = yycolumn = 0;
- zzLexicalState = YYINITIAL;
- }
-
-
- /**
- * Returns the current lexical state.
- */
- public final int yystate() {
- return zzLexicalState;
- }
-
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- public final void yybegin(int newState) {
- zzLexicalState = newState;
- }
-
-
- /**
- * Returns the text matched by the current regular expression.
- */
- public final String yytext() {
- return new String( zzBuffer, zzStartRead, zzMarkedPos-zzStartRead );
- }
-
-
- /**
- * Returns the character at position <tt>pos</tt> from the
- * matched text.
- *
- * It is equivalent to yytext().charAt(pos), but faster
- *
- * @param pos the position of the character to fetch.
- * A value from 0 to yylength()-1.
- *
- * @return the character at position pos
- */
- public final char yycharat(int pos) {
- return zzBuffer[zzStartRead+pos];
- }
-
-
- /**
- * Returns the length of the matched text region.
- */
- public final int yylength() {
- return zzMarkedPos-zzStartRead;
- }
-
-
- /**
- * Reports an error that occured while scanning.
- *
- * In a wellformed scanner (no or only correct usage of
- * yypushback(int) and a match-all fallback rule) this method
- * will only be called with things that "Can't Possibly Happen".
- * If this method is called, something is seriously wrong
- * (e.g. a JFlex bug producing a faulty scanner etc.).
- *
- * Usual syntax/scanner level error handling should be done
- * in error fallback rules.
- *
- * @param errorCode the code of the errormessage to display
- */
- private void zzScanError(int errorCode) {
- String message;
- try {
- message = ZZ_ERROR_MSG[errorCode];
- }
- catch (ArrayIndexOutOfBoundsException e) {
- message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
- }
-
- throw new Error(message);
- }
-
-
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number the number of characters to be read again.
- * This number must not be greater than yylength()!
- */
- public void yypushback(int number) {
- if ( number > yylength() )
- zzScanError(ZZ_PUSHBACK_2BIG);
-
- zzMarkedPos -= number;
- }
-
-
- /**
- * Contains user EOF-code, which will be executed exactly once,
- * when the end of file is reached
- */
- private void zzDoEOF() {
- if (!zzEOFDone) {
- zzEOFDone = true;
- hasMore=false;
-
- }
- }
-
-
- /**
- * Resumes scanning until the next regular expression is matched,
- * the end of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception java.io.IOException if any I/O-Error occurs
- */
- public String primGetNextToken() throws java.io.IOException {
- int zzInput;
- int zzAction;
-
- // cached fields:
- int zzCurrentPosL;
- int zzMarkedPosL;
- int zzEndReadL = zzEndRead;
- char [] zzBufferL = zzBuffer;
- char [] zzCMapL = ZZ_CMAP;
-
-
- while (true) {
- zzMarkedPosL = zzMarkedPos;
-
- yychar+= zzMarkedPosL-zzStartRead;
-
- if (zzMarkedPosL > zzStartRead) {
- switch (zzBufferL[zzMarkedPosL-1]) {
- case '\n':
- case '\u000B':
- case '\u000C':
- case '\u0085':
- case '\u2028':
- case '\u2029':
- zzAtBOL = true;
- break;
- case '\r':
- if (zzMarkedPosL < zzEndReadL)
- zzAtBOL = zzBufferL[zzMarkedPosL] != '\n';
- else if (zzAtEOF)
- zzAtBOL = false;
- else {
- boolean eof = zzRefill();
- zzMarkedPosL = zzMarkedPos;
- zzBufferL = zzBuffer;
- if (eof)
- zzAtBOL = false;
- else
- zzAtBOL = zzBufferL[zzMarkedPosL] != '\n';
- }
- break;
- default:
- zzAtBOL = false;
- }
- }
- zzAction = -1;
-
- zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
-
- if (zzAtBOL)
- zzState = ZZ_LEXSTATE[zzLexicalState+1];
- else
- zzState = ZZ_LEXSTATE[zzLexicalState];
-
-
- zzForAction: {
- while (true) {
-
- if (zzCurrentPosL < zzEndReadL)
- zzInput = zzBufferL[zzCurrentPosL++];
- else if (zzAtEOF) {
- zzInput = YYEOF;
- break zzForAction;
- }
- else {
- // store back cached positions
- zzCurrentPos = zzCurrentPosL;
- zzMarkedPos = zzMarkedPosL;
- boolean eof = zzRefill();
- // get translated positions and possibly new buffer
- zzCurrentPosL = zzCurrentPos;
- zzMarkedPosL = zzMarkedPos;
- zzBufferL = zzBuffer;
- zzEndReadL = zzEndRead;
- if (eof) {
- zzInput = YYEOF;
- break zzForAction;
- }
- else {
- zzInput = zzBufferL[zzCurrentPosL++];
- }
- }
- zzInput = zzCMapL[zzInput];
-
- boolean zzIsFinal = false;
- boolean zzNoLookAhead = false;
-
- zzForNext: { switch (zzState) {
- case 0:
- switch (zzInput) {
- case 10: zzIsFinal = true; zzState = 9; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext;
- }
-
- case 1:
- switch (zzInput) {
- case 1: zzIsFinal = true; zzState = 10; break zzForNext;
- case 2: zzIsFinal = true; zzState = 11; break zzForNext;
- case 3: zzIsFinal = true; zzState = 12; break zzForNext;
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 13; break zzForNext;
- case 10: zzIsFinal = true; zzState = 14; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext;
- }
-
- case 2:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 15; break zzForNext;
- case 11: zzIsFinal = true; zzState = 16; break zzForNext;
- case 22: zzIsFinal = true; zzState = 17; break zzForNext;
- case 45: zzIsFinal = true; zzState = 18; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext;
- }
-
- case 3:
- switch (zzInput) {
- case 14: zzIsFinal = true; zzState = 19; break zzForNext;
- case 18: zzIsFinal = true; zzState = 20; break zzForNext;
- case 21: zzIsFinal = true; zzState = 21; break zzForNext;
- case 27: zzIsFinal = true; zzState = 22; break zzForNext;
- case 41: zzIsFinal = true; zzState = 23; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext;
- }
-
- case 4:
- switch (zzInput) {
- case 6:
- case 8:
- case 28: zzIsFinal = true; zzState = 25; break zzForNext;
- case 9: zzIsFinal = true; zzState = 26; break zzForNext;
- case 31: zzIsFinal = true; zzNoLookAhead = true; zzState = 27; break zzForNext;
- case 32: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext;
- }
-
- case 5:
- switch (zzInput) {
- case 8:
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
- case 11: zzIsFinal = true; zzState = 31; break zzForNext;
- case 31: zzIsFinal = true; zzNoLookAhead = true; zzState = 32; break zzForNext;
- case 32: zzIsFinal = true; zzState = 33; break zzForNext;
- case 41: zzIsFinal = true; zzState = 34; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 29; break zzForNext;
- }
-
- case 6:
- switch (zzInput) {
- case 8:
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
- case 41: zzIsFinal = true; zzState = 34; break zzForNext;
- case 32: zzIsFinal = true; zzState = 35; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 29; break zzForNext;
- }
-
- case 7:
- switch (zzInput) {
- case 11:
- case 41: zzIsFinal = true; zzState = 34; break zzForNext;
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzNoLookAhead = true; zzState = 36; break zzForNext;
- case 31: zzIsFinal = true; zzNoLookAhead = true; zzState = 37; break zzForNext;
- case 32: zzIsFinal = true; zzState = 38; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 29; break zzForNext;
- }
-
- case 9:
- switch (zzInput) {
- case 15: zzState = 39; break zzForNext;
- case 23: zzState = 40; break zzForNext;
- case 41: zzState = 41; break zzForNext;
- case 44: zzState = 42; break zzForNext;
- default: break zzForAction;
- }
-
- case 10:
- switch (zzInput) {
- case 2: zzIsFinal = true; zzNoLookAhead = true; zzState = 43; break zzForNext;
- default: break zzForAction;
- }
-
- case 11:
- switch (zzInput) {
- case 1: zzIsFinal = true; zzNoLookAhead = true; zzState = 44; break zzForNext;
- default: break zzForAction;
- }
-
- case 12:
- switch (zzInput) {
- case 4: zzState = 45; break zzForNext;
- default: break zzForAction;
- }
-
- case 13:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 46; break zzForNext;
- case 10: zzState = 47; break zzForNext;
- default: break zzForAction;
- }
-
- case 14:
- switch (zzInput) {
- case 15: zzState = 39; break zzForNext;
- case 23: zzState = 40; break zzForNext;
- case 41: zzState = 41; break zzForNext;
- case 44: zzState = 42; break zzForNext;
- case 11: zzState = 48; break zzForNext;
- default: break zzForAction;
- }
-
- case 15:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 49; break zzForNext;
- case 11: zzState = 50; break zzForNext;
- default: break zzForAction;
- }
-
- case 16:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 51; break zzForNext;
- default: break zzForAction;
- }
-
- case 17:
- switch (zzInput) {
- case 29: zzState = 52; break zzForNext;
- default: break zzForAction;
- }
-
- case 18:
- switch (zzInput) {
- case 22: zzState = 53; break zzForNext;
- default: break zzForAction;
- }
-
- case 19:
- switch (zzInput) {
- case 43: zzState = 54; break zzForNext;
- default: break zzForAction;
- }
-
- case 20:
- switch (zzInput) {
- case 17: zzState = 55; break zzForNext;
- default: break zzForAction;
- }
-
- case 21:
- switch (zzInput) {
- case 43: zzState = 56; break zzForNext;
- default: break zzForAction;
- }
-
- case 22:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 57; break zzForNext;
- default: break zzForAction;
- }
-
- case 23:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 58; break zzForNext;
- default: break zzForAction;
- }
-
- case 25:
- switch (zzInput) {
- case 6:
- case 8:
- case 28: zzIsFinal = true; zzState = 25; break zzForNext;
- case 9: zzState = 59; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext;
- }
-
- case 26:
- switch (zzInput) {
- case 6:
- case 8:
- case 28: zzIsFinal = true; zzState = 25; break zzForNext;
- case 9: zzState = 59; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext;
- }
-
- case 31:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 60; break zzForNext;
- default: break zzForAction;
- }
-
- case 33:
- switch (zzInput) {
- case 10: zzState = 61; break zzForNext;
- default: break zzForAction;
- }
-
- case 34:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 62; break zzForNext;
- default: break zzForAction;
- }
-
- case 35:
- switch (zzInput) {
- case 10: zzState = 61; break zzForNext;
- default: break zzForAction;
- }
-
- case 38:
- switch (zzInput) {
- case 10: zzState = 61; break zzForNext;
- default: break zzForAction;
- }
-
- case 39:
- switch (zzInput) {
- case 16: zzState = 63; break zzForNext;
- default: break zzForAction;
- }
-
- case 40:
- switch (zzInput) {
- case 19: zzState = 64; break zzForNext;
- default: break zzForAction;
- }
-
- case 41:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 41; break zzForNext;
- case 42: zzState = 65; break zzForNext;
- default: break zzForAction;
- }
-
- case 42:
- switch (zzInput) {
- case 30: zzState = 66; break zzForNext;
- default: break zzForAction;
- }
-
- case 45:
- switch (zzInput) {
- case 5: zzIsFinal = true; zzNoLookAhead = true; zzState = 67; break zzForNext;
- default: break zzForAction;
- }
-
- case 46:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 46; break zzForNext;
- case 10: zzState = 47; break zzForNext;
- default: break zzForAction;
- }
-
- case 47:
- switch (zzInput) {
- case 11: zzState = 48; break zzForNext;
- default: break zzForAction;
- }
-
- case 48:
- switch (zzInput) {
- case 12: zzState = 68; break zzForNext;
- default: break zzForAction;
- }
-
- case 49:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 49; break zzForNext;
- case 11: zzState = 50; break zzForNext;
- default: break zzForAction;
- }
-
- case 50:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzNoLookAhead = true; zzState = 51; break zzForNext;
- default: break zzForAction;
- }
-
- case 52:
- switch (zzInput) {
- case 18: zzState = 69; break zzForNext;
- default: break zzForAction;
- }
-
- case 53:
- switch (zzInput) {
- case 37: zzState = 70; break zzForNext;
- default: break zzForAction;
- }
-
- case 54:
- switch (zzInput) {
- case 29: zzState = 71; break zzForNext;
- default: break zzForAction;
- }
-
- case 55:
- switch (zzInput) {
- case 29: zzState = 72; break zzForNext;
- default: break zzForAction;
- }
-
- case 56:
- switch (zzInput) {
- case 38: zzState = 73; break zzForNext;
- default: break zzForAction;
- }
-
- case 59:
- switch (zzInput) {
- case 6:
- case 8:
- case 28: zzIsFinal = true; zzState = 25; break zzForNext;
- case 9: zzState = 59; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 24; break zzForNext;
- }
-
- case 61:
- switch (zzInput) {
- case 32: zzIsFinal = true; zzNoLookAhead = true; zzState = 30; break zzForNext;
- default: break zzForAction;
- }
-
- case 63:
- switch (zzInput) {
- case 17: zzState = 74; break zzForNext;
- default: break zzForAction;
- }
-
- case 64:
- switch (zzInput) {
- case 13: zzState = 75; break zzForNext;
- default: break zzForAction;
- }
-
- case 65:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 65; break zzForNext;
- case 21: zzState = 76; break zzForNext;
- default: break zzForAction;
- }
-
- case 66:
- switch (zzInput) {
- case 21: zzState = 77; break zzForNext;
- default: break zzForAction;
- }
-
- case 68:
- switch (zzInput) {
- case 13: zzState = 78; break zzForNext;
- default: break zzForAction;
- }
-
- case 69:
- switch (zzInput) {
- case 17: zzState = 79; break zzForNext;
- default: break zzForAction;
- }
-
- case 70:
- switch (zzInput) {
- case 30: zzState = 80; break zzForNext;
- default: break zzForAction;
- }
-
- case 71:
- switch (zzInput) {
- case 38: zzState = 81; break zzForNext;
- default: break zzForAction;
- }
-
- case 72:
- switch (zzInput) {
- case 19: zzState = 82; break zzForNext;
- default: break zzForAction;
- }
-
- case 73:
- switch (zzInput) {
- case 22: zzState = 83; break zzForNext;
- default: break zzForAction;
- }
-
- case 74:
- switch (zzInput) {
- case 18: zzState = 84; break zzForNext;
- default: break zzForAction;
- }
-
- case 75:
- switch (zzInput) {
- case 14: zzState = 85; break zzForNext;
- default: break zzForAction;
- }
-
- case 76:
- switch (zzInput) {
- case 43: zzState = 86; break zzForNext;
- default: break zzForAction;
- }
-
- case 77:
- switch (zzInput) {
- case 33: zzState = 87; break zzForNext;
- default: break zzForAction;
- }
-
- case 78:
- switch (zzInput) {
- case 14: zzState = 88; break zzForNext;
- default: break zzForAction;
- }
-
- case 79:
- switch (zzInput) {
- case 16: zzState = 89; break zzForNext;
- default: break zzForAction;
- }
-
- case 80:
- switch (zzInput) {
- case 26: zzState = 90; break zzForNext;
- default: break zzForAction;
- }
-
- case 81:
- switch (zzInput) {
- case 24: zzState = 91; break zzForNext;
- default: break zzForAction;
- }
-
- case 82:
- switch (zzInput) {
- case 22: zzState = 92; break zzForNext;
- default: break zzForAction;
- }
-
- case 83:
- switch (zzInput) {
- case 22: zzState = 93; break zzForNext;
- default: break zzForAction;
- }
-
- case 84:
- switch (zzInput) {
- case 19: zzState = 94; break zzForNext;
- default: break zzForAction;
- }
-
- case 85:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 85; break zzForNext;
- case 12: zzState = 95; break zzForNext;
- default: break zzForAction;
- }
-
- case 86:
- switch (zzInput) {
- case 38: zzState = 96; break zzForNext;
- default: break zzForAction;
- }
-
- case 87:
- switch (zzInput) {
- case 16: zzState = 97; break zzForNext;
- default: break zzForAction;
- }
-
- case 88:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 98; break zzForNext;
- default: break zzForAction;
- }
-
- case 89:
- switch (zzInput) {
- case 26: zzState = 99; break zzForNext;
- default: break zzForAction;
- }
-
- case 90:
- switch (zzInput) {
- case 17: zzState = 100; break zzForNext;
- default: break zzForAction;
- }
-
- case 91:
- switch (zzInput) {
- case 43: zzState = 101; break zzForNext;
- default: break zzForAction;
- }
-
- case 92:
- switch (zzInput) {
- case 29: zzState = 102; break zzForNext;
- default: break zzForAction;
- }
-
- case 93:
- switch (zzInput) {
- case 29: zzState = 103; break zzForNext;
- default: break zzForAction;
- }
-
- case 94:
- switch (zzInput) {
- case 20: zzState = 104; break zzForNext;
- default: break zzForAction;
- }
-
- case 95:
- switch (zzInput) {
- case 13: zzState = 105; break zzForNext;
- default: break zzForAction;
- }
-
- case 96:
- switch (zzInput) {
- case 22: zzState = 106; break zzForNext;
- default: break zzForAction;
- }
-
- case 97:
- switch (zzInput) {
- case 26: zzState = 107; break zzForNext;
- default: break zzForAction;
- }
-
- case 98:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 98; break zzForNext;
- default: break zzForAction;
- }
-
- case 99:
- switch (zzInput) {
- case 29: zzState = 108; break zzForNext;
- default: break zzForAction;
- }
-
- case 100:
- switch (zzInput) {
- case 29: zzState = 109; break zzForNext;
- default: break zzForAction;
- }
-
- case 101:
- switch (zzInput) {
- case 38: zzState = 110; break zzForNext;
- default: break zzForAction;
- }
-
- case 102:
- switch (zzInput) {
- case 19: zzState = 111; break zzForNext;
- default: break zzForAction;
- }
-
- case 103:
- switch (zzInput) {
- case 18: zzState = 112; break zzForNext;
- default: break zzForAction;
- }
-
- case 104:
- switch (zzInput) {
- case 21: zzState = 113; break zzForNext;
- default: break zzForAction;
- }
-
- case 105:
- switch (zzInput) {
- case 14: zzState = 114; break zzForNext;
- default: break zzForAction;
- }
-
- case 106:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 115; break zzForNext;
- default: break zzForAction;
- }
-
- case 107:
- switch (zzInput) {
- case 37: zzState = 116; break zzForNext;
- default: break zzForAction;
- }
-
- case 108:
- switch (zzInput) {
- case 38: zzState = 117; break zzForNext;
- default: break zzForAction;
- }
-
- case 109:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 109; break zzForNext;
- case 7: zzIsFinal = true; zzState = 118; break zzForNext;
- default: break zzForAction;
- }
-
- case 110:
- switch (zzInput) {
- case 22: zzState = 119; break zzForNext;
- default: break zzForAction;
- }
-
- case 111:
- switch (zzInput) {
- case 19: zzState = 120; break zzForNext;
- default: break zzForAction;
- }
-
- case 112:
- switch (zzInput) {
- case 17: zzState = 121; break zzForNext;
- default: break zzForAction;
- }
-
- case 113:
- switch (zzInput) {
- case 22: zzState = 122; break zzForNext;
- default: break zzForAction;
- }
-
- case 114:
- switch (zzInput) {
- case 29: zzState = 123; break zzForNext;
- default: break zzForAction;
- }
-
- case 115:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 115; break zzForNext;
- default: break zzForAction;
- }
-
- case 116:
- switch (zzInput) {
- case 22: zzState = 124; break zzForNext;
- default: break zzForAction;
- }
-
- case 117:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 117; break zzForNext;
- case 7: zzIsFinal = true; zzState = 125; break zzForNext;
- default: break zzForAction;
- }
-
- case 118:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 118; break zzForNext;
- default: break zzForAction;
- }
-
- case 119:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 119; break zzForNext;
- case 7: zzIsFinal = true; zzState = 126; break zzForNext;
- default: break zzForAction;
- }
-
- case 120:
- switch (zzInput) {
- case 20: zzState = 127; break zzForNext;
- default: break zzForAction;
- }
-
- case 121:
- switch (zzInput) {
- case 16: zzState = 128; break zzForNext;
- default: break zzForAction;
- }
-
- case 122:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 122; break zzForNext;
- case 23: zzState = 129; break zzForNext;
- case 34: zzState = 130; break zzForNext;
- default: break zzForAction;
- }
-
- case 123:
- switch (zzInput) {
- case 30: zzState = 131; break zzForNext;
- default: break zzForAction;
- }
-
- case 124:
- switch (zzInput) {
- case 18: zzState = 132; break zzForNext;
- default: break zzForAction;
- }
-
- case 125:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 125; break zzForNext;
- default: break zzForAction;
- }
-
- case 126:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 126; break zzForNext;
- default: break zzForAction;
- }
-
- case 127:
- switch (zzInput) {
- case 21: zzState = 133; break zzForNext;
- default: break zzForAction;
- }
-
- case 128:
- switch (zzInput) {
- case 26: zzState = 134; break zzForNext;
- default: break zzForAction;
- }
-
- case 129:
- switch (zzInput) {
- case 19: zzState = 135; break zzForNext;
- default: break zzForAction;
- }
-
- case 130:
- switch (zzInput) {
- case 13: zzState = 136; break zzForNext;
- default: break zzForAction;
- }
-
- case 131:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 131; break zzForNext;
- case 7: zzState = 137; break zzForNext;
- default: break zzForAction;
- }
-
- case 132:
- switch (zzInput) {
- case 19: zzState = 138; break zzForNext;
- default: break zzForAction;
- }
-
- case 133:
- switch (zzInput) {
- case 22: zzState = 139; break zzForNext;
- default: break zzForAction;
- }
-
- case 134:
- switch (zzInput) {
- case 29: zzState = 140; break zzForNext;
- default: break zzForAction;
- }
-
- case 135:
- switch (zzInput) {
- case 13: zzState = 141; break zzForNext;
- default: break zzForAction;
- }
-
- case 136:
- switch (zzInput) {
- case 14: zzState = 142; break zzForNext;
- default: break zzForAction;
- }
-
- case 137:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 137; break zzForNext;
- case 31:
- case 32: zzState = 143; break zzForNext;
- default: break zzForAction;
- }
-
- case 138:
- switch (zzInput) {
- case 26: zzState = 144; break zzForNext;
- default: break zzForAction;
- }
-
- case 139:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 139; break zzForNext;
- case 7: zzIsFinal = true; zzState = 145; break zzForNext;
- default: break zzForAction;
- }
-
- case 140:
- switch (zzInput) {
- case 38: zzState = 146; break zzForNext;
- default: break zzForAction;
- }
-
- case 141:
- switch (zzInput) {
- case 14: zzState = 147; break zzForNext;
- default: break zzForAction;
- }
-
- case 142:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 142; break zzForNext;
- case 21: zzState = 148; break zzForNext;
- default: break zzForAction;
- }
-
- case 143:
- switch (zzInput) {
- case 23: zzState = 149; break zzForNext;
- default: break zzForAction;
- }
-
- case 144:
- switch (zzInput) {
- case 45: zzState = 150; break zzForNext;
- default: break zzForAction;
- }
-
- case 145:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 145; break zzForNext;
- default: break zzForAction;
- }
-
- case 146:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 146; break zzForNext;
- case 7: zzIsFinal = true; zzState = 151; break zzForNext;
- default: break zzForAction;
- }
-
- case 147:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzState = 147; break zzForNext;
- case 21: zzState = 152; break zzForNext;
- default: break zzForAction;
- }
-
- case 148:
- switch (zzInput) {
- case 24: zzState = 153; break zzForNext;
- default: break zzForAction;
- }
-
- case 149:
- switch (zzInput) {
- case 19: zzState = 154; break zzForNext;
- default: break zzForAction;
- }
-
- case 150:
- switch (zzInput) {
- case 22: zzState = 155; break zzForNext;
- default: break zzForAction;
- }
-
- case 151:
- switch (zzInput) {
- case 6:
- case 8:
- case 9:
- case 28: zzIsFinal = true; zzState = 151; break zzForNext;
- default: break zzForAction;
- }
-
- case 152:
- switch (zzInput) {
- case 24: zzState = 156; break zzForNext;
- default: break zzForAction;
- }
-
- case 153:
- switch (zzInput) {
- case 25: zzState = 157; break zzForNext;
- default: break zzForAction;
- }
-
- case 154:
- switch (zzInput) {
- case 19: zzState = 158; break zzForNext;
- default: break zzForAction;
- }
-
- case 155:
- switch (zzInput) {
- case 35: zzState = 159; break zzForNext;
- default: break zzForAction;
- }
-
- case 156:
- switch (zzInput) {
- case 25: zzState = 160; break zzForNext;
- default: break zzForAction;
- }
-
- case 157:
- switch (zzInput) {
- case 14: zzState = 161; break zzForNext;
- default: break zzForAction;
- }
-
- case 158:
- switch (zzInput) {
- case 21: zzState = 162; break zzForNext;
- default: break zzForAction;
- }
-
- case 159:
- switch (zzInput) {
- case 21: zzState = 76; break zzForNext;
- default: break zzForAction;
- }
-
- case 160:
- switch (zzInput) {
- case 14: zzState = 163; break zzForNext;
- default: break zzForAction;
- }
-
- case 161:
- switch (zzInput) {
- case 26: zzState = 164; break zzForNext;
- default: break zzForAction;
- }
-
- case 162:
- switch (zzInput) {
- case 33: zzState = 165; break zzForNext;
- default: break zzForAction;
- }
-
- case 163:
- switch (zzInput) {
- case 26: zzState = 166; break zzForNext;
- default: break zzForAction;
- }
-
- case 164:
- switch (zzInput) {
- case 18: zzState = 167; break zzForNext;
- default: break zzForAction;
- }
-
- case 165:
- switch (zzInput) {
- case 27: zzState = 168; break zzForNext;
- default: break zzForAction;
- }
-
- case 166:
- switch (zzInput) {
- case 18: zzState = 169; break zzForNext;
- default: break zzForAction;
- }
-
- case 167:
- switch (zzInput) {
- case 27: zzState = 170; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 167; break zzForNext;
- }
-
- case 168:
- switch (zzInput) {
- case 27: zzState = 171; break zzForNext;
- default: break zzForAction;
- }
-
- case 169:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 170:
- switch (zzInput) {
- case 27: zzState = 173; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 167; break zzForNext;
- }
-
- case 171:
- switch (zzInput) {
- case 34: zzState = 174; break zzForNext;
- default: break zzForAction;
- }
-
- case 172:
- switch (zzInput) {
- case 27: zzState = 175; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 173:
- switch (zzInput) {
- case 27: zzState = 173; break zzForNext;
- case 16: zzState = 176; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 167; break zzForNext;
- }
-
- case 174:
- switch (zzInput) {
- case 34: zzState = 177; break zzForNext;
- default: break zzForAction;
- }
-
- case 175:
- switch (zzInput) {
- case 27: zzState = 175; break zzForNext;
- case 16: zzState = 178; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 176:
- switch (zzInput) {
- case 27: zzState = 170; break zzForNext;
- case 19: zzState = 179; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 167; break zzForNext;
- }
-
- case 177:
- switch (zzInput) {
- case 34: zzState = 180; break zzForNext;
- default: break zzForAction;
- }
-
- case 178:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 19: zzState = 181; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 179:
- switch (zzInput) {
- case 27: zzState = 170; break zzForNext;
- case 16: zzState = 182; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 167; break zzForNext;
- }
-
- case 180:
- switch (zzInput) {
- case 35: zzState = 183; break zzForNext;
- default: break zzForAction;
- }
-
- case 181:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 16: zzState = 184; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 182:
- switch (zzInput) {
- case 27: zzState = 170; break zzForNext;
- case 28: zzState = 185; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 167; break zzForNext;
- }
-
- case 183:
- switch (zzInput) {
- case 34: zzState = 186; break zzForNext;
- default: break zzForAction;
- }
-
- case 184:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 28: zzState = 187; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 185:
- switch (zzInput) {
- case 27: zzState = 170; break zzForNext;
- case 34: zzState = 188; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 167; break zzForNext;
- }
-
- case 186:
- switch (zzInput) {
- case 36: zzState = 189; break zzForNext;
- default: break zzForAction;
- }
-
- case 187:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 12: zzState = 190; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 188:
- switch (zzInput) {
- case 27: zzState = 170; break zzForNext;
- case 13: zzState = 191; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 167; break zzForNext;
- }
-
- case 189:
- switch (zzInput) {
- case 35: zzState = 192; break zzForNext;
- default: break zzForAction;
- }
-
- case 190:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 23: zzState = 193; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 191:
- switch (zzInput) {
- case 27: zzState = 170; break zzForNext;
- case 14: zzIsFinal = true; zzState = 194; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 167; break zzForNext;
- }
-
- case 192:
- switch (zzInput) {
- case 17: zzState = 195; break zzForNext;
- default: break zzForAction;
- }
-
- case 193:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 19: zzState = 196; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 194:
- switch (zzInput) {
- case 27: zzState = 170; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 167; break zzForNext;
- }
-
- case 195:
- switch (zzInput) {
- case 37: zzState = 197; break zzForNext;
- default: break zzForAction;
- }
-
- case 196:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 13: zzState = 198; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 197:
- switch (zzInput) {
- case 38: zzState = 199; break zzForNext;
- default: break zzForAction;
- }
-
- case 198:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 14: zzIsFinal = true; zzState = 200; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 199:
- switch (zzInput) {
- case 27: zzState = 201; break zzForNext;
- default: break zzForAction;
- }
-
- case 200:
- switch (zzInput) {
- case 27: zzState = 172; break zzForNext;
- case 9: break zzForAction;
- default: zzState = 169; break zzForNext;
- }
-
- case 201:
- switch (zzInput) {
- case 39: zzState = 202; break zzForNext;
- default: break zzForAction;
- }
-
- case 202:
- switch (zzInput) {
- case 40: zzState = 203; break zzForNext;
- default: break zzForAction;
- }
-
- case 203:
- switch (zzInput) {
- case 40: zzState = 204; break zzForNext;
- default: break zzForAction;
- }
-
- case 204:
- switch (zzInput) {
- case 40: zzState = 205; break zzForNext;
- default: break zzForAction;
- }
-
- case 205:
- switch (zzInput) {
- case 27: zzState = 206; break zzForNext;
- default: break zzForAction;
- }
-
- case 206:
- switch (zzInput) {
- case 12: zzState = 207; break zzForNext;
- default: break zzForAction;
- }
-
- case 207:
- switch (zzInput) {
- case 23: zzState = 208; break zzForNext;
- default: break zzForAction;
- }
-
- case 208:
- switch (zzInput) {
- case 19: zzState = 209; break zzForNext;
- default: break zzForAction;
- }
-
- case 209:
- switch (zzInput) {
- case 13: zzState = 210; break zzForNext;
- default: break zzForAction;
- }
-
- case 210:
- switch (zzInput) {
- case 14: zzIsFinal = true; zzNoLookAhead = true; zzState = 211; break zzForNext;
- default: break zzForAction;
- }
-
- default:
- // if this is ever reached, there is a serious bug in JFlex
- zzScanError(ZZ_UNKNOWN_ERROR);
- break;
- } }
-
- if ( zzIsFinal ) {
- zzAction = zzState;
- zzMarkedPosL = zzCurrentPosL;
- if ( zzNoLookAhead ) break zzForAction;
- }
-
- }
- }
-
- // store back cached position
- zzMarkedPos = zzMarkedPosL;
-
- switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
- case 10:
- { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16BE;}
- }
- case 27: break;
- case 17:
- { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;}
- }
- case 28: break;
- case 4:
- { yybegin(SQ_STRING); string.setLength(0);
- }
- case 29: break;
- case 5:
- { string.append( yytext() );
- }
- case 30: break;
- case 22:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageLanguage;
- }
- case 31: break;
- case 26:
- { isXHTML = true;
- }
- case 32: break;
- case 24:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageEncoding;
- }
- case 33: break;
- case 1:
- { if (yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}
- }
- case 34: break;
- case 11:
- { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16LE;}
- }
- case 35: break;
- case 6:
- { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 36: break;
- case 8:
- { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue;
- }
- case 37: break;
- case 9:
- { yypushback(1);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;
- }
- case 38: break;
- case 7:
- { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;
- }
- case 39: break;
- case 14:
- { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;
- }
- case 40: break;
- case 23:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageContentType;
- }
- case 41: break;
- case 18:
- { if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}
- }
- case 42: break;
- case 15:
- { yypushback(2); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 43: break;
- case 2:
- { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);
- }
- case 44: break;
- case 12:
- { yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd;
- }
- case 45: break;
- case 13:
- { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;
- }
- case 46: break;
- case 25:
- { isWML = true;
- }
- case 47: break;
- case 19:
- { yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;
- }
- case 48: break;
- case 21:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;
- }
- case 49: break;
- case 20:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;
- }
- case 50: break;
- case 16:
- { yypushback(2);popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 51: break;
- case 3:
- { yybegin(DQ_STRING); string.setLength(0);
- }
- case 52: break;
- default:
- if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
- zzAtEOF = true;
- zzDoEOF();
- { hasMore = false; return EncodingParserConstants.EOF; }
- }
- else {
- zzScanError(ZZ_NO_MATCH);
- }
- }
- }
- }
-
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizerConstants.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizerConstants.java
deleted file mode 100644
index 08fa5b9a0b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizerConstants.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contenttype;
-
-import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants;
-
-public interface JSPHeadTokenizerConstants extends XMLHeadTokenizerConstants {
- String PageDirectiveStart = "PageDirectiveStart"; //$NON-NLS-1$
- String PageDirectiveEnd = "PageDirectiveEnd"; //$NON-NLS-1$
- String PageLanguage = "PageLanguage"; //$NON-NLS-1$
- String PageEncoding = "PageEncoding"; //$NON-NLS-1$
- String PageContentType = "PageContentType"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPResourceEncodingDetector.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPResourceEncodingDetector.java
deleted file mode 100644
index 521af027b0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPResourceEncodingDetector.java
+++ /dev/null
@@ -1,521 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.contenttype;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.nio.charset.Charset;
-import java.nio.charset.IllegalCharsetNameException;
-import java.nio.charset.UnsupportedCharsetException;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.sse.core.internal.encoding.CodedIO;
-import org.eclipse.wst.sse.core.internal.encoding.EncodingMemento;
-import org.eclipse.wst.sse.core.internal.encoding.IResourceCharsetDetector;
-import org.eclipse.wst.sse.core.internal.encoding.NonContentBasedEncodingRules;
-import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants;
-import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants;
-
-public class JSPResourceEncodingDetector implements IResourceCharsetDetector {
-
- private String fCharset;
-
- private String fContentType;
-
- private String fContentTypeValue;
-
- private String fLanguage;
-
- private String fPageEncodingValue;
-
- private JSPHeadTokenizer fTokenizer;
-
- private String fXMLDecEncodingName;
-
- private boolean unicodeCase;
-
- private EncodingMemento fEncodingMemento;
-
- private boolean fHeaderParsed;
-
- private Reader fReader;
-
- private boolean fXHTML;
-
- private boolean fWML;
-
-
- /**
- * No Arg constructor.
- */
- public JSPResourceEncodingDetector() {
- super();
- }
-
- class NullMemento extends EncodingMemento {
- /**
- *
- */
- public NullMemento() {
- super();
- String defaultCharset = NonContentBasedEncodingRules.useDefaultNameRules(null);
- setJavaCharsetName(defaultCharset);
- setAppropriateDefault(defaultCharset);
- setDetectedCharsetName(null);
- }
-
- }
-
- /**
- * @return Returns the contentType.
- */
- public String getContentType() throws IOException {
- ensureInputSet();
- if (!fHeaderParsed) {
- parseInput();
- // we keep track of if header's already been parse, so can make
- // multiple 'get' calls, without causing reparsing.
- fHeaderParsed = true;
- // Note: there is a "hidden assumption" here that an empty
- // string in content should be treated same as not present.
- }
- return fContentType;
- }
-
- public String getEncoding() throws IOException {
- return getEncodingMemento().getDetectedCharsetName();
- }
-
- // to ensure consist overall rules used, we'll mark as
- // final,
- // and require subclasses to provide certain pieces of
- // the
- // implementation
- public EncodingMemento getEncodingMemento() throws IOException {
- ensureInputSet();
- if (!fHeaderParsed) {
- parseInput();
- // we keep track of if header's already been
- // parse, so can make
- // multiple 'get' calls, without causing
- // reparsing.
- fHeaderParsed = true;
- // Note: there is a "hidden assumption" here
- // that an empty
- // string in content should be treated same as
- // not present.
- }
- if (fEncodingMemento == null) {
- handleSpecDefault();
- }
- if (fEncodingMemento == null) {
- // safty net
- fEncodingMemento = new NullMemento();
- }
- return fEncodingMemento;
- }
-
- public String getLanguage() throws IOException {
- ensureInputSet();
- if (!fHeaderParsed) {
- parseInput();
- fHeaderParsed = true;
- }
- return fLanguage;
- }
-
- public String getSpecDefaultEncoding() {
- // by JSP Spec
- final String enc = "ISO-8859-1"; //$NON-NLS-1$
- return enc;
- }
-
- public EncodingMemento getSpecDefaultEncodingMemento() {
- resetAll();
- EncodingMemento result = null;
- String enc = getSpecDefaultEncoding();
- if (enc != null) {
- createEncodingMemento(enc, EncodingMemento.DEFAULTS_ASSUMED_FOR_EMPTY_INPUT);
- fEncodingMemento.setAppropriateDefault(enc);
- result = fEncodingMemento;
- }
- return result;
- }
-
- /**
- *
- */
- public void set(InputStream inputStream) {
- resetAll();
- fReader = new ByteReader(inputStream);
- try {
- fReader.mark(CodedIO.MAX_MARK_SIZE);
- }
- catch (IOException e) {
- // impossible, since we know ByteReader
- // supports marking
- throw new Error(e);
- }
- }
-
- /**
- *
- */
- public void set(IStorage iStorage) throws CoreException {
- resetAll();
- InputStream inputStream = iStorage.getContents();
- InputStream resettableStream = new BufferedInputStream(inputStream, CodedIO.MAX_BUF_SIZE);
- resettableStream.mark(CodedIO.MAX_MARK_SIZE);
- set(resettableStream);
- // TODO we'll need to "remember" IFile, or
- // get its (or its project's) settings, in case
- // those are needed to handle cases when the
- // encoding is not in the file stream.
- }
-
- /**
- * Note: this is not part of interface to help avoid confusion ... it
- * expected this Reader is a well formed character reader ... that is, its
- * all ready been determined to not be a unicode marked input stream. And,
- * its assumed to be in the correct position, at position zero, ready to
- * read first character.
- */
- public void set(Reader reader) {
- resetAll();
- fReader = reader;
- if (!fReader.markSupported()) {
- fReader = new BufferedReader(fReader);
- }
- try {
- fReader.mark(CodedIO.MAX_MARK_SIZE);
- }
- catch (IOException e) {
- // impossble, since we just checked if markable
- throw new Error(e);
- }
- }
-
- private boolean canHandleAsUnicodeStream(String tokenType) {
- boolean canHandleAsUnicode = false;
- if (tokenType == EncodingParserConstants.UTF83ByteBOM) {
- canHandleAsUnicode = true;
- String enc = "UTF-8"; //$NON-NLS-1$
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- fEncodingMemento.setUTF83ByteBOMUsed(true);
- }
- else if (tokenType == EncodingParserConstants.UTF16BE) {
- canHandleAsUnicode = true;
- String enc = "UTF-16BE"; //$NON-NLS-1$
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- }
- else if (tokenType == EncodingParserConstants.UTF16LE) {
- canHandleAsUnicode = true;
- String enc = "UTF-16"; //$NON-NLS-1$
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- }
- return canHandleAsUnicode;
- }
-
- /**
- * Note: once this instance is created, trace info still needs to be
- * appended by caller, depending on the context its created.
- */
- private void createEncodingMemento(String detectedCharsetName) {
- fEncodingMemento = new EncodingMemento();
- fEncodingMemento.setJavaCharsetName(getAppropriateJavaCharset(detectedCharsetName));
- fEncodingMemento.setDetectedCharsetName(detectedCharsetName);
- // TODO: if detectedCharset and spec default is
- // null, need to use "work
- // bench based" defaults.
- fEncodingMemento.setAppropriateDefault(getSpecDefaultEncoding());
- }
-
- /**
- * There can sometimes be mulitple 'encodings' specified in a file. This
- * is an attempt to centralize the rules for deciding between them.
- * Returns encoding according to priority: 1. XML Declaration 2. page
- * directive pageEncoding name 3. page directive contentType charset name
- */
- private String getAppropriateEncoding() {
- String result = null;
- if (fXMLDecEncodingName != null)
- result = fXMLDecEncodingName;
- else if (fPageEncodingValue != null)
- result = fPageEncodingValue;
- else if (fCharset != null)
- result = fCharset;
- return result;
- }
-
- /**
- * This method can return null, if invalid charset name (in which case
- * "appropriateDefault" should be used, if a name is really need for some
- * "save anyway" cases).
- *
- * @param detectedCharsetName
- * @return
- */
- private String getAppropriateJavaCharset(String detectedCharsetName) {
- String result = null;
- // 1. Check explicit mapping overrides from
- // property file -- its here we pick up "rules" for cases
- // that are not even in Java
- result = CodedIO.checkMappingOverrides(detectedCharsetName);
- // 2. Use the "canonical" name from JRE mappings
- // Note: see Charset JavaDoc, the name you get one
- // with can be alias,
- // the name you get back is "standard" name.
- Charset javaCharset = null;
- try {
- javaCharset = Charset.forName(detectedCharsetName);
- }
- catch (UnsupportedCharsetException e) {
- // only set invalid, if result is same as detected -- they won't
- // be equal if
- // overridden
- if (result != null && result.equals(detectedCharsetName)) {
- fEncodingMemento.setInvalidEncoding(detectedCharsetName);
- }
- }
- catch (IllegalCharsetNameException e) {
- // only set invalid, if result is same as detected -- they won't
- // be equal if
- // overridden
- if (result != null && result.equals(detectedCharsetName)) {
- fEncodingMemento.setInvalidEncoding(detectedCharsetName);
- }
- }
- // give priority to java cononical name, if present
- if (javaCharset != null) {
- result = javaCharset.name();
- // but still allow overrides
- result = CodedIO.checkMappingOverrides(result);
- }
- return result;
- }
-
- private JSPHeadTokenizer getTokinizer() {
- if (fTokenizer == null) {
- fTokenizer = new JSPHeadTokenizer();
- }
- return fTokenizer;
- }
-
- private void handleSpecDefault() {
- String encodingName;
- encodingName = getSpecDefaultEncoding();
- if (encodingName != null) {
- // createEncodingMemento(encodingName,
- // EncodingMemento.USED_CONTENT_TYPE_DEFAULT);
- fEncodingMemento = new EncodingMemento();
- fEncodingMemento.setJavaCharsetName(encodingName);
- fEncodingMemento.setAppropriateDefault(encodingName);
- }
- }
-
- private boolean isLegalString(String valueTokenType) {
- boolean result = false;
- if (valueTokenType != null) {
- result = valueTokenType.equals(EncodingParserConstants.StringValue) || valueTokenType.equals(EncodingParserConstants.UnDelimitedStringValue) || valueTokenType.equals(EncodingParserConstants.InvalidTerminatedStringValue) || valueTokenType.equals(EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue);
- }
- return result;
- }
-
-
- /**
- * This method should be exactly the same as what is in
- * JSPHeadTokenizerTester
- * @param contentType
- */
- private void parseContentTypeValue(String contentType) {
- Pattern pattern = Pattern.compile(";\\s*charset\\s*=\\s*"); //$NON-NLS-1$
- String[] parts = pattern.split(contentType);
- if (parts.length > 0) {
- // if only one item, it can still be charset instead of
- // contentType
- if (parts.length == 1) {
- if (parts[0].length() > 6) {
- String checkForCharset = parts[0].substring(0, 7);
- if (checkForCharset.equalsIgnoreCase("charset")) { //$NON-NLS-1$
- int eqpos = parts[0].indexOf('=');
- eqpos = eqpos + 1;
- if (eqpos < parts[0].length()) {
- fCharset = parts[0].substring(eqpos);
- fCharset = fCharset.trim();
- }
- }
- else {
- fContentType = parts[0];
- }
- }
- }
- else {
- fContentType = parts[0];
- }
- }
- if (parts.length > 1) {
- fCharset = parts[1];
- }
- }
-
-
- /**
- * Looks for what ever encoding properties the tokenizer returns. Its the
- * responsibility of the tokenizer to stop when appropriate and not go too
- * far.
- */
- private void parseHeader(JSPHeadTokenizer tokenizer) throws IOException {
- fPageEncodingValue = null;
- fCharset = null;
-
- HeadParserToken token = null;
- do {
- // don't use 'get' here (at least until reset issue fixed)
- token = tokenizer.getNextToken();
- String tokenType = token.getType();
- if (canHandleAsUnicodeStream(tokenType))
- unicodeCase = true;
- else {
-
- if (tokenType == XMLHeadTokenizerConstants.XMLDelEncoding) {
- if (tokenizer.hasMoreTokens()) {
- HeadParserToken valueToken = tokenizer.getNextToken();
- String valueTokenType = valueToken.getType();
- if (isLegalString(valueTokenType)) {
- fXMLDecEncodingName = valueToken.getText();
- }
- }
- }
- else if (tokenType == JSPHeadTokenizerConstants.PageEncoding) {
- if (tokenizer.hasMoreTokens()) {
- HeadParserToken valueToken = tokenizer.getNextToken();
- String valueTokenType = valueToken.getType();
- if (isLegalString(valueTokenType)) {
- fPageEncodingValue = valueToken.getText();
- }
- }
- }
- else if (tokenType == JSPHeadTokenizerConstants.PageContentType) {
- if (tokenizer.hasMoreTokens()) {
- HeadParserToken valueToken = tokenizer.getNextToken();
- String valueTokenType = valueToken.getType();
- if (isLegalString(valueTokenType)) {
- fContentTypeValue = valueToken.getText();
- }
- }
- }
- else if (tokenType == JSPHeadTokenizerConstants.PageLanguage) {
- if (tokenizer.hasMoreTokens()) {
- HeadParserToken valueToken = tokenizer.getNextToken();
- String valueTokenType = valueToken.getType();
- if (isLegalString(valueTokenType)) {
- fLanguage = valueToken.getText();
- }
- }
- }
- }
- }
- while (tokenizer.hasMoreTokens());
- if (fContentTypeValue != null) {
- parseContentTypeValue(fContentTypeValue);
- }
- if (tokenizer.isXHTML()) {
- fXHTML = true;
- }
- if (tokenizer.isWML() ) {
- fWML = true;
- }
-
-
- }
-
- private void parseInput() throws IOException {
- JSPHeadTokenizer tokenizer = getTokinizer();
- fReader.reset();
- tokenizer.reset(fReader);
- parseHeader(tokenizer);
- // unicode stream cases are created directly in parseHeader
- if (!unicodeCase) {
- String enc = getAppropriateEncoding();
- if (enc != null && enc.length() > 0) {
- createEncodingMemento(enc, EncodingMemento.FOUND_ENCODING_IN_CONTENT);
- }
- }
- }
-
- /**
- *
- */
- private void resetAll() {
- fReader = null;
- fHeaderParsed = false;
- fEncodingMemento = null;
- fCharset = null;
- fContentTypeValue = null;
- fPageEncodingValue = null;
- fXMLDecEncodingName = null;
- unicodeCase = false;
- fXHTML=false;
- fWML=false;
- }
-
-
-
- /**
- * convience method all subclasses can use (but not override)
- *
- * @param detectedCharsetName
- * @param reason
- */
- private void createEncodingMemento(String detectedCharsetName, String reason) {
- createEncodingMemento(detectedCharsetName);
- }
-
- /**
- * convience method all subclasses can use (but not override)
- */
- private void ensureInputSet() {
- if (fReader == null) {
- throw new IllegalStateException("input must be set before use"); //$NON-NLS-1$
- }
- }
-
- public boolean isWML() throws IOException {
- ensureInputSet();
- if (!fHeaderParsed) {
- parseInput();
- // we keep track of if header's already been parse, so can make
- // multiple 'get' calls, without causing reparsing.
- fHeaderParsed = true;
- // Note: there is a "hidden assumption" here that an empty
- // string in content should be treated same as not present.
- }
- return fWML;
- }
-
- public boolean isXHTML() throws IOException {
- ensureInputSet();
- if (!fHeaderParsed) {
- parseInput();
- // we keep track of if header's already been parse, so can make
- // multiple 'get' calls, without causing reparsing.
- fHeaderParsed = true;
- // Note: there is a "hidden assumption" here that an empty
- // string in content should be treated same as not present.
- }
- return fXHTML;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/DocumentFactoryForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/DocumentFactoryForJSP.java
deleted file mode 100644
index d0050e26ae..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/DocumentFactoryForJSP.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.document;
-
-import org.eclipse.core.filebuffers.IDocumentFactory;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.wst.sse.core.internal.document.StructuredDocumentFactory;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-
-
-public class DocumentFactoryForJSP implements IDocumentFactory {
-
- public DocumentFactoryForJSP() {
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IDocumentFactory#createDocument()
- */
- public IDocument createDocument() {
- IStructuredDocument structuredDocument = StructuredDocumentFactory.getNewStructuredDocumentInstance(new JSPSourceParser());
- return structuredDocument;
- }
-
- public RegionParser getParser() {
- // remember, the Loader
- // will need to finish initialization of parser
- // based on "embedded content"
- JSPSourceParser parser = new JSPSourceParser();
- // add default nestable tag list
- addNestablePrefix(parser, JSP11Namespace.JSP_TAG_PREFIX);
- return parser;
- }
-
- private void addNestablePrefix(JSPSourceParser parser, String tagName) {
- TagMarker bm = new TagMarker(tagName);
- parser.addNestablePrefix(bm);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapter.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapter.java
deleted file mode 100644
index 831215bf28..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapter.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.document;
-
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.EmbeddedTypeHandler;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-
-/**
- * Classes which implement this interface have two responsibilities.
- * One is to provide
- * and embedded factory registry for JSP Aware INodeAdapter Factories
- * to use. The other is to monitor page directives and if
- * a change in embedded type is is made, it will signal
- * the structuredModel that it needs to reinitialize itself.
- */
-public interface PageDirectiveAdapter extends INodeAdapter {
-
- public String getContentType();
-
- public String getLanguage();
-
- /**
- * This setter method should be called once, shortly after
- * initialization.
- */
- void setEmbeddedType(EmbeddedTypeHandler handler);
-
- EmbeddedTypeHandler getEmbeddedType();
-
- /**
- * This method is to give this adapter a chance to use
- * the AdapterFactores from the EmbeddedTypeHandler
- * to adapt the node. Its to be used by JSPAwareAdapterFactories
- * to (potentially) adapt nodes from the embedded content type.
- */
- INodeAdapter adapt(INodeNotifier notifier, Object type);
-
- void addEmbeddedFactory(INodeAdapterFactory factory);
-
- /**
- * Method setLanguage.
- * @param language
- */
- void setLanguage(String language);
-
- INodeNotifier getTarget();
-
- public void release();
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterFactory.java
deleted file mode 100644
index f20707e5e4..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterFactory.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.document;
-
-import org.eclipse.jst.jsp.core.internal.Assert;
-import org.eclipse.wst.sse.core.internal.provisional.AbstractAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Node;
-
-/**
- * This class adapts document
- * with the an instance of PageDirectiveAdapter
- */
-public class PageDirectiveAdapterFactory extends AbstractAdapterFactory implements INodeAdapterFactory {
-
-
- private PageDirectiveAdapter pageDirectiveAdapterInstance = null;
-
- /**
- * Constructor for PageDirectiveAdapterFactory.
- * Note: its important not to be a singleton, since
- * this factory needs to track its adapter(s) and release
- * them when they are released.
- *
- * @param adapterKey
- * @param registerAdapters
- */
- protected PageDirectiveAdapterFactory(Object adapterKey, boolean registerAdapters) {
- super(adapterKey, registerAdapters);
- }
-
- /**
- * The no argument constructor assumes its a
- * Factory for PageDirectiveAdapter
- */
- public PageDirectiveAdapterFactory() {
- this(PageDirectiveAdapter.class, true);
- }
-
- protected INodeAdapter createAdapter(INodeNotifier target) {
- PageDirectiveAdapter result = null;
- if (target instanceof IDOMNode) {
- IDOMNode node = (IDOMNode) target;
- if (node.getNodeType() == Node.DOCUMENT_NODE) {
- result = getAdapterInstance(target);
- }
-
- }
- return result;
- }
-
- public void release() {
- if (pageDirectiveAdapterInstance != null) {
- pageDirectiveAdapterInstance.release();
- }
- }
-
- /**
- * We assume this is only called for 'document' target
- */
- protected PageDirectiveAdapter getAdapterInstance(INodeNotifier target) {
- // if our instance already exists with a different
- // target, then, somehow, the document node must
- // have changed for a model, so we should release
- // old adapter and create new one for new document
- // node. This is probably a programming error.
- if (pageDirectiveAdapterInstance != null) {
- if (target != pageDirectiveAdapterInstance.getTarget()) {
- release();
- pageDirectiveAdapterInstance = new PageDirectiveAdapterImpl(target);
- }
- // else return the one we have
- }
- else {
- // if is equal to null, create a new one
- pageDirectiveAdapterInstance = new PageDirectiveAdapterImpl(target);
- }
- Assert.isNotNull(pageDirectiveAdapterInstance, "pageDipageDirectiveAdapterInstance was null"); //$NON-NLS-1$
- return pageDirectiveAdapterInstance;
- }
-
- public INodeAdapterFactory copy() {
-
- return new PageDirectiveAdapterFactory(getAdapterKey(), isShouldRegisterAdapter());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterImpl.java
deleted file mode 100644
index 5a383f8232..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterImpl.java
+++ /dev/null
@@ -1,704 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004-2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.document;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentExtension3;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.contentproperties.JSPFContentProperties;
-import org.eclipse.jst.jsp.core.internal.modelhandler.EmbeddedTypeStateData;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.IContentDescriptionForJSP;
-import org.eclipse.jst.jsp.core.internal.text.StructuredTextPartitionerForJSP;
-import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeFamilyForHTML;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.EmbeddedTypeHandler;
-import org.eclipse.wst.sse.core.internal.modelhandler.EmbeddedTypeRegistry;
-import org.eclipse.wst.sse.core.internal.modelhandler.EmbeddedTypeRegistryImpl;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredPartitioning;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.sse.core.internal.util.DocumentInputStream;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-import com.ibm.icu.util.StringTokenizer;
-
-/**
- * This class has the responsibility to provide an embedded factory registry
- * for JSP Aware INodeAdapter Factories to use.
- *
- * Typically, the embedded type is to be considered a feature of the document,
- * so JSP Aware AdpaterFactories should call
- * getAdapter(PageDirectiveAdapter.class) directoy on the document (or owning
- * document) node.
- */
-public class PageDirectiveAdapterImpl implements PageDirectiveAdapter {
-
- protected static final String STR_CHARSET = "charset"; //$NON-NLS-1$
- private final static Object adapterType = PageDirectiveAdapter.class;
- private IStructuredModel model;
- protected final String[] JAVASCRIPT_LANGUAGE_KEYS = new String[]{"javascript", "javascript1.0", "javascript1.1_3", "javascript1.2", "javascript1.3", "javascript1.4", "javascript1.5", "javascript1.6", "jscript", "sashscript"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
- protected final String[] JAVA_LANGUAGE_KEYS = new String[]{"java"}; //$NON-NLS-1$
-
- /**
- * Constructor for PageDirectiveAdapterImpl.
- */
- public PageDirectiveAdapterImpl(INodeNotifier target) {
- super();
- notifierAtCreation = target;
- // we need to remember our instance of model,
- // in case we need to "signal" a re-init needed.
- if (target instanceof IDOMNode) {
- IDOMNode node = (IDOMNode) target;
- model = node.getModel();
- }
-
- }
-
- /**
- * parses the full contentType value into its two parts the contentType,
- * and the charset, if present. Note: this method is a lightly modified
- * version of a method in AbstractHeadParser. There, we're mostly
- * interested in the charset part of contentTypeValue. Here, we're mostly
- * interested in the mimeType part.
- */
- private String getMimeTypeFromContentTypeValue(String contentTypeValue) {
- if (contentTypeValue == null)
- return null;
- String cleanContentTypeValue = StringUtils.stripNonLetterDigits(contentTypeValue);
- StringTokenizer tokenizer = new StringTokenizer(cleanContentTypeValue, ";= \t\n\r\f"); //$NON-NLS-1$
- int tLen = tokenizer.countTokens();
- // if contains encoding should have three tokens, the mimetype, the
- // word 'charset', and the encoding value
- String[] tokens = new String[tLen];
- int j = 0;
- while (tokenizer.hasMoreTokens()) {
- tokens[j] = tokenizer.nextToken();
- j++;
- }
- //
- // Following is the common form for target expression
- // <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
- // But apparrently is also valid without the content type there,
- // just the charset, as follows:
- // <META http-equiv="Content-Type" content="charset=UTF-8">
- // So we'll loop through tokens and key off of 'charset'
-
- int charsetPos = -1;
- for (int i = 0; i < tokens.length; i++) {
- if (tokens[i].equalsIgnoreCase(STR_CHARSET)) {
- charsetPos = i;
- break;
- }
- }
- // String charset = null;
- String contentType = null;
- if (charsetPos > -1) {
- // case where charset was present
- // int charsetValuePos = charsetPos + 1;
- // if (charsetValuePos < tokens.length) {
- // charset = tokens[charsetValuePos];
- // }
- int contentTypeValuePos = charsetPos - 1;
- if (contentTypeValuePos > -1) {
- contentType = tokens[contentTypeValuePos];
- }
- }
- else {
- // charset was not present, so if there's
- // a value, we assume its the contentType value
- if (tokens.length > 0) {
- contentType = tokens[0];
- }
- }
- return contentType;
- }
-
- private EmbeddedTypeHandler embeddedTypeHandler;
- private List embeddedFactoryRegistry = new ArrayList();
- private String cachedLanguage;
- private String cachedContentType;
- private INodeNotifier notifierAtCreation;
-
- private int firstLanguagePosition = -1;
- private int firstContentTypePosition = -1;
-
- /*
- * @see INodeAdapter#isAdapterForType(Object)
- */
- public boolean isAdapterForType(Object type) {
- return (type == adapterType);
- }
-
- /*
- * @see INodeAdapter#notifyChanged(INodeNotifier, int, Object, Object,
- * Object, int)
- */
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- }
-
- public void setEmbeddedType(EmbeddedTypeHandler handler) {
- // if really the same handler, no need for further processing
- if (embeddedTypeHandler == handler) {
- return;
- }
- // then one exists, and the new one is truely different, so we need to
- // release and remove current factories
- if (embeddedTypeHandler != null) {
- Iterator list = embeddedFactoryRegistry.iterator();
- while (list.hasNext()) {
- INodeAdapterFactory factory = (INodeAdapterFactory) list.next();
- factory.release();
- }
-
- embeddedFactoryRegistry.clear();
- }
-
- embeddedTypeHandler = handler;
- // when the handler is set, "transfer" its factories to our own list.
- // note: our own list may also be added to else where, such as on
- // "editor side".
- if (embeddedTypeHandler != null) {
- Iterator iterator = embeddedTypeHandler.getAdapterFactories().iterator();
- while (iterator.hasNext()) {
- INodeAdapterFactory factory = (INodeAdapterFactory) iterator.next();
- embeddedFactoryRegistry.add(factory);
- }
- }
- }
-
- /**
- * @see PageDirectiveAdapter#adapt(INodeNotifier, Object)
- */
- public INodeAdapter adapt(INodeNotifier notifier, Object type) {
- INodeAdapter result = null;
- // if embeddedContentType hasn't been set,
- // then we can not adapt it.
- if (embeddedTypeHandler != null) {
- if (embeddedFactoryRegistry != null) {
- Iterator iterator = embeddedFactoryRegistry.iterator();
- INodeAdapterFactory factory = null;
- while (iterator.hasNext()) {
- factory = (INodeAdapterFactory) iterator.next();
- if (factory.isFactoryForType(type)) {
- result = factory.adapt(notifier);
- break;
- }
- }
- }
- }
- return result;
-
- }
-
- /**
- * @see PageDirectiveAdapter#getEmbeddedType()
- */
- public EmbeddedTypeHandler getEmbeddedType() {
- if (embeddedTypeHandler == null) {
- embeddedTypeHandler = getDefaultEmbeddedType();
- }
- return embeddedTypeHandler;
- }
-
- public void addEmbeddedFactory(INodeAdapterFactory factory) {
- // should we check if already exists in list?
- embeddedFactoryRegistry.add(factory);
- }
-
- // /**
- // * Used by PageDirectiveWatchers to signal that some important attribute
- // has changed, and
- // * any cached values should be re-calcuated
- // */
- // void changed() {
- // // we won't actually check if change is needed, if the model state is
- // already changing.
- // if (!model.isReinitializationNeeded()) {
- // // go through our list of page watcher adapters, and updates the
- // attributes
- // // we're interested in, if and only if they are the earliest occurance
- // in the resource
- // String potentialContentType = null;
- // String potentialLanguage = null;
- // int contentTypePosition = -1;
- // int languagePosition = -1;
- // Iterator iterator = pageDirectiveWatchers.iterator();
- // while (iterator.hasNext()) {
- // PageDirectiveWatcher pdWatcher = (PageDirectiveWatcher)
- // iterator.next();
- // String contentType = pdWatcher.getContentType();
- // String language = pdWatcher.getLanguage();
- // int offset = pdWatcher.getOffset();
- // if (potentialContentType == null || (hasValue(contentType) && (offset <
- // contentTypePosition))) {
- // potentialContentType = contentType;
- // contentTypePosition = offset;
- // }
- // }
- // // now we have the best candiates for cached values, let's see if
- // they've really changed from
- // // what we had. If so, note we go through the setters so side effects
- // can take place there.
- // potentialContentType =
- // getMimeTypeFromContentTypeValue(potentialContentType);
- // if (potentialContentType == null || potentialContentType.length() == 0)
- // {
- // //potentialContentType = getDefaultContentType();
- // } else {
- // setCachedContentType(potentialContentType);
- // }
- //
- // if (potentialLanguage != null && hasValue(potentialLanguage)) {
- // setCachedLanguage(potentialLanguage);
- // }
- // }
- // }
- void changedContentType(int elementOffset, String newValue) {
- // only need to process if this new value is
- // earlier in the file than our current value
- if (firstContentTypePosition == -1 || elementOffset <= firstContentTypePosition) {
- // dw_TODO: update embedded partitioner in JSP document
- // partitioner
- // nsd_TODO: update embedded partitioner in JSP document
- // partitioner
-
- // no need to change current value, if we're told some
- // earlier value is null or blank (sounds like an error, anyway)
- if (hasValue(newValue)) {
- firstContentTypePosition = elementOffset;
- String potentialContentType = getMimeTypeFromContentTypeValue(newValue);
- // only do the set processing if different
- // from what it already is
- // if (!potentialContentType.equalsIgnoreCase(cachedLanguage))
- // {
- setCachedContentType(potentialContentType);
- // }
- }
- }
- }
-
- /**
- * Used by PageDirectiveWatchers to signal that some important attribute
- * has changed, and any cached values should be re-calcuated
- */
- void changedLanguage(int elementOffset, String newValue) {
- // only need to process if this new value is
- // earlier in the file than our current value
- // has to be less than or equal to, in case our previous earliest one,
- // is itself changing!
- if (firstLanguagePosition == -1 || elementOffset <= firstLanguagePosition) {
-
- // no need to change current value, if we're told some
- // earlier value is null or blank (sounds like an error, anyway)
- if (hasValue(newValue)) {
- firstLanguagePosition = elementOffset;
- // only do the set processing if different
- // from what it already is
- if (!newValue.equalsIgnoreCase(cachedLanguage)) {
- setCachedLanguage(newValue);
- }
- }
-
- // dw_TODO: set language in document partitioner
- // nsd_TODO: set language in document partitioner
- }
- }
-
- /**
- * Used by PageDirectiveWatchers to signal that some important attribute
- * has changed, and any cached values should be re-calcuated
- */
- void changedPageEncoding(int elementOffset, String newValue) {
-
- // we don't currently track active value, since
- // just need during read and write (where its
- // calculated. We will need in future, to
- // acurately clone a model and to display
- // "current encoding" to user in status bar.
- }
-
- /**
- * Method hasValue.
- *
- * @param contentType
- * @return boolean
- */
- private boolean hasValue(String value) {
- if (value != null && value.length() > 0)
- return true;
- else
- return false;
- }
-
- /**
- * Returns the cachedContentType.
- *
- * @return String
- */
- public String getContentType() {
- if (cachedContentType == null) {
- cachedContentType = getDefaultContentType();
- }
- return cachedContentType;
- }
-
- /**
- * Method getDefaultContentType.
- *
- * @return String
- */
- private String getDefaultContentType() {
- String type = null;
- IFile file = getFile(model);
- if (file != null) {
- type = JSPFContentProperties.getProperty(JSPFContentProperties.JSPCONTENTTYPE, file, true);
- }
- // BUG136468
- if (type == null)
- type = "text/html"; //$NON-NLS-1$
- return type;
- }
-
- /**
- * Returns the cachedLanguage.
- *
- * @return String
- */
- public String getLanguage() {
- if (cachedLanguage == null)
- cachedLanguage = getDefaultLanguage();
- return cachedLanguage;
- }
-
- /**
- * Method getDefaultLanguage.
- *
- * @return String
- */
- private String getDefaultLanguage() {
- String language = null;
- IFile file = getFile(model);
- if (file != null) {
- language = JSPFContentProperties.getProperty(JSPFContentProperties.JSPLANGUAGE, file, true);
- }
- // BUG136468
- if (language == null)
- language = "java"; //$NON-NLS-1$
- return language;
- }
-
- /**
- * Sets the cachedContentType.
- *
- * @param cachedContentType
- * The cachedContentType to set
- */
- public void setCachedContentType(String newContentType) {
- /*
- * if the passed in value is the same as existing, there's nothing to
- * do. if its different, then we need to change the contentHandler as
- * well and, more to the point, signal a re-initializtation is needed.
- *
- * Note: if the value we're getting set to does not have a handler in
- * the registry, we'll actually not set it to null or anything, we'll
- * just continue on with the one we have. This is pretty important to
- * avoid re-initializing on every key stroke if someone is typing in a
- * new content type, but haven't yet finished the whole "word".
- * However, if an contentType is not recognized, the registry returns
- * the one for XML.
- */
-
- /* set the actual value first, the rest is "side effect" */
- this.cachedContentType = newContentType;
-
- /* see if we need to update embedded handler */
-
- /*
- * If the document is a type of XHTML, we do not use the page
- * directive's contentType to determine the embedded type ... its
- * XHTML! ... and, eventually, the DOCTYPE adapter should determine
- * if/when it needs to change.
- */
-
- /* just safety check, can be removed later, early in release cycle */
- if (model == null) {
- // throw IllegalStateException("model should never be null in
- // PageDirective Adapter");
- Logger.log(Logger.ERROR, "model should never be null in PageDirective Adapter");
- return;
- }
-
- EmbeddedTypeHandler potentialNewandler = null;
- IContentDescription contentDescription = getContentDescription(model.getStructuredDocument());
- Object prop = contentDescription.getProperty(IContentDescriptionForJSP.CONTENT_FAMILY_ATTRIBUTE);
- if (prop != null) {
- if (ContentTypeFamilyForHTML.HTML_FAMILY.equals(prop)) {
- potentialNewandler = EmbeddedTypeRegistryImpl.getInstance().getTypeFor("text/html");
- }
- }
-
- if (potentialNewandler == null) {
- /*
- * getHandler should always return something (never null), based
- * on the rules in the factory.
- */
- potentialNewandler = getHandlerFor(this.cachedContentType);
- }
- /*
- * we do this check for re-init here, instead of in setEmbeddedType,
- * since setEmbeddedType is called during the normal initializtion
- * process, when re-init is not needed (since there is no content)
- */
- if (embeddedTypeHandler == null) {
- setEmbeddedType(potentialNewandler);
- }
- else if (potentialNewandler != null && embeddedTypeHandler != potentialNewandler) {
- /*
- * changing this embedded handler here may be in the middle of a
- * notify loop. That's why we set that "it's needed". Then the
- * model decides when its "safe" to actually do the re-init.
- *
- * be sure to hold oldHandler in temp var or else setEmbeddedType
- * will "reset" it before modelReinitNeeded(oldHandler, handler)
- * is called
- *
- */
- EmbeddedTypeHandler oldHandler = embeddedTypeHandler;
- setEmbeddedType(potentialNewandler);
- modelReinitNeeded(oldHandler, potentialNewandler);
- }
-
- }
-
- /**
- * This method is used to re-init based on embeddedTypeHandler changing.
- * It is given priority over the language change, since there its more
- * important to have old and new handlers's in the stateData field.
- */
- private void modelReinitNeeded(EmbeddedTypeHandler oldHandler, EmbeddedTypeHandler newHandler) {
- if (model.isReinitializationNeeded()) {
- System.out.println("already being initialized"); //$NON-NLS-1$
- }
-
- try {
- model.aboutToChangeModel();
- model.setReinitializeStateData(new EmbeddedTypeStateData(oldHandler, newHandler));
- model.setReinitializeNeeded(true);
- }
- finally {
- model.changedModel();
- }
- }
-
- /**
- * Method modelReinitNeeded.
- */
- private void modelReinitNeeded(String oldlanguage, String newLanguage) {
- // bit of a short cut for now .... we dont' need language at the
- // moment,
- // but should set the state data
- if (model.isReinitializationNeeded()) {
- if (Debug.displayWarnings) {
- System.out.println("already being initialized"); //$NON-NLS-1$
- }
- }
- else {
- try {
- // if already being re-initialized, we don't want to
- // reset the data in the stateData field.
- model.aboutToChangeModel();
- model.setReinitializeStateData(newLanguage);
- model.setReinitializeNeeded(true);
- }
- finally {
- model.changedModel();
- }
- }
- }
-
- public void setCachedLanguage(String newLanguage) {
- if (cachedLanguage != null && languageStateChanged(cachedLanguage, newLanguage)) {
- /*
- * a complete re-init overkill in current system, since really
- * just need for the line style providers, BUT, a change in
- * language could effect other things, and we don't expect to
- * happen often so a little overkill isn't too bad. The deep
- * problem is that there is no way to get at the "edit side"
- * adpapters specifically here in model class. we have to do the
- * model changed sequence to get the screen to update. do not
- * signal again, if signaled once (the reinit state data will be
- * wrong. (this needs to be improved in future)
- */
- if (!model.isReinitializationNeeded()) {
- modelReinitNeeded(cachedLanguage, newLanguage);
- }
- }
- setLanguage(newLanguage);
- }
-
- /**
- * This is public access method, used especially from loader, for JSP
- * Fragment support.
- */
- public void setLanguage(String newLanguage) {
- this.cachedLanguage = newLanguage;
- IDocumentPartitioner partitioner = ((IDocumentExtension3) model.getStructuredDocument()).getDocumentPartitioner(IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING);
- if (partitioner instanceof StructuredTextPartitionerForJSP) {
- ((StructuredTextPartitionerForJSP) partitioner).setLanguage(newLanguage);
- }
- }
-
- /**
- * Method languageStateChange.
- *
- * @param cachedLanguage
- * @param newLanguage
- * @return boolean
- */
- private boolean languageStateChanged(String cachedLanguage, String newLanguage) {
- boolean result = false; // languages are equal, then no change in
- // state
- if (!cachedLanguage.equalsIgnoreCase(newLanguage)) {
- boolean oldLanguageKnown = languageKnown(cachedLanguage);
- boolean newLanguageKnown = languageKnown(newLanguage);
- result = newLanguageKnown || (!newLanguageKnown && oldLanguageKnown);
- }
- return result;
- }
-
- /**
- * Method languageKnown.
- *
- * @param cachedLanguage
- * @return boolean
- */
- private boolean languageKnown(String language) {
- return (StringUtils.contains(JAVA_LANGUAGE_KEYS, language, false) || StringUtils.contains(JAVASCRIPT_LANGUAGE_KEYS, language, false));
- }
-
- private IFile getFile(IStructuredModel model) {
- String location = model.getBaseLocation();
- if (location != null) {
- IPath path = new Path(location);
- if (path.segmentCount() > 1) {
- return ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- }
- return null;
- }
-
- private EmbeddedTypeHandler getHandlerFor(String contentType) {
- EmbeddedTypeRegistry reg = getEmbeddedContentTypeRegistry();
- EmbeddedTypeHandler handler = null;
- if (reg != null)
- handler = reg.getTypeFor(contentType);
- return handler;
- }
-
- /**
- * Gets the embeddedContentTypeRegistry.
- *
- * @return Returns a EmbeddedContentTypeRegistry
- */
- private EmbeddedTypeRegistry getEmbeddedContentTypeRegistry() {
- return EmbeddedTypeRegistryImpl.getInstance();
- }
-
- /**
- * For JSP files, text/html is the default content type. This may want
- * this different for types like jsv (jsp for voice xml) For now, hard
- * code to new instance. In future, should get instance from registry.
- *
- * Specification cites HTML as the default contentType.
- */
- protected EmbeddedTypeHandler getDefaultEmbeddedType() {
- return getHandlerFor(getDefaultContentType());
- }
-
- public INodeNotifier getTarget() {
- return notifierAtCreation;
- }
-
- public void release() {
- if (embeddedTypeHandler != null) {
- if (embeddedFactoryRegistry != null) {
- Iterator iterator = embeddedFactoryRegistry.iterator();
- INodeAdapterFactory factory = null;
- while (iterator.hasNext()) {
- factory = (INodeAdapterFactory) iterator.next();
- factory.release();
- }
- }
- // pa_TODO: possibly need to release here...
- // or "uninitializeFactoryRegistry"
- // initializeFactoryRegistry was called from JSPModelLoader
- embeddedTypeHandler = null;
- }
- }
-
- private IContentDescription getContentDescription(IDocument doc) {
- if (doc == null)
- return null;
- DocumentInputStream in = new DocumentInputStream(doc);
- return getContentDescription(in);
- }
-
- /**
- * Returns content description for an input stream Assumes it's JSP
- * content. Closes the input stream when finished.
- *
- * @param in
- * @return the IContentDescription for in, or null if in is null
- */
- private IContentDescription getContentDescription(DocumentInputStream in) {
-
- if (in == null)
- return null;
-
- IContentDescription desc = null;
- try {
-
- IContentType contentTypeJSP = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- desc = contentTypeJSP.getDescriptionFor(in, IContentDescription.ALL);
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- finally {
- if (in != null) {
- try {
- in.close();
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- }
- }
- return desc;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcher.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcher.java
deleted file mode 100644
index 6037021402..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcher.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.document;
-
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-
-interface PageDirectiveWatcher extends INodeAdapter {
-
- String getContentType();
-
- String getLanguage();
-
- int getOffset();
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java
deleted file mode 100644
index ea7df830b2..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherFactory.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.document;
-
-import org.eclipse.wst.sse.core.internal.PropagatingAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.xml.core.internal.propagate.PropagatingAdapterFactoryImpl;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.w3c.dom.Node;
-
-public class PageDirectiveWatcherFactory extends PropagatingAdapterFactoryImpl implements PropagatingAdapterFactory {
-
- /**
- * Constructor for PageDirectiveWatcherFactory.
- */
- public PageDirectiveWatcherFactory() {
- this(PageDirectiveWatcher.class, true);
- }
-
- /**
- * Constructor for PageDirectiveWatcherFactory.
- *
- * @param adapterKey
- * @param registerAdapters
- */
- public PageDirectiveWatcherFactory(Object adapterKey, boolean registerAdapters) {
- super(adapterKey, registerAdapters);
- }
-
- protected INodeAdapter createAdapter(INodeNotifier target) {
- PageDirectiveWatcher result = null;
- if (target instanceof IDOMElement) {
- IDOMElement xmlElement = (IDOMElement) target;
- if (xmlElement.getNodeType() == Node.ELEMENT_NODE) {
- String nodeName = xmlElement.getNodeName();
- if (nodeName.equals("jsp:directive.page")) { //$NON-NLS-1$
- result = new PageDirectiveWatcherImpl(xmlElement);
- }
-
- }
- }
- return result;
-
- }
-
-public INodeAdapterFactory copy() {
- return new PageDirectiveWatcherFactory(getAdapterKey(), isShouldRegisterAdapter());
- }} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherImpl.java
deleted file mode 100644
index 2fc219a9b7..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.document;
-
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.xml.core.internal.document.AttrImpl;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-
-
-/**
- * The responsibility of this class is to monitor page directives and if
- * a change in embedded type is is made, it will signal
- * the structuredModel that it needs to reinitialize itself.
- */
-class PageDirectiveWatcherImpl implements PageDirectiveWatcher {
-
- private static Object adapterType = PageDirectiveWatcher.class;
- IDOMElement targetElement;
-
- /**
- * Constructor for PageDirectiveWatcherImpl.
- */
- public PageDirectiveWatcherImpl(IDOMElement target) {
- super();
- targetElement = target;
- String contentTypeValue = target.getAttribute("contentType"); //$NON-NLS-1$
- if (contentTypeValue != null) {
- // using concrete class below, since "changed" is something of an internal method
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((IDOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
- pageDirectiveAdapter.changedContentType(((IndexedRegion) targetElement).getStartOffset(), contentTypeValue);
- }
- String languageValue = target.getAttribute("language"); //$NON-NLS-1$
- if (languageValue != null) {
- // using concrete class below, since "changed" is something of an internal method
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((IDOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
- pageDirectiveAdapter.changedLanguage(((IndexedRegion) targetElement).getStartOffset(), languageValue);
- }
-
-
- }
-
- public boolean isAdapterForType(Object type) {
- return (type == adapterType);
- }
-
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- // we should only be added to page directives, so if we see a page directive
- // change, we need to check its attributes, and notify the PageDirectiveAdapter when
- // certain ones chane, so it can make its "centralized" decisions.
- if (notifier instanceof IDOMNode) {
-
- switch (eventType) {
- case INodeNotifier.CHANGE :
- if (changedFeature instanceof AttrImpl) {
- AttrImpl attribute = (AttrImpl) changedFeature;
- String name = attribute.getName();
- if (name.equals("contentType")) { //$NON-NLS-1$
- // using concrete class below, since "changed" is something of an internal method
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((IDOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
- pageDirectiveAdapter.changedContentType(((IndexedRegion) targetElement).getStartOffset(), (String) newValue);
- }
- if (name.equals("language")) { //$NON-NLS-1$ //$NON-NLS-2$
- // using concrete class below, since "changed" is something of an internal method
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((IDOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
- pageDirectiveAdapter.changedLanguage(((IndexedRegion) targetElement).getStartOffset(), (String) newValue);
- }
- }
-
- break;
- case INodeNotifier.REMOVE :
- //System.out.println("removed"+new Date().toString());
- break;
-
-
- default :
- break;
- }
- }
-
- }
-
- public String getContentType() {
- String contentTypeValue = targetElement.getAttribute("contentType"); //$NON-NLS-1$
- return contentTypeValue;
- }
-
- public String getLanguage() {
- String languageValue = targetElement.getAttribute("language"); //$NON-NLS-1$
- return languageValue;
- }
-
- public int getOffset() {
- return targetElement.getStartOffset();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/AttrImplForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/AttrImplForJSP.java
deleted file mode 100644
index 5bcc664aa8..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/AttrImplForJSP.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.domdocument;
-
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.xml.core.internal.document.AttrImpl;
-import org.w3c.dom.Document;
-
-public class AttrImplForJSP extends AttrImpl {
-
- protected boolean isNestedLanguageOpening(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || regionType == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || regionType == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN;
- return result;
- }
- protected void setOwnerDocument(Document ownerDocument) {
- super.setOwnerDocument(ownerDocument);
- }
- protected void setName(String name) {
- super.setName(name);
- }
- protected void setNamespaceURI(String namespaceURI) {
- super.setNamespaceURI(namespaceURI);
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/CommentImplForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/CommentImplForJSP.java
deleted file mode 100644
index 455df72b04..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/CommentImplForJSP.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.domdocument;
-
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.xml.core.internal.document.CommentImpl;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-/**
- * CommentImplForJSP
- */
-public class CommentImplForJSP extends CommentImpl {
- protected CommentImplForJSP() {
- super();
- }
-
- protected CommentImplForJSP(CommentImpl that) {
- super(that);
- }
-
- protected boolean isNestedCommentClose(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_COMMENT_CLOSE;
- return result;
- }
-
- protected boolean isNestedCommentOpenClose(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_COMMENT_OPEN || regionType == DOMJSPRegionContexts.JSP_COMMENT_CLOSE;
- return result;
- }
-
- protected void setOwnerDocument(Document ownerDocument) {
- super.setOwnerDocument(ownerDocument);
- }
-
- public Node cloneNode(boolean deep) {
- CommentImpl cloned = new CommentImplForJSP(this);
- return cloned;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMDocumentForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMDocumentForJSP.java
deleted file mode 100644
index eb0bc6684f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMDocumentForJSP.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.domdocument;
-
-import org.eclipse.wst.html.core.internal.document.DocumentStyleImpl;
-import org.eclipse.wst.xml.core.internal.document.DocumentImpl;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Comment;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.Text;
-
-public class DOMDocumentForJSP extends DocumentStyleImpl {
-
- /**
- *
- */
- public DOMDocumentForJSP() {
- super();
- }
-
- /**
- * @param that
- */
- protected DOMDocumentForJSP(DocumentImpl that) {
- super(that);
- }
- /**
- * cloneNode method
- * @return org.w3c.dom.Node
- * @param deep boolean
- */
- public Node cloneNode(boolean deep) {
- DOMDocumentForJSP cloned = new DOMDocumentForJSP(this);
- if (deep)
- cloned.importChildNodes(this, true);
- return cloned;
- }
- /**
- * createElement method
- *
- * @return org.w3c.dom.Element
- * @param tagName
- * java.lang.String
- */
- public Element createElement(String tagName) throws DOMException {
- checkTagNameValidity(tagName);
-
- ElementImplForJSP element = new ElementImplForJSP();
- element.setOwnerDocument(this);
- element.setTagName(tagName);
- return element;
- }
- /**
- * createComment method
- *
- * @return org.w3c.dom.Comment
- * @param data
- * java.lang.String
- */
- public Comment createComment(String data) {
- CommentImplForJSP comment = new CommentImplForJSP();
- comment.setOwnerDocument(this);
- if (data != null)
- comment.setData(data);
- return comment;
- }
-
- /**
- * createAttribute method
- *
- * @return org.w3c.dom.Attr
- * @param name
- * java.lang.String
- */
- public Attr createAttribute(String name) throws DOMException {
- AttrImplForJSP attr = new AttrImplForJSP();
- attr.setOwnerDocument(this);
- attr.setName(name);
- return attr;
- }
-
- /**
- */
- public Attr createAttributeNS(String uri, String name) throws DOMException {
- AttrImplForJSP attr = new AttrImplForJSP();
- attr.setOwnerDocument(this);
- attr.setName(name);
- attr.setNamespaceURI(uri);
- return attr;
- }
- /**
- * createTextNode method
- *
- * @return org.w3c.dom.Text
- * @param data
- * java.lang.String
- */
- public Text createTextNode(String data) {
- TextImplForJSP text = new TextImplForJSP();
- text.setOwnerDocument(this);
- text.setData(data);
- return text;
- }
- protected void setModel(IDOMModel model) {
- super.setModel(model);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMModelForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMModelForJSP.java
deleted file mode 100644
index 413627fa8c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/DOMModelForJSP.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.domdocument;
-
-import org.eclipse.wst.html.core.internal.document.DOMStyleModelImpl;
-import org.eclipse.wst.xml.core.internal.document.XMLModelParser;
-import org.eclipse.wst.xml.core.internal.document.XMLModelUpdater;
-import org.w3c.dom.Document;
-
-public class DOMModelForJSP extends DOMStyleModelImpl {
-
- /**
- *
- */
- public DOMModelForJSP() {
- super();
- // remember, the document is created in super constructor,
- // via internalCreateDocument
- }
- /**
- * createDocument method
- * @return org.w3c.dom.Document
- */
- protected Document internalCreateDocument() {
- DOMDocumentForJSP document = new DOMDocumentForJSP();
- document.setModel(this);
- return document;
- }
- protected XMLModelParser createModelParser() {
- return new NestedDOMModelParser(this);
- }
- protected XMLModelUpdater createModelUpdater() {
- return new NestDOMModelUpdater(this);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/ElementImplForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/ElementImplForJSP.java
deleted file mode 100644
index 9f6bcda3dc..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/ElementImplForJSP.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.domdocument;
-
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.html.core.internal.document.ElementStyleImpl;
-import org.eclipse.wst.xml.core.internal.document.ElementImpl;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-public class ElementImplForJSP extends ElementStyleImpl {
- /**
- *
- */
- public ElementImplForJSP() {
- super();
- }
-
- /**
- * @param that
- */
- public ElementImplForJSP(ElementImpl that) {
- super(that);
- }
-
- protected boolean isNestedEndTag(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME || regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME;
- return result;
- }
-
- protected boolean isNestedClosed(String regionType) {
- boolean result = (regionType == DOMJSPRegionContexts.JSP_CLOSE || regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE);
- return result;
- }
-
- protected boolean isNestedClosedComment(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_COMMENT_CLOSE;
- return result;
- }
-
- protected boolean isClosedNestedDirective(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE;
- return result;
- }
-
- protected void setOwnerDocument(Document ownerDocument) {
- super.setOwnerDocument(ownerDocument);
- }
-
- protected void setTagName(String tagName) {
- super.setTagName(tagName);
- }
- public Node cloneNode(boolean deep) {
- ElementImpl cloned = new ElementImplForJSP(this);
- if (deep)
- cloneChildNodes(cloned, deep);
- return cloned;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/NestDOMModelUpdater.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/NestDOMModelUpdater.java
deleted file mode 100644
index 26b71c494a..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/NestDOMModelUpdater.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.domdocument;
-
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.xml.core.internal.document.DOMModelImpl;
-import org.eclipse.wst.xml.core.internal.document.XMLModelUpdater;
-
-
-public class NestDOMModelUpdater extends XMLModelUpdater {
-
- /**
- * @param model
- */
- public NestDOMModelUpdater(DOMModelImpl model) {
- super(model);
- }
-
- protected boolean isNestedTagClose(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_CLOSE || regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE;
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/NestedDOMModelParser.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/NestedDOMModelParser.java
deleted file mode 100644
index 6b7eb8249d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/NestedDOMModelParser.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.domdocument;
-
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.document.DOMModelImpl;
-import org.eclipse.wst.xml.core.internal.document.JSPTag;
-import org.eclipse.wst.xml.core.internal.document.XMLModelParser;
-
-public class NestedDOMModelParser extends XMLModelParser {
-
- /**
- * @param model
- */
- public NestedDOMModelParser(DOMModelImpl model) {
- super(model);
- }
-
- protected boolean isNestedCommentOpen(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_COMMENT_OPEN;
- return result;
- }
-
- protected boolean isNestedCommentText(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_COMMENT_TEXT;
- return result;
- }
-
- protected boolean isNestedContent(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_CONTENT;
- return result;
- }
-
- protected boolean isNestedTag(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || regionType == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || regionType == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || regionType == DOMJSPRegionContexts.JSP_CLOSE;
- return result;
- }
-
- protected boolean isNestedTagName(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME || regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME;
- return result;
- }
- protected boolean isNestedTagOpen(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || regionType == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || regionType == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN;
- return result;
- }
- protected String computeNestedTag(String regionType, String tagName, IStructuredDocumentRegion structuredDocumentRegion, ITextRegion region) {
- String resultTagName = tagName;
- if (regionType == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) {
- resultTagName = JSPTag.JSP_SCRIPTLET;
- }
- else if (regionType == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) {
- resultTagName = JSPTag.JSP_EXPRESSION;
- }
- else if (regionType == DOMJSPRegionContexts.JSP_DECLARATION_OPEN) {
- resultTagName = JSPTag.JSP_DECLARATION;
- }
- else if (regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN) {
- resultTagName = JSPTag.JSP_DIRECTIVE;
- }
- else if (regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- resultTagName += '.';
- resultTagName += structuredDocumentRegion.getText(region);
- }
- return resultTagName;
- }
-
- protected boolean isNestedTagClose(String regionType) {
- boolean result = regionType == DOMJSPRegionContexts.JSP_CLOSE || regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE;
- return result;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/TextImplForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/TextImplForJSP.java
deleted file mode 100644
index da91a239c1..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/TextImplForJSP.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.domdocument;
-
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.xml.core.internal.document.TextImpl;
-import org.w3c.dom.Document;
-
-public class TextImplForJSP extends TextImpl {
- protected boolean isNotNestedContent(String regionType) {
- boolean result = regionType != DOMJSPRegionContexts.JSP_CONTENT;
- return result;
- }
- protected void setOwnerDocument(Document ownerDocument) {
- super.setOwnerDocument(ownerDocument);
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/IJSPHeadContentDetector.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/IJSPHeadContentDetector.java
deleted file mode 100644
index 02b84537a0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/IJSPHeadContentDetector.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.encoding;
-
-import java.io.IOException;
-
-import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector;
-
-public interface IJSPHeadContentDetector extends IDocumentCharsetDetector {
- String getContentType() throws IOException;
-
- String getLanguage() throws IOException;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentHeadContentDetector.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentHeadContentDetector.java
deleted file mode 100644
index 5679036d28..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentHeadContentDetector.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.encoding;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.contenttype.JSPResourceEncodingDetector;
-import org.eclipse.wst.sse.core.internal.document.DocumentReader;
-
-/**
- * This class parses beginning portion of JSP file to get attributes in page
- * directiive
- *
- */
-public class JSPDocumentHeadContentDetector extends JSPResourceEncodingDetector implements IJSPHeadContentDetector {
-
- public JSPDocumentHeadContentDetector() {
- super();
- }
-
- public void set(IDocument document) {
- set(new DocumentReader(document, 0));
-
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentLoader.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentLoader.java
deleted file mode 100644
index bc4edfb79e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentLoader.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.encoding;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.io.UnsupportedEncodingException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jst.jsp.core.internal.Assert;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.document.PageDirectiveWatcherFactory;
-import org.eclipse.jst.jsp.core.internal.parser.JSPReParser;
-import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.text.StructuredTextPartitionerForJSP;
-import org.eclipse.wst.sse.core.internal.PropagatingAdapter;
-import org.eclipse.wst.sse.core.internal.document.AbstractDocumentLoader;
-import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector;
-import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.internal.document.StructuredDocumentFactory;
-import org.eclipse.wst.sse.core.internal.encoding.CodedIO;
-import org.eclipse.wst.sse.core.internal.encoding.CodedReaderCreator;
-import org.eclipse.wst.sse.core.internal.encoding.ContentTypeEncodingPreferences;
-import org.eclipse.wst.sse.core.internal.encoding.util.BufferedLimitedReader;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.EmbeddedTypeHandler;
-import org.eclipse.wst.sse.core.internal.ltk.parser.JSPCapableParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker;
-import org.eclipse.wst.sse.core.internal.modelhandler.EmbeddedTypeRegistry;
-import org.eclipse.wst.sse.core.internal.modelhandler.EmbeddedTypeRegistryImpl;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.document.IEncodedDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
-import org.w3c.dom.Document;
-
-public class JSPDocumentLoader extends AbstractDocumentLoader {
- private final static String DEFAULT_MIME_TYPE = "text/html"; //$NON-NLS-1$
- private final static String SPEC_DEFAULT_ENCODING = "ISO-8859-1"; //$NON-NLS-1$
-
- protected static IFile getFileFor(IStructuredModel model) {
- if (model == null)
- return null;
- String path = model.getBaseLocation();
- if (path == null || path.length() == 0) {
- Object id = model.getId();
- if (id == null)
- return null;
- path = id.toString();
- }
- // TODO needs rework for linked resources
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IFile file = root.getFileForLocation(new Path(path));
- return file;
- }
-
- private EmbeddedTypeRegistry fEmbeddedContentTypeRegistry;
-
- public JSPDocumentLoader() {
- super();
- }
-
- protected void addNestablePrefix(JSPSourceParser parser, String tagName) {
- TagMarker bm = new TagMarker(tagName);
- parser.addNestablePrefix(bm);
- }
-
- synchronized public IEncodedDocument createNewStructuredDocument(IFile iFile) throws IOException, CoreException {
- IStructuredDocument structuredDocument = null;
- try {
- structuredDocument = createCodedDocument(iFile);
-
- EmbeddedTypeHandler embeddedType = getEmbeddedType(iFile);
- if (embeddedType != null)
- embeddedType.initializeParser((JSPCapableParser) structuredDocument.getParser());
-
- fFullPreparedReader.reset();
- setDocumentContentsFromReader(structuredDocument, fFullPreparedReader);
-
- }
- finally {
- if (fFullPreparedReader != null) {
- fFullPreparedReader.close();
- }
- }
- return structuredDocument;
- }
-
- private IStructuredDocument createCodedDocument(IFile iFile) throws CoreException, UnsupportedEncodingException, IOException {
- IStructuredDocument structuredDocument = (IStructuredDocument) createNewStructuredDocument();
-
- getCodedReaderCreator().set(iFile);
-
- fFullPreparedReader = getCodedReaderCreator().getCodedReader();
- fEncodingMemento = getCodedReaderCreator().getEncodingMemento();
-
- structuredDocument.setEncodingMemento(getCodedReaderCreator().getEncodingMemento());
-
- return structuredDocument;
- }
-
- public IEncodedDocument createNewStructuredDocument(String filename, InputStream inputStream) throws UnsupportedEncodingException, IOException {
- if (filename == null && inputStream == null) {
- throw new IllegalArgumentException("can not have both null filename and inputstream"); //$NON-NLS-1$
- }
- IEncodedDocument structuredDocument = createNewStructuredDocument();
- CodedReaderCreator codedReaderCreator = new CodedReaderCreator();
- try {
- codedReaderCreator.set(filename, inputStream);
- fFullPreparedReader = codedReaderCreator.getCodedReader();
- fEncodingMemento = codedReaderCreator.getEncodingMemento();
- structuredDocument.setEncodingMemento(fEncodingMemento);
- // the fact that file is null means this method/code path is no
- // good for JSP fragments
- EmbeddedTypeHandler embeddedType = getEmbeddedType((IFile) null);
- fFullPreparedReader.reset();
- if (embeddedType != null)
- embeddedType.initializeParser((JSPCapableParser) ((IStructuredDocument) structuredDocument).getParser());
- setDocumentContentsFromReader(structuredDocument, fFullPreparedReader);
- }
- catch (CoreException e) {
- // impossible in this context
- throw new Error(e);
- }
- finally {
- if (fFullPreparedReader != null) {
- fFullPreparedReader.close();
- }
- }
- return structuredDocument;
-
- }
-
- /**
- * Method getDefaultDocumentPartitioner.
- *
- * @return IDocumentPartitioner
- */
- public IDocumentPartitioner getDefaultDocumentPartitioner() {
- return new StructuredTextPartitionerForJSP();
- }
-
- /**
- * Method getDefaultMimeType.
- *
- * @return String
- */
- private String getDefaultMimeType() {
- return DEFAULT_MIME_TYPE;
- }
-
-
- public IDocumentCharsetDetector getDocumentEncodingDetector() {
- if (fDocumentEncodingDetector == null) {
- fDocumentEncodingDetector = new JSPDocumentHeadContentDetector();
- }
- return fDocumentEncodingDetector;
- }
-
- /**
- * Gets the embeddedContentTypeRegistry.
- *
- * @return Returns a EmbeddedContentTypeRegistry
- */
- private EmbeddedTypeRegistry getEmbeddedContentTypeRegistry() {
- if (fEmbeddedContentTypeRegistry == null) {
- fEmbeddedContentTypeRegistry = EmbeddedTypeRegistryImpl.getInstance();
- }
- return fEmbeddedContentTypeRegistry;
- }
-
- /**
- * Determine the MIME content type specified in a page directive. This
- * should appear "as early as possible in the JSP page" according to the
- * JSP v1.2 specification.
- */
- private EmbeddedTypeHandler getEmbeddedType(IFile file) throws UnsupportedEncodingException, CoreException, IOException {
- EmbeddedTypeHandler handler = null;
- if (fFullPreparedReader == null) {
- handler = getJSPDefaultEmbeddedType();
- }
- else {
- String mimeType = null;
-
- IDocumentCharsetDetector jspProvider = getDocumentEncodingDetector();
- Reader fullPreparedReader = getFullPreparedReader();
- BufferedLimitedReader limitedReader = new BufferedLimitedReader(fullPreparedReader, CodedIO.MAX_BUF_SIZE);
- jspProvider.set(limitedReader);
- if (jspProvider instanceof IJSPHeadContentDetector) {
- mimeType = ((IJSPHeadContentDetector) jspProvider).getContentType();
- fullPreparedReader.reset();
- }
-
- EmbeddedTypeRegistry reg = getEmbeddedContentTypeRegistry();
- if (mimeType == null || mimeType.length() == 0) {
- handler = getJSPDefaultEmbeddedType();
- }
- else {
- handler = reg.getTypeFor(mimeType);
- }
- }
- return handler;
- }
-
- /**
- * For JSP files, text/html is the default content type. This may want
- * this different for types like jsv (jsp for voice xml) For now, hard
- * code to new instance. In future, should get instance from registry.
- * Specification cites HTML as the default contentType.
- */
- private EmbeddedTypeHandler getJSPDefaultEmbeddedType() {
- EmbeddedTypeRegistry reg = getEmbeddedContentTypeRegistry();
- return reg.getTypeFor(getDefaultMimeType());
- }
-
- public RegionParser getParser() {
- // remember, the Loader
- // will need to finish initialization of parser
- // based on "embedded content"
- JSPSourceParser parser = new JSPSourceParser();
- // add default nestable tag list
- addNestablePrefix(parser, JSP11Namespace.JSP_TAG_PREFIX);
- return parser;
- }
-
- protected String getPreferredNewLineDelimiter(IFile file) {
- String delimiter = ContentTypeEncodingPreferences.getPreferredNewLineDelimiter(ContentTypeIdForJSP.ContentTypeID_JSP);
- if (delimiter == null)
- delimiter = super.getPreferredNewLineDelimiter(file);
- return delimiter;
- }
-
- /**
- * Specification cites ISO-8859-1/Latin-1 as the default charset.
- */
- protected String getSpecDefaultEncoding() {
- return SPEC_DEFAULT_ENCODING;
- }
-
- /**
- * This method must return a new instance of IStructuredDocument, that has
- * been initialized with appropriate parser. For many loaders, the
- * (default) parser used is known for any input. For others, the correct
- * parser (and its initialization) is normall dependent on the content of
- * the file. This no-argument method should assume "empty input" and would
- * therefore return the default parser for the default contentType. If the
- * parser is to handle tag libraries, it must have a TaglibSupport object
- * with a valid URIResolver and this IStructuredDocument attached to it
- * before the contents are set on the IStructuredDocument.
- */
- protected IEncodedDocument newEncodedDocument() {
- IStructuredDocument structuredDocument = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
- ((BasicStructuredDocument) structuredDocument).setReParser(new JSPReParser());
- // structuredDocument.setDocumentPartitioner(new
- // JSPJavaDocumentPartioner());
- // even though this is an "empty model" ... we want it to have at
- // least
- // the
- // default embeddeded content type handler
- EmbeddedTypeHandler embeddedType = getJSPDefaultEmbeddedType();
- embeddedType.initializeParser((JSPCapableParser) structuredDocument.getParser());
- return structuredDocument;
- }
-
- public IDocumentLoader newInstance() {
- return new JSPDocumentLoader();
- }
-
- protected void preLoadAdapt(IStructuredModel structuredModel) {
- IDOMModel domModel = (IDOMModel) structuredModel;
- //
- // document must have already been set for this to
- // work.
- Document document = domModel.getDocument();
- Assert.isNotNull(document, JSPCoreMessages.JSPDocumentLoader_1);
- // if there is a model in the adapter, this will adapt it to
- // first node. After that the PropagatingAdater spreads over the
- // children being
- // created. Each time that happends, a side effect is to
- // also "spread" sprecific registered adapters,
- // they two can propigate is needed.
- // This 'get' causes first to be be attached.
- PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
- // may make this easier to use in futue
- propagatingAdapter.addAdaptOnCreateFactory(new PageDirectiveWatcherFactory());
- // For JSPs, the ModelQueryAdapter must be "attached" to the document
- // before content is set in the model, so taglib initization can
- // take place.
- ((INodeNotifier) document).getAdapterFor(ModelQueryAdapter.class);
-
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/CompilationUnitHelper.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/CompilationUnitHelper.java
deleted file mode 100644
index 8df55241a1..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/CompilationUnitHelper.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.java;
-
-import org.eclipse.jdt.core.WorkingCopyOwner;
-
-/**
- * To ensure there is only one instance of ProblemRequestor and WorkingCopyOwner
- * for JSP plugins. These were removed from JSPTranslation to ensure that the
- * JSPTranslation was not held in memory by any type of JDT lists (caching
- * search results, etc...)
- *
- * @author pavery
- */
-public class CompilationUnitHelper {
-
- private JSPProblemRequestor fProblemRequestor = null;
- private WorkingCopyOwner fWorkingCopyOwner = null;
- private static CompilationUnitHelper instance;
-
- private CompilationUnitHelper() {
- // force use of instance
- }
-
- public synchronized static final CompilationUnitHelper getInstance() {
-
- if (instance == null)
- instance = new CompilationUnitHelper();
- return instance;
- }
-
- public JSPProblemRequestor getProblemRequestor() {
-
- if (fProblemRequestor == null)
- fProblemRequestor = new JSPProblemRequestor();
- return fProblemRequestor;
- }
-
- public WorkingCopyOwner getWorkingCopyOwner() {
-
- if (fWorkingCopyOwner == null) {
- fWorkingCopyOwner = new WorkingCopyOwner() {
- public String toString() {
- return "JSP Working copy owner"; //$NON-NLS-1$
- }
- };
- }
- return fWorkingCopyOwner;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/EscapedTextUtil.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/EscapedTextUtil.java
deleted file mode 100644
index b33f2df579..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/EscapedTextUtil.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-
-
-import java.util.Properties;
-import com.ibm.icu.util.StringTokenizer;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-
-/**
- * class to handle chunks of text/regions
- * with escaped character data
- * @author pavery
- */
-public class EscapedTextUtil {
-
- public static Properties fXMLtoJavaLookup = null;
-
- /**
- * @return unescaped full text of that region, "" if there is no text
- */
- public static String getUnescapedText(IStructuredDocumentRegion parent, ITextRegion r) {
- String test = (parent != r) ? parent.getFullText(r) : parent.getFullText();
- return getUnescapedText(test);
- }
-
- public static String getUnescapedText(String test) {
- initLookup();
- StringBuffer buffer = new StringBuffer();
- if (test != null) {
- StringTokenizer st = new StringTokenizer(test, "&;", true); //$NON-NLS-1$
- String tok1, tok2, tok3, transString;
- while (st.hasMoreTokens()) {
- tok1 = tok2 = tok3 = transString = ""; //$NON-NLS-1$
- tok1 = st.nextToken();
- if (tok1.equals("&") && st.hasMoreTokens()) //$NON-NLS-1$
- {
- tok2 = st.nextToken();
- if (st.hasMoreTokens()) {
- tok3 = st.nextToken();
- }
- }
- if (!(transString = fXMLtoJavaLookup.getProperty(tok1 + tok2 + tok3, "")).equals("")) //$NON-NLS-2$ //$NON-NLS-1$
- {
- buffer.append(transString);
- }
- else {
- buffer.append(tok1 + tok2 + tok3);
- }
- }
- return buffer.toString();
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * initialize lookup tables
- */
- private static void initLookup() {
- fXMLtoJavaLookup = new Properties();
- fXMLtoJavaLookup.setProperty("&apos;", "'"); //$NON-NLS-2$ //$NON-NLS-1$
- fXMLtoJavaLookup.setProperty("&quot;", "\""); //$NON-NLS-2$ //$NON-NLS-1$
- fXMLtoJavaLookup.setProperty("&amp;", "&"); //$NON-NLS-2$ //$NON-NLS-1$
- fXMLtoJavaLookup.setProperty("&lt;", "<"); //$NON-NLS-2$ //$NON-NLS-1$
- fXMLtoJavaLookup.setProperty("&gt;", ">"); //$NON-NLS-2$ //$NON-NLS-1$
- fXMLtoJavaLookup.setProperty("&nbsp;", " "); //$NON-NLS-2$ //$NON-NLS-1$
- }
-
- /**
- * Get the String representation of an entity reference.
- */
- public static String translateEntityReference(String entity) {
- return fXMLtoJavaLookup.getProperty(entity, entity);
- }
-}
-
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/IJSPTranslation.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/IJSPTranslation.java
deleted file mode 100644
index cb79f3e1cd..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/IJSPTranslation.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-import java.util.List;
-
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-
-/**
- * An object that holds a translated JSP String along with
- * position mapping from Java to JSP, and JSP to Java.
- *
- * @author pavery
- *
- */
-public interface IJSPTranslation {
-
- /**
- * The string contents of the translated document.
- * @return the string contents of the translated document.
- */
- public String getJavaText();
-
- /**
- * The corresponding java offset in the translated document for a given jsp offset.
- * @param jspPosition
- * @return the java offset that maps to jspOffset, -1 if the position has no mapping.
- */
- public int getJavaOffset(int jspOffset);
-
- /**
- * The corresponding jsp offset in the source document for a given jsp offset in the translated document.
- * @param javaPosition
- * @return the jsp offset that maps to javaOffset, -1 if the position has no mapping.
- */
- public int getJspOffset(int javaOffset);
-
- /**
- * The corresponding CompilationUnit for the translated JSP document
- * @return an ICompilationUnit of the translation
- */
- public ICompilationUnit getCompilationUnit();
-
- /**
- * Returns the IJavaElements corresponding to the JSP range in the JSP StructuredDocument
- *
- * @param jspStart staring offset in the JSP document
- * @param jspEnd ending offset in the JSP document
- * @return IJavaElements corresponding to the JSP selection
- */
- public IJavaElement[] getElementsFromJspRange(int jspStart, int jspEnd);
-
- /**
- * Must be set true in order for problems to be collected during reconcile.
- * If set false, problems will be ignored during reconcile.
- * @param collect
- */
- public void setProblemCollectingActive(boolean collect);
-
- /**
- * Reconciles the compilation unit for this JSPTranslation
- */
- public void reconcileCompilationUnit();
-
- /**
- * @return the List of problems collected during reconcile of the compilation unit
- */
- public List getProblems();
-
- // add these API once finalized
- // getJspEdits(TextEdit javaEdit)
- // getJavaRanges()
- // getJavaDocument()
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSP2ServletNameUtil.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSP2ServletNameUtil.java
deleted file mode 100644
index 43dfba47de..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSP2ServletNameUtil.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-import java.io.File;
-
-/**
- * @author pavery
- */
-public class JSP2ServletNameUtil {
-
- /**
- * WAS mangles Tom&Jerry as: _Tom_26_Jerry; this takes in the mangled name
- * and returns the original name.
- *
- * Unmangles the qualified type name. If an underscore is found
- * it is assumed to be a mangled representation of a non-alpha,
- * non-digit character of the form _NN_, where NN are hex digits
- * representing the encoded character. This routine converts it
- * back to the original character.
- */
- public final static String unmangle(String qualifiedTypeName) {
- if(qualifiedTypeName.charAt(0) != '_')
- return qualifiedTypeName;
-
- StringBuffer buf = new StringBuffer();
- String possible = ""; //$NON-NLS-1$
-
- // remove the .java extension if there is one
- if(qualifiedTypeName.endsWith(".java"))//$NON-NLS-1$
- qualifiedTypeName = qualifiedTypeName.substring(0, qualifiedTypeName.length() - 5);
-
- for(int i = 1; i < qualifiedTypeName.length(); i++) { // start at index 1 b/c 1st char is always '_'
- char c = qualifiedTypeName.charAt(i);
- if(c == '_') {
- int endIndex = qualifiedTypeName.indexOf('_', i+1);
- if(endIndex == -1)
- buf.append(c);
- else {
- char unmangled;
- try {
- possible = qualifiedTypeName.substring(i+1, endIndex);
- if(isValid(possible)) {
- unmangled = (char)Integer.decode("0x" + possible).intValue();//$NON-NLS-1$
- i = endIndex;
- }
- else {
- unmangled = c;
- }
-
- } catch(NumberFormatException e) {
- unmangled = c;
- }
- buf.append(unmangled);
- }
- } else {
- buf.append(c);
- }
- }
- return buf.toString();
- }
-
- /**
- * Determine if given string is a valid Hex representation of an ASCII character (eg. 2F -> /)
- * @param possible
- * @return
- */
- private static boolean isValid(String possible) {
- boolean result = false;
- if(possible.length() == 2){
- char c1 = possible.charAt(0);
- char c2 = possible.charAt(1);
- // 1st character must be a digit
- if(Character.isDigit(c1)) {
- // 2nd character must be digit or upper case letter A-F
- if(Character.isDigit(c2)) {
- result = true;
- }
- else if(Character.isUpperCase(c2) && (c2 == 'A' || c2 == 'B' || c2 == 'C'|| c2 == 'D'|| c2 == 'E'|| c2 == 'F')) {
- result = true;
- }
- }
- }
- return result;
- }
-
- /**
- * Mangle string to WAS-like specifications
- *
- */
- public final static String mangle(String name) {
- StringBuffer modifiedName = new StringBuffer();
-
- // extension (.jsp, .jspf, .jspx, etc...) should already be encoded in name
-
- int length = name.length();
- // in case name is forbidden (a number, class, for, etc...)
- modifiedName.append('_');
-
- // ensure rest of characters are valid
- for (int i=0; i< length; i++) {
- char currentChar = name.charAt(i);
- if (Character.isJavaIdentifierPart(currentChar) == true ) {
- modifiedName.append(currentChar);
- } else {
- modifiedName.append(mangleChar(currentChar));
- }
- }
- return modifiedName.toString();
-
- }
-
- /**
- * take a character and return its hex equivalent
- */
- private final static String mangleChar(char ch) {
- if ( ch == File.separatorChar ) {
- ch = '/';
- }
-
- if ( Character.isLetterOrDigit(ch) == true ) {
- return "" + ch; //$NON-NLS-1$
- }
- return "_" + Integer.toHexString(ch).toUpperCase() + "_"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPIncludeRegionHelper.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPIncludeRegionHelper.java
deleted file mode 100644
index 5ef7219115..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPIncludeRegionHelper.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-
-/**
- * Extension of XMLJSPRegionHelper inteded to parse entire included JSP files.
- * Basically it expands the rules for what tags are parsed as JSP.
- *
- * @author pavery
- */
-class JSPIncludeRegionHelper extends XMLJSPRegionHelper {
- /**
- * @param JSPTranslator
- */
- public JSPIncludeRegionHelper(JSPTranslator translator) {
- super(translator);
- }
-
- // these methods determine what content gets added to the local scriplet, expression, declaration buffers
- /*
- * return true for elements whose contents we might want to add to the java file we are building
- */
- protected boolean isJSPStartRegion(IStructuredDocumentRegion sdRegion) {
- String type = sdRegion.getFirstRegion().getType();
- return type == DOMRegionContext.XML_TAG_OPEN || type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || type == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME;
- }
-
- protected boolean isDeclaration(String tagName) {
- return tagName.equalsIgnoreCase("jsp:declaration") //$NON-NLS-1$
- || tagName.equalsIgnoreCase("<%!"); //$NON-NLS-1$
- }
-
- protected boolean isExpression(String tagName) {
- return tagName.equalsIgnoreCase("jsp:expression") //$NON-NLS-1$
- || tagName.equalsIgnoreCase("<%="); //$NON-NLS-1$
- }
-
- protected boolean isScriptlet(String tagName) {
- return tagName.equalsIgnoreCase("jsp:scriptlet") //$NON-NLS-1$
- || tagName.equalsIgnoreCase("<%"); //$NON-NLS-1$
- }
-
- protected boolean isIncludeDirective(String tagName) {
- return tagName.equalsIgnoreCase("jsp:directive.include") || //$NON-NLS-1$
- tagName.equalsIgnoreCase("include"); //$NON-NLS-1$
- }
-
- protected boolean isTaglibDirective(String tagName) {
- return tagName.equalsIgnoreCase("jsp:directive.taglib") //$NON-NLS-1$
- || tagName.equalsIgnoreCase("taglib"); //$NON-NLS-1$
- }
-
- protected boolean isPageDirective(String tagName) {
- return tagName.equalsIgnoreCase("jsp:directive.page") //$NON-NLS-1$
- || tagName.equalsIgnoreCase("page"); //$NON-NLS-1$
- }
-
- // different btwn XML-JSP and JSP tags
- protected String getRegionName(IStructuredDocumentRegion sdRegion) {
- ITextRegion nameRegion = null;
- String nameStr = ""; //$NON-NLS-1$
- int size = sdRegion.getRegions().size();
- if (size > 1) {
- // presumably XML-JSP <jsp:scriptlet> | <jsp:expression> | <jsp:declaration>
- nameRegion = sdRegion.getRegions().get(1);
- }
- else if (size == 1) {
- // presumably JSP open <% | <%= | <%!
- nameRegion = sdRegion.getRegions().get(0);
- }
- if (nameRegion != null)
- nameStr = fTextToParse.substring(sdRegion.getStartOffset(nameRegion), sdRegion.getTextEndOffset(nameRegion));
- return nameStr.trim();
- }
-
- protected void processOtherRegions(IStructuredDocumentRegion sdRegion) {
- processIncludeDirective(sdRegion);
- processPageDirective(sdRegion);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPProblemRequestor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPProblemRequestor.java
deleted file mode 100644
index cf47682465..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPProblemRequestor.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.java;
-
-/**
- * @author pavery
- */
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jdt.core.IProblemRequestor;
-import org.eclipse.jdt.core.compiler.IProblem;
-
-class JSPProblemRequestor implements IProblemRequestor {
-
- private boolean fIsActive = false;
-
- private boolean fIsRunning = false;
-
- private List fCollectedProblems;
-
- public void beginReporting() {
-
- fIsRunning = true;
- fCollectedProblems = new ArrayList();
- }
-
- public void acceptProblem(IProblem problem) {
-
- if (isActive())
- fCollectedProblems.add(problem);
- }
-
- public void endReporting() {
-
- fIsRunning = false;
- }
-
- public boolean isActive() {
-
- return fIsActive && fCollectedProblems != null;
- }
-
- /**
- * Sets the active state of this problem requestor.
- *
- * @param isActive
- * the state of this problem requestor
- */
- public void setIsActive(boolean isActive) {
-
- if (fIsActive != isActive) {
- fIsActive = isActive;
- if (fIsActive)
- startCollectingProblems();
- else
- stopCollectingProblems();
- }
- }
-
- /**
- * Tells this annotation model to collect temporary problems from now on.
- */
- private void startCollectingProblems() {
-
- fCollectedProblems = new ArrayList();
- }
-
- /**
- * Tells this annotation model to no longer collect temporary problems.
- */
- private void stopCollectingProblems() {
-
- // do nothing
- }
-
- /**
- * @return the list of collected problems
- */
- public List getCollectedProblems() {
-
- return fCollectedProblems;
- }
-
- public boolean isRunning() {
-
- return fIsRunning;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java
deleted file mode 100644
index 67a45ab9dd..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java
+++ /dev/null
@@ -1,629 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.IBuffer;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.WorkingCopyOwner;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.Logger;
-
-
-/**
- * <p>
- * An implementation of IJSPTranslation.
- * <br>
- * This object that holds the java translation of
- * a JSP file as well as a mapping of ranges from the translated Java to the JSP source,
- * and mapping from JSP source back to the translated Java.
- * </p>
- *
- * <p>
- * You may also use JSPTranslation to do CompilationUnit-esque things such as:
- * <ul>
- * <li>code select (get java elements for jsp selection)</li>
- * <li>reconcile</li>
- * <li>get java regions for jsp selection</li>
- * <li>get a JSP text edit based on a Java text edit</li>
- * <li>determine if a java offset falls within a jsp:useBean range</li>
- * <li>determine if a java offset falls within a jsp import statment</li>
- * </ul>
- * </p>
- *
- * @author pavery
- */
-public class JSPTranslation implements IJSPTranslation {
-
- // for debugging
- private static final boolean DEBUG;
- static {
- String value= Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jsptranslation"); //$NON-NLS-1$
- DEBUG= value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- /** the name of the class (w/out extension) **/
- private String fClassname = ""; //$NON-NLS-1$
- private IJavaProject fJavaProject = null;
- private HashMap fJava2JspMap = null;
- private HashMap fJsp2JavaMap = null;
- private HashMap fJava2JspImportsMap = null;
- private HashMap fJava2JspUseBeanMap = null;
- private HashMap fJava2JspIndirectMap = null;
- private List fELProblems = null;
-
- // don't want to hold onto model (via translator)
- // all relevant info is extracted in the constructor.
- //private JSPTranslator fTranslator = null;
- private String fJavaText = ""; //$NON-NLS-1$
- private String fJspText = ""; //$NON-NLS-1$
-
- private ICompilationUnit fCompilationUnit = null;
- private IProgressMonitor fProgressMonitor = null;
- /** lock to synchronize access to the compilation unit **/
- private byte[] fLock = null;
- private String fMangledName;
- private String fJspName;
-
- public JSPTranslation(IJavaProject javaProj, JSPTranslator translator) {
-
- fLock = new byte[0];
- fJavaProject = javaProj;
- //fTranslator = translator;
-
- // can be null if it's an empty document (w/ NullJSPTranslation)
- if(translator != null) {
- fJavaText = translator.getTranslation().toString();
- fJspText = translator.getJspText();
- fClassname = translator.getClassname();
- fJava2JspMap = translator.getJava2JspRanges();
- fJsp2JavaMap = translator.getJsp2JavaRanges();
- fJava2JspImportsMap = translator.getJava2JspImportRanges();
- fJava2JspUseBeanMap = translator.getJava2JspUseBeanRanges();
- fJava2JspIndirectMap = translator.getJava2JspIndirectRanges();
- fELProblems = translator.getELProblems();
- }
- }
-
- public IJavaProject getJavaProject() {
- return fJavaProject;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.jsp.core.internal.java.IJSPTranslation#getJavaText()
- */
- public String getJavaText() {
- //return (fTranslator != null) ? fTranslator.getTranslation().toString() : ""; //$NON-NLS-1$
- return fJavaText;
- }
-
- public String getJspText() {
- //return (fTranslator != null) ? fTranslator.getJspText() : ""; //$NON-NLS-1$
- return fJspText;
- }
-
- public String getJavaPath() {
- // create if necessary
- ICompilationUnit cu = getCompilationUnit();
- return (cu != null) ? cu.getPath().toString() : ""; //$NON-NLS-1$
- }
-
- /**
- *
- * @return the corresponding Java offset for a give JSP offset
- */
- public int getJavaOffset(int jspOffset) {
- int result = -1;
- int offsetInRange = 0;
- Position jspPos, javaPos = null;
-
- // iterate all mapped jsp ranges
- Iterator it = fJsp2JavaMap.keySet().iterator();
- while (it.hasNext()) {
- jspPos = (Position) it.next();
- // need to count the last position as included
- if (!jspPos.includes(jspOffset) && !(jspPos.offset+jspPos.length == jspOffset))
- continue;
-
- offsetInRange = jspOffset - jspPos.offset;
- javaPos = (Position) fJsp2JavaMap.get(jspPos);
- if(javaPos != null)
- result = javaPos.offset + offsetInRange;
- else {
-
- Logger.log(Logger.ERROR, "JavaPosition was null!" + jspOffset); //$NON-NLS-1$
- }
- break;
- }
- return result;
- }
-
- /**
- *
- * @return the corresponding JSP offset for a give Java offset
- */
- public int getJspOffset(int javaOffset) {
- int result = -1;
- int offsetInRange = 0;
- Position jspPos, javaPos = null;
-
- // iterate all mapped java ranges
- Iterator it = fJava2JspMap.keySet().iterator();
- while (it.hasNext()) {
- javaPos = (Position) it.next();
- // need to count the last position as included
- if (!javaPos.includes(javaOffset) && !(javaPos.offset+javaPos.length == javaOffset))
- continue;
-
- offsetInRange = javaOffset - javaPos.offset;
- jspPos = (Position) fJava2JspMap.get(javaPos);
-
- if(jspPos != null)
- result = jspPos.offset + offsetInRange;
- else {
- Logger.log(Logger.ERROR, "jspPosition was null!" + javaOffset); //$NON-NLS-1$
- }
- break;
- }
-
- return result;
- }
-
- /**
- *
- * @return a map of Positions in the Java document to corresponding Positions in the JSP document
- */
- public HashMap getJava2JspMap() {
- return fJava2JspMap;
- }
-
- /**
- *
- * @return a map of Positions in the JSP document to corresponding Positions in the Java document
- */
- public HashMap getJsp2JavaMap() {
- return fJsp2JavaMap;
- }
-
- /**
- * Checks if the specified java range covers more than one partition in the JSP file.
- *
- * <p>
- * ex.
- * <code>
- * <%
- * if(submit)
- * {
- * %>
- * <p> print this...</p>
- *
- * <%
- * }
- * else
- * {
- * %>
- * <p> print that...</p>
- * <%
- * }
- * %>
- * </code>
- * </p>
- *
- * the if else statement above spans 3 JSP partitions, so it would return true.
- * @param offset
- * @param length
- * @return <code>true</code> if the java code spans multiple JSP partitions, otherwise false.
- */
- public boolean javaSpansMultipleJspPartitions(int javaOffset, int javaLength) {
- HashMap java2jsp = getJava2JspMap();
- int count = 0;
- Iterator it = java2jsp.keySet().iterator();
- Position javaRange = null;
- while(it.hasNext()) {
- javaRange = (Position)it.next();
- if(javaRange.overlapsWith(javaOffset, javaLength))
- count++;
- if(count > 1)
- return true;
- }
- return false;
- }
-
- /**
- * Returns the Java positions for the given range in the Java document.
- *
- * @param offset
- * @param length
- * @return
- */
- public Position[] getJavaRanges(int offset, int length) {
-
- List results = new ArrayList();
- Iterator it = getJava2JspMap().keySet().iterator();
- Position p = null;
- while(it.hasNext()) {
- p = (Position)it.next();
- if(p.overlapsWith(offset, length))
- results.add(p);
- }
- return (Position[])results.toArray(new Position[results.size()]);
- }
-
- /**
- * Indicates if the java Offset falls within the user import ranges
- * @param javaOffset
- * @return true if the java Offset falls within the user import ranges, otherwise false
- */
- public boolean isImport(int javaOffset) {
- return isInRanges(javaOffset, fJava2JspImportsMap);
- }
-
- /**
- * Indicates if the java offset falls within the use bean ranges
- * @param javaOffset
- * @return true if the java offset falls within the user import ranges, otherwise false
- */
- public boolean isUseBean(int javaOffset) {
- return isInRanges(javaOffset, fJava2JspUseBeanMap);
- }
-
- /**
- * @param javaPos
- * @return
- */
- public boolean isIndirect(int javaOffset) {
- return isInRanges(javaOffset, fJava2JspIndirectMap, false);
- }
-
- private boolean isInRanges(int javaOffset, HashMap ranges) {
- return isInRanges(javaOffset, ranges, true);
- }
- /**
- * Tells you if the given offset is included in any of the ranges (Positions) passed in.
- * includeEndOffset tells whether or not to include the end offset of each range in the test.
- *
- * @param javaOffset
- * @param ranges
- * @param includeEndOffset
- * @return
- */
- private boolean isInRanges(int javaOffset, HashMap ranges, boolean includeEndOffset) {
-
- Iterator it = ranges.keySet().iterator();
- while(it.hasNext()) {
- Position javaPos = (Position)it.next();
- // also include the start and end offset (only if requested)
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=81687
- if(javaPos.includes(javaOffset) || (includeEndOffset && javaPos.offset+javaPos.length == javaOffset))
- return true;
- }
- return false;
- }
-
- /**
- * Return the Java CompilationUnit associated with this JSPTranslation (this particular model)
- * When using methods on the CU, it's reccomended to synchronize on the CU for reliable
- * results.
- *
- * The method is synchronized to ensure that <code>createComplilationUnit</code> doesn't
- * get entered 2 or more times simultaneously. A side effect of that is 2 compilation units
- * can be created in the JavaModelManager, but we only hold one reference to it in
- * fCompilationUnit. This would lead to a leak since only one instance of the CU is
- * discarded in the <code>release()</code> method.
- *
- * @return a CompilationUnit representation of this JSPTranslation
- */
- public ICompilationUnit getCompilationUnit() {
- synchronized(fLock) {
- try {
- if (fCompilationUnit == null) {
- fCompilationUnit = createCompilationUnit();
- }
- }
- catch (JavaModelException jme) {
- if(DEBUG)
- Logger.logException("error creating JSP working copy... ", jme); //$NON-NLS-1$
- }
- }
- return fCompilationUnit;
- }
-
- private String getMangledName() {
- return fMangledName;
- }
- private void setMangledName(String mangledName) {
- fMangledName = mangledName;
- }
- private String getJspName() {
- return fJspName;
- }
-
- private void setJspName(String jspName) {
- fJspName = jspName;
- }
-
- /**
- * Replaces mangled (servlet) name with jsp file name.
- *
- * @param displayString
- * @return
- */
- public String fixupMangledName(String displayString) {
-
- if(displayString == null)
- return null;
-
- if(getJspName() == null || getMangledName() == null) {
- // names not set yet
- initJspAndServletNames();
- }
- return displayString.replaceAll(getMangledName(), getJspName());
- }
-
- private void initJspAndServletNames() {
- ICompilationUnit cu = getCompilationUnit();
- if(cu != null) {
- String cuName = null;
- synchronized(cu) {
- // set some names for fixing up mangled name in proposals
- // set mangled (servlet) name
- cuName = cu.getPath().lastSegment();
- }
- if(cuName != null) {
- setMangledName(cuName.substring(0, cuName.lastIndexOf('.')));
- // set name of jsp file
- String unmangled = JSP2ServletNameUtil.unmangle(cuName);
- setJspName(unmangled.substring(unmangled.lastIndexOf('/') + 1, unmangled.lastIndexOf('.')));
- }
- }
- }
-
-
- /**
- * Originally from ReconcileStepForJava. Creates an ICompilationUnit from the contents of the JSP document.
- *
- * @return an ICompilationUnit from the contents of the JSP document
- */
- private ICompilationUnit createCompilationUnit() throws JavaModelException {
-
- IPackageFragment packageFragment = null;
- IJavaElement je = getJavaProject();
-
- if (je == null || !je.exists())
- return null;
-
- switch (je.getElementType()) {
- case IJavaElement.PACKAGE_FRAGMENT :
- je = je.getParent();
- // fall through
-
- case IJavaElement.PACKAGE_FRAGMENT_ROOT :
- IPackageFragmentRoot packageFragmentRoot = (IPackageFragmentRoot) je;
- packageFragment = packageFragmentRoot.getPackageFragment(IPackageFragmentRoot.DEFAULT_PACKAGEROOT_PATH);
- break;
-
- case IJavaElement.JAVA_PROJECT :
- IJavaProject jProject = (IJavaProject) je;
-
- if (!jProject.exists()) {
- if(DEBUG) {
- System.out.println("** Abort create working copy: cannot create working copy: JSP is not in a Java project"); //$NON-NLS-1$
- }
- return null;
- }
-
- packageFragmentRoot = null;
- IPackageFragmentRoot[] packageFragmentRoots = jProject.getPackageFragmentRoots();
- int i = 0;
- while (i < packageFragmentRoots.length) {
- if (!packageFragmentRoots[i].isArchive() && !packageFragmentRoots[i].isExternal()) {
- packageFragmentRoot = packageFragmentRoots[i];
- break;
- }
- i++;
- }
- if (packageFragmentRoot == null) {
- if(DEBUG) {
- System.out.println("** Abort create working copy: cannot create working copy: JSP is not in a Java project with source package fragment root"); //$NON-NLS-1$
- }
- return null;
- }
- packageFragment = packageFragmentRoot.getPackageFragment(IPackageFragmentRoot.DEFAULT_PACKAGEROOT_PATH);
- break;
-
- default :
- return null;
- }
-
- ICompilationUnit cu = packageFragment.getCompilationUnit(getClassname() + ".java").getWorkingCopy(getWorkingCopyOwner(), getProblemRequestor(), getProgressMonitor()); //$NON-NLS-1$
- setContents(cu);
-
- if(DEBUG) {
- System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); //$NON-NLS-1$
- System.out.println("(+) JSPTranslation ["+ this + "] finished creating CompilationUnit: " + cu); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); //$NON-NLS-1$
- }
-
- return cu;
- }
-
- /**
- *
- * @return the problem requestor for the CompilationUnit in this JSPTranslation
- */
- private JSPProblemRequestor getProblemRequestor() {
- return CompilationUnitHelper.getInstance().getProblemRequestor();
- }
-
- /**
- *
- * @return the IWorkingCopyOwner for this CompilationUnit in this JSPTranslation
- */
- public WorkingCopyOwner getWorkingCopyOwner() {
- return CompilationUnitHelper.getInstance().getWorkingCopyOwner();
- }
-
- /**
- *
- * @return the progress monitor used in long operations (reconcile, creating the CompilationUnit...) in this JSPTranslation
- */
- private IProgressMonitor getProgressMonitor() {
- if (fProgressMonitor == null)
- fProgressMonitor = new NullProgressMonitor();
- return fProgressMonitor;
- }
-
- /**
- *
- * @return the List of problems collected during reconcile of the compilation unit
- */
- public List getProblems() {
- List problems = getProblemRequestor().getCollectedProblems();
- return problems != null ? problems : new ArrayList();
- }
-
- /**
- *
- * @return the List of problems collected during reconcile of the compilation unit
- */
- public List getELProblems() {
- return fELProblems != null ? fELProblems : new ArrayList();
- }
-
-
- /**
- * Must be set true in order for problems to be collected during reconcile.
- * If set false, problems will be ignored during reconcile.
- * @param collect
- */
- public void setProblemCollectingActive(boolean collect) {
- ICompilationUnit cu = getCompilationUnit();
- if(cu != null) {
- getProblemRequestor().setIsActive(collect);
- }
- }
-
- /**
- * Reconciles the compilation unit for this JSPTranslation
- */
- public void reconcileCompilationUnit() {
- ICompilationUnit cu = getCompilationUnit();
- if (cu != null) {
- try {
- synchronized(cu) {
- cu.makeConsistent(getProgressMonitor());
- cu.reconcile(ICompilationUnit.NO_AST, true, getWorkingCopyOwner(), getProgressMonitor());
- }
- }
- catch (JavaModelException e) {
- Logger.logException(e);
- }
- }
- }
-
- /**
- * Set contents of the compilation unit to the translated jsp text.
- * @param the ICompilationUnit on which to set the buffer contents
- */
- private void setContents(ICompilationUnit cu) {
- if (cu == null)
- return;
-
- synchronized (cu) {
- IBuffer buffer;
- try {
-
- buffer = cu.getBuffer();
- }
- catch (JavaModelException e) {
- e.printStackTrace();
- buffer = null;
- }
-
- if (buffer != null)
- buffer.setContents(getJavaText());
- }
- }
-
- /**
- * Returns the IJavaElements corresponding to the JSP range in the JSP StructuredDocument
- *
- * @param jspStart staring offset in the JSP document
- * @param jspEnd ending offset in the JSP document
- * @return IJavaElements corresponding to the JSP selection
- */
- public IJavaElement[] getElementsFromJspRange(int jspStart, int jspEnd) {
-
- int javaPositionStart = getJavaOffset(jspStart);
- int javaPositionEnd = getJavaOffset(jspEnd);
-
- IJavaElement[] EMTPY_RESULT_SET = new IJavaElement[0];
- IJavaElement[] result = EMTPY_RESULT_SET;
- try {
- ICompilationUnit cu = getCompilationUnit();
- if (cu != null) {
- synchronized (cu) {
- int cuDocLength = cu.getBuffer().getLength();
- int javaLength = javaPositionEnd - javaPositionStart;
- if (cuDocLength > 0 && javaPositionStart >= 0 && javaLength >= 0 && javaPositionEnd < cuDocLength) {
- result = cu.codeSelect(javaPositionStart, javaLength);
- }
- }
- }
-
- if (result == null || result.length == 0)
- return EMTPY_RESULT_SET;
- }
- catch (JavaModelException x) {
- Logger.logException(x);
- }
-
- return result;
- }
-
- public String getClassname() {
- return fClassname;
- }
-
- /**
- * Must discard compilation unit, or else they can leak in the JavaModelManager
- */
- public void release() {
-
- synchronized(fLock) {
- if(fCompilationUnit != null) {
- try {
- if(DEBUG) {
- System.out.println("------------------------------------------------------------------"); //$NON-NLS-1$
- System.out.println("(-) JSPTranslation [" + this +"] discarding CompilationUnit: " + fCompilationUnit); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("------------------------------------------------------------------"); //$NON-NLS-1$
- }
- fCompilationUnit.discardWorkingCopy();
- }
- catch (JavaModelException e) {
- // we're done w/ it anyway
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java
deleted file mode 100644
index f0ba288a44..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java
+++ /dev/null
@@ -1,226 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.DocumentEvent;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentListener;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-/**
- * An adapter for getting a JSPTranslation of the document.
- *
- * @author pavery
- */
-public class JSPTranslationAdapter implements INodeAdapter, IDocumentListener {
-
- // for debugging
- private static final boolean DEBUG = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jsptranslation")); //$NON-NLS-1$ //$NON-NLS-2$
-
- private IDocument fJspDocument = null;
- private IDocument fJavaDocument = null;
- private JSPTranslationExtension fJSPTranslation = null;
- private boolean fDocumentIsDirty = true;
- private IDOMModel fXMLModel;
- private JSPTranslator fTranslator = null;
- private NullProgressMonitor fTranslationMonitor = null;
-
- public JSPTranslationAdapter(IDOMModel xmlModel) {
- setXMLModel(xmlModel);
- initializeJavaPlugins();
- }
-
- /**
- * Initialize the required Java Plugins
- */
- protected void initializeJavaPlugins() {
- JavaCore.getPlugin();
- }
-
- public boolean isAdapterForType(Object type) {
- return type.equals(IJSPTranslation.class);
- }
-
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- // nothing to do
- }
-
- /**
- * Automatically set through the setXMLModel(XMLModel)
- *
- * @param doc
- */
- private void setDocument(IDocument doc) {
- if (fJspDocument != null)
- fJspDocument.removeDocumentListener(this);
- if (doc != null) {
- doc.addDocumentListener(this);
- fJspDocument = doc;
- }
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentListener#documentAboutToBeChanged(org.eclipse.jface.text.DocumentEvent)
- */
- public void documentAboutToBeChanged(DocumentEvent event) {
- // do nothing
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentListener#documentChanged(org.eclipse.jface.text.DocumentEvent)
- */
- public void documentChanged(DocumentEvent event) {
- // mark translation for rebuilding
- fDocumentIsDirty = true;
- }
-
- public void release() {
-
- if (fJspDocument != null)
- fJspDocument.removeDocumentListener(this);
-
- if (fTranslationMonitor != null)
- fTranslationMonitor.setCanceled(true);
-
- if (fJSPTranslation != null) {
-
- if (DEBUG)
- System.out.println("JSPTranslationAdapter releasing:" + fJSPTranslation); //$NON-NLS-1$
-
- fJSPTranslation.release();
- }
- }
-
- /**
- * Returns the JSPTranslation for this adapter.
- *
- * @return a JSPTranslationExtension
- */
- public synchronized JSPTranslationExtension getJSPTranslation() {
-
- if (fJSPTranslation == null || fDocumentIsDirty) {
- JSPTranslator translator = null;
- if (getXMLModel() != null && getXMLModel().getIndexedRegion(0) != null) {
- translator = getTranslator((IDOMNode) getXMLModel().getIndexedRegion(0));
- translator.translate();
- StringBuffer javaContents = translator.getTranslation();
- fJavaDocument = new Document(javaContents.toString());
- }
- else {
- // empty document case
- translator = new JSPTranslator();
- StringBuffer emptyContents = translator.getEmptyTranslation();
- fJavaDocument = new Document(emptyContents.toString());
- }
- // it's going to be rebuilt, so we release it here
- if (fJSPTranslation != null) {
- if (DEBUG)
- System.out.println("JSPTranslationAdapter releasing:" + fJSPTranslation); //$NON-NLS-1$
- fJSPTranslation.release();
- }
- fJSPTranslation = new JSPTranslationExtension(getXMLModel().getStructuredDocument(), fJavaDocument, getJavaProject(), translator);
- fDocumentIsDirty = false;
- }
- return fJSPTranslation;
- }
-
- /**
- * Returns the JSPTranslator for this adapter. If it's null, a new
- * translator is created with the xmlNode. Otherwise the
- * translator.reset(xmlNode) is called to reset the current local
- * translator.
- *
- * @param xmlNode
- * the first node of the JSP document to be translated
- * @return the JSPTranslator for this adapter (creates if null)
- */
- private JSPTranslator getTranslator(IDOMNode xmlNode) {
- if (fTranslator == null) {
- fTranslationMonitor = new NullProgressMonitor();
- fTranslator = new JSPTranslator();
- fTranslator.reset(xmlNode, fTranslationMonitor);
- }
- else
- fTranslator.reset(xmlNode, fTranslationMonitor);
- return fTranslator;
- }
-
- /**
- * set the XMLModel for this adapter. Must be called.
- *
- * @param xmlModel
- */
- public void setXMLModel(IDOMModel xmlModel) {
- fXMLModel = xmlModel;
- setDocument(fXMLModel.getStructuredDocument());
- }
-
- /**
- * @return the XMLModel for this adapter.
- */
- private IDOMModel getXMLModel() {
- return fXMLModel;
- }
-
- /**
- * Gets (or creates via JavaCore) a JavaProject based on the location of
- * this adapter's XMLModel. Returns null for non IFile based models.
- *
- * @return the java project where
- */
- public IJavaProject getJavaProject() {
-
- IJavaProject javaProject = null;
- try {
- String baseLocation = getXMLModel().getBaseLocation();
- // 20041129 (pa) the base location changed for XML model
- // because of FileBuffers, so this code had to be updated
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=79686
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IPath filePath = new Path(baseLocation);
- IProject project = null;
- if (filePath.segmentCount() > 0) {
- project = root.getProject(filePath.segment(0));
- }
-// IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(new Path(baseLocation));
-// for (int i = 0; project == null && i < files.length; i++) {
-// if (files[i].getType() != IResource.PROJECT) {
-// project = files[i].getProject();
-// break;
-// }
-// }
- if (project != null) {
- javaProject = JavaCore.create(project);
- }
- }
- catch (Exception ex) {
- if (getXMLModel() != null)
- Logger.logException("(JSPTranslationAdapter) problem getting java project from the XMLModel's baseLocation > " + getXMLModel().getBaseLocation(), ex); //$NON-NLS-1$
- else
- Logger.logException("(JSPTranslationAdapter) problem getting java project", ex); //$NON-NLS-1$
- }
- return javaProject;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java
deleted file mode 100644
index 7d4b14fa33..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.wst.sse.core.internal.provisional.AbstractAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-/**
- * Factory for JSPTranslationAdapters.
- *
- * @author pavery
- *
- */
-public class JSPTranslationAdapterFactory extends AbstractAdapterFactory {
-
- private JSPTranslationAdapter fAdapter = null;
-
- // for debugging
- private static final boolean DEBUG;
- static {
- String value= Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jsptranslation"); //$NON-NLS-1$
- DEBUG= value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- public JSPTranslationAdapterFactory() {
- super(IJSPTranslation.class, true);
- }
-
- public INodeAdapterFactory copy() {
- return new JSPTranslationAdapterFactory();
- }
-
- protected INodeAdapter createAdapter(INodeNotifier target) {
- if (target instanceof IDOMNode && fAdapter == null) {
- fAdapter = new JSPTranslationAdapter(((IDOMNode) target).getModel());
- if(DEBUG) {
- System.out.println("(+) JSPTranslationAdapterFactory [" + this + "] created adapter: " + fAdapter); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- return fAdapter;
- }
-
-
- public void release() {
- if (fAdapter != null) {
- if(DEBUG) {
- System.out.println("(-) JSPTranslationAdapterFactory [" + this + "] releasing adapter: " + fAdapter); //$NON-NLS-1$ //$NON-NLS-2$
- }
- fAdapter.release();
- }
- super.release();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationExtension.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationExtension.java
deleted file mode 100644
index 9e0706837e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationExtension.java
+++ /dev/null
@@ -1,441 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.InsertEdit;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.text.edits.TextEdit;
-import org.eclipse.text.edits.UndoEdit;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-import com.ibm.icu.util.StringTokenizer;
-
-
-/**
- * Adds the notion of IDocuments (jsp Document and java Document)
- * Used for TextEdit translation
- * @author pavery
- */
-public class JSPTranslationExtension extends JSPTranslation {
-
- // for debugging
- private static final boolean DEBUG;
- static {
- String value= Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jsptranslation"); //$NON-NLS-1$
- DEBUG= value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- // just a convenience data structure
- // to keep track of java position deltas
- private class PositionDelta {
-
- public boolean isDeleted = false;
- public int preOffset = 0;
- public int preLength = 0;
- public int postOffset = 0;
- public int postLength = 0;
-
- public PositionDelta(int preOffset, int preLength) {
- this.preOffset = preOffset;
- this.preLength = preLength;
- }
- public void setPostEditData(int postOffset, int postLength, boolean isDeleted) {
- this.postOffset = postOffset;
- this.postLength = postLength;
- this.isDeleted = isDeleted;
- }
- }
-
- private IDocument fJspDocument = null;
- private IDocument fJavaDocument = null;
-
- public JSPTranslationExtension(IDocument jspDocument, IDocument javaDocument, IJavaProject javaProj, JSPTranslator translator) {
- super(javaProj, translator);
- fJspDocument = jspDocument;
- fJavaDocument = javaDocument;
-
- // make sure positions are added to Java and JSP documents
- // this is necessary for text edits
- addPositionsToDocuments();
- }
-
- public IDocument getJspDocument() {
- return fJspDocument;
- }
-
- public IDocument getJavaDocument() {
- return fJavaDocument;
- }
-
- public String getJavaText() {
- return getJavaDocument() != null ? getJavaDocument().get() : ""; //$NON-NLS-1$
- }
-
- /**
- * Returns a corresponding TextEdit for the JSP file given a TextEdit for a Java file.
- *
- * @param javaEdit
- * @return the corresponding JSP edits (not applied to the document yet)
- */
- public TextEdit getJspEdit(TextEdit javaEdit) {
-
- if(javaEdit == null)
- return null;
-
- List jspEdits = new ArrayList();
-
- int offset = javaEdit.getOffset();
- int length = javaEdit.getLength();
-
- if(javaEdit instanceof MultiTextEdit && javaEdit.getChildren().length > 0) {
-
- IRegion r = TextEdit.getCoverage(getAllEdits(javaEdit));
- offset = r.getOffset();
- length = r.getLength();
- }
-
- // get java ranges that will be affected by the edit
- Position[] javaPositions = getJavaRanges(offset, length);
-
- // record position data before the change
- Position[] jspPositions = new Position[javaPositions.length];
- PositionDelta[] deltas = new PositionDelta[javaPositions.length];
- for(int i=0; i<javaPositions.length; i++) {
- deltas[i] = new PositionDelta(javaPositions[i].offset, javaPositions[i].length);
- // isIndirect means the position doesn't actually exist as exact text
- // mapping from java <-> jsp (eg. an import statement)
- if(!isIndirect(javaPositions[i].offset))
- jspPositions[i] = (Position)getJava2JspMap().get(javaPositions[i]);
- }
-
- if(DEBUG) {
- System.out.println("================================================"); //$NON-NLS-1$
- System.out.println("deltas:"); //$NON-NLS-1$
- String javaText = getJavaText();
- for(int i=0; i<deltas.length; i++)
- System.out.println("pos[" + deltas[i].preOffset + ":" + deltas[i].preLength + "]" + javaText.substring(deltas[i].preOffset, deltas[i].preOffset + deltas[i].preLength) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- System.out.println("==============================================="); //$NON-NLS-1$
- }
- UndoEdit undo = null;
- // apply the edit to the java document
- try {
- undo = javaEdit.apply(getJavaDocument());
- } catch (MalformedTreeException e) {
- Logger.logException(e);
- } catch (BadLocationException e) {
- Logger.logException(e);
- }
- // now at this point Java positions are unreliable since they were updated after applying java edit.
-
- String newJavaText = getJavaDocument().get();
- if(DEBUG)
- System.out.println("java post format text:\n" + newJavaText); //$NON-NLS-1$
-
- // record post edit data
- for(int i=0; i<javaPositions.length; i++)
- deltas[i].setPostEditData(javaPositions[i].offset, javaPositions[i].length, javaPositions[i].isDeleted);
-
- // create appropriate text edits for deltas
- Position jspPos = null;
- String replaceText = ""; //$NON-NLS-1$
- for(int i=0; i<deltas.length; i++) {
- jspPos = jspPositions[i];
- // can be null if it's an indirect mapping position
- // or if something was added into java that was not originally in JSP (like a new import...)
-
- if(jspPos != null) {
- if(deltas[i].isDeleted) {
- jspEdits.add(new DeleteEdit(jspPos.offset, jspPos.length));
- }
- else {
- replaceText = newJavaText.substring(deltas[i].postOffset, deltas[i].postOffset + deltas[i].postLength);
-
- // get rid of pre and post white space or fine tuned adjustment later.
- // fix text here...
- replaceText = fixJspReplaceText(replaceText, jspPos.offset);
-
- jspEdits.add(new ReplaceEdit(jspPos.offset, jspPos.length, replaceText));
- }
- if(DEBUG)
- debugReplace(deltas, jspPos, replaceText, i);
- }
- else {
- // the new Java text has no corresponding JSP position
- // possible new import?
- if(isImport(javaPositions[i].getOffset()) && replaceText.lastIndexOf("import ") != -1) { //$NON-NLS-1$
- replaceText = newJavaText.substring(deltas[i].postOffset, deltas[i].postOffset + deltas[i].postLength);
- String importText = replaceText.substring(replaceText.lastIndexOf("import "), replaceText.indexOf(";")); //$NON-NLS-1$ //$NON-NLS-2$
- // evenutally need to check if it's XML-JSP
- importText = "<%@page import=\"" + importText + "\" %>\n"; //$NON-NLS-1$ //$NON-NLS-2$
- jspEdits.add(new InsertEdit(0, importText));
- }
- }
- }
- TextEdit allJspEdits = createMultiTextEdit((TextEdit[])jspEdits.toArray(new TextEdit[jspEdits.size()]));
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=105632
- // undo the java edit
- // (so the underlying Java document still represents what's in the editor)
- if(undo != null) {
- try {
- undo.apply(getJavaDocument());
- }
- catch (MalformedTreeException e) {
- Logger.logException(e);
- }
- catch (BadLocationException e) {
- Logger.logException(e);
- }
- }
-
- return allJspEdits;
- }
-
- private String fixJspReplaceText(String replaceText, int jspOffset) {
-
- // result is the text inbetween the delimiters
- // eg.
- //
- // <% result
- // %>
- String result = replaceText.trim();
- String preDelimiterWhitespace = ""; //$NON-NLS-1$
-
- IDocument jspDoc = getJspDocument();
- if(jspDoc instanceof IStructuredDocument) {
- IStructuredDocument sDoc = (IStructuredDocument)jspDoc;
- IStructuredDocumentRegion[] regions = sDoc.getStructuredDocumentRegions(0, jspOffset);
- IStructuredDocumentRegion lastRegion = regions[regions.length-1];
-
- // only specifically modify scriptlets
- if(lastRegion != null && lastRegion.getType() == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) {
- for (int i = regions.length-1; i >= 0; i--) {
- IStructuredDocumentRegion region = regions[i];
-
- // is there a better way to check whitespace?
- if(region.getType() == DOMRegionContext.XML_CONTENT && region.getFullText().trim().equals("")) { //$NON-NLS-1$
-
- preDelimiterWhitespace = region.getFullText();
- preDelimiterWhitespace = preDelimiterWhitespace.replaceAll("\r", ""); //$NON-NLS-1$ //$NON-NLS-2$
- preDelimiterWhitespace = preDelimiterWhitespace.replaceAll("\n", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
- // need to determine indent for that first line...
- String initialIndent = getInitialIndent(result);
-
- // fix the first line of java code
- result = TextUtilities.getDefaultLineDelimiter(sDoc)
- + initialIndent
- + result;
-
- result = adjustIndent(result, preDelimiterWhitespace, TextUtilities.getDefaultLineDelimiter(sDoc));
-
- // add whitespace before last delimiter to match
- // it w/ the opening delimiter
- result = result + TextUtilities.getDefaultLineDelimiter(sDoc) + preDelimiterWhitespace;
- break;
- }
- }
- }
- }
- return result;
- }
-
- private String adjustIndent(String textBefore, String indent, String delim) {
-
- // first replace multiple indent with single indent
- // the triple indent occurs because the scriptlet code
- // actually occurs under:
- //
- // class
- // method
- // code
- //
- // in the translated java document
-
- textBefore = textBefore.replaceAll("\t\t\t", "\t"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // get indent after 2nd line break
- StringBuffer textAfter = new StringBuffer();
- // will this work on mac?
- textBefore = textBefore.replaceAll("\r", ""); //$NON-NLS-1$ //$NON-NLS-2$
- StringTokenizer st = new StringTokenizer(textBefore, "\n", true); //$NON-NLS-1$
- while(st.hasMoreTokens()) {
- String tok = st.nextToken();
- if(tok.equals("\n")) { //$NON-NLS-1$
- textAfter.append(delim);
- }
- else {
- // prepend each line w/ specified indent
- textAfter.append(indent);
- textAfter.append(tok);
- }
- }
- return textAfter.toString();
-
- }
-
- private String getInitialIndent(String result) {
-
- // get indent after 2nd line break
- String indent = ""; //$NON-NLS-1$
- StringTokenizer st = new StringTokenizer(result, "\r\n", false); //$NON-NLS-1$
- if(st.countTokens() > 1) {
- String tok = st.nextToken();
- tok = st.nextToken();
- int index =0;
- if(tok != null) {
- while(tok.charAt(index) == ' ' || tok.charAt(index) == '\t') {
- indent += tok.charAt(index);
- index++;
- }
- }
- }
- return indent;
- }
-
-
- /**
- * Combines an array of edits into one MultiTextEdit (with the appropriate coverage region)
- * @param edits
- * @return
- */
- private TextEdit createMultiTextEdit(TextEdit[] edits) {
-
- if(edits.length == 0)
- return new MultiTextEdit();
-
- IRegion region = TextEdit.getCoverage(edits);
- MultiTextEdit multiEdit = new MultiTextEdit(region.getOffset(), region.getLength());
- for (int i = 0; i < edits.length; i++) {
- addToMultiEdit(edits[i], multiEdit);
- }
- return multiEdit;
- }
-
-
- private void addToMultiEdit(TextEdit edit, MultiTextEdit multiEdit) {
-
- // check for overlap here
- // discard overlapping edits..
- // possible exponential performance hit... need a better way...
- TextEdit[] children = multiEdit.getChildren();
- for (int i = 0; i < children.length; i++) {
- if(children[i].covers(edit))
- // don't add
- return;
- }
- multiEdit.addChild(edit);
- }
-
-
- /**
- * @param translation
- */
- private void addPositionsToDocuments() {
-
- // can be null if it's a NullJSPTranslation
- if(getJavaDocument() != null && getJspDocument() != null) {
-
- HashMap java2jsp = getJava2JspMap();
- Iterator it = java2jsp.keySet().iterator();
- Position javaPos = null;
- while(it.hasNext()) {
- javaPos =(Position)it.next();
- try {
-
- fJavaDocument.addPosition(javaPos);
-
- } catch (BadLocationException e) {
- if(DEBUG) {
- System.out.println("tyring to add Java Position:[" + javaPos.offset + ":" + javaPos.length + "] to " + getJavaPath()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- //System.out.println("substring :[" + fJavaDocument.get().substring(javaPos.offset) + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- Logger.logException(e);
- }
- }
-
- try {
-
- fJspDocument.addPosition((Position)java2jsp.get(javaPos));
-
- } catch (BadLocationException e) {
- if(DEBUG) {
- System.out.println("tyring to add JSP Position:[" + ((Position)java2jsp.get(javaPos)).offset + ":" +((Position)java2jsp.get(javaPos)).length + "] to " + getJavaPath()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- Logger.logException(e);
- }
- }
- }
- }
- }
-
- /**
- * Recursively gets all child edits
- * @param javaEdit
- * @return all child edits
- */
- private TextEdit[] getAllEdits(TextEdit javaEdit) {
-
- List result = new ArrayList();
- if(javaEdit instanceof MultiTextEdit) {
- TextEdit[] children = javaEdit.getChildren();
- for (int i = 0; i < children.length; i++)
- result.addAll(Arrays.asList(getAllEdits(children[i])));
- }
- else
- result.add(javaEdit);
- return (TextEdit[])result.toArray(new TextEdit[result.size()]);
- }
-
- public void reconcileCompilationUnit() {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=87351
- // the check to reconcile/validate fragments was removed
- // from here and placed in a class that is called earlier
- // in stack trace
- super.reconcileCompilationUnit();
- }
-
- /**
- * @param deltas
- * @param jspPos
- * @param replaceText
- * @param jspText
- * @param i
- */
- private void debugReplace(PositionDelta[] deltas, Position jspPos, String replaceText, int i) {
- String jspChunk;
- jspChunk = getJspDocument().get().substring(jspPos.offset, jspPos.offset + jspPos.length);
- if(!deltas[i].isDeleted) {
- System.out.println("replacing:"); //$NON-NLS-1$
- System.out.println("jsp:[" + jspChunk + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("w/ :[" + replaceText + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("--------------------------------"); //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationUtil.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationUtil.java
deleted file mode 100644
index 7b64c8dfc4..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationUtil.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.text.edits.CopySourceEdit;
-import org.eclipse.text.edits.CopyTargetEdit;
-import org.eclipse.text.edits.DeleteEdit;
-import org.eclipse.text.edits.InsertEdit;
-import org.eclipse.text.edits.MoveSourceEdit;
-import org.eclipse.text.edits.MoveTargetEdit;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.ReplaceEdit;
-import org.eclipse.text.edits.TextEdit;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-public class JSPTranslationUtil {
- protected IDocument fDocument = null;
- protected JSPTranslationExtension fTranslation = null;
-
- public JSPTranslationUtil(IDocument document) {
- fDocument = document;
- }
-
- public TextEdit translateTextEdit(TextEdit textEdit) {
- TextEdit translatedTextEdit = null;
-
- int javaOffset = textEdit.getOffset();
- int jspOffset = getTranslation().getJspOffset(textEdit.getOffset());
- int length = textEdit.getLength();
-
- if (textEdit instanceof MultiTextEdit) {
- translatedTextEdit = new MultiTextEdit();
- TextEdit[] children = ((MultiTextEdit) textEdit).getChildren();
- for (int i = 0; i < children.length; i++) {
- TextEdit translatedChildTextEdit = translateTextEdit(children[i]);
- if (translatedChildTextEdit != null)
- ((MultiTextEdit) translatedTextEdit).addChild(translatedChildTextEdit);
- }
- }
- else if (textEdit instanceof ReplaceEdit) {
- if (jspOffset == -1)
- return null;
-
- if (!getTranslation().javaSpansMultipleJspPartitions(javaOffset, length))
- translatedTextEdit = new ReplaceEdit(jspOffset, length, ((ReplaceEdit) textEdit).getText());
- }
- else if (textEdit instanceof InsertEdit) {
- translatedTextEdit = new InsertEdit(jspOffset, ((InsertEdit) textEdit).getText());
- }
- else if (textEdit instanceof DeleteEdit) {
- translatedTextEdit = new DeleteEdit(jspOffset, length);
- TextEdit[] children = ((DeleteEdit) textEdit).getChildren();
- for (int i = 0; i < children.length; i++) {
- TextEdit translatedChildTextEdit = translateTextEdit(children[i]);
- if (translatedChildTextEdit != null)
- ((DeleteEdit) translatedTextEdit).addChild(translatedChildTextEdit);
- }
- }
- else if (textEdit instanceof CopySourceEdit) {
- translatedTextEdit = new CopySourceEdit(jspOffset, length);
- ((CopySourceEdit) translatedTextEdit).setTargetEdit(((CopySourceEdit) textEdit).getTargetEdit());
- ((CopySourceEdit) translatedTextEdit).setSourceModifier(((CopySourceEdit) textEdit).getSourceModifier());
- }
- else if (textEdit instanceof CopyTargetEdit) {
- translatedTextEdit = new CopyTargetEdit(jspOffset);
- ((CopyTargetEdit) textEdit).getSourceEdit().setTargetEdit((CopyTargetEdit) translatedTextEdit);
- }
- else if (textEdit instanceof MoveSourceEdit) {
- translatedTextEdit = new MoveSourceEdit(jspOffset, length);
- ((MoveSourceEdit) translatedTextEdit).setTargetEdit(((MoveSourceEdit) textEdit).getTargetEdit());
- }
- else if (textEdit instanceof MoveTargetEdit) {
- translatedTextEdit = new MoveTargetEdit(jspOffset);
- ((MoveTargetEdit) textEdit).getSourceEdit().setTargetEdit((MoveTargetEdit) translatedTextEdit);
- }
- else {
- System.out.println("Need to translate " + textEdit); //$NON-NLS-1$
- }
-
- return translatedTextEdit;
- }
-
- public JSPTranslationExtension getTranslation() {
- if (fTranslation == null) {
- IDOMModel xmlModel = (IDOMModel) getModelManager().getExistingModelForRead(fDocument);
- try {
- IDOMDocument xmlDoc = xmlModel.getDocument();
-
- JSPTranslationAdapter translationAdapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
- if (translationAdapter != null)
- fTranslation = translationAdapter.getJSPTranslation();
- }
- finally {
- if (xmlModel != null) {
- xmlModel.releaseFromRead();
- }
- }
- }
-
- return fTranslation;
- }
-
- public ICompilationUnit getCompilationUnit() {
- return getTranslation().getCompilationUnit();
- }
-
- protected IModelManager getModelManager() {
- return StructuredModelManager.getModelManager();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
deleted file mode 100644
index 9cc1eb845c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
+++ /dev/null
@@ -1,2487 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Stack;
-
-import javax.servlet.jsp.tagext.VariableInfo;
-
-import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.filebuffers.ITextFileBufferManager;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.internal.taglib.TaglibHelper;
-import org.eclipse.jst.jsp.core.internal.taglib.TaglibHelperManager;
-import org.eclipse.jst.jsp.core.internal.taglib.TaglibVariable;
-import org.eclipse.jst.jsp.core.jspel.IJSPELTranslator;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.util.URIResolver;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.parser.ContextRegionContainer;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocumentTracker;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-import com.ibm.icu.util.StringTokenizer;
-
-/**
- * Translates a JSP document into a HttpServlet. Keeps two way mapping from
- * java translation to the original JSP source, which can be obtained through
- * getJava2JspRanges() and getJsp2JavaRanges().
- *
- * @author pavery
- */
-public class JSPTranslator {
-
- // the name of the element in the extension point
- private static final String EL_TRANSLATOR_EXTENSION_NAME = "elTranslator"; //$NON-NLS-1$
-
- private static final String ELTRANSLATOR_PROP_NAME = "ELTranslator"; //$NON-NLS-1$
-
- // Default EL Translator
- private static final String DEFAULT_JSP_EL_TRANSLATOR_ID = "org.eclipse.jst.jsp.defaultJSP20"; //$NON-NLS-1$
-
- // handy plugin ID constant
- private static final String JSP_CORE_PLUGIN_ID = "org.eclipse.jst.jsp.core"; //$NON-NLS-1$
-
- // for debugging
- private static final boolean DEBUG;
- private static final boolean DEBUG_SAVE_OUTPUT = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jsptranslationstodisk")); //$NON-NLS-1$ //$NON-NLS-2$
-
- private IJSPELTranslator fELTranslator = null;
-
- static {
- String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspjavamapping"); //$NON-NLS-1$
- DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- public static final String ENDL = "\n"; //$NON-NLS-1$
-
- private String fClassHeader = "public class _JSPServlet extends "; //$NON-NLS-1$
- private String fClassname = "_JSPServlet"; //$NON-NLS-1$
-
- private String fImplicitImports = "import javax.servlet.*;" + ENDL + //$NON-NLS-1$
- "import javax.servlet.http.*;" + ENDL + //$NON-NLS-1$
- "import javax.servlet.jsp.*;" + ENDL + ENDL; //$NON-NLS-1$
-
- private String fServiceHeader = "public void _jspService(javax.servlet.http.HttpServletRequest request," + //$NON-NLS-1$
- " javax.servlet.http.HttpServletResponse response)" + ENDL + //$NON-NLS-1$
- "\t\tthrows java.io.IOException, javax.servlet.ServletException {" + ENDL + //$NON-NLS-1$
- "javax.servlet.jsp.PageContext pageContext = null;" + ENDL + //$NON-NLS-1$
- "javax.servlet.ServletContext application = null;" + ENDL + //$NON-NLS-1$
- "javax.servlet.ServletConfig config = null;" + ENDL + //$NON-NLS-1$
- "javax.servlet.jsp.JspWriter out = null;" + ENDL + //$NON-NLS-1$
- "Object page = null;" + ENDL; //$NON-NLS-1$
-
- private String fSessionVariableDeclaration = "javax.servlet.http.HttpSession session = null;" + ENDL; //$NON-NLS-1$
- private String fFooter = "}}"; //$NON-NLS-1$
- private String fException = "Throwable exception = null;"; //$NON-NLS-1$
- public static final String EXPRESSION_PREFIX = "out.print(\"\"+"; //$NON-NLS-1$
- public static final String EXPRESSION_SUFFIX = ");"; //$NON-NLS-1$
- private String fSuperclass = "javax.servlet.http.HttpServlet"; //$NON-NLS-1$
-
- private String fTryCatchStart = ENDL + "try {" + ENDL; //$NON-NLS-1$
- private String fTryCatchEnd = " } catch (java.lang.Exception e) {} " + ENDL; //$NON-NLS-1$
-
- /** fSourcePosition = position in JSP source */
- private int fSourcePosition = -1;
- /** fRelativeOffest = offset in the buffer there the cursor is */
- private int fRelativeOffset = -1;
- /** fCursorPosition = offset in the translated java document */
- private int fCursorPosition = -1;
- /** some page directive attributes */
- private boolean fIsErrorPage, fCursorInExpression = false;
- private boolean fIsInASession = true;
-
- /** user java code in body of the service method */
- private StringBuffer fUserCode = new StringBuffer();
- /** user EL Expression */
- private StringBuffer fUserELExpressions = new StringBuffer();
- /** user defined vars declared in the beginning of the class */
- private StringBuffer fUserDeclarations = new StringBuffer();
-
- /** user defined imports */
- private StringBuffer fUserImports = new StringBuffer();
-
- /**
- * A map of tag names to tag library variable information; used to store
- * the ones needed for AT_END variable support.
- */
- private HashMap fTagToVariableMap = null;
-
- private StringBuffer fResult; // the final traslated java document
- // string buffer
- private StringBuffer fCursorOwner = null; // the buffer where the cursor
- // is
-
- private IDOMModel fStructuredModel = null;
- private IStructuredDocument fStructuredDocument = null;
- private IStructuredDocumentRegion fCurrentNode;
- private boolean fInCodeRegion = false; // flag for if cursor is in the
- // current region being translated
-
- /**
- * these constants are to keep track of whether the code in question is
- * embedded (JSP as an attribute or within comment tags) or is just
- * standard JSP code, or identifies if it's an expression
- */
- protected final static int STANDARD_JSP = 0;
- protected final static int EMBEDDED_JSP = 1;
- protected final static int DECLARATION = 2;
- protected final static int EXPRESSION = 4;
- protected final static int SCRIPTLET = 8;
-
- /** used to avoid infinite looping include files */
- private Stack fIncludes = null;
- /** mostly for helper classes, so they parse correctly */
- private ArrayList fBlockMarkers = null;
- /**
- * for keeping track of offset in user buffers while document is being
- * built
- */
- private int fOffsetInUserImports = 0;
- private int fOffsetInUserDeclarations = 0;
- private int fOffsetInUserCode = 0;
-
- /** correlates ranges (positions) in java to ranges in jsp */
- private HashMap fJava2JspRanges = new HashMap();
-
- /**
- * map of ranges in fUserImports (relative to the start of the buffer) to
- * ranges in source JSP buffer.
- */
- private HashMap fImportRanges = new HashMap();
- /**
- * map of ranges in fUserCode (relative to the start of the buffer) to
- * ranges in source JSP buffer.
- */
- private HashMap fCodeRanges = new HashMap();
- /**
- * map of ranges in fUserDeclarations (relative to the start of the
- * buffer) to ranges in source JSP buffer.
- */
- private HashMap fDeclarationRanges = new HashMap();
-
- private HashMap fUseBeanRanges = new HashMap();
-
- private HashMap fUserELRanges = new HashMap();
-
- /**
- * ranges that don't directly map from java code to JSP code (eg.
- * <%@include file="included.jsp"%>
- */
- private HashMap fIndirectRanges = new HashMap();
-
- private IProgressMonitor fProgressMonitor = null;
-
- /**
- * save JSP document text for later use may just want to read this from
- * the file or strucdtured document depending what is available
- */
- private StringBuffer fJspTextBuffer = new StringBuffer();
-
-
- /**
- * List of EL problems to be translated
- */
- private ArrayList fELProblems = new ArrayList();
-
- /**
- * EL Translator ID
- */
- private String fELTranslatorID;
-
- /**
- * configure using an XMLNode
- *
- * @param node
- * @param monitor
- */
- private void configure(IDOMNode node, IProgressMonitor monitor) {
-
- fProgressMonitor = monitor;
- fStructuredModel = node.getModel();
- String baseLocation = fStructuredModel.getBaseLocation();
-
- fELTranslatorID = getELTranslatorProperty(baseLocation);
-
- fStructuredDocument = fStructuredModel.getStructuredDocument();
-
- String className = createClassname(node);
- if (className.length() > 0) {
- setClassname(className);
- fClassHeader = "public class " + className + " extends "; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * memory saving configure (no StructuredDocument in memory) currently
- * doesn't handle included files
- *
- * @param jspFile
- * @param monitor
- */
- private void configure(IFile jspFile, IProgressMonitor monitor) {
- // when configured on a file
- // fStructuredModel, fPositionNode, fModelQuery, fStructuredDocument
- // are all null
- fProgressMonitor = monitor;
-
- fELTranslatorID = getELTranslatorProperty(jspFile);
-
- String className = createClassname(jspFile);
- if (className.length() > 0) {
- setClassname(className);
- fClassHeader = "public class " + className + " extends "; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Set the jsp text from an IFile
- *
- * @param jspFile
- */
- private void setJspText(IFile jspFile) {
- try {
- BufferedInputStream in = new BufferedInputStream(jspFile.getContents());
- BufferedReader reader = new BufferedReader(new InputStreamReader(in));
- String line = null;
- while ((line = reader.readLine()) != null) {
- fJspTextBuffer.append(line);
- fJspTextBuffer.append(ENDL);
- }
- reader.close();
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- }
-
- /**
- * Get the value of the ELTranslator property from a workspace relative
- * path string
- *
- * @param baseLocation
- * Workspace-relative string path
- * @return Value of the ELTranslator property associated with the project.
- */
- private String getELTranslatorProperty(String baseLocation) {
- IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
- String elTranslatorValue = null;
- IFile file = workspaceRoot.getFile(new Path(baseLocation));
- if (file != null) {
- elTranslatorValue = getELTranslatorProperty(file);
- }
- return elTranslatorValue;
- }
-
- /**
- * Get the value of the ELTranslator property from an IFile
- *
- * @param file
- * IFile
- * @return Value of the ELTranslator property associated with the project.
- */
- private String getELTranslatorProperty(IFile file) {
- String elTranslatorValue = null;
- if (file != null) {
- if (file.exists()) {
- try {
- elTranslatorValue = file.getPersistentProperty(new QualifiedName(JSP_CORE_PLUGIN_ID, ELTRANSLATOR_PROP_NAME));
- if (null == elTranslatorValue) {
-
- elTranslatorValue = file.getProject().getPersistentProperty(new QualifiedName(JSP_CORE_PLUGIN_ID, ELTRANSLATOR_PROP_NAME));
- }
- }
- catch (CoreException e) {
- // ISSUE: why do we log this here? Instead of allowing to
- // throwup?
- Logger.logException(e);
- }
-
- }
- }
- return elTranslatorValue;
- }
-
- /**
- * @param node
- * @return
- */
- private String createClassname(IDOMNode node) {
-
- String classname = ""; //$NON-NLS-1$
- if (node != null) {
- String base = node.getModel().getBaseLocation();
- classname = JSP2ServletNameUtil.mangle(base);
- }
- return classname;
- }
-
- /**
- * @param jspFile
- * @return
- */
- private String createClassname(IFile jspFile) {
-
- String classname = ""; //$NON-NLS-1$
- if (jspFile != null) {
- classname = JSP2ServletNameUtil.mangle(jspFile.getFullPath().toString());
- }
- return classname;
- }
-
- public void setClassname(String classname) {
- this.fClassname = classname;
- }
-
- public String getClassname() {
- return this.fClassname != null ? this.fClassname : "GenericJspServlet"; //$NON-NLS-1$
- }
-
- /**
- * So that the JSPTranslator can be reused.
- */
- public void reset(IDOMNode node, IProgressMonitor progress) {
-
- // initialize some things on node
- configure(node, progress);
- reset();
- // set the jsp text buffer
- fJspTextBuffer.append(fStructuredDocument.get());
- }
-
- /**
- * conservative version (no StructuredDocument/Model)
- *
- * @param jspFile
- * @param progress
- */
- public void reset(IFile jspFile, IProgressMonitor progress) {
-
- // initialize some things on node
- configure(jspFile, progress);
- reset();
- // set the jsp text buffer
- setJspText(jspFile);
- }
-
- /**
- * Reinitialize some fields
- */
- private void reset() {
-
- // reset progress monitor
- if (fProgressMonitor != null)
- fProgressMonitor.setCanceled(false);
-
- // reinit fields
- fSourcePosition = -1;
- fRelativeOffset = -1;
- fCursorPosition = -1;
-
- fIsErrorPage = fCursorInExpression = false;
- fIsInASession = true;
-
- fUserCode = new StringBuffer();
- fUserDeclarations = new StringBuffer();
- fUserImports = new StringBuffer();
- fUserELExpressions = new StringBuffer();
-
- fResult = null;
- fCursorOwner = null; // the buffer where the cursor is
-
- fCurrentNode = null;
- fInCodeRegion = false; // flag for if cursor is in the current region
- // being translated
-
- if (fIncludes != null)
- fIncludes.clear();
-
- fBlockMarkers = null;
-
- fOffsetInUserImports = 0;
- fOffsetInUserDeclarations = 0;
- fOffsetInUserCode = 0;
-
- fJava2JspRanges.clear();
- fImportRanges.clear();
- fCodeRanges.clear();
- fUseBeanRanges.clear();
- fDeclarationRanges.clear();
- fUserELRanges.clear();
- fIndirectRanges.clear();
-
- fJspTextBuffer = new StringBuffer();
-
- fELProblems = new ArrayList();
-
- }
-
- /**
- * @return just the "shell" of a servlet, nothing contributed from the JSP
- * doc
- */
- public final StringBuffer getEmptyTranslation() {
- reset();
- buildResult();
- return getTranslation();
- }
-
- /**
- * put the final java document together
- */
- private final void buildResult() {
- // to build the java document this is the order:
- //
- // + default imports
- // + user imports
- // + class header
- // [+ error page]
- // + user declarations
- // + service method header
- // + try/catch start
- // + user code
- // + try/catch end
- // + service method footer
- fResult = new StringBuffer(fImplicitImports.length() + fUserImports.length() + fClassHeader.length() + fUserDeclarations.length() + fServiceHeader.length() + fTryCatchStart.length() // try/catch
- // start
- + fUserCode.length() + fTryCatchEnd.length() // try/catch
- // end
- + fFooter.length());
-
- int javaOffset = 0;
-
- fResult.append(fImplicitImports);
- javaOffset += fImplicitImports.length();
-
- // updateRanges(fIndirectImports, javaOffset);
- updateRanges(fImportRanges, javaOffset);
- // user imports
- append(fUserImports);
- javaOffset += fUserImports.length();
-
- // class header
- fResult.append(fClassHeader); //$NON-NLS-1$
- javaOffset += fClassHeader.length();
- fResult.append(fSuperclass + "{" + ENDL); //$NON-NLS-1$
- javaOffset += fSuperclass.length() + 2;
-
- updateRanges(fDeclarationRanges, javaOffset);
- // user declarations
- append(fUserDeclarations);
- javaOffset += fUserDeclarations.length();
-
- updateRanges(fUserELRanges, javaOffset);
- append(fUserELExpressions);
- javaOffset += fUserELExpressions.length();
-
- fResult.append(fServiceHeader);
- javaOffset += fServiceHeader.length();
- // error page
- if (fIsErrorPage) {
- fResult.append(fException);
- javaOffset += fException.length();
- }
- // session participant
- if(fIsInASession) {
- fResult.append(fSessionVariableDeclaration);
- javaOffset += fSessionVariableDeclaration.length();
- }
-
-
- fResult.append(fTryCatchStart);
- javaOffset += fTryCatchStart.length();
-
- updateRanges(fCodeRanges, javaOffset);
-
- // user code
- append(fUserCode);
- javaOffset += fUserCode.length();
-
-
- fResult.append(fTryCatchEnd);
- javaOffset += fTryCatchEnd.length();
-
- // footer
- fResult.append(fFooter);
- javaOffset += fFooter.length();
-
- fJava2JspRanges.putAll(fImportRanges);
- fJava2JspRanges.putAll(fDeclarationRanges);
- fJava2JspRanges.putAll(fCodeRanges);
- fJava2JspRanges.putAll(fUserELRanges);
-
- }
-
- /**
- * @param javaRanges
- * @param offsetInJava
- */
- private void updateRanges(HashMap rangeMap, int offsetInJava) {
- // just need to update java ranges w/ the offset we now know
- Iterator it = rangeMap.keySet().iterator();
- while (it.hasNext())
- ((Position) it.next()).offset += offsetInJava;
- }
-
- /**
- * map of ranges (positions) in java document to ranges in jsp document
- *
- * @return a map of java positions to jsp positions.
- */
- public HashMap getJava2JspRanges() {
- return fJava2JspRanges;
- }
-
- /**
- * map of ranges in jsp document to ranges in java document.
- *
- * @return a map of jsp positions to java positions, or null if no
- * translation has occured yet (the map hasn't been built).
- */
- public HashMap getJsp2JavaRanges() {
- if (fJava2JspRanges == null)
- return null;
- HashMap flipFlopped = new HashMap();
- Iterator keys = fJava2JspRanges.keySet().iterator();
- Object range = null;
- while (keys.hasNext()) {
- range = keys.next();
- flipFlopped.put(fJava2JspRanges.get(range), range);
- }
- return flipFlopped;
- }
-
- public HashMap getJava2JspImportRanges() {
- return fImportRanges;
- }
-
- public HashMap getJava2JspUseBeanRanges() {
- return fUseBeanRanges;
- }
-
- public HashMap getJava2JspIndirectRanges() {
- return fIndirectRanges;
- }
-
- /**
- * Adds to the jsp<->java map by default
- *
- * @param value
- * a comma delimited list of imports
- */
- protected void addImports(String value) {
- addImports(value, true);
- }
-
- /**
- * Pass in a comma delimited list of import values, appends each to the
- * final result buffer
- *
- * @param value
- * a comma delimited list of imports
- */
- protected void addImports(String value, boolean addToMap) {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=81687
- // added the "addToMap" parameter to exclude imports originating
- // from included JSP files to be added to the jsp<->java mapping
- StringTokenizer st = new StringTokenizer(value, ",", false); //$NON-NLS-1$
- String tok = ""; //$NON-NLS-1$
- // String appendage = ""; //$NON-NLS-1$
- while (st.hasMoreTokens()) {
- tok = st.nextToken();
- appendImportToBuffer(tok, fCurrentNode, addToMap);
- }
- }
-
- /**
- * /* keep track of cursor position inside the buffer /* appends buffer to
- * the final result buffer
- */
- protected void append(StringBuffer buf) {
- if (getCursorOwner() == buf) {
- fCursorPosition = fResult.length() + getRelativeOffset();
- }
- fResult.append(buf.toString());
- }
-
- /**
- * Only valid after a configure(...), translate(...) or
- * translateFromFile(...) call
- *
- * @return the current result (java translation) buffer
- */
- public final StringBuffer getTranslation() {
-
- if (DEBUG) {
- StringBuffer debugString = new StringBuffer();
- try {
- Iterator it = fJava2JspRanges.keySet().iterator();
- while (it.hasNext()) {
- debugString.append("--------------------------------------------------------------\n"); //$NON-NLS-1$
- Position java = (Position) it.next();
- debugString.append("Java range:[" + java.offset + ":" + java.length + "]\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- debugString.append("[" + fResult.toString().substring(java.offset, java.offset + java.length) + "]\n"); //$NON-NLS-1$ //$NON-NLS-2$
- debugString.append("--------------------------------------------------------------\n"); //$NON-NLS-1$
- debugString.append("|maps to...|\n"); //$NON-NLS-1$
- debugString.append("==============================================================\n"); //$NON-NLS-1$
- Position jsp = (Position) fJava2JspRanges.get(java);
- debugString.append("JSP range:[" + jsp.offset + ":" + jsp.length + "]\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- debugString.append("[" + fJspTextBuffer.toString().substring(jsp.offset, jsp.offset + jsp.length) + "]\n"); //$NON-NLS-1$ //$NON-NLS-2$
- debugString.append("==============================================================\n"); //$NON-NLS-1$
- debugString.append("\n"); //$NON-NLS-1$
- debugString.append("\n"); //$NON-NLS-1$
- }
- }
- catch (Exception e) {
- Logger.logException("JSPTranslation error", e); //$NON-NLS-1$
- }
- Logger.log(Logger.INFO_DEBUG, debugString.toString());
- }
-
- if (DEBUG_SAVE_OUTPUT) {
- IProject project = getFile().getProject();
- String shortenedClassname = StringUtils.replace(getFile().getName(), ".", "_");
- String filename = shortenedClassname + ".java";
- IPath path = project.getFullPath().append("src/" + filename);
- try {
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- if (!file.exists()) {
- file.create(new ByteArrayInputStream(new byte[0]), true, new NullProgressMonitor());
- }
- ITextFileBufferManager textFileBufferManager = FileBuffers.getTextFileBufferManager();
- textFileBufferManager.connect(path, new NullProgressMonitor());
- ITextFileBuffer javaOutputBuffer = textFileBufferManager.getTextFileBuffer(path);
- javaOutputBuffer.getDocument().set(StringUtils.replace(fResult.toString(), getClassname(), shortenedClassname));
- javaOutputBuffer.commit(new NullProgressMonitor(), true);
- textFileBufferManager.disconnect(path, new NullProgressMonitor());
- }
- catch (Exception e) {
- // this is just for debugging, ignore
- }
- System.out.println("Updated translation: " + path);
- }
-
- return fResult;
- }
-
- /**
- * Only valid after a configure(...), translate(...) or
- * translateFromFile(...) call
- *
- * @return the text in the JSP file
- */
- public final String getJspText() {
- return fJspTextBuffer.toString();
- }
-
- protected void addTaglibVariables(String tagToAdd) {
- addTaglibVariables(tagToAdd, getCurrentNode());
- }
-
- protected void addTaglibVariables(String tagToAdd, IStructuredDocumentRegion customTag) {
- IFile f = getFile();
-
- if (f == null || !f.exists())
- return;
-
- TaglibHelper helper = TaglibHelperManager.getInstance().getTaglibHelper(f);
- /*
- * Variables can declare as available when NESTED, AT_BEGIN, or
- * AT_END. For AT_END variables, store the entire list of variables in
- * the map field so it can be used on the end tag.
- */
- String decl = ""; //$NON-NLS-1$
- if (customTag.getFirstRegion().getType().equals(DOMRegionContext.XML_TAG_OPEN)) {
- TaglibVariable[] taglibVars = helper.getTaglibVariables(tagToAdd, getStructuredDocument(), customTag);
- /*
- * These loops are duplicated intentionally to keep the nesting
- * scoped variables from interfering with the others
- */
- for (int i = 0; i < taglibVars.length; i++) {
- if (taglibVars[i].getScope() == VariableInfo.AT_BEGIN) {
- decl = taglibVars[i].getDeclarationString();
- appendToBuffer(decl, fUserCode, false, fCurrentNode);
- }
- if (taglibVars[i].getScope() == VariableInfo.AT_END) {
- decl = taglibVars[i].getDeclarationString();
- fTagToVariableMap.put(tagToAdd, taglibVars);
- }
- }
- for (int i = 0; i < taglibVars.length; i++) {
- if (taglibVars[i].getScope() == VariableInfo.NESTED) {
- decl = taglibVars[i].getDeclarationString();
- appendToBuffer("{", fUserCode, false, fCurrentNode);
- appendToBuffer(decl, fUserCode, false, fCurrentNode);
- fTagToVariableMap.put(tagToAdd, taglibVars);
- }
- }
- if (customTag.getLastRegion().getType().equals(DOMRegionContext.XML_EMPTY_TAG_CLOSE)) {
- /*
- * Process NESTED variables backwards so the scopes "unroll"
- * correctly.
- */
- for (int i = taglibVars.length; i > 0; i--) {
- if (taglibVars[i-1].getScope() == VariableInfo.NESTED) {
- appendToBuffer("}", fUserCode, false, fCurrentNode);
- }
- }
- /* Treat this as the end for empty tags */
- for (int i = 0; i < taglibVars.length; i++) {
- if (taglibVars[i].getScope() == VariableInfo.AT_END) {
- decl = taglibVars[i].getDeclarationString();
- appendToBuffer(decl, fUserCode, false, fCurrentNode);
- }
- }
- }
- }
- /*
- * Process NESTED variables for an end tag backwards so the scopes
- * "unroll" correctly.
- */
- else if (customTag.getFirstRegion().getType().equals(DOMRegionContext.XML_END_TAG_OPEN)) {
- TaglibVariable[] taglibVars = (TaglibVariable[]) fTagToVariableMap.remove(tagToAdd);
- if (taglibVars != null) {
- for (int i = taglibVars.length; i > 0; i--) {
- if (taglibVars[i-1].getScope() == VariableInfo.NESTED) {
- appendToBuffer("}", fUserCode, false, fCurrentNode);
- }
- }
- for (int i = 0; i < taglibVars.length; i++) {
- if (taglibVars[i].getScope() == VariableInfo.AT_END) {
- decl = taglibVars[i].getDeclarationString();
- appendToBuffer(decl, fUserCode, false, fCurrentNode);
- }
- }
- }
- }
- }
-
- private IFile getFile() {
- IFile f = null;
- IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(getStructuredDocument());
- try {
- if (sModel != null)
- f = FileBuffers.getWorkspaceFileAtLocation(new Path(sModel.getBaseLocation()));
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- return f;
- }
-
- /*
- * used by inner helper class (XMLJSPRegionHelper, JSPIncludeRegionHelper)
- */
- public List getBlockMarkers() {
- if (fBlockMarkers == null)
- fBlockMarkers = new ArrayList();
- return fBlockMarkers;
- }
-
- /**
- * /* the main control loop for translating the document, driven by the
- * structuredDocument nodes
- */
- public void translate() {
- if (fTagToVariableMap == null) {
- fTagToVariableMap = new HashMap(2);
- }
-
- setCurrentNode(fStructuredDocument.getFirstStructuredDocumentRegion());
-
- while (getCurrentNode() != null && !isCanceled()) {
-
- // intercept HTML comment flat node
- // also handles UNDEFINED (which is what CDATA comes in as)
- // basically this part will handle any "embedded" JSP containers
- if (getCurrentNode().getType() == DOMRegionContext.XML_COMMENT_TEXT || getCurrentNode().getType() == DOMRegionContext.XML_CDATA_TEXT || getCurrentNode().getType() == DOMRegionContext.UNDEFINED) {
- translateXMLCommentNode(getCurrentNode());
- }
- else {
- // iterate through each region in the flat node
- translateRegionContainer(getCurrentNode(), STANDARD_JSP);
- }
- if (getCurrentNode() != null)
- advanceNextNode();
- }
- buildResult();
-
- fTagToVariableMap.clear();
- }
-
- protected void setDocumentContent(IDocument document, InputStream contentStream, String charset) {
- Reader in = null;
- try {
- in = new BufferedReader(new InputStreamReader(contentStream, charset), 2048);
- StringBuffer buffer = new StringBuffer(2048);
- char[] readBuffer = new char[2048];
- int n = in.read(readBuffer);
- while (n > 0) {
- buffer.append(readBuffer, 0, n);
- n = in.read(readBuffer);
- }
- document.set(buffer.toString());
- }
- catch (IOException x) {
- // ignore
- }
- finally {
- if (in != null) {
- try {
- in.close();
- }
- catch (IOException x) {
- // ignore
- }
- }
- }
- }
-
- /**
- *
- * @return the status of the translator's progrss monitor, false if the
- * monitor is null
- */
- private boolean isCanceled() {
- return (fProgressMonitor == null) ? false : fProgressMonitor.isCanceled();
- }
-
- private void advanceNextNode() {
- setCurrentNode(getCurrentNode().getNext());
- if (getCurrentNode() != null)
- setSourceReferencePoint();
- }
-
- private void setSourceReferencePoint() {
- if (isJSP(getCurrentNode().getFirstRegion().getType())) {
- Iterator it = getCurrentNode().getRegions().iterator();
- ITextRegion r = null;
- while (it.hasNext()) {
- r = (ITextRegion) it.next();
- if (r.getType() == DOMJSPRegionContexts.JSP_CONTENT || r.getType() == DOMRegionContext.XML_CONTENT)
- break;
- else if (r.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME)
- break;
- else if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE && getCurrentNode().getFullText(r).trim().equals("import")) //$NON-NLS-1$
- break;
- }
- }
- }
-
- /**
- * translates a region container (and XML JSP container, or <% JSP
- * container)
- */
- protected void translateRegionContainer(ITextRegionCollection container, int JSPType) {
-
- ITextRegionCollection containerRegion = container;
-
- // custom tags need their own scope {}
- handleScopingIfNecessary(containerRegion);
-
- Iterator regions = containerRegion.getRegions().iterator();
- ITextRegion region = null;
- while (regions.hasNext()) {
-
- region = (ITextRegion) regions.next();
-
- String type = region.getType();
-
- // content assist was not showing up in JSP inside a javascript
- // region
- if (type == DOMRegionContext.BLOCK_TEXT) {
- // check if it's nested jsp in a script tag...
- if (region instanceof ITextRegionContainer) {
- translateJSPNode(region, regions, type, EMBEDDED_JSP);
- }
- else {
- // ////////////////////////////////////////////////////////////////////////////////
- // THIS EMBEDDED JSP TEXT WILL COME OUT LATER WHEN
- // PARTITIONING HAS
- // SUPPORT FOR NESTED XML-JSP
- // CMVC 241882
- decodeScriptBlock(containerRegion.getFullText(region), containerRegion.getStartOffset());
- // ////////////////////////////////////////////////////////////////////////////////
- }
- }
- if (type != null && isJSP(type)) // <%, <%=, <%!, <%@
- {
- // translateJSPNode(region, regions, type, JSPType);
- translateJSPNode(containerRegion, regions, type, JSPType);
- }
- else if (type != null && (type == DOMRegionContext.XML_TAG_OPEN || type == DOMRegionContext.XML_END_TAG_OPEN)) {
- translateXMLNode(containerRegion, regions);
- }
- }
- // }
- }
-
- private void handleScopingIfNecessary(ITextRegionCollection containerRegion) {
- if (true)
- return;
-
- // code within a custom tag gets its own scope
- // so if we encounter a start of a custom tag, we add '{'
- // and for the end of a custom tag we add '}'
- if (containerRegion.getFirstRegion().getType() == DOMRegionContext.XML_TAG_OPEN) {
- // don't add '{' if it's a self closing tag
- if (!isSelfClosingTag(containerRegion)) {
- if (isCustomTag(containerRegion)) {
- startScope();
- }
- }
- }
- else if (containerRegion.getFirstRegion().getType() == DOMRegionContext.XML_END_TAG_OPEN) {
- if (isCustomTag(containerRegion)) {
- endScope();
- }
- }
- }
-
- private void startScope() {
- // fScopeDepth++;
- StringBuffer text = new StringBuffer();
- // for(int i=0; i<fScopeDepth; i++) text.append(" "); //$NON-NLS-1$
- text.append("{ // <"); //$NON-NLS-1$
- text.append(getRegionName(fCurrentNode));
- text.append(">\n"); //$NON-NLS-1$
- appendToBuffer(text.toString(), fUserCode, false, fCurrentNode); //$NON-NLS-1$
- }
-
- private void endScope() {
- StringBuffer text = new StringBuffer();
- text.append("} // </"); //$NON-NLS-1$
- text.append(getRegionName(fCurrentNode));
- text.append(">\n"); //$NON-NLS-1$
- appendToBuffer(text.toString(), fUserCode, false, fCurrentNode); //$NON-NLS-1$
- }
-
- private boolean isSelfClosingTag(ITextRegionCollection containerRegion) {
-
- if (containerRegion == null)
- return false;
-
- ITextRegionList regions = containerRegion.getRegions();
- ITextRegion r = regions.get(regions.size() - 1);
- return r.getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE;
- }
-
- private boolean isCustomTag(ITextRegionCollection containerRegion) {
- String tagName = getRegionName(containerRegion);
-
- if (tagName == null)
- return false;
-
- if (tagName.indexOf(":") > 0 && !tagName.startsWith("jsp")) //$NON-NLS-1$ //$NON-NLS-2$
- return true;
-
- return false;
- }
-
- private String getRegionName(ITextRegionCollection containerRegion) {
- ITextRegionList regions = containerRegion.getRegions();
- ITextRegion nameRegion = null;
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion r = regions.get(i);
- if (r.getType() == DOMRegionContext.XML_TAG_NAME) {
- nameRegion = r;
- break;
- }
- }
- return nameRegion != null ? containerRegion.getText(nameRegion).trim() : null;
- }
-
- /*
- * ////////////////////////////////////////////////////////////////////////////////// **
- * TEMP WORKAROUND FOR CMVC 241882 Takes a String and blocks out
- * jsp:scriptlet, jsp:expression, and jsp:declaration @param blockText
- * @return
- */
- private void decodeScriptBlock(String blockText, int startOfBlock) {
- XMLJSPRegionHelper helper = new XMLJSPRegionHelper(this);
- helper.addBlockMarker(new BlockMarker("jsp:scriptlet", null, DOMJSPRegionContexts.JSP_CONTENT, false)); //$NON-NLS-1$
- helper.addBlockMarker(new BlockMarker("jsp:expression", null, DOMJSPRegionContexts.JSP_CONTENT, false)); //$NON-NLS-1$
- helper.addBlockMarker(new BlockMarker("jsp:declaration", null, DOMJSPRegionContexts.JSP_CONTENT, false)); //$NON-NLS-1$
- helper.addBlockMarker(new BlockMarker("jsp:directive.include", null, DOMJSPRegionContexts.JSP_CONTENT, false)); //$NON-NLS-1$
- helper.addBlockMarker(new BlockMarker("jsp:directive.taglib", null, DOMJSPRegionContexts.JSP_CONTENT, false)); //$NON-NLS-1$
- helper.reset(blockText, startOfBlock);
- // force parse
- helper.forceParse();
- }
-
- /*
- * returns string minus CDATA open and close text
- */
- final public String stripCDATA(String text) {
- String resultText = ""; //$NON-NLS-1$
- String CDATA_OPEN = "<![CDATA["; //$NON-NLS-1$
- String CDATA_CLOSE = "]]>"; //$NON-NLS-1$
- int start = 0;
- int end = text.length();
- while (start < text.length()) {
- if (text.indexOf(CDATA_OPEN, start) > -1) {
- end = text.indexOf(CDATA_OPEN, start);
- resultText += text.substring(start, end);
- start = end + CDATA_OPEN.length();
- }
- else if (text.indexOf(CDATA_CLOSE, start) > -1) {
- end = text.indexOf(CDATA_CLOSE, start);
- resultText += text.substring(start, end);
- start = end + CDATA_CLOSE.length();
- }
- else {
- end = text.length();
- resultText += text.substring(start, end);
- break;
- }
- }
- return resultText;
- }
-
- // END OF WORKAROUND CODE...
- // /////////////////////////////////////////////////////////////////////////////////////
- /**
- * determines if the type is a pure JSP type (not XML)
- */
- protected boolean isJSP(String type) {
- return ((type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || type == DOMJSPRegionContexts.JSP_CONTENT || type == DOMJSPRegionContexts.JSP_EL_OPEN) && type != DOMRegionContext.XML_TAG_OPEN);
- // checking XML_TAG_OPEN so <jsp:directive.xxx/> gets treated like
- // other XML jsp tags
- }
-
- /**
- * translates the various XMLJSP type nodes
- *
- * @param regions
- * the regions of the XMLNode
- */
- protected void translateXMLNode(ITextRegionCollection container, Iterator regions) {
- // contents must be valid XHTML, translate escaped CDATA into what it
- // really is...
- ITextRegion r = null;
- if (regions.hasNext()) {
- r = (ITextRegion) regions.next();
- // <jsp:directive.xxx > comes in as this
- if (r.getType() == DOMRegionContext.XML_TAG_NAME || r.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME)
-
- {
- String fullTagName = container.getText(r);
- if (fullTagName.indexOf(':') > -1) {
- addTaglibVariables(fullTagName); // it may be a custom
- // tag
- }
- StringTokenizer st = new StringTokenizer(fullTagName, ":.", false); //$NON-NLS-1$
- if (st.hasMoreTokens() && st.nextToken().equals("jsp")) //$NON-NLS-1$
- {
- if (st.hasMoreTokens()) {
- String jspTagName = st.nextToken();
-
- if (jspTagName.equals("scriptlet")) //$NON-NLS-1$
- {
- translateXMLJSPContent(SCRIPTLET);
- }
- else if (jspTagName.equals("expression")) //$NON-NLS-1$
- {
- translateXMLJSPContent(EXPRESSION);
- }
- else if (jspTagName.equals("declaration")) //$NON-NLS-1$
- {
- translateXMLJSPContent(DECLARATION);
- }
- else if (jspTagName.equals("directive")) //$NON-NLS-1$
- {
- if (st.hasMoreTokens()) {
- String directiveName = st.nextToken();
- if (directiveName.equals("taglib")) { //$NON-NLS-1$
- while (r != null && regions.hasNext() && !r.getType().equals(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)) {
- r = (ITextRegion) regions.next();
- if(container.getText(r).equals(JSP11Namespace.ATTR_NAME_PREFIX)) {
- String prefix = getAttributeValue(r, regions);
- if (prefix != null) {
- handleTaglib(prefix);
- }
- }
- }
- return;
- }
- else if (directiveName.equals("include")) { //$NON-NLS-1$
-
- String fileLocation = ""; //$NON-NLS-1$
-
- // skip to required "file" attribute,
- // should be safe because
- // "file" is the only attribute for the
- // include directive
- while (r != null && regions.hasNext() && !r.getType().equals(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)) {
- r = (ITextRegion) regions.next();
- }
- fileLocation = getAttributeValue(r, regions);
- if (fileLocation != null)
- handleIncludeFile(fileLocation);
- }
- else if (directiveName.equals("page")) { //$NON-NLS-1$
-
- // bad if currentNode is referenced after
- // here w/ the current list
- // see:
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3035
- // setCurrentNode(getCurrentNode().getNext());
- if (container != null) {
- // 'regions' contain the attrs
- translatePageDirectiveAttributes(container, regions);
- }
- }
- }
- }
- else if (jspTagName.equals("include")) { //$NON-NLS-1$
- // <jsp:include page="filename") />
- checkAttributeValueContainer(regions, "page"); //$NON-NLS-1$
- }
- else if (jspTagName.equals("forward")) { //$NON-NLS-1$
- checkAttributeValueContainer(regions, "page"); //$NON-NLS-1$
- }
- else if (jspTagName.equals("param")) { //$NON-NLS-1$
- checkAttributeValueContainer(regions, "value"); //$NON-NLS-1$
- }
- else if (jspTagName.equals("setProperty")) { //$NON-NLS-1$
- checkAttributeValueContainer(regions, "value"); //$NON-NLS-1$
- }
- else if (jspTagName.equals("useBean")) //$NON-NLS-1$
- {
- checkAttributeValueContainer(regions, "name"); //$NON-NLS-1$
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=103004
- // advanceNextNode(); // get the content
- if (getCurrentNode() != null) {
- translateUseBean(container); // 'regions'
- }
- }
-
- }
- }
- else {
- checkAllAttributeValueContainers(regions);
- }
- }
- }
- }
-
- /**
- * translates embedded containers for ALL attribute values
- *
- * @param regions
- */
- private void checkAllAttributeValueContainers(Iterator regions) {
- // tag name is not jsp
- // handle embedded jsp attributes...
- ITextRegion embedded = null;
- // Iterator attrRegions = null;
- // ITextRegion attrChunk = null;
- while (regions.hasNext()) {
- embedded = (ITextRegion) regions.next();
- if (embedded instanceof ITextRegionContainer) {
- // parse out container
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=130606
- // fix exponential iteration problem w/ embedded expressions
- translateEmbeddedJSPInAttribute((ITextRegionContainer) embedded);
- // attrRegions = ((ITextRegionContainer)
- // embedded).getRegions().iterator();
- // while (attrRegions.hasNext()) {
- // attrChunk = (ITextRegion) attrRegions.next();
- // String type = attrChunk.getType();
- // // embedded JSP in attribute support only want to
- // // translate one time per
- // // embedded region so we only translate on the JSP open
- // // tags (not content)
- // if (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN ||
- // type ==
- // DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || type ==
- // DOMJSPRegionContexts.JSP_DECLARATION_OPEN || type ==
- // DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || type ==
- // DOMJSPRegionContexts.JSP_EL_OPEN) {
- // // now call jsptranslate
- // translateEmbeddedJSPInAttribute((ITextRegionContainer)
- // embedded);
- // break;
- // }
- // }
- }
- }
- }
-
- /**
- * translates embedded container for specified attribute
- *
- * @param regions
- * @param attrName
- */
- private void checkAttributeValueContainer(Iterator regions, String attrName) {
- ITextRegion r = null;
- while (regions.hasNext()) {
- r = (ITextRegion) regions.next();
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME && getCurrentNode().getText(r).equals(attrName)) { //$NON-NLS-1$
- // skip to attribute value
- while (regions.hasNext() && (r = (ITextRegion) regions.next()) != null) {
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)
- break;
- }
- // forces embedded region to be translated
- if (r instanceof ContextRegionContainer) {
- translateEmbeddedJSPInAttribute((ContextRegionContainer) r);
- }
- break;
- }
- }
- }
-
- /*
- * example:
- *
- * <jsp:scriptlet>scriptlet jsp-java content <![CDATA[ more jsp java ]]>
- * jsp-java content... <![CDATA[ more jsp java ]]> </jsp:scriptlet>
- *
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=93366
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=88590 translate
- * everything inbetween <scriptlet> tags, which may be more than one
- * region (esp. CDATA)
- *
- */
- private void translateXMLJSPContent(int type) {
-
- IStructuredDocumentRegion sdr = getCurrentNode().getNext();
- int start = sdr.getStartOffset();
- int end = sdr.getEndOffset();
- String sdrText = ""; //$NON-NLS-1$
-
- // read structured document regions until
- // </jsp:scriptlet> or EOF
- while (sdr != null && sdr.getType() != DOMRegionContext.XML_TAG_NAME) {
-
- // setup for next region
- start = sdr.getStartOffset();
- sdrText = sdr.getText();
-
- if (sdr.getType() == DOMRegionContext.XML_CDATA_TEXT) {
-
- // just to be safe, make sure CDATA start & end are there
- if (sdrText.startsWith("<![CDATA[") && sdrText.endsWith("]]>")) { //$NON-NLS-1$ //$NON-NLS-2$
-
- start = sdr.getStartOffset() + 9; // <![CDATA[
- end = sdr.getEndOffset() - 3; // ]]>
- sdrText = sdrText.substring(9, sdrText.length() - 3);
- writeToBuffer(type, sdrText, start, end);
- }
- }
- else {
-
- // handle entity references
- sdrText = EscapedTextUtil.getUnescapedText(sdrText);
- end = sdr.getEndOffset();
- writeToBuffer(type, sdrText, start, end);
- }
- sdr = sdr.getNext();
- }
- setCurrentNode(sdr);
- setSourceReferencePoint();
- }
-
- private void writeToBuffer(int type, String content, int jspStart, int jspEnd) {
- switch (type) {
- case SCRIPTLET :
- translateScriptletString(content, getCurrentNode(), jspStart, jspEnd - jspStart);
- break;
- case EXPRESSION :
- translateExpressionString(content, getCurrentNode(), jspStart, jspEnd - jspStart);
- break;
- case DECLARATION :
- translateDeclarationString(content, getCurrentNode(), jspStart, jspEnd - jspStart);
- break;
- }
- }
-
- /**
- * goes through comment regions, checks if any are an embedded JSP
- * container if it finds one, it's sends the container into the
- * translation routine
- */
- protected void translateXMLCommentNode(IStructuredDocumentRegion node) {
- Iterator it = node.getRegions().iterator();
- ITextRegion commentRegion = null;
- while (it != null && it.hasNext()) {
- commentRegion = (ITextRegion) it.next();
- if (commentRegion instanceof ITextRegionContainer) {
- translateRegionContainer((ITextRegionContainer) commentRegion, EMBEDDED_JSP); // it's
- // embedded
- // jsp...iterate
- // regions...
- }
- }
- }
-
- /**
- * determines which type of JSP node to translate
- */
- protected void translateJSPNode(ITextRegion region, Iterator regions, String type, int JSPType) {
- if (type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN && regions != null) {
- translateDirective(fCurrentNode, regions);
- }
- else {
- ITextRegionCollection contentRegion = null;
- if (JSPType == STANDARD_JSP && (setCurrentNode(getCurrentNode().getNext())) != null) {
- contentRegion = getCurrentNode();
- }
- else if (JSPType == EMBEDDED_JSP && region instanceof ITextRegionCollection) {
-
- translateEmbeddedJSPInBlock((ITextRegionCollection) region);
- // ensure the rest of this method won't be called
- contentRegion = null;
- }
- if (contentRegion != null) {
- if (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) {
- translateExpression(contentRegion);
- }
- else if (type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN) {
- translateDeclaration(contentRegion);
- }
- else if (type == DOMJSPRegionContexts.JSP_CONTENT || type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) {
- translateScriptlet(contentRegion);
- }
- }
- else {
- // this is the case of an attribute w/ no region <p
- // align="<%%>">
- setCursorOwner(getJSPTypeForRegion(region));
- }
- }
- }
-
-
- private void translateEL(String elText, String delim, IStructuredDocumentRegion currentNode, int contentStart, int contentLength) {
- IJSPELTranslator translator = getELTranslator();
- if (null != translator) {
- translator.translateEL(elText, delim, currentNode, contentStart, contentLength, fUserELExpressions, fUserELRanges, fStructuredDocument);
- }
- }
-
- /**
- * Discover and instantiate an EL translator.
- */
- public IJSPELTranslator getELTranslator() {
- if (fELTranslator == null) {
-
- IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(JSP_CORE_PLUGIN_ID, // name
- // of
- // plugin
- // that
- // exposes
- // this
- // extension
- // point
- EL_TRANSLATOR_EXTENSION_NAME); // - extension id
-
- // Iterate over all declared extensions of this extension point.
- // A single plugin may extend the extension point more than once,
- // although it's not recommended.
- IConfigurationElement bestTranslator = null;
- IExtension[] extensions = extensionPoint.getExtensions();
- for (int curExtension = 0; curExtension < extensions.length; curExtension++) {
- IExtension extension = extensions[curExtension];
-
- IConfigurationElement[] translators = extension.getConfigurationElements();
- for (int curTranslator = 0; curTranslator < translators.length; curTranslator++) {
-
- IConfigurationElement elTranslator = translators[curTranslator];
-
- if (!EL_TRANSLATOR_EXTENSION_NAME.equals(elTranslator.getName())) { // -
- // name
- // of
- // configElement
- continue;
- }
-
- String idString = elTranslator.getAttribute("id"); //$NON-NLS-1$
- if (null != idString && idString.equals(fELTranslatorID) || (null == bestTranslator && DEFAULT_JSP_EL_TRANSLATOR_ID.equals(idString))) {
- bestTranslator = elTranslator;
- }
- }
- }
-
- if (null != bestTranslator) {
- try {
- Object execExt = bestTranslator.createExecutableExtension("class"); //$NON-NLS-1$
- if (execExt instanceof IJSPELTranslator) {
- return fELTranslator = (IJSPELTranslator) execExt;
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- }
- return fELTranslator;
- }
-
- /**
- * Pass the ITextRegionCollection which is the embedded region
- *
- * @param iterator
- */
- private void translateEmbeddedJSPInBlock(ITextRegionCollection collection) {
- Iterator regions = collection.getRegions().iterator();
- ITextRegion region = null;
- while (regions.hasNext()) {
- region = (ITextRegion) regions.next();
- if (isJSP(region.getType()))
- break;
- region = null;
- }
- if (region != null) {
- translateEmbeddedJSPInAttribute(collection);
- }
- }
-
- /*
- * for example: <a href="index.jsp?p=<%=abc%>b=<%=xyz%>">abc</a>
- */
- private void translateEmbeddedJSPInAttribute(ITextRegionCollection embeddedContainer) {
- // THIS METHOD IS A FIX FOR
- // jsp embedded in attribute regions
- // loop all regions
- ITextRegionList embeddedRegions = embeddedContainer.getRegions();
- ITextRegion delim = null;
- ITextRegion content = null;
- String type = null;
- for (int i = 0; i < embeddedRegions.size(); i++) {
-
- // possible delimiter, check later
- delim = embeddedRegions.get(i);
- type = delim.getType();
-
- // check next region to see if it's content
- if (i + 1 < embeddedRegions.size()) {
- String regionType = embeddedRegions.get(i + 1).getType();
- if (regionType == DOMJSPRegionContexts.JSP_CONTENT || regionType == DOMJSPRegionContexts.JSP_EL_CONTENT)
- content = embeddedRegions.get(i + 1);
-
- }
-
- if (content != null) {
- int contentStart = embeddedContainer.getStartOffset(content);
- int rStart = fCurrentNode.getStartOffset() + contentStart;
- int rEnd = fCurrentNode.getStartOffset() + embeddedContainer.getEndOffset(content);
-
- boolean inThisRegion = rStart <= fSourcePosition && rEnd >= fSourcePosition;
- // int jspPositionStart = fCurrentNode.getStartOffset() +
- // contentStart;
-
- if (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) {
- fLastJSPType = EXPRESSION;
- // translateExpressionString(embeddedContainer.getText(content),
- // fCurrentNode, contentStart, content.getLength());
- translateExpressionString(embeddedContainer.getText(content), embeddedContainer, contentStart, content.getLength());
- }
- else if (type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) {
- fLastJSPType = SCRIPTLET;
- // translateScriptletString(embeddedContainer.getText(content),
- // fCurrentNode, contentStart, content.getLength());
- translateScriptletString(embeddedContainer.getText(content), embeddedContainer, contentStart, content.getLength());
- }
- else if (type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN) {
- fLastJSPType = DECLARATION;
- // translateDeclarationString(embeddedContainer.getText(content),
- // fCurrentNode, contentStart, content.getLength());
- translateDeclarationString(embeddedContainer.getText(content), embeddedContainer, contentStart, content.getLength());
- }
- else if (type == DOMJSPRegionContexts.JSP_EL_OPEN) {
- fLastJSPType = EXPRESSION;
- translateEL(embeddedContainer.getText(content), embeddedContainer.getText(delim), fCurrentNode, contentStart, content.getLength());
- }
-
- // calculate relative offset in buffer
- if (inThisRegion) {
- setCursorOwner(fLastJSPType);
- int currentBufferLength = getCursorOwner().length();
- setRelativeOffset((fSourcePosition - contentStart) + currentBufferLength);
- if (fLastJSPType == EXPRESSION) {
- // if an expression, add then length of the enclosing
- // paren..
- setCursorInExpression(true);
- setRelativeOffset(getRelativeOffset() + EXPRESSION_PREFIX.length());
- }
- }
- }
- else {
- type = null;
- content = null;
- }
- }
- }
-
- private int fLastJSPType = SCRIPTLET;
-
- /**
- * JSPType is only used internally in this class to describe tye type of
- * region to be translated
- *
- * @param region
- * @return int
- */
- private int getJSPTypeForRegion(ITextRegion region) {
- String regionType = region.getType();
- int type = SCRIPTLET;
- if (regionType == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN)
- type = SCRIPTLET;
- else if (regionType == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN)
- type = EXPRESSION;
- else if (regionType == DOMJSPRegionContexts.JSP_DECLARATION_OPEN)
- type = DECLARATION;
- else if (regionType == DOMJSPRegionContexts.JSP_CONTENT)
- type = fLastJSPType;
- // remember the last type, in case the next type that comes in is
- // JSP_CONTENT
- fLastJSPType = type;
- return type;
- }
-
- /**
- * /* <%@ %> /* need to pass in the directive tag region
- */
- protected void translateDirective(ITextRegionCollection container, Iterator regions) {
- ITextRegion r = null;
- String regionText, attrValue = ""; //$NON-NLS-1$
- while (regions.hasNext() && (r = (ITextRegion) regions.next()) != null && r.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) { // could
- // be
- // XML_CONTENT
- // =
- // "",
- // skips
- // attrs?
- regionText = getCurrentNode().getText(r);
- if (regionText.indexOf("taglib") > -1) { //$NON-NLS-1$
- // add custom tag block markers here
- handleTaglib();
- return;
- }
- else if (regionText.equals("include")) { //$NON-NLS-1$
- String fileLocation = ""; //$NON-NLS-1$
- // CMVC 258311
- // PMR 18368, B663
- // skip to required "file" attribute, should be safe because
- // "file" is the only attribute for the include directive
- while (r != null && regions.hasNext() && !r.getType().equals(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)) {
- r = (ITextRegion) regions.next();
- }
- fileLocation = getAttributeValue(r, regions);
- if (attrValue != null)
- handleIncludeFile(fileLocation);
- }
- else if (regionText.indexOf("page") > -1) { //$NON-NLS-1$
- translatePageDirectiveAttributes(container, regions);
- }
- }
- }
-
- /*
- * This method should ideally only be called once per run through
- * JSPTranslator This is intended for use by inner helper classes that
- * need to add block markers to their own parsers. This method only adds
- * markers that came from <@taglib> directives, (not <@include>), since
- * include file taglibs are handled on the fly when they are encountered. *
- * @param regions
- *
- * @deprecated - does not properly handle prefixes
- */
- protected void handleTaglib() {
- // get/create TLDCMDocument
- TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(fStructuredDocument);
- if (mgr != null) {
- List trackers = mgr.getCMDocumentTrackers(getCurrentNode().getEnd());
- Iterator it = trackers.iterator();
- CMDocumentTracker tracker = null;
- Iterator taglibRegions = null;
- IStructuredDocumentRegion sdRegion = null;
- ITextRegion r = null;
- while (it.hasNext()) {
- tracker = (CMDocumentTracker) it.next();
- sdRegion = tracker.getStructuredDocumentRegion();
- // since may be call from another thread (like a background
- // job)
- // this check is to be safer
- if (sdRegion != null && !sdRegion.isDeleted()) {
- taglibRegions = sdRegion.getRegions().iterator();
- while (sdRegion != null && !sdRegion.isDeleted() && taglibRegions.hasNext()) {
- r = (ITextRegion) taglibRegions.next();
- if (r.getType().equals(DOMJSPRegionContexts.JSP_DIRECTIVE_NAME)) {
- if (sdRegion.getText(r).equals(JSP12TLDNames.TAGLIB)) {
- addBlockMarkers(tracker.getDocument());
- }
- }
- }
- }
- }
- }
- }
-
- /*
- * This method should ideally only be called once per run through
- * JSPTranslator This is intended for use by inner helper classes that
- * need to add block markers to their own parsers. This method only adds
- * markers that came from <@taglib> directives, (not <@include>), since
- * include file taglibs are handled on the fly when they are encountered. *
- * @param regions
- */
- private void handleTaglib(String prefix) {
- // get/create TLDCMDocument
- TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(fStructuredDocument);
- if (mgr != null) {
- // get trackers for the CMDocuments enabled at this offset
- List trackers = mgr.getCMDocumentTrackers(getCurrentNode().getEnd());
- Iterator it = trackers.iterator();
- CMDocumentTracker tracker = null;
- while (it.hasNext()) {
- tracker = (CMDocumentTracker) it.next();
- addBlockMarkers(prefix + ":", tracker.getDocument());
- }
- }
- }
-
- /*
- * adds block markers to JSPTranslator's block marker list for all
- * elements in doc @param doc
- */
- protected void addBlockMarkers(CMDocument doc) {
- if (doc.getElements().getLength() > 0) {
- Iterator elements = doc.getElements().iterator();
- CMNode node = null;
- while (elements.hasNext()) {
- node = (CMNode) elements.next();
- getBlockMarkers().add(new BlockMarker(node.getNodeName(), null, DOMJSPRegionContexts.JSP_CONTENT, true));
- }
- }
- }
-
- /*
- * adds block markers to JSPTranslator's block marker list for all
- * elements in doc @param doc
- */
- protected void addBlockMarkers(String prefix, CMDocument doc) {
- if (doc.getElements().getLength() > 0) {
- Iterator elements = doc.getElements().iterator();
- CMNode node = null;
- while (elements.hasNext()) {
- node = (CMNode) elements.next();
- if (node instanceof TLDElementDeclaration && ((TLDElementDeclaration) node).getBodycontent().equals(JSP12TLDNames.CONTENT_TAGDEPENDENT))
- getBlockMarkers().add(new BlockMarker(prefix + node.getNodeName(), null, DOMRegionContext.BLOCK_TEXT, true));
- else
- getBlockMarkers().add(new BlockMarker(prefix + node.getNodeName(), null, DOMJSPRegionContexts.JSP_CONTENT, true));
- }
- }
- }
-
- /**
- * If r is an attribute name region, this method will safely return the
- * value for that attribute.
- *
- * @param r
- * @param remainingRegions
- * @return the value for the attribute name (r), or null if isn't one
- */
- protected String getAttributeValue(ITextRegion r, Iterator remainingRegions) {
- if (r.getType().equals(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)) {
- if (remainingRegions.hasNext() && (r = (ITextRegion) remainingRegions.next()) != null && r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) {
- if (remainingRegions.hasNext() && (r = (ITextRegion) remainingRegions.next()) != null && r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- return StringUtils.stripQuotes(getCurrentNode().getText(r));
- }
- }
- }
- return null;
- }
-
- /**
- * takes an emnumeration of the attributes of a directive tag
- */
- protected void translatePageDirectiveAttributes(ITextRegionCollection container, Iterator regions) {
- ITextRegion r = null;
- String attrName, attrValue;
- // iterate all attributes
- while (regions.hasNext() && (r = (ITextRegion) regions.next()) != null && r.getType() != DOMJSPRegionContexts.JSP_CLOSE) {
- attrName = attrValue = null;
- if (r.getType().equals(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)) {
-
- attrName = container.getText(r).trim();
- if (attrName.length() > 0) {
- if (regions.hasNext() && (r = (ITextRegion) regions.next()) != null && r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) {
- if (regions.hasNext() && (r = (ITextRegion) regions.next()) != null && r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-
- attrValue = StringUtils.strip(container.getText(r));
- }
- // has equals, but no value?
- }
- setDirectiveAttribute(attrName, attrValue);
- }
- }
- }
- }
-
- /**
- * sets the appropriate page directive attribute
- */
- protected void setDirectiveAttribute(String attrName, String attrValue) {
- if (attrValue == null)
- return; // uses default (if there was one)
- if (attrName.equals("extends")) //$NON-NLS-1$
- {
- fSuperclass = attrValue;
- }
- else if (attrName.equals("import")) //$NON-NLS-1$
- {
- addImports(attrValue);
- }
- else if (attrName.equals("session")) //$NON-NLS-1$
- {
- fIsInASession = "true".equalsIgnoreCase(attrValue); //$NON-NLS-1$
- }
- else if (attrName.equals("buffer")) //$NON-NLS-1$
- {
- // ignore for now
- }
- else if (attrName.equals("autoFlush")) //$NON-NLS-1$
- {
- // ignore for now
- }
- else if (attrName.equals("isThreadSafe")) //$NON-NLS-1$
- {
- // fThreadSafe = "true".equalsIgnoreCase(attrValue); //$NON-NLS-1$
- }
- else if (attrName.equals("isErrorPage")) //$NON-NLS-1$
- {
- fIsErrorPage = "true".equalsIgnoreCase(attrValue); //$NON-NLS-1$
- }
- }
-
- protected void handleIncludeFile(String filename) {
- if (filename != null) {
- String fileLocation = null;
- if (getResolver() != null) {
- fileLocation = (getIncludes().empty()) ? getResolver().getLocationByURI(StringUtils.strip(filename)) : getResolver().getLocationByURI(StringUtils.strip(filename), (String) getIncludes().peek());
- }
- else {
- // shouldn't happen
- fileLocation = StringUtils.strip(filename);
- }
- // hopefully, a resolver is present and has returned a canonical
- // file path
- if (!getIncludes().contains(fileLocation) && getBaseLocation() != null && !fileLocation.equals(getBaseLocation())) {
- getIncludes().push(fileLocation);
- JSPIncludeRegionHelper helper = new JSPIncludeRegionHelper(this);
- boolean parsed = helper.parse(fileLocation);
- if (!parsed) {
- Logger.log(Logger.ERROR_DEBUG, "Error: included file " + filename + " not found {" + getBaseLocation() + ")");
- }
- getIncludes().pop();
- }
- }
- }
-
- private URIResolver getResolver() {
- return (fStructuredModel != null) ? fStructuredModel.getResolver() : null;
- }
-
- /**
- *
- * @return java.lang.String
- */
- private String getBaseLocation() {
- if (getResolver() == null)
- return null;
- return getResolver().getFileBaseLocation();
- }
-
- private Stack getIncludes() {
- if (fIncludes == null)
- fIncludes = new Stack();
- return fIncludes;
- }
-
- protected void translateExpressionString(String newText, ITextRegionCollection embeddedContainer, int jspPositionStart, int jspPositionLength) {
- appendToBuffer(EXPRESSION_PREFIX, fUserCode, false, embeddedContainer);
- appendToBuffer(newText, fUserCode, true, embeddedContainer, jspPositionStart, jspPositionLength);
- appendToBuffer(EXPRESSION_SUFFIX, fUserCode, false, embeddedContainer);
- }
-
- protected void translateDeclarationString(String newText, ITextRegionCollection embeddedContainer, int jspPositionStart, int jspPositionLength) {
- appendToBuffer(newText, fUserDeclarations, true, embeddedContainer, jspPositionStart, jspPositionLength);
- appendToBuffer(ENDL, fUserDeclarations, false, embeddedContainer);
- }
-
- /**
- * used by XMLJSPRegionHelper for included JSP files
- *
- * @param newText
- * @param embeddedContainer
- * @param jspPositionStart
- * @param jspPositionLength
- */
- protected void translateScriptletString(String newText, ITextRegionCollection embeddedContainer, int jspPositionStart, int jspPositionLength) {
- appendToBuffer(newText, fUserCode, true, embeddedContainer, jspPositionStart, jspPositionLength);
- }
-
- // the following 3 methods determine the cursor position
- // <%= %>
- protected void translateExpression(ITextRegionCollection region) {
- String newText = getUnescapedRegionText(region, EXPRESSION);
- appendToBuffer(EXPRESSION_PREFIX, fUserCode, false, fCurrentNode);
- appendToBuffer(newText, fUserCode, true, fCurrentNode);
- appendToBuffer(EXPRESSION_SUFFIX, fUserCode, false, fCurrentNode);
- }
-
- //
- // <%! %>
- protected void translateDeclaration(ITextRegionCollection region) {
- String newText = getUnescapedRegionText(region, DECLARATION);
- appendToBuffer(newText, fUserDeclarations, true, fCurrentNode);
- appendToBuffer(ENDL, fUserDeclarations, false, fCurrentNode);
- }
-
- //
- // <% %>
- protected void translateScriptlet(ITextRegionCollection region) {
- String newText = getUnescapedRegionText(region, SCRIPTLET);
- appendToBuffer(newText, fUserCode, true, fCurrentNode);
- }
-
- /**
- * Append using a region, probably indirect mapping (eg. <%@page
- * include=""%>)
- *
- * @param newText
- * @param buffer
- * @param addToMap
- * @param jspReferenceRegion
- */
- private void appendToBuffer(String newText, StringBuffer buffer, boolean addToMap, ITextRegionCollection jspReferenceRegion) {
- int start = 0, length = 0;
- if (jspReferenceRegion != null) {
- start = jspReferenceRegion.getStartOffset();
- length = jspReferenceRegion.getLength();
- }
- appendToBuffer(newText, buffer, addToMap, jspReferenceRegion, start, length, false);
- }
-
- private void appendToBuffer(String newText, StringBuffer buffer, boolean addToMap, ITextRegionCollection jspReferenceRegion, int jspPositionStart, int jspPositionLength) {
- appendToBuffer(newText, buffer, addToMap, jspReferenceRegion, jspPositionStart, jspPositionLength, true);
- }
-
- /**
- * Adds newText to the buffer passed in, and adds to translation mapping
- * as specified by the addToMap flag. some special cases to consider (that
- * may be affected by changes to this method): included files scriplets in
- * an attribute value refactoring
- *
- * @param newText
- * @param buffer
- * @param addToMap
- */
- private void appendToBuffer(String newText, StringBuffer buffer, boolean addToMap, ITextRegionCollection jspReferenceRegion, int jspPositionStart, int jspPositionLength, boolean isIndirect) {
-
- int origNewTextLength = newText.length();
-
- // nothing to append
- if (jspReferenceRegion == null)
- return;
-
- // add a newline so translation looks cleaner
- if (!newText.endsWith(ENDL))
- newText += ENDL;
-
- if (buffer == fUserCode) {
- buffer.append(newText);
- if (addToMap) {
- if (isUsebeanTag(jspReferenceRegion)) {
- try {
- // requires special mapping
- appendUseBeanToBuffer(newText, jspReferenceRegion, isIndirect);
- }
- catch (Exception e) {
- // still working out kinks
- Logger.logException(e);
- }
- }
- else {
- // all other cases
- Position javaRange = new Position(fOffsetInUserCode, origNewTextLength);
- Position jspRange = new Position(jspPositionStart, jspPositionLength);
-
- fCodeRanges.put(javaRange, jspRange);
- if (isIndirect)
- fIndirectRanges.put(javaRange, jspRange);
- }
- }
- fOffsetInUserCode += newText.length();
- }
- else if (buffer == fUserDeclarations) {
- buffer.append(newText);
- if (addToMap) {
- Position javaRange = new Position(fOffsetInUserDeclarations, newText.length());
- Position jspRange = new Position(jspPositionStart, jspPositionLength);
-
- fDeclarationRanges.put(javaRange, jspRange);
- if (isIndirect)
- fIndirectRanges.put(javaRange, jspRange);
- }
- fOffsetInUserDeclarations += newText.length();
- }
- }
-
- /**
- *
- * @param jspReferenceRegion
- * @return
- */
- private boolean isUsebeanTag(ITextRegionCollection jspReferenceRegion) {
- ITextRegionList regions = jspReferenceRegion.getRegions();
- ITextRegion r = null;
- boolean isUseBean = false;
- for (int i = 0; i < regions.size(); i++) {
- r = regions.get(i);
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=128490
- // length of 11 is the length of jsp:useBean
- // and saves the expensive getText.equals call
- if (r.getType() == DOMRegionContext.XML_TAG_NAME) {
- if (r.getTextLength() == 11 && jspReferenceRegion.getText(r).equals("jsp:useBean")) { //$NON-NLS-1$
- isUseBean = true;
- }
- // break no matter what if you hit tagname
- break;
- }
- }
- return isUseBean;
- }
-
- /**
- * @param importName
- * should be just the package plus the type eg. java.util.List
- * or java.util.*
- * @param jspReferenceRegion
- * should be the <%@ page import = "java.util.List"%> region
- * @param addToMap
- */
- private void appendImportToBuffer(String importName, ITextRegionCollection jspReferenceRegion, boolean addToMap) {
- String javaImportString = "import " + importName + ";" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$
- fUserImports.append(javaImportString);
- if (addToMap) {
- addImportToMap(importName, jspReferenceRegion);
- }
- fOffsetInUserImports += javaImportString.length();
- }
-
- /**
- * new text can be something like: "import java.lang.Object;\n"
- *
- * but the reference region could have been something like: <%@page
- * import="java.lang.Object, java.io.*, java.util.List"%>
- *
- * so the exact mapping has to be calculated carefully.
- *
- * isIndirect means that the import came from an included file (if true)
- *
- * @param importName
- * @param jspReferenceRegion
- */
- private void addImportToMap(String importName, ITextRegionCollection jspReferenceRegion) {
-
- // massage text
- // String jspText = importName.substring(importName.indexOf("import ")
- // + 7, importName.indexOf(';'));
- // String jspText = importName.trim();
-
- // these positions will be updated below
- Position javaRange = new Position(fOffsetInUserImports + 7, 1);
- Position jspRange = new Position(jspReferenceRegion.getStart(), jspReferenceRegion.getLength());
-
- // calculate JSP range by finding "import" attribute
- ITextRegionList regions = jspReferenceRegion.getRegions();
- int size = regions.size();
-
- int start = -1;
- int length = -1;
-
- ITextRegion r = null;
- for (int i = 0; i < size; i++) {
- r = regions.get(i);
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)
- if (jspReferenceRegion.getText(r).trim().equals("import")) { //$NON-NLS-1$
- // get the attr value region
- if (size > i + 2) {
- r = regions.get(i + 2);
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
-
- String jspImportText = jspReferenceRegion.getText(r);
-
- // the position in question (in the JSP) is what
- // is bracketed below
- // includes whitespace
- // <%@page import="java.lang.Object,[ java.io.* ],
- // java.util.List"%>
-
- // in the java file
- // import [ java.io.* ];
-
- start = jspImportText.indexOf(importName);
- length = importName.length();
-
- // safety, don't add to map if bad positioning
- if (start == -1 || length < 1)
- break;
-
- // update jsp range
- jspRange.setOffset(jspReferenceRegion.getStartOffset(r) + start);
- jspRange.setLength(length);
-
- // update java range
- javaRange.setLength(length);
-
- break;
- }
- }
- }
- }
-
- // safety for bad ranges
- if (start != -1 && length > 1) {
- // put ranges in java -> jsp range map
- fImportRanges.put(javaRange, jspRange);
- }
- }
-
- /**
- * temp fix for 282295 until better mapping is in place
- *
- * @param newText
- * @param jspReferenceRegion
- */
- private void appendUseBeanToBuffer(String newText, ITextRegionCollection jspReferenceRegion, boolean isIndirect) throws Exception {
- // java string looks like this (tokenized)
- // Type id = new Classname();\n
- // 0 1 2 3 4
- // or
- // Type id = null;\n // if there is no classname
- // 0 1 2 3
-
- // ----------------------
- // calculate java ranges
- // ----------------------
- StringTokenizer st = new StringTokenizer(newText, " ", false); //$NON-NLS-1$
- int i = 0;
- String[] parsedJava = new String[st.countTokens()];
- while (st.hasMoreTokens())
- parsedJava[i++] = st.nextToken();
-
- String type = parsedJava[0] != null ? parsedJava[0] : ""; //$NON-NLS-1$
- String id = parsedJava[1] != null ? parsedJava[1] : ""; //$NON-NLS-1$
- String className = parsedJava.length > 4 ? parsedJava[4] : ""; //$NON-NLS-1$
-
- Position javaTypeRange = new Position(fOffsetInUserCode, type.length());
- Position javaIdRange = new Position(fOffsetInUserCode + type.length() + 1, id.length());
- Position javaClassRange = new Position(fOffsetInUserCode + type.length() + 1 + id.length() + 7, 0);
- if (className.length() >= 4) {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=86132
- int classNameLength = className.substring(0, className.indexOf('(')).length();
- javaClassRange = new Position(fOffsetInUserCode + type.length() + 1 + id.length() + 7, classNameLength);
- }
-
- // ---------------------
- // calculate jsp ranges
- // ---------------------
- ITextRegionList regions = jspReferenceRegion.getRegions();
- ITextRegion r = null;
- String attrName = "", attrValue = ""; //$NON-NLS-1$ //$NON-NLS-2$
- int quoteOffset = 0;
- Position jspTypeRange = null;
- Position jspIdRange = null;
- Position jspClassRange = null;
-
- for (int j = 0; j < regions.size(); j++) {
- r = regions.get(j);
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- attrName = jspReferenceRegion.getText(r);
- if (regions.size() >= j + 2 && regions.get(j + 2).getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- // get attr value
- r = regions.get(j + 2);
- attrValue = jspReferenceRegion.getText(r);
-
- // may have quotes
- quoteOffset = (attrValue.startsWith("\"") || attrValue.startsWith("'")) ? 1 : 0; //$NON-NLS-1$ //$NON-NLS-2$
-
- if (attrName.equals("type")) //$NON-NLS-1$
- jspTypeRange = new Position(jspReferenceRegion.getStartOffset(r) + quoteOffset, StringUtils.stripQuotesLeaveInsideSpace(attrValue).length());
- else if (attrName.equals("id")) //$NON-NLS-1$
- jspIdRange = new Position(jspReferenceRegion.getStartOffset(r) + quoteOffset, StringUtils.stripQuotesLeaveInsideSpace(attrValue).length());
- else if (attrName.equals("class")) //$NON-NLS-1$
- jspClassRange = new Position(jspReferenceRegion.getStartOffset(r) + quoteOffset, StringUtils.stripQuotesLeaveInsideSpace(attrValue).length());
- }
- }
- }
-
- // put ranges in java -> jsp range map
- if (!type.equals("") && jspTypeRange != null) { //$NON-NLS-1$
- fCodeRanges.put(javaTypeRange, jspTypeRange);
- // note: don't update offsets for this map when result is built
- // they'll be updated when code ranges offsets are updated
- fUseBeanRanges.put(javaTypeRange, jspTypeRange);
- if (isIndirect)
- fIndirectRanges.put(javaTypeRange, jspTypeRange);
- }
- if (!id.equals("") && jspIdRange != null) { //$NON-NLS-1$
- fCodeRanges.put(javaIdRange, jspIdRange);
- // note: don't update offsets for this map when result is built
- // they'll be updated when code ranges offsets are updated
- fUseBeanRanges.put(javaIdRange, jspTypeRange);
- if (isIndirect)
- fIndirectRanges.put(javaIdRange, jspTypeRange);
- }
- if (!className.equals("") && jspClassRange != null) { //$NON-NLS-1$
- fCodeRanges.put(javaClassRange, jspClassRange);
- // note: don't update offsets for this map when result is built
- // they'll be updated when code ranges offsets are updated
- fUseBeanRanges.put(javaClassRange, jspTypeRange);
- if (isIndirect)
- fIndirectRanges.put(javaClassRange, jspTypeRange);
- }
- }
-
- /**
- * Set the buffer to the current JSPType: STANDARD_JSP, EMBEDDED_JSP,
- * DECLARATION, EXPRESSION, SCRIPTLET (for keepting track of cursor
- * position when the final document is built)
- *
- * @param JSPType
- * the JSP type that the cursor is in
- */
- protected void setCursorOwner(int JSPType) {
- switch (JSPType) {
- case DECLARATION :
- setCursorOwner(fUserDeclarations);
- break;
- case EXPRESSION :
- case SCRIPTLET :
- setCursorOwner(fUserCode);
- break;
- default :
- setCursorOwner(fUserCode);
- }
- }
-
- /**
- * this piece of code iterates through fCurrentNodes and clumps them
- * together in a big text string - unescaping characters if they are not
- * CDATA - simply appending if they are CDATA it stops iteration when it
- * hits a node that is an XML_TAG_NAME (which should be the region closing
- * tag)
- */
- protected String getUnescapedRegionText(ITextRegionCollection stRegion, int JSPType) {
- StringBuffer buffer = new StringBuffer();
- int start = stRegion.getStartOffset();
- int end = stRegion.getEndOffset();
- // adjustment necessary for embedded region containers
- if (stRegion instanceof ITextRegionContainer && stRegion.getType() == DOMRegionContext.BLOCK_TEXT) {
- if (stRegion.getRegions() != null && stRegion.getRegions().size() > 1) {
- ITextRegion jspContent = stRegion.getRegions().get(1); // should
- // be
- // jspContent
- // region
- start = stRegion.getStartOffset(jspContent);
- end = stRegion.getEndOffset(jspContent);
- }
- }
- int CDATAOffset = 0; // number of characters lost in conversion
- int bufferSize = 0;
- if (stRegion.getType() == DOMJSPRegionContexts.JSP_CONTENT || stRegion.getType() == DOMRegionContext.BLOCK_TEXT // need
- // this
- // for
- // embedded
- // JSP
- // regions
- || stRegion.getType() == DOMRegionContext.XML_TAG_NAME) // need
- // this
- // in
- // case
- // there's
- // no
- // region...
- {
- fInCodeRegion = (start <= fSourcePosition && fSourcePosition <= end);
- if (fInCodeRegion) {
- setCursorOwner(JSPType);
- setRelativeOffset((fSourcePosition - start) + getCursorOwner().length());
- if (JSPType == EXPRESSION) {
- // if an expression, add then length of the enclosing
- // paren..
- setCursorInExpression(true);
- setRelativeOffset(getRelativeOffset() + EXPRESSION_PREFIX.length());
- }
- }
- ITextRegion jspContent = null;
- if (stRegion.getRegions() != null && stRegion.getRegions().size() > 1)
- jspContent = stRegion.getRegions().get(1);
- return (jspContent != null) ? stRegion.getFullText(jspContent) : stRegion.getFullText(); // don't
- // unescape
- // if
- // it's
- // not
- // an
- // XMLJSP
- // tag
- }
- else if (stRegion.getType() == DOMJSPRegionContexts.JSP_CLOSE) {
- // need to determine cursor owner so that the fCurosorPosition
- // will be
- // correct even if there is no region after the cursor in the JSP
- // file
- setCursorOwner(JSPType);
- }
- // iterate XMLCONTENT and CDATA regions
- // loop fCurrentNode until you hit </jsp:scriptlet> (or other closing
- // tag name)
- while (getCurrentNode() != null && getCurrentNode().getType() != DOMRegionContext.XML_TAG_NAME) // need
- // to
- // stop
- // on
- // the
- // ending
- // tag
- // name...
- {
- start = getCurrentNode().getStartOffset();
- end = getCurrentNode().getEndOffset();
- bufferSize = buffer.length();
- CDATAOffset = unescapeRegion(getCurrentNode(), buffer);
- fInCodeRegion = (start <= fSourcePosition && fSourcePosition <= end);
- if (fInCodeRegion) {
- setCursorOwner(JSPType);
- // this offset is sort of complicated...
- // it's composed of:
- // 1. the length of the start of the current region up till
- // where the cursor is
- // 2. minus the number of characters lost in CDATA translation
- // 3. plus the length of the escaped buffer before the current
- // region, but
- // is still within the jsp tag
- setRelativeOffset((fSourcePosition - getCurrentNode().getStartOffset()) + getCursorOwner().length() - CDATAOffset + bufferSize);
- if (JSPType == EXPRESSION) {
- setCursorInExpression(true);
- // if an expression, add then length of the enclosing
- // paren..
- setRelativeOffset(getRelativeOffset() + EXPRESSION_PREFIX.length());
- }
- }
- if (getCurrentNode() != null)
- advanceNextNode();
- }
- return buffer.toString();
- }
-
- /**
- * @param r
- * the region to be unescaped (XMLContent, XML ENTITY
- * REFERENCE, or CDATA)
- * @param sb
- * the stringbuffer to append the text to
- * @return the number of characters removed in unescaping this text
- */
- protected int unescapeRegion(ITextRegion r, StringBuffer sb) {
- String s = ""; //$NON-NLS-1$
- int lengthBefore = 0, lengthAfter = 0, cdata_tags_length = 0;
- if (r != null && (r.getType() == DOMRegionContext.XML_CONTENT || r.getType() == DOMRegionContext.XML_ENTITY_REFERENCE)) {
- lengthBefore = (getCurrentNode() != r) ? getCurrentNode().getFullText(r).length() : getCurrentNode().getFullText().length();
- s = EscapedTextUtil.getUnescapedText(getCurrentNode(), r);
- lengthAfter = s.length();
- sb.append(s);
- }
- else if (r != null && r.getType() == DOMRegionContext.XML_CDATA_TEXT) {
- if (r instanceof ITextRegionContainer) // only interested in
- // contents
- {
- // navigate to next region container (which should be a JSP
- // region)
- Iterator it = ((ITextRegionContainer) r).getRegions().iterator();
- ITextRegion temp = null;
- while (it.hasNext()) {
- temp = (ITextRegion) it.next();
- if (temp instanceof ITextRegionContainer || temp.getType() == DOMRegionContext.XML_CDATA_TEXT) {
- sb.append(getCurrentNode().getFullText(temp));
- }
- else if (temp.getType() == DOMRegionContext.XML_CDATA_OPEN || temp.getType() == DOMRegionContext.XML_CDATA_CLOSE) {
- cdata_tags_length += temp.getLength();
- }
- }
- }
- }
- return (lengthBefore - lengthAfter + cdata_tags_length);
- }
-
- //
- // <jsp:useBean>
- protected void translateUseBean(ITextRegionCollection container) {
- ITextRegion r = null;
- String attrName = null;
- String attrValue = null;
- String id = null;
- String type = null;
- String className = null;
-
- Iterator regions = container.getRegions().iterator();
- while (regions.hasNext() && (r = (ITextRegion) regions.next()) != null && (r.getType() != DOMRegionContext.XML_TAG_CLOSE || r.getType() != DOMRegionContext.XML_EMPTY_TAG_CLOSE)) {
-
- attrName = attrValue = null;
- if (r.getType().equals(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)) {
- attrName = container.getText(r).trim();
- if (regions.hasNext() && (r = (ITextRegion) regions.next()) != null && r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) {
- if (regions.hasNext() && (r = (ITextRegion) regions.next()) != null && r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- attrValue = StringUtils.stripQuotes(container.getText(r));
- }
- // has equals, but no value?
- }
- // an attribute with no equals?
- }
- // (pa) might need different logic here if we wanna support more
- if (attrName != null && attrValue != null) {
- if (attrName.equals("id")) //$NON-NLS-1$
- id = attrValue;
- else if (attrName.equals("class")) //$NON-NLS-1$
- className = attrValue;
- else if (attrName.equals("type")) //$NON-NLS-1$
- type = attrValue;
- }
-
- }
- // has id w/ type and/or classname
- // Type id = new Classname();
- // or
- // Type id = null; // if there is no classname
- if (id != null && (type != null || className != null)) {
- if (type == null)
- type = className;
- String prefix = type + " " + id + " = "; //$NON-NLS-1$ //$NON-NLS-2$
- String suffix = "null;" + ENDL; //$NON-NLS-1$
- if (className != null)
- suffix = "new " + className + "();" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$
-
- appendToBuffer(prefix + suffix, fUserCode, true, fCurrentNode);
- }
- }
-
- final public int getCursorPosition() {
- return fCursorPosition;
- }
-
- protected boolean isCursorInExpression() {
- return fCursorInExpression;
- }
-
- protected void setCursorInExpression(boolean in) {
- fCursorInExpression = in;
- }
-
- final public void setSourceCursor(int i) {
- fSourcePosition = i;
- }
-
- final public int getSourcePosition() {
- return fSourcePosition;
- }
-
- final public TLDCMDocumentManager getTLDCMDocumentManager() {
- return TaglibController.getTLDCMDocumentManager(fStructuredDocument);
- }
-
- final public void setRelativeOffset(int relativeOffset) {
- this.fRelativeOffset = relativeOffset;
- }
-
- final public int getRelativeOffset() {
- return fRelativeOffset;
- }
-
- private void setCursorOwner(StringBuffer cursorOwner) {
- this.fCursorOwner = cursorOwner;
- }
-
- final public StringBuffer getCursorOwner() {
- return fCursorOwner;
- }
-
- private IStructuredDocumentRegion setCurrentNode(IStructuredDocumentRegion currentNode) {
- return this.fCurrentNode = currentNode;
- }
-
- final public IStructuredDocumentRegion getCurrentNode() {
- return fCurrentNode;
- }
-
- public ArrayList getELProblems() {
- return fELProblems;
- }
-
- public IStructuredDocument getStructuredDocument() {
- return fStructuredDocument;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java
deleted file mode 100644
index d1c907ab93..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java
+++ /dev/null
@@ -1,531 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-import java.io.InputStream;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.document.StructuredDocumentFactory;
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker;
-import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionHandler;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-
-/**
- * Parser/helper class for JSPTranslator. Used for parsing XML-JSP regions (in a script block)
- * A lot of logic borrowed from TLDCMDocumentManager. There should be only one XMLJSPRegionHelper per text file
- *
- * @author pavery
- */
-class XMLJSPRegionHelper implements StructuredDocumentRegionHandler {
- private final JSPTranslator fTranslator;
- protected JSPSourceParser fLocalParser = null;
- protected String fTextToParse = null;
- // need this if not at the start of the document (eg. parsing just a script block)
- protected int fStartOfTextToParse = 0;
- // name of the open tag that was last handled (if we are interested in it)
- protected String fTagname = null;
- protected String fTextBefore = ""; //$NON-NLS-1$
- protected String fUnescapedText = ""; //$NON-NLS-1$
- protected String fStrippedText = ""; //$NON-NLS-1$
- // for reconciling cursor position later
- int fPossibleOwner = JSPTranslator.SCRIPTLET;
-
- public XMLJSPRegionHelper(JSPTranslator translator) {
- getLocalParser().addStructuredDocumentRegionHandler(this);
- this.fTranslator = translator;
- }
-
- protected JSPSourceParser getLocalParser() {
- if (fLocalParser == null)
- fLocalParser = new JSPSourceParser();
- return fLocalParser;
- }
-
- public void addBlockMarker(BlockMarker marker) {
- fLocalParser.addBlockMarker(marker);
- }
-
- public void reset(String textToParse) {
- reset(textToParse, 0);
- }
-
- public void reset(String textToParse, int start) {
- fStartOfTextToParse = start;
- getLocalParser().reset(textToParse);
- fTextToParse = textToParse;
- }
-
- public void forceParse() {
- getLocalParser().getDocumentRegions();
- fLocalParser = null;
- }
-
- /*
- * parse an entire file
- *
- * @param filename
- * @return
- */
- public boolean parse(String filename) {
- getLocalParser().removeStructuredDocumentRegionHandler(this);
- // from outer class
- List blockMarkers = this.fTranslator.getBlockMarkers();
- IStructuredDocument document = StructuredDocumentFactory.getNewStructuredDocumentInstance(getLocalParser());
- String contents = getContents(filename);
- if(contents == null)
- return false;
- // this adds the current markers from the outer class list
- // to this parser so parsing works correctly
- for (int i = 0; i < blockMarkers.size(); i++) {
- addBlockMarker((BlockMarker) blockMarkers.get(i));
- }
- reset(contents);
-// forceParse();
- document.set(contents);
- IStructuredDocumentRegion cursor = document.getFirstStructuredDocumentRegion();
- while(cursor != null) {
- nodeParsed(cursor);
- cursor = cursor.getNext();
- }
- getLocalParser().addStructuredDocumentRegionHandler(this);
- return true;
- }
-
-
- /*
- * listens to parser node parsed events
- * adds to local scriplet, expression, declaration buffers
- * determines which type of region the cursor is in, and adjusts cursor offset accordingly
- */
- public void nodeParsed(IStructuredDocumentRegion sdRegion) {
-
- try {
-
- handleScopingIfNecessary(sdRegion);
-
- if (isJSPEndRegion(sdRegion)) {
- fTagname = null;
- String nameStr = getRegionName(sdRegion);
- if (isPossibleCustomTag(nameStr)) {
- // this custom tag may define variables
- this.fTranslator.addTaglibVariables(nameStr, sdRegion);
- }
- }
- else if (isJSPStartRegion(sdRegion)) {
- String nameStr = getRegionName(sdRegion);
- if (sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_TAG_OPEN) {
- if (isPossibleCustomTag(nameStr)) {
- // this custom tag may define variables
- this.fTranslator.addTaglibVariables(nameStr, sdRegion);
- }
- }
-
- if (isJSPRegion(nameStr))
- fTagname = nameStr;
- else
- fTagname = null;
-
-
- // this section assumes important content (to translate)
- // IS the opening tag
-
- // handle include and directive
- if(fTagname != null && sdRegion.getFirstRegion().getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN) {
- processOtherRegions(sdRegion);
- }
-
- // handle jsp:useBean
- if(fTagname != null && fTagname.equals(JSP11Namespace.ElementName.USEBEAN)) {
- processUseBean(sdRegion);
- }
- }
- else if (sdRegion.getFirstRegion().getType() == DOMJSPRegionContexts.JSP_CONTENT || sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_CONTENT) {
- // this section assumes important content (to translate)
- // is AFTER the opening tag
- if (fTagname != null) {
- // assign contents to one of the tables
- if (isScriptlet(fTagname)) {
- processScriptlet(sdRegion);
- }
- else if (isExpression(fTagname)) {
- processExpression(sdRegion);
- }
- else if (isDeclaration(fTagname)) {
- processDeclaration(sdRegion);
- }
- }
- }
- else {
- fTagname = null;
- }
- // this updates cursor position
- checkCursorInRegion(sdRegion);
- }
- catch (NullPointerException e) {
- // logging this exception that I've seen a couple of times...
- // seems to happen during shutdown of unit tests, at which
- // point Logger has already been unloaded
- try {
- Logger.logException("XMLJSPRegionHelper: exception in node parsing", e); //$NON-NLS-1$
- }
- catch (NoClassDefFoundError ex) {
- // do nothing, since we're just ending
- }
- }
- }
-
-
- private void handleScopingIfNecessary(IStructuredDocumentRegion sdRegion) {
- if(true)
- return;
-
- // fix to make sure custom tag block have their own scope
- // we add '{' for custom tag open and '}' for custom tag close
- // in the translation
- if(sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_TAG_OPEN) {
- if(!isSelfClosingTag(sdRegion)) {
- String nameStr = getRegionName(sdRegion);
- if(isPossibleCustomTag(nameStr)) {
- startScope(nameStr);
- }
- }
- }
- else if(sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_END_TAG_OPEN) {
- String nameStr = getRegionName(sdRegion);
- if(isPossibleCustomTag(nameStr)) {
- endScope(nameStr);
- }
- }
- }
-
- private boolean isSelfClosingTag(ITextRegionCollection containerRegion) {
-
- if(containerRegion == null)
- return false;
-
- ITextRegionList regions = containerRegion.getRegions();
- ITextRegion r = regions.get(regions.size()-1);
- return r.getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE;
- }
-
- private void startScope(String tagName) {
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- StringBuffer text = new StringBuffer();
- text.append("{ // <"); //$NON-NLS-1$
- text.append(tagName);
- text.append(">\n"); //$NON-NLS-1$
- this.fTranslator.translateScriptletString(text.toString(), currentNode, currentNode.getStartOffset(), currentNode.getLength()); //$NON-NLS-1$
-
- }
-
- private void endScope(String tagName) {
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- StringBuffer text = new StringBuffer();
- text.append("} // </"); //$NON-NLS-1$
- text.append(tagName);
- text.append(">\n"); //$NON-NLS-1$
- this.fTranslator.translateScriptletString(text.toString(), currentNode, currentNode.getStartOffset(), currentNode.getLength()); //$NON-NLS-1$
-
- }
-
- public void resetNodes() {
- // do nothing
- }
-
- private void checkCursorInRegion(IStructuredDocumentRegion sdRegion) {
- // if cursor is in this region...
- if (this.fTranslator.getSourcePosition() >= fStartOfTextToParse + sdRegion.getStartOffset() && this.fTranslator.getSourcePosition() <= fStartOfTextToParse + sdRegion.getEndOffset()) {
- int endOfNameTag = sdRegion.getStartOffset();
- int offset = fTextBefore.length() - fStrippedText.length();
- // offset in addtion to what's already in the buffer
- this.fTranslator.setRelativeOffset(this.fTranslator.getSourcePosition() - (fStartOfTextToParse + endOfNameTag) - offset);
- // outer class method
- this.fTranslator.setCursorOwner(fPossibleOwner);
- // add length of what's already in the buffer
- this.fTranslator.setRelativeOffset(this.fTranslator.getRelativeOffset() + this.fTranslator.getCursorOwner().length());
- if (fPossibleOwner == JSPTranslator.EXPRESSION) {
- // add length of expression prefix if necessary...
- this.fTranslator.setRelativeOffset(this.fTranslator.getRelativeOffset() + JSPTranslator.EXPRESSION_PREFIX.length());
- }
- }
- }
-
- protected void processDeclaration(IStructuredDocumentRegion sdRegion) {
- prepareText(sdRegion);
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- this.fTranslator.translateDeclarationString(fStrippedText, currentNode, currentNode.getStartOffset(), currentNode.getLength());
- fPossibleOwner = JSPTranslator.DECLARATION;
- }
-
- protected void processExpression(IStructuredDocumentRegion sdRegion) {
- prepareText(sdRegion);
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- this.fTranslator.translateExpressionString(fStrippedText, currentNode, currentNode.getStartOffset(), currentNode.getLength());
- fPossibleOwner = JSPTranslator.EXPRESSION;
- }
-
- protected void processScriptlet(IStructuredDocumentRegion sdRegion) {
- prepareText(sdRegion);
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- this.fTranslator.translateScriptletString(fStrippedText, currentNode, currentNode.getStartOffset(), currentNode.getLength());
- fPossibleOwner = JSPTranslator.SCRIPTLET;
- }
-
- /*
- * Substitutes values for entity references, strips CDATA tags, and keeps
- * track of string length(s) for cursor position calculation later.
- * @param sdRegion
- */
- protected void prepareText(IStructuredDocumentRegion sdRegion) {
- fTextBefore = fTextToParse.substring(sdRegion.getStartOffset(), sdRegion.getEndOffset());
- fUnescapedText = EscapedTextUtil.getUnescapedText(fTextBefore);
- fStrippedText = this.fTranslator.stripCDATA(fUnescapedText);
- }
-
- protected void processUseBean(IStructuredDocumentRegion sdRegion) {
- if (fTagname != null && isUseBean(fTagname)) {
-
- String beanClass, beanType, beanId, beanDecl = ""; //$NON-NLS-1$
- beanClass = getAttributeValue("class", sdRegion); //$NON-NLS-1$
- beanType = getAttributeValue("type", sdRegion); //$NON-NLS-1$
- beanId = getAttributeValue("id", sdRegion); //$NON-NLS-1$
-
- if (beanId != null && (beanType != null || beanClass != null)) {
- if (beanType.equals("")) //$NON-NLS-1$
- beanType = beanClass;
- String prefix = beanType + " " + beanId + " = "; //$NON-NLS-1$ //$NON-NLS-2$
- String suffix = "null;\n"; //$NON-NLS-1$
- if (beanClass != null)
- suffix = "new " + beanClass + "();\n"; //$NON-NLS-1$ //$NON-NLS-2$
- beanDecl = prefix + suffix;
- }
-
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- this.fTranslator.translateScriptletString(beanDecl, currentNode, currentNode.getStartOffset(), currentNode.getLength());
- fPossibleOwner = JSPTranslator.SCRIPTLET;
- }
- }
-
- protected void processOtherRegions(IStructuredDocumentRegion sdRegion) {
- processIncludeDirective(sdRegion);
- processPageDirective(sdRegion);
- }
-
- protected void processIncludeDirective(IStructuredDocumentRegion sdRegion) {
- if (isIncludeDirective(fTagname)) {
- // the directive name region itself contains the attrs...
- if (sdRegion.getRegions().get(0).getType() == DOMRegionContext.XML_CONTENT)
- sdRegion = sdRegion.getPrevious();
- String fileLocation = getAttributeValue("file", sdRegion); //$NON-NLS-1$
- this.fTranslator.handleIncludeFile(fileLocation);
- }
- else if (isPossibleCustomTag(fTagname)) {
- // this custom tag may define variables
- this.fTranslator.addTaglibVariables(fTagname);
- }
- else if (isTaglibDirective(fTagname)) {
- // also add the ones created here to the parent document
- String prefix = getAttributeValue("prefix", sdRegion); //$NON-NLS-1$
- List docs = this.fTranslator.getTLDCMDocumentManager().getCMDocumentTrackers(prefix, this.fTranslator.getCurrentNode().getStartOffset());
- Iterator it = docs.iterator();
- Iterator elements = null;
- CMNode node = null;
- CMDocument doc = null;
- BlockMarker marker = null;
- while (it.hasNext()) {
- doc = (CMDocument) it.next();
- elements = doc.getElements().iterator();
- while (elements.hasNext()) {
- node = (CMNode) elements.next();
- marker = new BlockMarker(node.getNodeName(), null, DOMJSPRegionContexts.JSP_CONTENT, true);
- // global scope is OK because we have encountered this <@taglib> directive
- // so it all markers from it should will be in scope
- // add to this local parser
- addBlockMarker(marker);
- // add to outer class marker list, for
- this.fTranslator.getBlockMarkers().add(marker);
- }
- }
- }
- }
-
- protected void processPageDirective(IStructuredDocumentRegion sdRegion) {
- if (isPageDirective(fTagname)) {
- while (sdRegion != null) {
- if (sdRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME)
- break;
- sdRegion = sdRegion.getPrevious();
- }
- String importValue = getAttributeValue("import", sdRegion); //$NON-NLS-1$
- if (importValue != "") { //$NON-NLS-1$
- // had to add "false" parameter to ensure these
- // imports don't get added to jsp <-> java map (since they are from an included file)
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=81687
- this.fTranslator.addImports(importValue, false);
- }
- fTranslator.translatePageDirectiveAttributes(sdRegion, sdRegion.getRegions().iterator());
- }
- }
-
- /*
- * convenience method to get an attribute value from attribute name
- */
- protected String getAttributeValue(String attrName, IStructuredDocumentRegion sdRegion) {
- String sdRegionText = fTextToParse.substring(sdRegion.getStartOffset(), sdRegion.getEndOffset());
- String textRegionText, attrValue = ""; //$NON-NLS-1$
- Iterator it = sdRegion.getRegions().iterator();
- ITextRegion nameRegion, valueRegion = null;
- while (it.hasNext()) {
- nameRegion = (ITextRegion) it.next();
- if (nameRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- textRegionText = sdRegionText.substring(nameRegion.getStart(), nameRegion.getTextEnd());
- if (textRegionText.equalsIgnoreCase(attrName)) {
- while (it.hasNext()) {
- valueRegion = (ITextRegion) it.next();
- if (valueRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- attrValue = sdRegionText.substring(valueRegion.getStart(), valueRegion.getEnd());
- break; // inner
- }
- }
- break; // outer
- }
- }
- }
- return StringUtils.stripQuotes(attrValue);
- }
-
- // these methods determine what content gets added to the local scriplet, expression, declaration buffers
- /*
- * return true for elements whose contents we might want to add to the java file we are building
- */
- private boolean isJSPEndRegion(IStructuredDocumentRegion sdRegion) {
- return (sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_END_TAG_OPEN);
- }
-
- protected boolean isJSPStartRegion(IStructuredDocumentRegion sdRegion) {
- return (sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_TAG_OPEN || sdRegion.getFirstRegion().getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN);
- }
-
- protected boolean isJSPRegion(String tagName) {
- return isDeclaration(tagName) || isExpression(tagName) || isScriptlet(tagName) || isUseBean(tagName) || isIncludeDirective(tagName) || isPossibleCustomTag(tagName) || isTaglibDirective(tagName) || isPageDirective(tagName);
- }
-
- protected boolean isDeclaration(String tagName) {
- return tagName.equalsIgnoreCase("jsp:declaration"); //$NON-NLS-1$
- }
-
- protected boolean isExpression(String tagName) {
- return tagName.equalsIgnoreCase("jsp:expression"); //$NON-NLS-1$
- }
-
- protected boolean isScriptlet(String tagName) {
- return tagName.equalsIgnoreCase("jsp:scriptlet"); //$NON-NLS-1$
- }
-
- protected boolean isUseBean(String tagName) {
- return tagName.equalsIgnoreCase("jsp:useBean"); //$NON-NLS-1$
- }
-
- protected boolean isIncludeDirective(String tagName) {
- return tagName.equalsIgnoreCase("jsp:directive.include"); //$NON-NLS-1$
- }
-
- protected boolean isPossibleCustomTag(String tagName) {
- return tagName.indexOf(":") > 0 && !tagName.startsWith("jsp"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- protected boolean isTaglibDirective(String tagName) {
- return tagName.equalsIgnoreCase("jsp:directive.taglib"); //$NON-NLS-1$
- }
-
- protected boolean isPageDirective(String tagName) {
- return tagName.equalsIgnoreCase("jsp:directive.page"); //$NON-NLS-1$
- }
-
- protected String getRegionName(IStructuredDocumentRegion sdRegion) {
-
- String nameStr = ""; //$NON-NLS-1$
- ITextRegionList regions = sdRegion.getRegions();
- for(int i=0; i<regions.size(); i++) {
- ITextRegion r = regions.get(i);
- if(r.getType() == DOMRegionContext.XML_TAG_NAME) {
- nameStr = fTextToParse.substring(sdRegion.getStartOffset(r), sdRegion.getTextEndOffset(r));
- break;
- }
- }
- return nameStr.trim();
- }
-
- /**
- * get the contents of a file as a String
- *
- * @param fileName
- * @return the contents, null if the file could not be found
- */
- protected String getContents(String fileName) {
- StringBuffer s = new StringBuffer();
- int c = 0;
- int count = 0;
- InputStream is = null;
- try {
- IPath filePath = new Path(fileName);
- IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
- if(f != null && !f.exists()) {
- f = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(filePath);
- }
- if (f != null && f.exists()) {
- is = f.getContents();
- while ((c = is.read()) != -1) {
- count++;
- s.append((char) c);
- }
- }
- else {
- // error condition, file could not be found
- return null;
- }
- }
- catch (Exception e) {
- if (Debug.debugStructuredDocument)
- e.printStackTrace();
- }
- finally {
- try {
- if (is != null) {
- is.close();
- }
- }
- catch (Exception e) {
- // nothing to do
- }
- }
- return s.toString();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpress.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpress.java
deleted file mode 100644
index a3c6a6eafc..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpress.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTAddExpress.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTAddExpress extends SimpleNode {
- public ASTAddExpress(int id) {
- super(id);
- }
-
- public ASTAddExpress(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpression.java
deleted file mode 100644
index c3b6eac73c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAddExpression.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTAddExpression.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTAddExpression extends ASTOperatorExpression {
- public ASTAddExpression(int id) {
- super(id);
- }
-
- public ASTAddExpression(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAndExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAndExpression.java
deleted file mode 100644
index befe402036..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTAndExpression.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTAndExpression.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTAndExpression extends ASTOperatorExpression {
- public ASTAndExpression(int id) {
- super(id);
- }
-
- public ASTAndExpression(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTChoiceExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTChoiceExpression.java
deleted file mode 100644
index 779079e30b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTChoiceExpression.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTChoiceExpression.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTChoiceExpression extends SimpleNode {
- public ASTChoiceExpression(int id) {
- super(id);
- }
-
- public ASTChoiceExpression(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTEqualityExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTEqualityExpression.java
deleted file mode 100644
index 4a06113a00..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTEqualityExpression.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTEqualityExpression.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTEqualityExpression extends ASTOperatorExpression {
- public ASTEqualityExpression(int id) {
- super(id);
- }
-
- public ASTEqualityExpression(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTExpression.java
deleted file mode 100644
index 9d93f38a2e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTExpression.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTExpression.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTExpression extends SimpleNode {
- public ASTExpression(int id) {
- super(id);
- }
-
- public ASTExpression(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTFunctionInvocation.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTFunctionInvocation.java
deleted file mode 100644
index a0cad90208..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTFunctionInvocation.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTFunctionInvocation.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTFunctionInvocation extends SimpleNode {
- String fullFunctionName;
-
- public ASTFunctionInvocation(int id) {
- super(id);
- }
-
- public ASTFunctionInvocation(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-
-public String getFullFunctionName() {
- return fullFunctionName;
-}
-
-public void setFullFunctionName(String fullFunctionName) {
- this.fullFunctionName = fullFunctionName;
-}
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTGTNode.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTGTNode.java
deleted file mode 100644
index d40005b68c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTGTNode.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTGTNode.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTGTNode extends SimpleNode {
- public ASTGTNode(int id) {
- super(id);
- }
-
- public ASTGTNode(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTImplicitObject.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTImplicitObject.java
deleted file mode 100644
index 1049ad52d4..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTImplicitObject.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTImplicitObject.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTImplicitObject extends SimpleNode {
- public ASTImplicitObject(int id) {
- super(id);
- }
-
- public ASTImplicitObject(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTLiteral.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTLiteral.java
deleted file mode 100644
index fb334f433c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTLiteral.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTLiteral.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTLiteral extends SimpleNode {
- public ASTLiteral(int id) {
- super(id);
- }
-
- public ASTLiteral(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTMultiplyExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTMultiplyExpression.java
deleted file mode 100644
index 3d8f600610..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTMultiplyExpression.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTMultiplyExpression.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTMultiplyExpression extends ASTOperatorExpression {
- public ASTMultiplyExpression(int id) {
- super(id);
- }
-
- public ASTMultiplyExpression(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOperatorExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOperatorExpression.java
deleted file mode 100644
index 3da6b77f57..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOperatorExpression.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class ASTOperatorExpression extends SimpleNode {
- protected ArrayList operatorTokens = new ArrayList();
-
- public ASTOperatorExpression(int i) {
- super(i);
- }
-
- public ASTOperatorExpression(JSPELParser p, int i) {
- this(i);
- parser = p;
- }
-
- public void addOperatorToken(Token opToken) {
- operatorTokens.add(opToken);
- }
-
- public List getOperatorTokens() {
- return operatorTokens;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOrExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOrExpression.java
deleted file mode 100644
index f3bb76c4aa..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTOrExpression.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTOrExpression.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTOrExpression extends ASTOperatorExpression {
- public ASTOrExpression(int id) {
- super(id);
- }
-
- public ASTOrExpression(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTRelationalExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTRelationalExpression.java
deleted file mode 100644
index 30238463ff..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTRelationalExpression.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTRelationalExpression.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTRelationalExpression extends ASTOperatorExpression {
- public ASTRelationalExpression(int id) {
- super(id);
- }
-
- public ASTRelationalExpression(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTStart.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTStart.java
deleted file mode 100644
index 3a117e5c61..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTStart.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Gopyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTStart extends SimpleNode {
- public ASTStart(int id) {
- super(id);
- }
-
- public ASTStart(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTUnaryExpression.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTUnaryExpression.java
deleted file mode 100644
index 86870a33db..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTUnaryExpression.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTUnaryExpression.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTUnaryExpression extends SimpleNode {
- public ASTUnaryExpression(int id) {
- super(id);
- }
-
- public ASTUnaryExpression(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValue.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValue.java
deleted file mode 100644
index fd6a36c84a..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValue.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTValue.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTValue extends SimpleNode {
- public ASTValue(int id) {
- super(id);
- }
-
- public ASTValue(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValuePrefix.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValuePrefix.java
deleted file mode 100644
index 1f2bf03f81..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValuePrefix.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTValuePrefix.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTValuePrefix extends SimpleNode {
- public ASTValuePrefix(int id) {
- super(id);
- }
-
- public ASTValuePrefix(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValueSuffix.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValueSuffix.java
deleted file mode 100644
index 2317267337..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ASTValueSuffix.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. ASTValueSuffix.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class ASTValueSuffix extends SimpleNode {
-
- protected Token propertyNameToken;
-
- public ASTValueSuffix(int id) {
- super(id);
- }
-
- public ASTValueSuffix(JSPELParser p, int id) {
- super(p, id);
- }
-
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-
-public Token getPropertyNameToken() {
- return propertyNameToken;
-}
-
-public void setPropertyNameToken(Token propertyNameToken) {
- this.propertyNameToken = propertyNameToken;
-}
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java
deleted file mode 100644
index 462ae6f6da..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-import java.util.Map;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
-
-/**
- * The code checker for the jsf/jsp EL.
- */
-public final class ELGenerator {
- /**
- * Constructor.
- *
- * @param locator A valid ELLocator instance, may not be null.
- */
- public ELGenerator() {
- } // constructor
-
-
- /**
- * Check the netuiel AST and set diagnostics as necessary.
- * @param translator TODO
- * @param jspReferenceRegion TODO
- * @param contentStart
- * @param contentLength
- */
- public void generate(ASTExpression root, IStructuredDocumentRegion currentNode, StringBuffer result, Map codeMap, IStructuredDocument document, ITextRegionCollection jspReferenceRegion, int contentStart, int contentLength) {
- ELGeneratorVisitor visitor = new ELGeneratorVisitor(result, currentNode, codeMap, document, jspReferenceRegion, contentStart);
- root.jjtAccept(visitor, null);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java
deleted file mode 100644
index e488b6a2f2..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java
+++ /dev/null
@@ -1,457 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMDocumentImpl;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TaglibTracker;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDFunction;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
-
-public class ELGeneratorVisitor implements JSPELParserVisitor {
-
- private static final String ENDL = "\n"; //$NON-NLS-1$
-
- private static final String fExpressionHeader1 = "public String _elExpression"; //$NON-NLS-1$
- private static final String fExpressionHeader2 = "()" + ENDL + //$NON-NLS-1$
- "\t\tthrows java.io.IOException, javax.servlet.ServletException {" + ENDL + //$NON-NLS-1$
- "javax.servlet.jsp.PageContext pageContext = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map param = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map paramValues = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map header = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map headerValues = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map cookie = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map initParam = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map pageScope = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map requestScope = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map sessionScope = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map applicationScope = null;" + ENDL + //$NON-NLS-1$
- "return \"\"+"; //$NON-NLS-1$
-
- private static final String fJspImplicitObjects[] = { "pageContext" }; //$NON-NLS-1$
-
- private static final String fJspImplicitMaps[] = { "param", "paramValues", "header", "headerValues", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- "cookie", "initParam", "pageScope", "requestScope", "sessionScope", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- "applicationScope" }; //$NON-NLS-1$
-
- private static final HashMap fJSPImplicitObjectMap = new HashMap(fJspImplicitObjects.length);
- static {
- for(int i = 0; i < fJspImplicitObjects.length; i++) {
- fJSPImplicitObjectMap.put(fJspImplicitObjects[i], new Boolean(true));
- }
-
- for(int i = 0; i < fJspImplicitMaps.length; i++) {
- fJSPImplicitObjectMap.put(fJspImplicitMaps[i], new Boolean(false));
- }
- }
-
- private static final String fFooter = " ;" + ENDL + "}" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$
-
- private StringBuffer fResult;
- private Map fCodeMap;
- private int fOffsetInUserCode;
- private static int methodCounter = 0;
- private IStructuredDocument fDocument = null;
- private int fContentStart;
- private static Map fOperatorMap;
-
- // this flag lets us know if we were unable to generate for some reason. One possible reason is that the expression
- // contains a reference to a variable for which information is only available at runtime.
- private boolean fCanGenerate = true;
-
- private IStructuredDocumentRegion fCurrentNode;
-
- /**
- * Tranlsation of XML-style operators to java
- */
- static {
- fOperatorMap = new HashMap();
- fOperatorMap.put("gt", ">"); //$NON-NLS-1$ //$NON-NLS-2$
- fOperatorMap.put("lt", "<"); //$NON-NLS-1$ //$NON-NLS-2$
- fOperatorMap.put("ge", ">="); //$NON-NLS-1$ //$NON-NLS-2$
- fOperatorMap.put("le", "<="); //$NON-NLS-1$ //$NON-NLS-2$
- fOperatorMap.put("mod", "%"); //$NON-NLS-1$ //$NON-NLS-2$
- fOperatorMap.put("eq", "=="); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * The constructor squirrels away a few things we'll need later
- *
- * @param result
- * @param codeMap
- * @param translator
- * @param jspReferenceRegion
- * @param contentStart
- */
- public ELGeneratorVisitor(StringBuffer result, IStructuredDocumentRegion currentNode, Map codeMap, IStructuredDocument document, ITextRegionCollection jspReferenceRegion, int contentStart)
- {
- fResult = result;
- fCodeMap = codeMap;
- fOffsetInUserCode = result.length();
- fContentStart = contentStart;
- fDocument = document;
- fCurrentNode = currentNode;
- }
-
- /**
- * Append a token to the output stream. Automatically calculating mapping.
- *
- * @param token
- */
- private void append(Token token)
- {
- append(token.image, token.beginColumn - 1, token.endColumn);
- }
-
- /**
- * Append a translation for the corresponding input token.
- *
- * @param translated
- * @param token
- */
- private void append(String translated, Token token)
- {
- append(translated, token.beginColumn - 1, token.endColumn);
- }
-
- /**
- * Append a string explicitly giving the input mapping.
- *
- * @param newText
- * @param jspPositionStart
- * @param jspPositionEnd
- */
- private void append(String newText, int jspPositionStart, int jspPositionEnd)
- {
- fResult.append(newText);
- Position javaRange = new Position(fOffsetInUserCode, newText.length());
- Position jspRange = new Position(fContentStart + jspPositionStart, jspPositionEnd - jspPositionStart);
-
- fCodeMap.put(javaRange, jspRange);
- fOffsetInUserCode += newText.length();
- }
-
- /**
- * Append text that will be unmapped and therefore will not be available for completion.
- *
- * @param newText
- */
- private void append(String newText)
- {
- fResult.append(newText);
- fOffsetInUserCode += newText.length();
- }
-
- /**
- * Generate a function invocation.
- *
- * @param fullFunctionName
- * @return
- */
- protected String genFunction(String fullFunctionName) {
- TLDCMDocumentManager docMgr = TaglibController.getTLDCMDocumentManager(fDocument);
- int colonIndex = fullFunctionName.indexOf(':');
- String prefix = fullFunctionName.substring(0, colonIndex);
- String functionName = fullFunctionName.substring(colonIndex + 1);
- if (docMgr == null)
- return null;
-
- Iterator taglibs = docMgr.getCMDocumentTrackers(fCurrentNode.getStartOffset()).iterator();
- while (taglibs.hasNext()) {
- TaglibTracker tracker = (TaglibTracker)taglibs.next();
- if(tracker.getPrefix().equals(prefix)) {
- CMDocumentImpl doc = (CMDocumentImpl)tracker.getDocument();
-
- List functions = doc.getFunctions();
- for(Iterator it = functions.iterator(); it.hasNext(); ) {
- TLDFunction function = (TLDFunction)it.next();
- if(function.getName().equals(functionName)) {
- return function.getClassName() + "." + function.getName(); //$NON-NLS-1$
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Handle a simple node -- fallback
- */
- public Object visit(SimpleNode node, Object data) {
- return(node.childrenAccept(this, data));
- }
-
- static synchronized int getMethodCounter() {
- return methodCounter++;
- }
-
- /**
- * Handle top-level expression
- */
- public Object visit(ASTExpression node, Object data) {
- int start = node.getFirstToken().beginColumn - 1;
- int end = node.lastToken.endColumn - 1;
- append(fExpressionHeader1, start, start);
- append(Integer.toString(getMethodCounter()), start, start);
- append(fExpressionHeader2, start, start);
-
- Object retval = node.childrenAccept(this, data);
-
- append(fFooter, end, end);
-
- // something is preventing good code generation so empty out the result and the map.
- if(!fCanGenerate) {
- fResult.delete(0, fResult.length());
- fCodeMap.clear();
- }
- return retval;
- }
-
- /**
- * Generically generate an operator node.
- *
- * @param node
- * @param data
- */
- private void generateOperatorNode(ASTOperatorExpression node, Object data) {
- for(int i = 0; i < node.children.length; i++) {
- node.children[i].jjtAccept(this, data);
- if( node.children.length - i > 1) {
- appendOperator((Token)node.getOperatorTokens().get(i));
- }
- }
- }
-
- /**
- * Append an operator to the output stream after translation (if any)
- *
- * @param token
- * @return
- */
- private String appendOperator(Token token) {
- String tokenImage = token.image.trim();
- String translated = (String)fOperatorMap.get(tokenImage);
- if(null != translated) {
- append(translated, token);
- } else {
- append(token);
- }
- return(translated);
- }
-
- /**
- * Handle or Expression
- */
- public Object visit(ASTOrExpression node, Object data) {
- generateOperatorNode(node, data);
- return(null);
- }
-
-
- /**
- * Handle and expression
- */
- public Object visit(ASTAndExpression node, Object data) {
- generateOperatorNode(node, data);
- return(null);
- }
-
-
- /**
- * Handle equality
- */
- public Object visit(ASTEqualityExpression node, Object data) {
- generateOperatorNode(node, data);
- return(null);
- }
-
-
- /**
- * Handle Relational
- */
- public Object visit(ASTRelationalExpression node, Object data) {
- generateOperatorNode(node, data);
- return(null);
- }
-
-
- /**
- * Handle addition
- */
- public Object visit(ASTAddExpression node, Object data) {
- generateOperatorNode(node, data);
- return(null);
- }
-
-
- /**
- * Handle multiply
- */
- public Object visit(ASTMultiplyExpression node, Object data) {
- generateOperatorNode(node, data);
- return(null);
- }
-
-
- /**
- * Choice Expression (ternary operator)
- */
- public Object visit(ASTChoiceExpression node, Object data) {
- node.children[0].jjtAccept(this, data);
- append("?"); //$NON-NLS-1$
- node.children[1].jjtAccept(this, data);
- append(":"); //$NON-NLS-1$
- node.children[2].jjtAccept(this,data);
- return null;
- }
-
-
- /**
- * Handle unary
- */
- public Object visit(ASTUnaryExpression node, Object data) {
- if(JSPELParserConstants.EMPTY == node.firstToken.kind) {
- append("((null == "); //$NON-NLS-1$
- node.childrenAccept(this, data);
- append(") || ("); //$NON-NLS-1$
- node.childrenAccept(this, data);
- append(").isEmpty())"); //$NON-NLS-1$
- } else if(JSPELParserConstants.NOT1 == node.firstToken.kind || JSPELParserConstants.NOT2 == node.firstToken.kind) {
- append("(!"); //$NON-NLS-1$
- node.childrenAccept(this, data);
- append(")"); //$NON-NLS-1$
- } else if(JSPELParserConstants.MINUS == node.firstToken.kind) {
- append("(-"); //$NON-NLS-1$
- node.childrenAccept(this, data);
- append(")"); //$NON-NLS-1$
- } else {
- node.childrenAccept(this, data);
- }
- return null;
- }
-
-
- /**
- * Value node
- */
- public Object visit(ASTValue node, Object data) {
- if(node.jjtGetNumChildren() >= 2) {
- if(node.jjtGetChild(0) instanceof ASTValuePrefix && node.jjtGetChild(1) instanceof ASTValueSuffix) {
- ASTValuePrefix prefix = (ASTValuePrefix) node.jjtGetChild(0);
- ASTValueSuffix suffix = (ASTValueSuffix) node.jjtGetChild(1);
- if(prefix.firstToken.image.equals("pageContext") && suffix.getPropertyNameToken().image.equals("request")) {
- append("((HTTPServletRequest)");
- }
- }
- }
- return node.childrenAccept(this, data);
- }
-
-
- /**
- * Value Prefix
- */
- public Object visit(ASTValuePrefix node, Object data) {
- // this is a raw identifier. May sure it's an implicit object.
- // This is the primary plae where modification is needed to
- // support JSF backing beans.
- if(null == node.children) {
- if(isCompletingObject(node.firstToken.image)) {
- append(node.firstToken);
- } else {
- fCanGenerate = false;
- }
- return(null);
- }
- return node.childrenAccept(this, data);
- }
-
-
- /**
- * Function for testing implicit objects.
- *
- * @param image
- * @return
- */
- private boolean isCompletingObject(String image) {
- Boolean value = (Boolean)fJSPImplicitObjectMap.get(image);
- return null == value ? false : value.booleanValue();
- }
-
- /**
- * Value suffix
- */
- public Object visit(ASTValueSuffix node, Object data) {
- if(JSPELParserConstants.LBRACKET == node.firstToken.kind) {
- fCanGenerate = false;
- } else if(null != node.getPropertyNameToken()) {
- Token suffix = node.getPropertyNameToken();
- String ucaseName = suffix.image.substring(0, 1).toUpperCase() + suffix.image.substring(1, suffix.image.length());
-
- // This is a special case. Note that the type system, no matter how much type information
- // we would have wouldn't give us the correct result. We're looking for "pageContext.request"
- // here and will add a downcast to (HTTPServletRequest)
-
- append(node.firstToken);
- append("get" + ucaseName + "()", suffix); //$NON-NLS-1$ //$NON-NLS-2$
-
- SimpleNode parent = (SimpleNode) node.jjtGetParent();
- if(suffix.image.equals("request") && parent instanceof ASTValue && //$NON-NLS-1$
- parent.jjtGetParent() instanceof ASTUnaryExpression && parent.firstToken.image.equals("pageContext")) { //$NON-NLS-1$
- append(")");
- }
-
-
- } else {
- append(node.firstToken);
- }
- return null;
- }
-
-
- /**
- * Function invocation
- */
- public Object visit(ASTFunctionInvocation node, Object data) {
- String functionTranslation = genFunction(node.getFullFunctionName());
- if(null != functionTranslation)
- {
- append(functionTranslation + "(", node.getFirstToken()); //$NON-NLS-1$
- for(int i = 0; i < node.children.length; i++) {
- node.children[i].jjtAccept(this, data);
- if( node.children.length - i > 1){
- append(","); //$NON-NLS-1$
- }
- }
- append(")"); //$NON-NLS-1$
- }
- return null;
- }
-
- /**
- * Literal
- */
- public Object visit(ASTLiteral node, Object data) {
- // TODO any further translation needed?
- append(node.firstToken);
- return null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/FindFunctionInvocationVisitor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/FindFunctionInvocationVisitor.java
deleted file mode 100644
index e05c5622de..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/FindFunctionInvocationVisitor.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class FindFunctionInvocationVisitor implements JSPELParserVisitor {
- protected int fCursorPosition;
-
- public FindFunctionInvocationVisitor(int cursorPosition)
- {
- fCursorPosition = cursorPosition;
- }
-
- protected boolean isEnclosing(SimpleNode node) {
- return(node.firstToken.beginColumn < fCursorPosition && node.lastToken.endColumn >= fCursorPosition);
- }
-
-
- protected Object visitEnclosingChild(SimpleNode node, Object data) {
- if(null == node.children)
- return null;
-
- for(int i = 0; i < node.children.length; i++) {
- if(isEnclosing(node))
- return node.children[i].jjtAccept(this, data);
- }
- return null;
- }
-
- public Object visit(SimpleNode node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTOrExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTAndExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTEqualityExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTRelationalExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTAddExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTMultiplyExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTChoiceExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTUnaryExpression node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTValue node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTValuePrefix node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTValueSuffix node, Object data) {
- return visitEnclosingChild(node, data);
- }
-
- public Object visit(ASTFunctionInvocation node, Object data) {
- Object nestedInvocation = visitEnclosingChild(node, data);
- if(null != nestedInvocation)
- return nestedInvocation;
- return node;
- }
-
- public Object visit(ASTLiteral node, Object data) {
- return visitEnclosingChild(node, data);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JJTJSPELParserState.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JJTJSPELParserState.java
deleted file mode 100644
index 6e7436c2c9..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JJTJSPELParserState.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. JJTJSPELParserState.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-class JJTJSPELParserState {
- private java.util.Stack nodes;
- private java.util.Stack marks;
-
- private int sp; // number of nodes on stack
- private int mk; // current mark
- private boolean node_created;
-
- JJTJSPELParserState() {
- nodes = new java.util.Stack();
- marks = new java.util.Stack();
- sp = 0;
- mk = 0;
- }
-
- /* Determines whether the current node was actually closed and
- pushed. This should only be called in the final user action of a
- node scope. */
- boolean nodeCreated() {
- return node_created;
- }
-
- /* Call this to reinitialize the node stack. It is called
- automatically by the parser's ReInit() method. */
- void reset() {
- nodes.removeAllElements();
- marks.removeAllElements();
- sp = 0;
- mk = 0;
- }
-
- /* Returns the root node of the AST. It only makes sense to call
- this after a successful parse. */
- Node rootNode() {
- return (Node)nodes.elementAt(0);
- }
-
- /* Pushes a node on to the stack. */
- void pushNode(Node n) {
- nodes.push(n);
- ++sp;
- }
-
- /* Returns the node on the top of the stack, and remove it from the
- stack. */
- Node popNode() {
- if (--sp < mk) {
- mk = ((Integer)marks.pop()).intValue();
- }
- return (Node)nodes.pop();
- }
-
- /* Returns the node currently on the top of the stack. */
- Node peekNode() {
- return (Node)nodes.peek();
- }
-
- /* Returns the number of children on the stack in the current node
- scope. */
- int nodeArity() {
- return sp - mk;
- }
-
-
- void clearNodeScope(Node n) {
- while (sp > mk) {
- popNode();
- }
- mk = ((Integer)marks.pop()).intValue();
- }
-
-
- void openNodeScope(Node n) {
- marks.push(new Integer(mk));
- mk = sp;
- n.jjtOpen();
- }
-
-
- /* A definite node is constructed from a specified number of
- children. That number of nodes are popped from the stack and
- made the children of the definite node. Then the definite node
- is pushed on to the stack. */
- void closeNodeScope(Node n, int num) {
- mk = ((Integer)marks.pop()).intValue();
- while (num-- > 0) {
- Node c = popNode();
- c.jjtSetParent(n);
- n.jjtAddChild(c, num);
- }
- n.jjtClose();
- pushNode(n);
- node_created = true;
- }
-
-
- /* A conditional node is constructed if its condition is true. All
- the nodes that have been pushed since the node was opened are
- made children of the the conditional node, which is then pushed
- on to the stack. If the condition is false the node is not
- constructed and they are left on the stack. */
- void closeNodeScope(Node n, boolean condition) {
- if (condition) {
- int a = nodeArity();
- mk = ((Integer)marks.pop()).intValue();
- while (a-- > 0) {
- Node c = popNode();
- c.jjtSetParent(n);
- n.jjtAddChild(c, a);
- }
- n.jjtClose();
- pushNode(n);
- node_created = true;
- } else {
- mk = ((Integer)marks.pop()).intValue();
- node_created = false;
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj
deleted file mode 100644
index 0e383b4047..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj
+++ /dev/null
@@ -1,675 +0,0 @@
-*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. JSPEL.jj */
-/*@egen*//* I know that haing some of these options on one line is rude but
- * if we don't do that the line number reported from javacc are off
- * which, trust me, is far more annoying. --tcarroll@bea.com
- */
-options {
- JAVA_UNICODE_ESCAPE = false;
- UNICODE_INPUT = true;
- STATIC = false;
- OPTIMIZE_TOKEN_MANAGER = true;
-}
-
-PARSER_BEGIN(JSPELParser)
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class JSPELParser/*@bgen(jjtree)*/implements JSPELParserTreeConstants/*@egen*/ {/*@bgen(jjtree)*/
- protected JJTJSPELParserState jjtree = new JJTJSPELParserState();
-
-/*@egen*/
-
- void jjtreeOpenNodeScope(Node n)
- {
- ((SimpleNode)n).setFirstToken(getToken(1));
- }
-
- void jjtreeCloseNodeScope(Node n)
- {
- ((SimpleNode)n).setLastToken(getToken(0));
- }
-
- public static JSPELParser createParser(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- return new JSPELParser(reader);
- }
-
- public void ReInit(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- ReInit(reader);
- }
-
-}
-
-PARSER_END(JSPELParser)
-
-SKIP :
-{
- " "
-| "\t"
-| "\n"
-| "\r"
-}
-
-TOKEN :
-{
-/* Literals */
- < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])* >
-|
- < FLOATING_POINT_LITERAL:
- (["0"-"9"])+ "." (["0"-"9"])* (<EXPONENT>)?
- | "." (["0"-"9"])+ (<EXPONENT>)?
- | (["0"-"9"])+ <EXPONENT>
- >
-|
- < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ >
-|
- < STRING_LITERAL:
- ("\"" ((~["\"","\\"]) | ("\\" ( ["\\","\""] )))* "\"") |
- ("\'" ((~["\'","\\"]) | ("\\" ( ["\\","\'"] )))* "\'")
- >
-|
- < BADLY_ESCAPED_STRING_LITERAL:
- ("\"" (~["\"","\\"])* ("\\" ( ~["\\","\""] ))) |
- ("\'" (~["\'","\\"])* ("\\" ( ~["\\","\'"] )))
- >
-
-/* Reserved Words and Symbols */
-| < TRUE: "true" >
-| < FALSE: "false" >
-| < NULL: "null" >
-| < DOT: "." >
-| < GT1: ">" >
-| < GT2: "gt" >
-| < LT1: "<" >
-| < LT2: "lt" >
-| < EQ1: "==" >
-| < EQ2: "eq" >
-| < LE1: "<=" >
-| < LE2: "le" >
-| < GE1: ">=" >
-| < GE2: "ge" >
-| < NEQ1: "!=" >
-| < NEQ2: "ne" >
-| < LPAREN: "(" >
-| < RPAREN: ")" >
-| < COMMA: "," >
-| < COLON: ":" >
-| < LBRACKET: "[" >
-| < RBRACKET: "]" >
-| < PLUS: "+" >
-| < MINUS: "-" >
-| < MULTIPLY: "*" >
-| < DIVIDE1: "/" >
-| < DIVIDE2: "div" >
-| < MODULUS1: "%" >
-| < MODULUS2: "mod" >
-| < NOT1: "not" >
-| < NOT2: "!" >
-| < AND1: "and" >
-| < AND2: "&&" >
-| < OR1: "or" >
-| < OR2: "||" >
-| < EMPTY: "empty" >
-| < COND: "?" >
-
-/* Identifiers */
-
-| < IDENTIFIER: (<LETTER>|<IMPL_OBJ_START>) (<LETTER>|<DIGIT>)* >
-| < #IMPL_OBJ_START: "#" >
-|
- < #LETTER:
- [
- "$",
- "A"-"Z",
- "_",
- "a"-"z",
- "\u00c0"-"\u00d6",
- "\u00d8"-"\u00f6",
- "\u00f8"-"\u00ff",
- "\u0100"-"\u1fff",
- "\u3040"-"\u318f",
- "\u3300"-"\u337f",
- "\u3400"-"\u3d2d",
- "\u4e00"-"\u9fff",
- "\uf900"-"\ufaff"
- ]
- >
-|
- < #DIGIT:
- [
- "0"-"9",
- "\u0660"-"\u0669",
- "\u06f0"-"\u06f9",
- "\u0966"-"\u096f",
- "\u09e6"-"\u09ef",
- "\u0a66"-"\u0a6f",
- "\u0ae6"-"\u0aef",
- "\u0b66"-"\u0b6f",
- "\u0be7"-"\u0bef",
- "\u0c66"-"\u0c6f",
- "\u0ce6"-"\u0cef",
- "\u0d66"-"\u0d6f",
- "\u0e50"-"\u0e59",
- "\u0ed0"-"\u0ed9",
- "\u1040"-"\u1049"
- ]
- >
-}
-
-ASTExpression Expression() : {/*@bgen(jjtree) Expression */
- ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Expression */
- try {
-/*@egen*/
- (LOOKAHEAD("?") ChoiceExpression() | OrExpression())/*@bgen(jjtree)*/
- {
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtreeCloseNodeScope(jjtn000);
- }
-/*@egen*/ { return jjtn000; }/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void OrExpression() :
-{/*@bgen(jjtree) #OrExpression(> 1) */
- ASTOrExpression jjtn000 = new ASTOrExpression(JJTOREXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #OrExpression(> 1) */
- try {
-/*@egen*/
- AndExpression() ((t = <OR1> | t = <OR2>) { jjtn000.addOperatorToken(t); }
- AndExpression())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void AndExpression() :
-{/*@bgen(jjtree) #AndExpression(> 1) */
- ASTAndExpression jjtn000 = new ASTAndExpression(JJTANDEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #AndExpression(> 1) */
- try {
-/*@egen*/
- EqualityExpression() ((t = <AND1> | t = <AND2>) { jjtn000.addOperatorToken(t); }
- EqualityExpression())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void EqualityExpression() :
-{/*@bgen(jjtree) #EqualityExpression(> 1) */
- ASTEqualityExpression jjtn000 = new ASTEqualityExpression(JJTEQUALITYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #EqualityExpression(> 1) */
- try {
-/*@egen*/
- RelationalExpression()
- ((t = <EQ1> | t = <EQ2> | t = <NEQ1> | t = <NEQ2>) { jjtn000.addOperatorToken(t); }
- RelationalExpression())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void RelationalExpression() :
-{/*@bgen(jjtree) #RelationalExpression(> 1) */
- ASTRelationalExpression jjtn000 = new ASTRelationalExpression(JJTRELATIONALEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #RelationalExpression(> 1) */
- try {
-/*@egen*/
- AddExpression()
- (
- (t = <LT1> | t = <LT2> | t = <GT1> | t = <GT2> | t = <GE1> | t = <GE2> | t = <LE1> | t = <LE2>) { jjtn000.addOperatorToken(t); }
- AddExpression()
- )*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void AddExpression() :
-{/*@bgen(jjtree) #AddExpression(> 1) */
- ASTAddExpression jjtn000 = new ASTAddExpression(JJTADDEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #AddExpression(> 1) */
- try {
-/*@egen*/
- MultiplyExpression() ((t = <PLUS> | t = <MINUS>) { jjtn000.addOperatorToken(t); }
- MultiplyExpression())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void MultiplyExpression() :
-{/*@bgen(jjtree) #MultiplyExpression(> 1) */
- ASTMultiplyExpression jjtn000 = new ASTMultiplyExpression(JJTMULTIPLYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t;
-}
-{/*@bgen(jjtree) #MultiplyExpression(> 1) */
- try {
-/*@egen*/
- UnaryExpression() (
- ( t = <MULTIPLY> | t = <DIVIDE1> | t = <DIVIDE2> | t = <MODULUS1> | t = <MODULUS2>) { jjtn000.addOperatorToken(t); }
- UnaryExpression()
- )*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void ChoiceExpression() : {/*@bgen(jjtree) ChoiceExpression */
- ASTChoiceExpression jjtn000 = new ASTChoiceExpression(JJTCHOICEEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) ChoiceExpression */
- try {
-/*@egen*/
- OrExpression() <COND> OrExpression() <COLON> OrExpression()/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void UnaryExpression() : {/*@bgen(jjtree) UnaryExpression */
- ASTUnaryExpression jjtn000 = new ASTUnaryExpression(JJTUNARYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) UnaryExpression */
- try {
-/*@egen*/
- ((<NOT1> | <NOT2> | <MINUS> | <EMPTY>) UnaryExpression())
- | Value()/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-
-}
-
-void Value() : {/*@bgen(jjtree) Value */
- ASTValue jjtn000 = new ASTValue(JJTVALUE);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Value */
- try {
-/*@egen*/
- ValuePrefix() (ValueSuffix())*/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void ValuePrefix() : {/*@bgen(jjtree) ValuePrefix */
- ASTValuePrefix jjtn000 = new ASTValuePrefix(JJTVALUEPREFIX);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) ValuePrefix */
- try {
-/*@egen*/
- Literal() | (<LPAREN> Expression() <RPAREN>) | LOOKAHEAD(3) FunctionInvocation() | <IDENTIFIER>/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void ValueSuffix() :
-{/*@bgen(jjtree) ValueSuffix */
- ASTValueSuffix jjtn000 = new ASTValueSuffix(JJTVALUESUFFIX);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token t = null;
-}
-{/*@bgen(jjtree) ValueSuffix */
- try {
-/*@egen*/
- (<DOT> (t = <IDENTIFIER>)?)/*@bgen(jjtree)*/
- {
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtreeCloseNodeScope(jjtn000);
- }
-/*@egen*/ { jjtn000.setPropertyNameToken(t); }
- | (<LBRACKET> Expression() <RBRACKET>)/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void FunctionInvocation() :
-{/*@bgen(jjtree) FunctionInvocation */
- ASTFunctionInvocation jjtn000 = new ASTFunctionInvocation(JJTFUNCTIONINVOCATION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/
- Token prefix = null, name = null;
-}
-{/*@bgen(jjtree) FunctionInvocation */
- try {
-/*@egen*/
- (prefix = <IDENTIFIER> <COLON>) { jjtn000.setFullFunctionName(prefix.image + ":"); }
- (name = <IDENTIFIER>)? {
- if(null != prefix && null != name)
- jjtn000.setFullFunctionName(prefix.image + ":" + (null == name ? "" : name.image));
- else if(null != name)
- jjtn000.setFullFunctionName(name.image);
- }
- (<LPAREN> Expression() (<COMMA> Expression())* try { (<RPAREN>) } catch (Exception e) {} )?/*@bgen(jjtree)*/
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- throw (RuntimeException)jjte000;
- }
- if (jjte000 instanceof ParseException) {
- throw (ParseException)jjte000;
- }
- throw (Error)jjte000;
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
-
-void Literal() : {/*@bgen(jjtree) Literal */
- ASTLiteral jjtn000 = new ASTLiteral(JJTLITERAL);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Literal */
- try {
-/*@egen*/
- <TRUE> | <FALSE> | <INTEGER_LITERAL> | <FLOATING_POINT_LITERAL> | <STRING_LITERAL> | <NULL>/*@bgen(jjtree)*/
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
-/*@egen*/
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt
deleted file mode 100644
index 9fd40d9242..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt
+++ /dev/null
@@ -1,281 +0,0 @@
-*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* I know that having some of these options on one line is rude but
- * if we don't do that the line number reported from javacc are off
- * which, trust me, is far more annoying. --tcarroll@bea.com
- */
-options {
- JAVA_UNICODE_ESCAPE = false;
- UNICODE_INPUT = true;
- STATIC = false;
- OPTIMIZE_TOKEN_MANAGER = true; MULTI = true; VISITOR = true; NODE_PACKAGE = "org.eclipse.jst.jsp.core.internal.java.jspel"; NODE_SCOPE_HOOK = true;
-}
-
-PARSER_BEGIN(JSPELParser)
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class JSPELParser {
-
- void jjtreeOpenNodeScope(Node n)
- {
- ((SimpleNode)n).setFirstToken(getToken(1));
- }
-
- void jjtreeCloseNodeScope(Node n)
- {
- ((SimpleNode)n).setLastToken(getToken(0));
- }
-
- public static JSPELParser createParser(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- return new JSPELParser(reader);
- }
-
- public void ReInit(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- ReInit(reader);
- }
-
-}
-
-PARSER_END(JSPELParser)
-
-SKIP :
-{
- " "
-| "\t"
-| "\n"
-| "\r"
-}
-
-TOKEN :
-{
-/* Literals */
- < INTEGER_LITERAL: ["0"-"9"] (["0"-"9"])* >
-|
- < FLOATING_POINT_LITERAL:
- (["0"-"9"])+ "." (["0"-"9"])* (<EXPONENT>)?
- | "." (["0"-"9"])+ (<EXPONENT>)?
- | (["0"-"9"])+ <EXPONENT>
- >
-|
- < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ >
-|
- < STRING_LITERAL:
- ("\"" ((~["\"","\\"]) | ("\\" ( ["\\","\""] )))* "\"") |
- ("\'" ((~["\'","\\"]) | ("\\" ( ["\\","\'"] )))* "\'")
- >
-|
- < BADLY_ESCAPED_STRING_LITERAL:
- ("\"" (~["\"","\\"])* ("\\" ( ~["\\","\""] ))) |
- ("\'" (~["\'","\\"])* ("\\" ( ~["\\","\'"] )))
- >
-
-/* Reserved Words and Symbols */
-| < TRUE: "true" >
-| < FALSE: "false" >
-| < NULL: "null" >
-| < DOT: "." >
-| < GT1: ">" >
-| < GT2: "gt" >
-| < LT1: "<" >
-| < LT2: "lt" >
-| < EQ1: "==" >
-| < EQ2: "eq" >
-| < LE1: "<=" >
-| < LE2: "le" >
-| < GE1: ">=" >
-| < GE2: "ge" >
-| < NEQ1: "!=" >
-| < NEQ2: "ne" >
-| < LPAREN: "(" >
-| < RPAREN: ")" >
-| < COMMA: "," >
-| < COLON: ":" >
-| < LBRACKET: "[" >
-| < RBRACKET: "]" >
-| < PLUS: "+" >
-| < MINUS: "-" >
-| < MULTIPLY: "*" >
-| < DIVIDE1: "/" >
-| < DIVIDE2: "div" >
-| < MODULUS1: "%" >
-| < MODULUS2: "mod" >
-| < NOT1: "not" >
-| < NOT2: "!" >
-| < AND1: "and" >
-| < AND2: "&&" >
-| < OR1: "or" >
-| < OR2: "||" >
-| < EMPTY: "empty" >
-| < COND: "?" >
-
-/* Identifiers */
-
-| < IDENTIFIER: (<LETTER>|<IMPL_OBJ_START>) (<LETTER>|<DIGIT>)* >
-| < #IMPL_OBJ_START: "#" >
-|
- < #LETTER:
- [
- "\u0024",
- "\u0041"-"\u005a",
- "\u005f",
- "\u0061"-"\u007a",
- "\u00c0"-"\u00d6",
- "\u00d8"-"\u00f6",
- "\u00f8"-"\u00ff",
- "\u0100"-"\u1fff",
- "\u3040"-"\u318f",
- "\u3300"-"\u337f",
- "\u3400"-"\u3d2d",
- "\u4e00"-"\u9fff",
- "\uf900"-"\ufaff"
- ]
- >
-|
- < #DIGIT:
- [
- "\u0030"-"\u0039",
- "\u0660"-"\u0669",
- "\u06f0"-"\u06f9",
- "\u0966"-"\u096f",
- "\u09e6"-"\u09ef",
- "\u0a66"-"\u0a6f",
- "\u0ae6"-"\u0aef",
- "\u0b66"-"\u0b6f",
- "\u0be7"-"\u0bef",
- "\u0c66"-"\u0c6f",
- "\u0ce6"-"\u0cef",
- "\u0d66"-"\u0d6f",
- "\u0e50"-"\u0e59",
- "\u0ed0"-"\u0ed9",
- "\u1040"-"\u1049"
- ]
- >
-}
-
-ASTExpression Expression() : {}
-{
- (LOOKAHEAD("?") ChoiceExpression() | OrExpression()) { return jjtThis; }
-}
-
-void OrExpression() #OrExpression(>1) :
-{
- Token t;
-}
-{
- AndExpression() ((t = <OR1> | t = <OR2>) { jjtThis.addOperatorToken(t); }
- AndExpression())*
-}
-
-void AndExpression() #AndExpression(>1) :
-{
- Token t;
-}
-{
- EqualityExpression() ((t = <AND1> | t = <AND2>) { jjtThis.addOperatorToken(t); }
- EqualityExpression())*
-}
-
-void EqualityExpression() #EqualityExpression(>1) :
-{
- Token t;
-}
-{
- RelationalExpression()
- ((t = <EQ1> | t = <EQ2> | t = <NEQ1> | t = <NEQ2>) { jjtThis.addOperatorToken(t); }
- RelationalExpression())*
-}
-
-void RelationalExpression() #RelationalExpression(>1) :
-{
- Token t;
-}
-{
- AddExpression()
- (
- (t = <LT1> | t = <LT2> | t = <GT1> | t = <GT2> | t = <GE1> | t = <GE2> | t = <LE1> | t = <LE2>) { jjtThis.addOperatorToken(t); }
- AddExpression()
- )*
-}
-
-void AddExpression() #AddExpression(>1) :
-{
- Token t;
-}
-{
- MultiplyExpression() ((t = <PLUS> | t = <MINUS>) { jjtThis.addOperatorToken(t); }
- MultiplyExpression())*
-}
-
-void MultiplyExpression() #MultiplyExpression(>1) :
-{
- Token t;
-}
-{
- UnaryExpression() (
- ( t = <MULTIPLY> | t = <DIVIDE1> | t = <DIVIDE2> | t = <MODULUS1> | t = <MODULUS2>) { jjtThis.addOperatorToken(t); }
- UnaryExpression()
- )*
-}
-
-void ChoiceExpression() : {}
-{
- OrExpression() <COND> OrExpression() <COLON> OrExpression()
-}
-
-void UnaryExpression() : {}
-{
- ((<NOT1> | <NOT2> | <MINUS> | <EMPTY>) UnaryExpression())
- | Value()
-
-}
-
-void Value() : {}
-{
- ValuePrefix() (ValueSuffix())*
-}
-
-void ValuePrefix() : {}
-{
- Literal() | (<LPAREN> Expression() <RPAREN>) | LOOKAHEAD(3) FunctionInvocation() | <IDENTIFIER>
-}
-
-void ValueSuffix() :
-{
- Token t = null;
-}
-{
- (<DOT> (t = <IDENTIFIER>)?) { jjtThis.setPropertyNameToken(t); }
- | (<LBRACKET> Expression() <RBRACKET>)
-}
-
-void FunctionInvocation() :
-{
- Token prefix = null, name = null;
-}
-{
- (prefix = <IDENTIFIER> <COLON>) { jjtThis.setFullFunctionName(prefix.image + ":"); }
- (name = <IDENTIFIER>)? {
- if(null != prefix && null != name)
- jjtThis.setFullFunctionName(prefix.image + ":" + (null == name ? "" : name.image));
- else if(null != name)
- jjtThis.setFullFunctionName(name.image);
- }
- (<LPAREN> Expression() (<COMMA> Expression())* try { (<RPAREN>) } catch (Exception e) {} )?
-}
-
-void Literal() : {}
-{
- <TRUE> | <FALSE> | <INTEGER_LITERAL> | <FLOATING_POINT_LITERAL> | <STRING_LITERAL> | <NULL>
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java
deleted file mode 100644
index 5c01bae7fd..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java
+++ /dev/null
@@ -1,1158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree&JavaCC: Do not edit this line. JSPELParser.java */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class JSPELParser/*@bgen(jjtree)*/implements JSPELParserTreeConstants, JSPELParserConstants {/*@bgen(jjtree)*/
- protected JJTJSPELParserState jjtree = new JJTJSPELParserState();
- void jjtreeOpenNodeScope(Node n)
- {
- ((SimpleNode)n).setFirstToken(getToken(1));
- }
-
- void jjtreeCloseNodeScope(Node n)
- {
- ((SimpleNode)n).setLastToken(getToken(0));
- }
-
- public static JSPELParser createParser(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- return new JSPELParser(reader);
- }
-
- public void ReInit(java.lang.String input) {
- java.io.StringReader reader = new java.io.StringReader(input);
- ReInit(reader);
- }
-
- final public ASTExpression Expression() throws ParseException {
- /*@bgen(jjtree) Expression */
- ASTExpression jjtn000 = new ASTExpression(JJTEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
- try {
- if (jj_2_1(2147483647)) {
- ChoiceExpression();
- } else {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- case LPAREN:
- case MINUS:
- case NOT1:
- case NOT2:
- case EMPTY:
- case IDENTIFIER:
- OrExpression();
- break;
- default:
- jj_la1[0] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtreeCloseNodeScope(jjtn000);
- {if (true) return jjtn000;}
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- throw new Error("Missing return statement in function");
- }
-
- final public void OrExpression() throws ParseException {
- /*@bgen(jjtree) #OrExpression(> 1) */
- ASTOrExpression jjtn000 = new ASTOrExpression(JJTOREXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t;
- try {
- AndExpression();
- label_1:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case OR1:
- case OR2:
-
- break;
- default:
- jj_la1[1] = jj_gen;
- break label_1;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case OR1:
- t = jj_consume_token(OR1);
- break;
- case OR2:
- t = jj_consume_token(OR2);
- break;
- default:
- jj_la1[2] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jjtn000.addOperatorToken(t);
- AndExpression();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void AndExpression() throws ParseException {
- /*@bgen(jjtree) #AndExpression(> 1) */
- ASTAndExpression jjtn000 = new ASTAndExpression(JJTANDEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t;
- try {
- EqualityExpression();
- label_2:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case AND1:
- case AND2:
-
- break;
- default:
- jj_la1[3] = jj_gen;
- break label_2;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case AND1:
- t = jj_consume_token(AND1);
- break;
- case AND2:
- t = jj_consume_token(AND2);
- break;
- default:
- jj_la1[4] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jjtn000.addOperatorToken(t);
- EqualityExpression();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void EqualityExpression() throws ParseException {
- /*@bgen(jjtree) #EqualityExpression(> 1) */
- ASTEqualityExpression jjtn000 = new ASTEqualityExpression(JJTEQUALITYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t;
- try {
- RelationalExpression();
- label_3:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case EQ1:
- case EQ2:
- case NEQ1:
- case NEQ2:
-
- break;
- default:
- jj_la1[5] = jj_gen;
- break label_3;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case EQ1:
- t = jj_consume_token(EQ1);
- break;
- case EQ2:
- t = jj_consume_token(EQ2);
- break;
- case NEQ1:
- t = jj_consume_token(NEQ1);
- break;
- case NEQ2:
- t = jj_consume_token(NEQ2);
- break;
- default:
- jj_la1[6] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jjtn000.addOperatorToken(t);
- RelationalExpression();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void RelationalExpression() throws ParseException {
- /*@bgen(jjtree) #RelationalExpression(> 1) */
- ASTRelationalExpression jjtn000 = new ASTRelationalExpression(JJTRELATIONALEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t;
- try {
- AddExpression();
- label_4:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case GT1:
- case GT2:
- case LT1:
- case LT2:
- case LE1:
- case LE2:
- case GE1:
- case GE2:
-
- break;
- default:
- jj_la1[7] = jj_gen;
- break label_4;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LT1:
- t = jj_consume_token(LT1);
- break;
- case LT2:
- t = jj_consume_token(LT2);
- break;
- case GT1:
- t = jj_consume_token(GT1);
- break;
- case GT2:
- t = jj_consume_token(GT2);
- break;
- case GE1:
- t = jj_consume_token(GE1);
- break;
- case GE2:
- t = jj_consume_token(GE2);
- break;
- case LE1:
- t = jj_consume_token(LE1);
- break;
- case LE2:
- t = jj_consume_token(LE2);
- break;
- default:
- jj_la1[8] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jjtn000.addOperatorToken(t);
- AddExpression();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void AddExpression() throws ParseException {
- /*@bgen(jjtree) #AddExpression(> 1) */
- ASTAddExpression jjtn000 = new ASTAddExpression(JJTADDEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t;
- try {
- MultiplyExpression();
- label_5:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PLUS:
- case MINUS:
-
- break;
- default:
- jj_la1[9] = jj_gen;
- break label_5;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case PLUS:
- t = jj_consume_token(PLUS);
- break;
- case MINUS:
- t = jj_consume_token(MINUS);
- break;
- default:
- jj_la1[10] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jjtn000.addOperatorToken(t);
- MultiplyExpression();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void MultiplyExpression() throws ParseException {
- /*@bgen(jjtree) #MultiplyExpression(> 1) */
- ASTMultiplyExpression jjtn000 = new ASTMultiplyExpression(JJTMULTIPLYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t;
- try {
- UnaryExpression();
- label_6:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case MULTIPLY:
- case DIVIDE1:
- case DIVIDE2:
- case MODULUS1:
- case MODULUS2:
-
- break;
- default:
- jj_la1[11] = jj_gen;
- break label_6;
- }
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case MULTIPLY:
- t = jj_consume_token(MULTIPLY);
- break;
- case DIVIDE1:
- t = jj_consume_token(DIVIDE1);
- break;
- case DIVIDE2:
- t = jj_consume_token(DIVIDE2);
- break;
- case MODULUS1:
- t = jj_consume_token(MODULUS1);
- break;
- case MODULUS2:
- t = jj_consume_token(MODULUS2);
- break;
- default:
- jj_la1[12] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- jjtn000.addOperatorToken(t);
- UnaryExpression();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, jjtree.nodeArity() > 1);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void ChoiceExpression() throws ParseException {
- /*@bgen(jjtree) ChoiceExpression */
- ASTChoiceExpression jjtn000 = new ASTChoiceExpression(JJTCHOICEEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
- try {
- OrExpression();
- jj_consume_token(COND);
- OrExpression();
- jj_consume_token(COLON);
- OrExpression();
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void UnaryExpression() throws ParseException {
- /*@bgen(jjtree) UnaryExpression */
- ASTUnaryExpression jjtn000 = new ASTUnaryExpression(JJTUNARYEXPRESSION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
- try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case MINUS:
- case NOT1:
- case NOT2:
- case EMPTY:
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case NOT1:
- jj_consume_token(NOT1);
- break;
- case NOT2:
- jj_consume_token(NOT2);
- break;
- case MINUS:
- jj_consume_token(MINUS);
- break;
- case EMPTY:
- jj_consume_token(EMPTY);
- break;
- default:
- jj_la1[13] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- UnaryExpression();
- break;
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- case LPAREN:
- case IDENTIFIER:
- Value();
- break;
- default:
- jj_la1[14] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void Value() throws ParseException {
- /*@bgen(jjtree) Value */
- ASTValue jjtn000 = new ASTValue(JJTVALUE);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
- try {
- ValuePrefix();
- label_7:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOT:
- case LBRACKET:
-
- break;
- default:
- jj_la1[15] = jj_gen;
- break label_7;
- }
- ValueSuffix();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void ValuePrefix() throws ParseException {
- /*@bgen(jjtree) ValuePrefix */
- ASTValuePrefix jjtn000 = new ASTValuePrefix(JJTVALUEPREFIX);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
- try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case INTEGER_LITERAL:
- case FLOATING_POINT_LITERAL:
- case STRING_LITERAL:
- case TRUE:
- case FALSE:
- case NULL:
- Literal();
- break;
- case LPAREN:
- jj_consume_token(LPAREN);
- Expression();
- jj_consume_token(RPAREN);
- break;
- default:
- jj_la1[16] = jj_gen;
- if (jj_2_2(3)) {
- FunctionInvocation();
- } else {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- jj_consume_token(IDENTIFIER);
- break;
- default:
- jj_la1[17] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- }
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void ValueSuffix() throws ParseException {
- /*@bgen(jjtree) ValueSuffix */
- ASTValueSuffix jjtn000 = new ASTValueSuffix(JJTVALUESUFFIX);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token t = null;
- try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case DOT:
- jj_consume_token(DOT);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- t = jj_consume_token(IDENTIFIER);
- break;
- default:
- jj_la1[18] = jj_gen;
-
- }
- jjtree.closeNodeScope(jjtn000, true);
- jjtc000 = false;
- jjtreeCloseNodeScope(jjtn000);
- jjtn000.setPropertyNameToken(t);
- break;
- case LBRACKET:
- jj_consume_token(LBRACKET);
- Expression();
- jj_consume_token(RBRACKET);
- break;
- default:
- jj_la1[19] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void FunctionInvocation() throws ParseException {
- /*@bgen(jjtree) FunctionInvocation */
- ASTFunctionInvocation jjtn000 = new ASTFunctionInvocation(JJTFUNCTIONINVOCATION);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);Token prefix = null, name = null;
- try {
- prefix = jj_consume_token(IDENTIFIER);
- jj_consume_token(COLON);
- jjtn000.setFullFunctionName(prefix.image + ":");
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- name = jj_consume_token(IDENTIFIER);
- break;
- default:
- jj_la1[20] = jj_gen;
-
- }
- if(null != prefix && null != name)
- jjtn000.setFullFunctionName(prefix.image + ":" + (null == name ? "" : name.image));
- else if(null != name)
- jjtn000.setFullFunctionName(name.image);
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case LPAREN:
- jj_consume_token(LPAREN);
- Expression();
- label_8:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
-
- break;
- default:
- jj_la1[21] = jj_gen;
- break label_8;
- }
- jj_consume_token(COMMA);
- Expression();
- }
- try {
- jj_consume_token(RPAREN);
- } catch (Exception e) {
-
- }
- break;
- default:
- jj_la1[22] = jj_gen;
-
- }
- } catch (Throwable jjte000) {
- if (jjtc000) {
- jjtree.clearNodeScope(jjtn000);
- jjtc000 = false;
- } else {
- jjtree.popNode();
- }
- if (jjte000 instanceof RuntimeException) {
- {if (true) throw (RuntimeException)jjte000;}
- }
- if (jjte000 instanceof ParseException) {
- {if (true) throw (ParseException)jjte000;}
- }
- {if (true) throw (Error)jjte000;}
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final public void Literal() throws ParseException {
- /*@bgen(jjtree) Literal */
- ASTLiteral jjtn000 = new ASTLiteral(JJTLITERAL);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
- jjtreeOpenNodeScope(jjtn000);
- try {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case TRUE:
- jj_consume_token(TRUE);
- break;
- case FALSE:
- jj_consume_token(FALSE);
- break;
- case INTEGER_LITERAL:
- jj_consume_token(INTEGER_LITERAL);
- break;
- case FLOATING_POINT_LITERAL:
- jj_consume_token(FLOATING_POINT_LITERAL);
- break;
- case STRING_LITERAL:
- jj_consume_token(STRING_LITERAL);
- break;
- case NULL:
- jj_consume_token(NULL);
- break;
- default:
- jj_la1[23] = jj_gen;
- jj_consume_token(-1);
- throw new ParseException();
- }
- } finally {
- if (jjtc000) {
- jjtree.closeNodeScope(jjtn000, true);
- jjtreeCloseNodeScope(jjtn000);
- }
- }
- }
-
- final private boolean jj_2_1(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_1(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(0, xla); }
- }
-
- final private boolean jj_2_2(int xla) {
- jj_la = xla; jj_lastpos = jj_scanpos = token;
- try { return !jj_3_2(); }
- catch(LookaheadSuccess ls) { return true; }
- finally { jj_save(1, xla); }
- }
-
- final private boolean jj_3R_10() {
- if (jj_scan_token(LPAREN)) return true;
- return false;
- }
-
- final private boolean jj_3R_9() {
- if (jj_scan_token(IDENTIFIER)) return true;
- if (jj_scan_token(COLON)) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(47)) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_10()) jj_scanpos = xsp;
- return false;
- }
-
- final private boolean jj_3_2() {
- if (jj_3R_9()) return true;
- return false;
- }
-
- final private boolean jj_3_1() {
- if (jj_scan_token(COND)) return true;
- return false;
- }
-
- public JSPELParserTokenManager token_source;
- SimpleCharStream jj_input_stream;
- public Token token, jj_nt;
- private int jj_ntk;
- private Token jj_scanpos, jj_lastpos;
- private int jj_la;
- public boolean lookingAhead = false;
-// private boolean jj_semLA;
- private int jj_gen;
- final private int[] jj_la1 = new int[24];
- static private int[] jj_la1_0;
- static private int[] jj_la1_1;
- static {
- jj_la1_0();
- jj_la1_1();
- }
- private static void jj_la1_0() {
- jj_la1_0 = new int[] {0x4001d60,0x0,0x0,0x0,0x0,0x30c0000,0x30c0000,0xf3c000,0xf3c000,0x0,0x0,0x0,0x0,0x0,0x4001d60,0x40002000,0x4001d60,0x0,0x0,0x40002000,0x0,0x10000000,0x4000000,0x1d60,};
- }
- private static void jj_la1_1() {
- jj_la1_1 = new int[] {0xa182,0x1800,0x1800,0x600,0x600,0x0,0x0,0x0,0x0,0x3,0x3,0x7c,0x7c,0x2182,0xa182,0x0,0x0,0x8000,0x8000,0x0,0x8000,0x0,0x0,0x0,};
- }
- final private JJCalls[] jj_2_rtns = new JJCalls[2];
- private boolean jj_rescan = false;
- private int jj_gc = 0;
-
- public JSPELParser(java.io.InputStream stream) {
- jj_input_stream = new SimpleCharStream(stream, 1, 1);
- token_source = new JSPELParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 24; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- public void ReInit(java.io.InputStream stream) {
- jj_input_stream.ReInit(stream, 1, 1);
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 24; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- public JSPELParser(java.io.Reader stream) {
- jj_input_stream = new SimpleCharStream(stream, 1, 1);
- token_source = new JSPELParserTokenManager(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 24; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- public void ReInit(java.io.Reader stream) {
- jj_input_stream.ReInit(stream, 1, 1);
- token_source.ReInit(jj_input_stream);
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 24; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- public JSPELParser(JSPELParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jj_gen = 0;
- for (int i = 0; i < 24; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- public void ReInit(JSPELParserTokenManager tm) {
- token_source = tm;
- token = new Token();
- jj_ntk = -1;
- jjtree.reset();
- jj_gen = 0;
- for (int i = 0; i < 24; i++) jj_la1[i] = -1;
- for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();
- }
-
- final private Token jj_consume_token(int kind) throws ParseException {
- Token oldToken;
- if ((oldToken = token).next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- if (token.kind == kind) {
- jj_gen++;
- if (++jj_gc > 100) {
- jj_gc = 0;
- for (int i = 0; i < jj_2_rtns.length; i++) {
- JJCalls c = jj_2_rtns[i];
- while (c != null) {
- if (c.gen < jj_gen) c.first = null;
- c = c.next;
- }
- }
- }
- return token;
- }
- token = oldToken;
- jj_kind = kind;
- throw generateParseException();
- }
-
- static private final class LookaheadSuccess extends java.lang.Error {
- private static final long serialVersionUID = 1L;
- }
- final private LookaheadSuccess jj_ls = new LookaheadSuccess();
- final private boolean jj_scan_token(int kind) {
- if (jj_scanpos == jj_lastpos) {
- jj_la--;
- if (jj_scanpos.next == null) {
- jj_lastpos = jj_scanpos = jj_scanpos.next = token_source.getNextToken();
- } else {
- jj_lastpos = jj_scanpos = jj_scanpos.next;
- }
- } else {
- jj_scanpos = jj_scanpos.next;
- }
- if (jj_rescan) {
- int i = 0; Token tok = token;
- while (tok != null && tok != jj_scanpos) { i++; tok = tok.next; }
- if (tok != null) jj_add_error_token(kind, i);
- }
- if (jj_scanpos.kind != kind) return true;
- if (jj_la == 0 && jj_scanpos == jj_lastpos) throw jj_ls;
- return false;
- }
-
- final public Token getNextToken() {
- if (token.next != null) token = token.next;
- else token = token.next = token_source.getNextToken();
- jj_ntk = -1;
- jj_gen++;
- return token;
- }
-
- final public Token getToken(int index) {
- Token t = lookingAhead ? jj_scanpos : token;
- for (int i = 0; i < index; i++) {
- if (t.next != null) t = t.next;
- else t = t.next = token_source.getNextToken();
- }
- return t;
- }
-
- final private int jj_ntk() {
- if ((jj_nt=token.next) == null)
- return (jj_ntk = (token.next=token_source.getNextToken()).kind);
- else
- return (jj_ntk = jj_nt.kind);
- }
-
- private java.util.Vector jj_expentries = new java.util.Vector();
- private int[] jj_expentry;
- private int jj_kind = -1;
- private int[] jj_lasttokens = new int[100];
- private int jj_endpos;
-
- private void jj_add_error_token(int kind, int pos) {
- if (pos >= 100) return;
- if (pos == jj_endpos + 1) {
- jj_lasttokens[jj_endpos++] = kind;
- } else if (jj_endpos != 0) {
- jj_expentry = new int[jj_endpos];
- for (int i = 0; i < jj_endpos; i++) {
- jj_expentry[i] = jj_lasttokens[i];
- }
- boolean exists = false;
- for (java.util.Enumeration e = jj_expentries.elements(); e.hasMoreElements();) {
- int[] oldentry = (int[])(e.nextElement());
- if (oldentry.length == jj_expentry.length) {
- exists = true;
- for (int i = 0; i < jj_expentry.length; i++) {
- if (oldentry[i] != jj_expentry[i]) {
- exists = false;
- break;
- }
- }
- if (exists) break;
- }
- }
- if (!exists) jj_expentries.addElement(jj_expentry);
- if (pos != 0) jj_lasttokens[(jj_endpos = pos) - 1] = kind;
- }
- }
-
- public ParseException generateParseException() {
- jj_expentries.removeAllElements();
- boolean[] la1tokens = new boolean[51];
- for (int i = 0; i < 51; i++) {
- la1tokens[i] = false;
- }
- if (jj_kind >= 0) {
- la1tokens[jj_kind] = true;
- jj_kind = -1;
- }
- for (int i = 0; i < 24; i++) {
- if (jj_la1[i] == jj_gen) {
- for (int j = 0; j < 32; j++) {
- if ((jj_la1_0[i] & (1<<j)) != 0) {
- la1tokens[j] = true;
- }
- if ((jj_la1_1[i] & (1<<j)) != 0) {
- la1tokens[32+j] = true;
- }
- }
- }
- }
- for (int i = 0; i < 51; i++) {
- if (la1tokens[i]) {
- jj_expentry = new int[1];
- jj_expentry[0] = i;
- jj_expentries.addElement(jj_expentry);
- }
- }
- jj_endpos = 0;
- jj_rescan_token();
- jj_add_error_token(0, 0);
- int[][] exptokseq = new int[jj_expentries.size()][];
- for (int i = 0; i < jj_expentries.size(); i++) {
- exptokseq[i] = (int[])jj_expentries.elementAt(i);
- }
- return new ParseException(token, exptokseq, tokenImage);
- }
-
- final public void enable_tracing() {
- }
-
- final public void disable_tracing() {
- }
-
- final private void jj_rescan_token() {
- jj_rescan = true;
- for (int i = 0; i < 2; i++) {
- JJCalls p = jj_2_rtns[i];
- do {
- if (p.gen > jj_gen) {
- jj_la = p.arg; jj_lastpos = jj_scanpos = p.first;
- switch (i) {
- case 0: jj_3_1(); break;
- case 1: jj_3_2(); break;
- }
- }
- p = p.next;
- } while (p != null);
- }
- jj_rescan = false;
- }
-
- final private void jj_save(int index, int xla) {
- JJCalls p = jj_2_rtns[index];
- while (p.gen > jj_gen) {
- if (p.next == null) { p = p.next = new JJCalls(); break; }
- p = p.next;
- }
- p.gen = jj_gen + xla - jj_la; p.first = token; p.arg = xla;
- }
-
- static final class JJCalls {
- int gen;
- Token first;
- int arg;
- JJCalls next;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserConstants.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserConstants.java
deleted file mode 100644
index 1f4e3ad908..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserConstants.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree&JavaCC: Do not edit this line. JSPELParserConstants.java */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public interface JSPELParserConstants {
-
- int EOF = 0;
- int INTEGER_LITERAL = 5;
- int FLOATING_POINT_LITERAL = 6;
- int EXPONENT = 7;
- int STRING_LITERAL = 8;
- int BADLY_ESCAPED_STRING_LITERAL = 9;
- int TRUE = 10;
- int FALSE = 11;
- int NULL = 12;
- int DOT = 13;
- int GT1 = 14;
- int GT2 = 15;
- int LT1 = 16;
- int LT2 = 17;
- int EQ1 = 18;
- int EQ2 = 19;
- int LE1 = 20;
- int LE2 = 21;
- int GE1 = 22;
- int GE2 = 23;
- int NEQ1 = 24;
- int NEQ2 = 25;
- int LPAREN = 26;
- int RPAREN = 27;
- int COMMA = 28;
- int COLON = 29;
- int LBRACKET = 30;
- int RBRACKET = 31;
- int PLUS = 32;
- int MINUS = 33;
- int MULTIPLY = 34;
- int DIVIDE1 = 35;
- int DIVIDE2 = 36;
- int MODULUS1 = 37;
- int MODULUS2 = 38;
- int NOT1 = 39;
- int NOT2 = 40;
- int AND1 = 41;
- int AND2 = 42;
- int OR1 = 43;
- int OR2 = 44;
- int EMPTY = 45;
- int COND = 46;
- int IDENTIFIER = 47;
- int IMPL_OBJ_START = 48;
- int LETTER = 49;
- int DIGIT = 50;
-
- int DEFAULT = 0;
-
- String[] tokenImage = {
- "<EOF>",
- "\" \"",
- "\"\\t\"",
- "\"\\n\"",
- "\"\\r\"",
- "<INTEGER_LITERAL>",
- "<FLOATING_POINT_LITERAL>",
- "<EXPONENT>",
- "<STRING_LITERAL>",
- "<BADLY_ESCAPED_STRING_LITERAL>",
- "\"true\"",
- "\"false\"",
- "\"null\"",
- "\".\"",
- "\">\"",
- "\"gt\"",
- "\"<\"",
- "\"lt\"",
- "\"==\"",
- "\"eq\"",
- "\"<=\"",
- "\"le\"",
- "\">=\"",
- "\"ge\"",
- "\"!=\"",
- "\"ne\"",
- "\"(\"",
- "\")\"",
- "\",\"",
- "\":\"",
- "\"[\"",
- "\"]\"",
- "\"+\"",
- "\"-\"",
- "\"*\"",
- "\"/\"",
- "\"div\"",
- "\"%\"",
- "\"mod\"",
- "\"not\"",
- "\"!\"",
- "\"and\"",
- "\"&&\"",
- "\"or\"",
- "\"||\"",
- "\"empty\"",
- "\"?\"",
- "<IDENTIFIER>",
- "\"#\"",
- "<LETTER>",
- "<DIGIT>",
- };
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java
deleted file mode 100644
index cc1e711d94..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java
+++ /dev/null
@@ -1,855 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree&JavaCC: Do not edit this line. JSPELParserTokenManager.java */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class JSPELParserTokenManager implements JSPELParserConstants
-{
- public java.io.PrintStream debugStream = System.out;
- public void setDebugStream(java.io.PrintStream ds) { debugStream = ds; }
-private final int jjStopStringLiteralDfa_0(int pos, long active0)
-{
- switch (pos)
- {
- case 0:
- if ((active0 & 0x2ad002aa9c00L) != 0L)
- {
- jjmatchedKind = 47;
- return 6;
- }
- if ((active0 & 0x2000L) != 0L)
- return 1;
- return -1;
- case 1:
- if ((active0 & 0x22d000001c00L) != 0L)
- {
- jjmatchedKind = 47;
- jjmatchedPos = 1;
- return 6;
- }
- if ((active0 & 0x80002aa8000L) != 0L)
- return 6;
- return -1;
- case 2:
- if ((active0 & 0x200000001c00L) != 0L)
- {
- jjmatchedKind = 47;
- jjmatchedPos = 2;
- return 6;
- }
- if ((active0 & 0x2d000000000L) != 0L)
- return 6;
- return -1;
- case 3:
- if ((active0 & 0x200000000800L) != 0L)
- {
- jjmatchedKind = 47;
- jjmatchedPos = 3;
- return 6;
- }
- if ((active0 & 0x1400L) != 0L)
- return 6;
- return -1;
- default :
- return -1;
- }
-}
-private final int jjStartNfa_0(int pos, long active0)
-{
- return jjMoveNfa_0(jjStopStringLiteralDfa_0(pos, active0), pos + 1);
-}
-private final int jjStopAtPos(int pos, int kind)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- return pos + 1;
-}
-private final int jjStartNfaWithStates_0(int pos, int kind, int state)
-{
- jjmatchedKind = kind;
- jjmatchedPos = pos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return pos + 1; }
- return jjMoveNfa_0(state, pos + 1);
-}
-private final int jjMoveStringLiteralDfa0_0()
-{
- switch(curChar)
- {
- case 33:
- jjmatchedKind = 40;
- return jjMoveStringLiteralDfa1_0(0x1000000L);
- case 37:
- return jjStopAtPos(0, 37);
- case 38:
- return jjMoveStringLiteralDfa1_0(0x40000000000L);
- case 40:
- return jjStopAtPos(0, 26);
- case 41:
- return jjStopAtPos(0, 27);
- case 42:
- return jjStopAtPos(0, 34);
- case 43:
- return jjStopAtPos(0, 32);
- case 44:
- return jjStopAtPos(0, 28);
- case 45:
- return jjStopAtPos(0, 33);
- case 46:
- return jjStartNfaWithStates_0(0, 13, 1);
- case 47:
- return jjStopAtPos(0, 35);
- case 58:
- return jjStopAtPos(0, 29);
- case 60:
- jjmatchedKind = 16;
- return jjMoveStringLiteralDfa1_0(0x100000L);
- case 61:
- return jjMoveStringLiteralDfa1_0(0x40000L);
- case 62:
- jjmatchedKind = 14;
- return jjMoveStringLiteralDfa1_0(0x400000L);
- case 63:
- return jjStopAtPos(0, 46);
- case 91:
- return jjStopAtPos(0, 30);
- case 93:
- return jjStopAtPos(0, 31);
- case 97:
- return jjMoveStringLiteralDfa1_0(0x20000000000L);
- case 100:
- return jjMoveStringLiteralDfa1_0(0x1000000000L);
- case 101:
- return jjMoveStringLiteralDfa1_0(0x200000080000L);
- case 102:
- return jjMoveStringLiteralDfa1_0(0x800L);
- case 103:
- return jjMoveStringLiteralDfa1_0(0x808000L);
- case 108:
- return jjMoveStringLiteralDfa1_0(0x220000L);
- case 109:
- return jjMoveStringLiteralDfa1_0(0x4000000000L);
- case 110:
- return jjMoveStringLiteralDfa1_0(0x8002001000L);
- case 111:
- return jjMoveStringLiteralDfa1_0(0x80000000000L);
- case 116:
- return jjMoveStringLiteralDfa1_0(0x400L);
- case 124:
- return jjMoveStringLiteralDfa1_0(0x100000000000L);
- default :
- return jjMoveNfa_0(0, 0);
- }
-}
-private final int jjMoveStringLiteralDfa1_0(long active0)
-{
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(0, active0);
- return 1;
- }
- switch(curChar)
- {
- case 38:
- if ((active0 & 0x40000000000L) != 0L)
- return jjStopAtPos(1, 42);
- break;
- case 61:
- if ((active0 & 0x40000L) != 0L)
- return jjStopAtPos(1, 18);
- else if ((active0 & 0x100000L) != 0L)
- return jjStopAtPos(1, 20);
- else if ((active0 & 0x400000L) != 0L)
- return jjStopAtPos(1, 22);
- else if ((active0 & 0x1000000L) != 0L)
- return jjStopAtPos(1, 24);
- break;
- case 97:
- return jjMoveStringLiteralDfa2_0(active0, 0x800L);
- case 101:
- if ((active0 & 0x200000L) != 0L)
- return jjStartNfaWithStates_0(1, 21, 6);
- else if ((active0 & 0x800000L) != 0L)
- return jjStartNfaWithStates_0(1, 23, 6);
- else if ((active0 & 0x2000000L) != 0L)
- return jjStartNfaWithStates_0(1, 25, 6);
- break;
- case 105:
- return jjMoveStringLiteralDfa2_0(active0, 0x1000000000L);
- case 109:
- return jjMoveStringLiteralDfa2_0(active0, 0x200000000000L);
- case 110:
- return jjMoveStringLiteralDfa2_0(active0, 0x20000000000L);
- case 111:
- return jjMoveStringLiteralDfa2_0(active0, 0xc000000000L);
- case 113:
- if ((active0 & 0x80000L) != 0L)
- return jjStartNfaWithStates_0(1, 19, 6);
- break;
- case 114:
- if ((active0 & 0x80000000000L) != 0L)
- return jjStartNfaWithStates_0(1, 43, 6);
- return jjMoveStringLiteralDfa2_0(active0, 0x400L);
- case 116:
- if ((active0 & 0x8000L) != 0L)
- return jjStartNfaWithStates_0(1, 15, 6);
- else if ((active0 & 0x20000L) != 0L)
- return jjStartNfaWithStates_0(1, 17, 6);
- break;
- case 117:
- return jjMoveStringLiteralDfa2_0(active0, 0x1000L);
- case 124:
- if ((active0 & 0x100000000000L) != 0L)
- return jjStopAtPos(1, 44);
- break;
- default :
- break;
- }
- return jjStartNfa_0(0, active0);
-}
-private final int jjMoveStringLiteralDfa2_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(0, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(1, active0);
- return 2;
- }
- switch(curChar)
- {
- case 100:
- if ((active0 & 0x4000000000L) != 0L)
- return jjStartNfaWithStates_0(2, 38, 6);
- else if ((active0 & 0x20000000000L) != 0L)
- return jjStartNfaWithStates_0(2, 41, 6);
- break;
- case 108:
- return jjMoveStringLiteralDfa3_0(active0, 0x1800L);
- case 112:
- return jjMoveStringLiteralDfa3_0(active0, 0x200000000000L);
- case 116:
- if ((active0 & 0x8000000000L) != 0L)
- return jjStartNfaWithStates_0(2, 39, 6);
- break;
- case 117:
- return jjMoveStringLiteralDfa3_0(active0, 0x400L);
- case 118:
- if ((active0 & 0x1000000000L) != 0L)
- return jjStartNfaWithStates_0(2, 36, 6);
- break;
- default :
- break;
- }
- return jjStartNfa_0(1, active0);
-}
-private final int jjMoveStringLiteralDfa3_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(1, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(2, active0);
- return 3;
- }
- switch(curChar)
- {
- case 101:
- if ((active0 & 0x400L) != 0L)
- return jjStartNfaWithStates_0(3, 10, 6);
- break;
- case 108:
- if ((active0 & 0x1000L) != 0L)
- return jjStartNfaWithStates_0(3, 12, 6);
- break;
- case 115:
- return jjMoveStringLiteralDfa4_0(active0, 0x800L);
- case 116:
- return jjMoveStringLiteralDfa4_0(active0, 0x200000000000L);
- default :
- break;
- }
- return jjStartNfa_0(2, active0);
-}
-private final int jjMoveStringLiteralDfa4_0(long old0, long active0)
-{
- if (((active0 &= old0)) == 0L)
- return jjStartNfa_0(2, old0);
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) {
- jjStopStringLiteralDfa_0(3, active0);
- return 4;
- }
- switch(curChar)
- {
- case 101:
- if ((active0 & 0x800L) != 0L)
- return jjStartNfaWithStates_0(4, 11, 6);
- break;
- case 121:
- if ((active0 & 0x200000000000L) != 0L)
- return jjStartNfaWithStates_0(4, 45, 6);
- break;
- default :
- break;
- }
- return jjStartNfa_0(3, active0);
-}
-private final void jjCheckNAdd(int state)
-{
- if (jjrounds[state] != jjround)
- {
- jjstateSet[jjnewStateCnt++] = state;
- jjrounds[state] = jjround;
- }
-}
-private final void jjAddStates(int start, int end)
-{
- do {
- jjstateSet[jjnewStateCnt++] = jjnextStates[start];
- } while (start++ != end);
-}
-private final void jjCheckNAddTwoStates(int state1, int state2)
-{
- jjCheckNAdd(state1);
- jjCheckNAdd(state2);
-}
-private final void jjCheckNAddStates(int start, int end)
-{
- do {
- jjCheckNAdd(jjnextStates[start]);
- } while (start++ != end);
-}
-//private final void jjCheckNAddStates(int start)
-//{
-// jjCheckNAdd(jjnextStates[start]);
-// jjCheckNAdd(jjnextStates[start + 1]);
-//}
-static final long[] jjbitVec0 = {
- 0x1ff00000fffffffeL, 0xffffffffffffc000L, 0xffffffffL, 0x600000000000000L
-};
-static final long[] jjbitVec2 = {
- 0x0L, 0x0L, 0x0L, 0xff7fffffff7fffffL
-};
-static final long[] jjbitVec3 = {
- 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-static final long[] jjbitVec4 = {
- 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffL, 0x0L
-};
-static final long[] jjbitVec5 = {
- 0xffffffffffffffffL, 0xffffffffffffffffL, 0x0L, 0x0L
-};
-static final long[] jjbitVec6 = {
- 0x3fffffffffffL, 0x0L, 0x0L, 0x0L
-};
-static final long[] jjbitVec7 = {
- 0xfffffffffffffffeL, 0xffffffffffffffffL, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-static final long[] jjbitVec8 = {
- 0x0L, 0x0L, 0xffffffffffffffffL, 0xffffffffffffffffL
-};
-private final int jjMoveNfa_0(int startState, int curPos)
-{
- int startsAt = 0;
- jjnewStateCnt = 35;
- int i = 1;
- jjstateSet[0] = startState;
- int kind = 0x7fffffff;
- for (;;)
- {
- if (++jjround == 0x7fffffff)
- ReInitRounds();
- if (curChar < 64)
- {
- long l = 1L << curChar;
- // MatchLoop:
- do
- {
- switch(jjstateSet[--i])
- {
- case 0:
- if ((0x3ff000000000000L & l) != 0L)
- {
- if (kind > 5)
- kind = 5;
- jjCheckNAddStates(0, 4);
- }
- else if ((0x1800000000L & l) != 0L)
- {
- if (kind > 47)
- kind = 47;
- jjCheckNAdd(6);
- }
- else if (curChar == 39)
- jjCheckNAddStates(5, 9);
- else if (curChar == 34)
- jjCheckNAddStates(10, 14);
- else if (curChar == 46)
- jjCheckNAdd(1);
- break;
- case 1:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 6)
- kind = 6;
- jjCheckNAddTwoStates(1, 2);
- break;
- case 3:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(4);
- break;
- case 4:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 6)
- kind = 6;
- jjCheckNAdd(4);
- break;
- case 5:
- if ((0x1800000000L & l) == 0L)
- break;
- if (kind > 47)
- kind = 47;
- jjCheckNAdd(6);
- break;
- case 6:
- if ((0x3ff001000000000L & l) == 0L)
- break;
- if (kind > 47)
- kind = 47;
- jjCheckNAdd(6);
- break;
- case 7:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 5)
- kind = 5;
- jjCheckNAddStates(0, 4);
- break;
- case 8:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 5)
- kind = 5;
- jjCheckNAdd(8);
- break;
- case 9:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(9, 10);
- break;
- case 10:
- if (curChar != 46)
- break;
- if (kind > 6)
- kind = 6;
- jjCheckNAddTwoStates(11, 12);
- break;
- case 11:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 6)
- kind = 6;
- jjCheckNAddTwoStates(11, 12);
- break;
- case 13:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(14);
- break;
- case 14:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 6)
- kind = 6;
- jjCheckNAdd(14);
- break;
- case 15:
- if ((0x3ff000000000000L & l) != 0L)
- jjCheckNAddTwoStates(15, 16);
- break;
- case 17:
- if ((0x280000000000L & l) != 0L)
- jjCheckNAdd(18);
- break;
- case 18:
- if ((0x3ff000000000000L & l) == 0L)
- break;
- if (kind > 6)
- kind = 6;
- jjCheckNAdd(18);
- break;
- case 19:
- if (curChar == 34)
- jjCheckNAddStates(10, 14);
- break;
- case 20:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddStates(15, 17);
- break;
- case 22:
- if (curChar == 34)
- jjCheckNAddStates(15, 17);
- break;
- case 23:
- if (curChar == 34 && kind > 8)
- kind = 8;
- break;
- case 24:
- if ((0xfffffffbffffffffL & l) != 0L)
- jjCheckNAddTwoStates(24, 25);
- break;
- case 26:
- if ((0xfffffffbffffffffL & l) != 0L && kind > 9)
- kind = 9;
- break;
- case 27:
- if (curChar == 39)
- jjCheckNAddStates(5, 9);
- break;
- case 28:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddStates(18, 20);
- break;
- case 30:
- if (curChar == 39)
- jjCheckNAddStates(18, 20);
- break;
- case 31:
- if (curChar == 39 && kind > 8)
- kind = 8;
- break;
- case 32:
- if ((0xffffff7fffffffffL & l) != 0L)
- jjCheckNAddTwoStates(32, 33);
- break;
- case 34:
- if ((0xffffff7fffffffffL & l) != 0L && kind > 9)
- kind = 9;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else if (curChar < 128)
- {
- long l = 1L << (curChar & 077);
- //MatchLoop:
- do
- {
- switch(jjstateSet[--i])
- {
- case 0:
- case 6:
- if ((0x7fffffe87fffffeL & l) == 0L)
- break;
- if (kind > 47)
- kind = 47;
- jjCheckNAdd(6);
- break;
- case 2:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(21, 22);
- break;
- case 12:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(23, 24);
- break;
- case 16:
- if ((0x2000000020L & l) != 0L)
- jjAddStates(25, 26);
- break;
- case 20:
- if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(15, 17);
- break;
- case 21:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 22;
- break;
- case 22:
- if (curChar == 92)
- jjCheckNAddStates(15, 17);
- break;
- case 24:
- if ((0xffffffffefffffffL & l) != 0L)
- jjAddStates(27, 28);
- break;
- case 25:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 26;
- break;
- case 26:
- case 34:
- if ((0xffffffffefffffffL & l) != 0L && kind > 9)
- kind = 9;
- break;
- case 28:
- if ((0xffffffffefffffffL & l) != 0L)
- jjCheckNAddStates(18, 20);
- break;
- case 29:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 30;
- break;
- case 30:
- if (curChar == 92)
- jjCheckNAddStates(18, 20);
- break;
- case 32:
- if ((0xffffffffefffffffL & l) != 0L)
- jjAddStates(29, 30);
- break;
- case 33:
- if (curChar == 92)
- jjstateSet[jjnewStateCnt++] = 34;
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- else
- {
- int hiByte = curChar >> 8;
- int i1 = hiByte >> 6;
- long l1 = 1L << (hiByte & 077);
- int i2 = (curChar & 0xff) >> 6;
- long l2 = 1L << (curChar & 077);
- //MatchLoop:
- do
- {
- switch(jjstateSet[--i])
- {
- case 0:
- case 6:
- if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
- break;
- if (kind > 47)
- kind = 47;
- jjCheckNAdd(6);
- break;
- case 20:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjAddStates(15, 17);
- break;
- case 24:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjAddStates(27, 28);
- break;
- case 26:
- case 34:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2) && kind > 9)
- kind = 9;
- break;
- case 28:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjAddStates(18, 20);
- break;
- case 32:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjAddStates(29, 30);
- break;
- default : break;
- }
- } while(i != startsAt);
- }
- if (kind != 0x7fffffff)
- {
- jjmatchedKind = kind;
- jjmatchedPos = curPos;
- kind = 0x7fffffff;
- }
- ++curPos;
- if ((i = jjnewStateCnt) == (startsAt = 35 - (jjnewStateCnt = startsAt)))
- return curPos;
- try { curChar = input_stream.readChar(); }
- catch(java.io.IOException e) { return curPos; }
- }
-}
-static final int[] jjnextStates = {
- 8, 9, 10, 15, 16, 28, 29, 31, 32, 33, 20, 21, 23, 24, 25, 20,
- 21, 23, 28, 29, 31, 3, 4, 13, 14, 17, 18, 24, 25, 32, 33,
-};
-private static final boolean jjCanMove_0(int hiByte, int i1, int i2, long l1, long l2)
-{
- switch(hiByte)
- {
- case 0:
- return ((jjbitVec2[i2] & l2) != 0L);
- case 48:
- return ((jjbitVec3[i2] & l2) != 0L);
- case 49:
- return ((jjbitVec4[i2] & l2) != 0L);
- case 51:
- return ((jjbitVec5[i2] & l2) != 0L);
- case 61:
- return ((jjbitVec6[i2] & l2) != 0L);
- default :
- if ((jjbitVec0[i1] & l1) != 0L)
- return true;
- return false;
- }
-}
-private static final boolean jjCanMove_1(int hiByte, int i1, int i2, long l1, long l2)
-{
- switch(hiByte)
- {
- case 0:
- return ((jjbitVec8[i2] & l2) != 0L);
- default :
- if ((jjbitVec7[i1] & l1) != 0L)
- return true;
- return false;
- }
-}
-public static final String[] jjstrLiteralImages = {
-"", null, null, null, null, null, null, null, null, null, "\164\162\165\145",
-"\146\141\154\163\145", "\156\165\154\154", "\56", "\76", "\147\164", "\74", "\154\164", "\75\75",
-"\145\161", "\74\75", "\154\145", "\76\75", "\147\145", "\41\75", "\156\145", "\50",
-"\51", "\54", "\72", "\133", "\135", "\53", "\55", "\52", "\57", "\144\151\166",
-"\45", "\155\157\144", "\156\157\164", "\41", "\141\156\144", "\46\46", "\157\162",
-"\174\174", "\145\155\160\164\171", "\77", null, null, null, null, };
-public static final String[] lexStateNames = {
- "DEFAULT",
-};
-static final long[] jjtoToken = {
- 0xffffffffff61L,
-};
-static final long[] jjtoSkip = {
- 0x1eL,
-};
-protected SimpleCharStream input_stream;
-private final int[] jjrounds = new int[35];
-private final int[] jjstateSet = new int[70];
-protected char curChar;
-public JSPELParserTokenManager(SimpleCharStream stream)
-{
- if (SimpleCharStream.staticFlag)
- throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
- input_stream = stream;
-}
-public JSPELParserTokenManager(SimpleCharStream stream, int lexState)
-{
- this(stream);
- SwitchTo(lexState);
-}
-public void ReInit(SimpleCharStream stream)
-{
- jjmatchedPos = jjnewStateCnt = 0;
- curLexState = defaultLexState;
- input_stream = stream;
- ReInitRounds();
-}
-private final void ReInitRounds()
-{
- int i;
- jjround = 0x80000001;
- for (i = 35; i-- > 0;)
- jjrounds[i] = 0x80000000;
-}
-public void ReInit(SimpleCharStream stream, int lexState)
-{
- ReInit(stream);
- SwitchTo(lexState);
-}
-public void SwitchTo(int lexState)
-{
- if (lexState >= 1 || lexState < 0)
- throw new TokenMgrError("Error: Ignoring invalid lexical state : " + lexState + ". State unchanged.", TokenMgrError.INVALID_LEXICAL_STATE);
- else
- curLexState = lexState;
-}
-
-protected Token jjFillToken()
-{
- Token t = Token.newToken(jjmatchedKind);
- t.kind = jjmatchedKind;
- String im = jjstrLiteralImages[jjmatchedKind];
- t.image = (im == null) ? input_stream.GetImage() : im;
- t.beginLine = input_stream.getBeginLine();
- t.beginColumn = input_stream.getBeginColumn();
- t.endLine = input_stream.getEndLine();
- t.endColumn = input_stream.getEndColumn();
- return t;
-}
-
-int curLexState = 0;
-int defaultLexState = 0;
-int jjnewStateCnt;
-int jjround;
-int jjmatchedPos;
-int jjmatchedKind;
-
-public Token getNextToken()
-{
- Token matchedToken;
- int curPos = 0;
-
- EOFLoop :
- for (;;)
- {
- try
- {
- curChar = input_stream.BeginToken();
- }
- catch(java.io.IOException e)
- {
- jjmatchedKind = 0;
- matchedToken = jjFillToken();
- return matchedToken;
- }
-
- try { input_stream.backup(0);
- while (curChar <= 32 && (0x100002600L & (1L << curChar)) != 0L)
- curChar = input_stream.BeginToken();
- }
- catch (java.io.IOException e1) { continue EOFLoop; }
- jjmatchedKind = 0x7fffffff;
- jjmatchedPos = 0;
- curPos = jjMoveStringLiteralDfa0_0();
- if (jjmatchedKind != 0x7fffffff)
- {
- if (jjmatchedPos + 1 < curPos)
- input_stream.backup(curPos - jjmatchedPos - 1);
- if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)
- {
- matchedToken = jjFillToken();
- return matchedToken;
- }
- else
- {
- continue EOFLoop;
- }
- }
- int error_line = input_stream.getEndLine();
- int error_column = input_stream.getEndColumn();
- String error_after = null;
- boolean EOFSeen = false;
- try { input_stream.readChar(); input_stream.backup(1); }
- catch (java.io.IOException e1) {
- EOFSeen = true;
- error_after = curPos <= 1 ? "" : input_stream.GetImage();
- if (curChar == '\n' || curChar == '\r') {
- error_line++;
- error_column = 0;
- }
- else
- error_column++;
- }
- if (!EOFSeen) {
- input_stream.backup(1);
- error_after = curPos <= 1 ? "" : input_stream.GetImage();
- }
- throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);
- }
-}
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTreeConstants.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTreeConstants.java
deleted file mode 100644
index 55a6e47482..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTreeConstants.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. JSPELParserTreeConstants.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public interface JSPELParserTreeConstants
-{
- public int JJTEXPRESSION = 0;
- public int JJTOREXPRESSION = 1;
- public int JJTANDEXPRESSION = 2;
- public int JJTEQUALITYEXPRESSION = 3;
- public int JJTRELATIONALEXPRESSION = 4;
- public int JJTADDEXPRESSION = 5;
- public int JJTMULTIPLYEXPRESSION = 6;
- public int JJTCHOICEEXPRESSION = 7;
- public int JJTUNARYEXPRESSION = 8;
- public int JJTVALUE = 9;
- public int JJTVALUEPREFIX = 10;
- public int JJTVALUESUFFIX = 11;
- public int JJTFUNCTIONINVOCATION = 12;
- public int JJTLITERAL = 13;
-
-
- public String[] jjtNodeName = {
- "Expression",
- "OrExpression",
- "AndExpression",
- "EqualityExpression",
- "RelationalExpression",
- "AddExpression",
- "MultiplyExpression",
- "ChoiceExpression",
- "UnaryExpression",
- "Value",
- "ValuePrefix",
- "ValueSuffix",
- "FunctionInvocation",
- "Literal",
- };
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserVisitor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserVisitor.java
deleted file mode 100644
index ffcf4941b8..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserVisitor.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. JSPELParserVisitor.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public interface JSPELParserVisitor
-{
- public Object visit(SimpleNode node, Object data);
- public Object visit(ASTExpression node, Object data);
- public Object visit(ASTOrExpression node, Object data);
- public Object visit(ASTAndExpression node, Object data);
- public Object visit(ASTEqualityExpression node, Object data);
- public Object visit(ASTRelationalExpression node, Object data);
- public Object visit(ASTAddExpression node, Object data);
- public Object visit(ASTMultiplyExpression node, Object data);
- public Object visit(ASTChoiceExpression node, Object data);
- public Object visit(ASTUnaryExpression node, Object data);
- public Object visit(ASTValue node, Object data);
- public Object visit(ASTValuePrefix node, Object data);
- public Object visit(ASTValueSuffix node, Object data);
- public Object visit(ASTFunctionInvocation node, Object data);
- public Object visit(ASTLiteral node, Object data);
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java
deleted file mode 100644
index 8ba5eb304e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.jspel.ELProblem;
-import org.eclipse.jst.jsp.core.jspel.IJSPELTranslator;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-
-
-public class JSPELTranslator implements IJSPELTranslator {
- /**
- * JSP Expression Language Parser.
- */
- private JSPELParser elParser = null;
-
- public List translateEL(String elText, String delim,
- IStructuredDocumentRegion currentNode, int contentStart,
- int contentLength, StringBuffer fUserELExpressions,
- HashMap fUserELRanges, IStructuredDocument document) {
-
- ArrayList elProblems = new ArrayList();
-
- try {
- synchronized(this) {
- if(null == elParser) {
- elParser = JSPELParser.createParser(elText);
- } else {
- elParser.ReInit(elText);
- }
-
- ASTExpression expression = elParser.Expression();
- ELGenerator gen = new ELGenerator();
- gen.generate(expression, currentNode, fUserELExpressions, fUserELRanges, document, currentNode, contentStart, contentLength);
- }
- } catch (ParseException e) {
- Token curTok = e.currentToken;
- int problemStartOffset;
- int problemEndOffset;
- Position pos = null;
- problemStartOffset = contentStart + curTok.beginColumn;
- problemEndOffset = contentStart + curTok.endColumn;
-
- pos = new Position(problemStartOffset, problemEndOffset - problemStartOffset + 1);
- elProblems.add(new ELProblem(pos, e.getLocalizedMessage()));
- } catch (TokenMgrError te) {
- Position pos = new Position(contentStart, contentLength);
- elProblems.add(new ELProblem(pos, JSPCoreMessages.JSPEL_Token));
- }
- return elProblems;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Node.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Node.java
deleted file mode 100644
index b8a186e4c4..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Node.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. Node.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-/* All AST nodes must implement this interface. It provides basic
- machinery for constructing the parent and child relationships
- between nodes. */
-
-public interface Node {
-
- /** This method is called after the node has been made the current
- node. It indicates that child nodes can now be added to it. */
- public void jjtOpen();
-
- /** This method is called after all the child nodes have been
- added. */
- public void jjtClose();
-
- /** This pair of methods are used to inform the node of its
- parent. */
- public void jjtSetParent(Node n);
- public Node jjtGetParent();
-
- /** This method tells the node to add its argument to the node's
- list of children. */
- public void jjtAddChild(Node n, int i);
-
- /** This method returns a child node. The children are numbered
- from zero, left to right. */
- public Node jjtGetChild(int i);
-
- /** Return the number of children the node has. */
- public int jjtGetNumChildren();
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data);
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ParseException.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ParseException.java
deleted file mode 100644
index ecd5087075..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ParseException.java
+++ /dev/null
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-/**
- * This exception is thrown when parse errors are encountered.
- * You can explicitly create objects of this exception type by
- * calling the method generateParseException in the generated
- * parser.
- *
- * You can modify this class to customize your error reporting
- * mechanisms so long as you retain the public fields.
- */
-public class ParseException extends Exception {
-
- /**
- * Default <code>serialVersionUID</code>
- */
- private static final long serialVersionUID = 1L;
-
-/**
- * This constructor is used by the method "generateParseException"
- * in the generated parser. Calling this constructor generates
- * a new object of this type with the fields "currentToken",
- * "expectedTokenSequences", and "tokenImage" set. The boolean
- * flag "specialConstructor" is also set to true to indicate that
- * this constructor was used to create this object.
- * This constructor calls its super class with the empty string
- * to force the "toString" method of parent class "Throwable" to
- * print the error message in the form:
- * ParseException: <result of getMessage>
- */
- public ParseException(Token currentTokenVal,
- int[][] expectedTokenSequencesVal,
- String[] tokenImageVal
- )
- {
- super("");
- specialConstructor = true;
- currentToken = currentTokenVal;
- expectedTokenSequences = expectedTokenSequencesVal;
- tokenImage = tokenImageVal;
- }
-
- /**
- * The following constructors are for use by you for whatever
- * purpose you can think of. Constructing the exception in this
- * manner makes the exception behave in the normal way - i.e., as
- * documented in the class "Throwable". The fields "errorToken",
- * "expectedTokenSequences", and "tokenImage" do not contain
- * relevant information. The JavaCC generated code does not use
- * these constructors.
- */
-
- public ParseException() {
- super();
- specialConstructor = false;
- }
-
- public ParseException(String message) {
- super(message);
- specialConstructor = false;
- }
-
- /**
- * This variable determines which constructor was used to create
- * this object and thereby affects the semantics of the
- * "getMessage" method (see below).
- */
- protected boolean specialConstructor;
-
- /**
- * This is the last token that has been consumed successfully. If
- * this object has been created due to a parse error, the token
- * followng this token will (therefore) be the first error token.
- */
- public Token currentToken;
-
- /**
- * Each entry in this array is an array of integers. Each array
- * of integers represents a sequence of tokens (by their ordinal
- * values) that is expected at this point of the parse.
- */
- public int[][] expectedTokenSequences;
-
- /**
- * This is a reference to the "tokenImage" array of the generated
- * parser within which the parse error occurred. This array is
- * defined in the generated ...Constants interface.
- */
- public String[] tokenImage;
-
- /**
- * This method has the standard behavior when this object has been
- * created using the standard constructors. Otherwise, it uses
- * "currentToken" and "expectedTokenSequences" to generate a parse
- * error message and returns it. If this object has been created
- * due to a parse error, and you do not catch it (it gets thrown
- * from the parser), then this method is called during the printing
- * of the final stack trace, and hence the correct error message
- * gets displayed.
- */
- public String getMessage() {
- if (!specialConstructor) {
- return super.getMessage();
- }
- String expected = "";
- int maxSize = 0;
- for (int i = 0; i < expectedTokenSequences.length; i++) {
- if (maxSize < expectedTokenSequences[i].length) {
- maxSize = expectedTokenSequences[i].length;
- }
- for (int j = 0; j < expectedTokenSequences[i].length; j++) {
- expected += tokenImage[expectedTokenSequences[i][j]] + " ";
- }
- if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
- expected += "...";
- }
- expected += eol + " ";
- }
- String retval = "Encountered \"";
- Token tok = currentToken.next;
- for (int i = 0; i < maxSize; i++) {
- if (i != 0) retval += " ";
- if (tok.kind == 0) {
- retval += tokenImage[0];
- break;
- }
- retval += add_escapes(tok.image);
- tok = tok.next;
- }
- retval += "\" at line " + currentToken.next.beginLine + ", column " + currentToken.next.beginColumn;
- retval += "." + eol;
- if (expectedTokenSequences.length == 1) {
- retval += "Was expecting:" + eol + " ";
- } else {
- retval += "Was expecting one of:" + eol + " ";
- }
- retval += expected;
- return retval;
- }
-
- /**
- * The end of line string for this machine.
- */
- protected String eol = System.getProperty("line.separator", "\n");
-
- /**
- * Used to convert raw characters to their escaped version
- * when these raw version cannot be used as part of an ASCII
- * string literal.
- */
- protected String add_escapes(String str) {
- StringBuffer retval = new StringBuffer();
- char ch;
- for (int i = 0; i < str.length(); i++) {
- switch (str.charAt(i))
- {
- case 0 :
- continue;
- case '\b':
- retval.append("\\b");
- continue;
- case '\t':
- retval.append("\\t");
- continue;
- case '\n':
- retval.append("\\n");
- continue;
- case '\f':
- retval.append("\\f");
- continue;
- case '\r':
- retval.append("\\r");
- continue;
- case '\"':
- retval.append("\\\"");
- continue;
- case '\'':
- retval.append("\\\'");
- continue;
- case '\\':
- retval.append("\\\\");
- continue;
- default:
- if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
- } else {
- retval.append(ch);
- }
- continue;
- }
- }
- return retval.toString();
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java
deleted file mode 100644
index 8021b4b992..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java
+++ /dev/null
@@ -1,412 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 3.0 */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-/**
- * An implementation of interface CharStream, where the stream is assumed to
- * contain only ASCII characters (without unicode processing).
- */
-
-public class SimpleCharStream
-{
- public static final boolean staticFlag = false;
- int bufsize;
- int available;
- int tokenBegin;
- public int bufpos = -1;
- protected int bufline[];
- protected int bufcolumn[];
-
- protected int column = 0;
- protected int line = 1;
-
- protected boolean prevCharIsCR = false;
- protected boolean prevCharIsLF = false;
-
- protected java.io.Reader inputStream;
-
- protected char[] buffer;
- protected int maxNextCharInd = 0;
- protected int inBuf = 0;
-
- protected void ExpandBuff(boolean wrapAround)
- {
- char[] newbuffer = new char[bufsize + 2048];
- int newbufline[] = new int[bufsize + 2048];
- int newbufcolumn[] = new int[bufsize + 2048];
-
- try
- {
- if (wrapAround)
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- System.arraycopy(buffer, 0, newbuffer,
- bufsize - tokenBegin, bufpos);
- buffer = newbuffer;
-
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
- bufline = newbufline;
-
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin, bufpos);
- bufcolumn = newbufcolumn;
-
- maxNextCharInd = (bufpos += (bufsize - tokenBegin));
- }
- else
- {
- System.arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
- buffer = newbuffer;
-
- System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize - tokenBegin);
- bufline = newbufline;
-
- System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize - tokenBegin);
- bufcolumn = newbufcolumn;
-
- maxNextCharInd = (bufpos -= tokenBegin);
- }
- }
- catch (Throwable t)
- {
- throw new Error(t.getMessage());
- }
-
-
- bufsize += 2048;
- available = bufsize;
- tokenBegin = 0;
- }
-
- protected void FillBuff() throws java.io.IOException
- {
- if (maxNextCharInd == available)
- {
- if (available == bufsize)
- {
- if (tokenBegin > 2048)
- {
- bufpos = maxNextCharInd = 0;
- available = tokenBegin;
- }
- else if (tokenBegin < 0)
- bufpos = maxNextCharInd = 0;
- else
- ExpandBuff(false);
- }
- else if (available > tokenBegin)
- available = bufsize;
- else if ((tokenBegin - available) < 2048)
- ExpandBuff(true);
- else
- available = tokenBegin;
- }
-
- int i;
- try {
- if ((i = inputStream.read(buffer, maxNextCharInd,
- available - maxNextCharInd)) == -1)
- {
- inputStream.close();
- throw new java.io.IOException();
- }
- else
- maxNextCharInd += i;
- return;
- }
- catch(java.io.IOException e) {
- --bufpos;
- backup(0);
- if (tokenBegin == -1)
- tokenBegin = bufpos;
- throw e;
- }
- }
-
- public char BeginToken() throws java.io.IOException
- {
- tokenBegin = -1;
- char c = readChar();
- tokenBegin = bufpos;
-
- return c;
- }
-
- protected void UpdateLineColumn(char c)
- {
- column++;
-
- if (prevCharIsLF)
- {
- prevCharIsLF = false;
- line += (column = 1);
- }
- else if (prevCharIsCR)
- {
- prevCharIsCR = false;
- if (c == '\n')
- {
- prevCharIsLF = true;
- }
- else
- line += (column = 1);
- }
-
- switch (c)
- {
- case '\r' :
- prevCharIsCR = true;
- break;
- case '\n' :
- prevCharIsLF = true;
- break;
- case '\t' :
- column--;
- column += (8 - (column & 07));
- break;
- default :
- break;
- }
-
- bufline[bufpos] = line;
- bufcolumn[bufpos] = column;
- }
-
- public char readChar() throws java.io.IOException
- {
- if (inBuf > 0)
- {
- --inBuf;
-
- if (++bufpos == bufsize)
- bufpos = 0;
-
- return buffer[bufpos];
- }
-
- if (++bufpos >= maxNextCharInd)
- FillBuff();
-
- char c = buffer[bufpos];
-
- UpdateLineColumn(c);
- return (c);
- }
-
- /**
- * @deprecated
- * @see #getEndColumn
- */
-
- public int getColumn() {
- return bufcolumn[bufpos];
- }
-
- /**
- * @deprecated
- * @see #getEndLine
- */
-
- public int getLine() {
- return bufline[bufpos];
- }
-
- public int getEndColumn() {
- return bufcolumn[bufpos];
- }
-
- public int getEndLine() {
- return bufline[bufpos];
- }
-
- public int getBeginColumn() {
- return bufcolumn[tokenBegin];
- }
-
- public int getBeginLine() {
- return bufline[tokenBegin];
- }
-
- public void backup(int amount) {
-
- inBuf += amount;
- if ((bufpos -= amount) < 0)
- bufpos += bufsize;
- }
-
- public SimpleCharStream(java.io.Reader dstream, int startline,
- int startcolumn, int buffersize)
- {
- inputStream = dstream;
- line = startline;
- column = startcolumn - 1;
-
- available = bufsize = buffersize;
- buffer = new char[buffersize];
- bufline = new int[buffersize];
- bufcolumn = new int[buffersize];
- }
-
- public SimpleCharStream(java.io.Reader dstream, int startline,
- int startcolumn)
- {
- this(dstream, startline, startcolumn, 4096);
- }
-
- public SimpleCharStream(java.io.Reader dstream)
- {
- this(dstream, 1, 1, 4096);
- }
- public void ReInit(java.io.Reader dstream, int startline,
- int startcolumn, int buffersize)
- {
- inputStream = dstream;
- line = startline;
- column = startcolumn - 1;
-
- if (buffer == null || buffersize != buffer.length)
- {
- available = bufsize = buffersize;
- buffer = new char[buffersize];
- bufline = new int[buffersize];
- bufcolumn = new int[buffersize];
- }
- prevCharIsLF = prevCharIsCR = false;
- tokenBegin = inBuf = maxNextCharInd = 0;
- bufpos = -1;
- }
-
- public void ReInit(java.io.Reader dstream, int startline,
- int startcolumn)
- {
- ReInit(dstream, startline, startcolumn, 4096);
- }
-
- public void ReInit(java.io.Reader dstream)
- {
- ReInit(dstream, 1, 1, 4096);
- }
- public SimpleCharStream(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize)
- {
- this(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
- }
-
- public SimpleCharStream(java.io.InputStream dstream, int startline,
- int startcolumn)
- {
- this(dstream, startline, startcolumn, 4096);
- }
-
- public SimpleCharStream(java.io.InputStream dstream)
- {
- this(dstream, 1, 1, 4096);
- }
-
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize)
- {
- ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, 4096);
- }
-
- public void ReInit(java.io.InputStream dstream)
- {
- ReInit(dstream, 1, 1, 4096);
- }
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn)
- {
- ReInit(dstream, startline, startcolumn, 4096);
- }
- public String GetImage()
- {
- if (bufpos >= tokenBegin)
- return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
- else
- return new String(buffer, tokenBegin, bufsize - tokenBegin) +
- new String(buffer, 0, bufpos + 1);
- }
-
- public char[] GetSuffix(int len)
- {
- char[] ret = new char[len];
-
- if ((bufpos + 1) >= len)
- System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
- else
- {
- System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0,
- len - bufpos - 1);
- System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
- }
-
- return ret;
- }
-
- public void Done()
- {
- buffer = null;
- bufline = null;
- bufcolumn = null;
- }
-
- /**
- * Method to adjust line and column numbers for the start of a token.
- */
- public void adjustBeginLineColumn(int newLine, int newCol)
- {
- int start = tokenBegin;
- int len;
-
- if (bufpos >= tokenBegin)
- {
- len = bufpos - tokenBegin + inBuf + 1;
- }
- else
- {
- len = bufsize - tokenBegin + bufpos + 1 + inBuf;
- }
-
- int i = 0, j = 0, k = 0;
- int nextColDiff = 0, columnDiff = 0;
-
- while (i < len &&
- bufline[j = start % bufsize] == bufline[k = ++start % bufsize])
- {
- bufline[j] = newLine;
- nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
- bufcolumn[j] = newCol + columnDiff;
- columnDiff = nextColDiff;
- i++;
- }
-
- if (i < len)
- {
- bufline[j] = newLine++;
- bufcolumn[j] = newCol + columnDiff;
-
- while (i++ < len)
- {
- if (bufline[j = start % bufsize] != bufline[++start % bufsize])
- bufline[j] = newLine++;
- else
- bufline[j] = newLine;
- }
- }
-
- line = bufline[j];
- column = bufcolumn[j];
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleNode.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleNode.java
deleted file mode 100644
index aac473f95a..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleNode.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JJTree: Do not edit this line. SimpleNode.java */
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class SimpleNode implements Node {
- protected Node parent;
- protected Node[] children;
- protected int id;
- protected JSPELParser parser;
- protected Token firstToken;
- protected Token lastToken;
-
- public SimpleNode(int i) {
- id = i;
- }
-
- public SimpleNode(JSPELParser p, int i) {
- this(i);
- parser = p;
- }
-
- public void jjtOpen() {
- }
-
- public void jjtClose() {
- }
-
- public void jjtSetParent(Node n) { parent = n; }
- public Node jjtGetParent() { return parent; }
-
- public void jjtAddChild(Node n, int i) {
- if (children == null) {
- children = new Node[i + 1];
- } else if (i >= children.length) {
- Node c[] = new Node[i + 1];
- System.arraycopy(children, 0, c, 0, children.length);
- children = c;
- }
- children[i] = n;
- }
-
- public Node jjtGetChild(int i) {
- return children[i];
- }
-
- public int jjtGetNumChildren() {
- return (children == null) ? 0 : children.length;
- }
-
- /** Accept the visitor. **/
- public Object jjtAccept(JSPELParserVisitor visitor, Object data) {
- return visitor.visit(this, data);
- }
-
- /** Accept the visitor. **/
- public Object childrenAccept(JSPELParserVisitor visitor, Object data) {
- if (children != null) {
- for (int i = 0; i < children.length; ++i) {
- children[i].jjtAccept(visitor, data);
- }
- }
- return data;
- }
-
- /* You can override these two methods in subclasses of SimpleNode to
- customize the way the node appears when the tree is dumped. If
- your output uses more than one line you should override
- toString(String), otherwise overriding toString() is probably all
- you need to do. */
-
- public String toString() { return JSPELParserTreeConstants.jjtNodeName[id]; }
- public String toString(String prefix) { return prefix + toString(); }
-
- /* Override this method if you want to customize how the node dumps
- out its children. */
-
- public void dump(String prefix) {
- System.out.println(toString(prefix));
- if (children != null) {
- for (int i = 0; i < children.length; ++i) {
- SimpleNode n = (SimpleNode)children[i];
- if (n != null) {
- n.dump(prefix + " ");
- }
- }
- }
- }
-
- public Token getFirstToken() {
- return firstToken;
- }
-
- public void setFirstToken(Token firstToken) {
- this.firstToken = firstToken;
- }
-
- public Token getLastToken() {
- return lastToken;
- }
-
- public void setLastToken(Token lastToken) {
- this.lastToken = lastToken;
- }
-}
-
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Token.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Token.java
deleted file mode 100644
index 7159820f62..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Token.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-/**
- * Describes the input token stream.
- */
-
-public class Token {
-
- /**
- * An integer that describes the kind of this token. This numbering
- * system is determined by JavaCCParser, and a table of these numbers is
- * stored in the file ...Constants.java.
- */
- public int kind;
-
- /**
- * beginLine and beginColumn describe the position of the first character
- * of this token; endLine and endColumn describe the position of the
- * last character of this token.
- */
- public int beginLine, beginColumn, endLine, endColumn;
-
- /**
- * The string image of the token.
- */
- public String image;
-
- /**
- * A reference to the next regular (non-special) token from the input
- * stream. If this is the last token from the input stream, or if the
- * token manager has not read tokens beyond this one, this field is
- * set to null. This is true only if this token is also a regular
- * token. Otherwise, see below for a description of the contents of
- * this field.
- */
- public Token next;
-
- /**
- * This field is used to access special tokens that occur prior to this
- * token, but after the immediately preceding regular (non-special) token.
- * If there are no such special tokens, this field is set to null.
- * When there are more than one such special token, this field refers
- * to the last of these special tokens, which in turn refers to the next
- * previous special token through its specialToken field, and so on
- * until the first special token (whose specialToken field is null).
- * The next fields of special tokens refer to other special tokens that
- * immediately follow it (without an intervening regular token). If there
- * is no such token, this field is null.
- */
- public Token specialToken;
-
- /**
- * Returns the image.
- */
- public String toString()
- {
- return image;
- }
-
- /**
- * Returns a new Token object, by default. However, if you want, you
- * can create and return subclass objects based on the value of ofKind.
- * Simply add the cases to the switch for all those special cases.
- * For example, if you have a subclass of Token called IDToken that
- * you want to create if ofKind is ID, simlpy add something like :
- *
- * case MyParserConstants.ID : return new IDToken();
- *
- * to the following switch statement. Then you can cast matchedToken
- * variable to the appropriate type and use it in your lexical actions.
- */
- public static final Token newToken(int ofKind)
- {
- switch(ofKind)
- {
- default : return new Token();
- }
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/TokenMgrError.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/TokenMgrError.java
deleted file mode 100644
index 1a53dc2638..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/TokenMgrError.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class TokenMgrError extends Error
-{
- /*
- * Ordinals for various reasons why an Error of this type can be thrown.
- */
-
- /**
- * Default <code>serialVersionUID</code>
- */
- private static final long serialVersionUID = 1L;
-
-/**
- * Lexical error occured.
- */
- static final int LEXICAL_ERROR = 0;
-
- /**
- * An attempt wass made to create a second instance of a static token manager.
- */
- static final int STATIC_LEXER_ERROR = 1;
-
- /**
- * Tried to change to an invalid lexical state.
- */
- static final int INVALID_LEXICAL_STATE = 2;
-
- /**
- * Detected (and bailed out of) an infinite loop in the token manager.
- */
- static final int LOOP_DETECTED = 3;
-
- /**
- * Indicates the reason why the exception is thrown. It will have
- * one of the above 4 values.
- */
- int errorCode;
-
- /**
- * Replaces unprintable characters by their espaced (or unicode escaped)
- * equivalents in the given string
- */
- protected static final String addEscapes(String str) {
- StringBuffer retval = new StringBuffer();
- char ch;
- for (int i = 0; i < str.length(); i++) {
- switch (str.charAt(i))
- {
- case 0 :
- continue;
- case '\b':
- retval.append("\\b");
- continue;
- case '\t':
- retval.append("\\t");
- continue;
- case '\n':
- retval.append("\\n");
- continue;
- case '\f':
- retval.append("\\f");
- continue;
- case '\r':
- retval.append("\\r");
- continue;
- case '\"':
- retval.append("\\\"");
- continue;
- case '\'':
- retval.append("\\\'");
- continue;
- case '\\':
- retval.append("\\\\");
- continue;
- default:
- if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- String s = "0000" + Integer.toString(ch, 16);
- retval.append("\\u" + s.substring(s.length() - 4, s.length()));
- } else {
- retval.append(ch);
- }
- continue;
- }
- }
- return retval.toString();
- }
-
- /**
- * Returns a detailed message for the Error when it is thrown by the
- * token manager to indicate a lexical error.
- * Parameters :
- * EOFSeen : indicates if EOF caused the lexicl error
- * curLexState : lexical state in which this error occured
- * errorLine : line number when the error occured
- * errorColumn : column number when the error occured
- * errorAfter : prefix that was seen before this error occured
- * curchar : the offending character
- * Note: You can customize the lexical error message by modifying this method.
- */
- protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {
- return("Lexical error at line " +
- errorLine + ", column " +
- errorColumn + ". Encountered: " +
- (EOFSeen ? "<EOF> " : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " (" + (int)curChar + "), ") +
- "after : \"" + addEscapes(errorAfter) + "\"");
- }
-
- /**
- * You can also modify the body of this method to customize your error messages.
- * For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE are not
- * of end-users concern, so you can return something like :
- *
- * "Internal Error : Please file a bug report .... "
- *
- * from this method for such cases in the release version of your parser.
- */
- public String getMessage() {
- return super.getMessage();
- }
-
- /*
- * Constructors of various flavors follow.
- */
-
- public TokenMgrError() {
- }
-
- public TokenMgrError(String message, int reason) {
- super(message);
- errorCode = reason;
- }
-
- public TokenMgrError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar, int reason) {
- this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar), reason);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixparser.sed b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixparser.sed
deleted file mode 100644
index 1aa5e62fec..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixparser.sed
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/sed
-
-#
-# The SSE generally uses compiler setting to turn most warnings into errors.
-# This is a little problematic for JavaCC generated files. We don't want
-# to distribute a customized version of JavaCC nor is there any "template"
-# mechanism. So, this simple sed script goes through the generated token
-# manager and fixes a few things. If JavaCC changes the generated code,
-# it's likely that this script will no longer do the right thing. Ditto with
-# any version of JavaCC besides 3.2. Also, there's no guarantee that this
-# script will even work with an arbitrary JavaCC grammar. It's only been tested
-# with the current JSP EL grammar.
-#
-# Author: Ted A. Carroll (tcarroll@bea.com)
-#
-
-s/static private final class LookaheadSuccess extends java.lang.Error { }/static private final class LookaheadSuccess extends java.lang.Error { \n private static final long serialVersionUID = 1L; \n }/g
-
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixtm.sed b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixtm.sed
deleted file mode 100644
index 5c1dea401e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/fixtm.sed
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/sed
-
-#
-# The SSE generally uses compiler setting to turn most warnings into errors.
-# This is a little problematic for JavaCC generated files. We don't want
-# to distribute a customized version of JavaCC nor is there any "template"
-# mechanism. So, this simple sed script goes through the generated token
-# manager and fixes a few things. If JavaCC changes the generated code,
-# it's likely that this script will no longer do the right thing. Ditto with
-# any version of JavaCC besides 3.2. Also, there's no guarantee that this
-# script will even work with an arbitrary JavaCC grammar. It's only been tested
-# with the current JSP EL grammar.
-#
-# Author: Ted A. Carroll (tcarroll@bea.com)
-#
-
-s/(int)(curChar >> 8)/curChar >> 8/g
-
-/^public Token getNextToken()/, /EOFLoop/{
- /int kind;/ {d}
- /Token specialToken = null;/{d}
-}
-
-/^private final int jjMoveNfa_0(int startState, int curPos)/, /for(;;)/{
- s/int j, kind = 0x7fffffff;/int kind = 0x7fffffff;/g
- /int\[\] nextStates;/{d}
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/go.sh b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/go.sh
deleted file mode 100644
index b3d5aaa43c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/go.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/sh
-
-# Set JAVACC_HOME to the installation directory of javacc 3.2
-$JAVACC_HOME/bin/jjtree.bat JSPEL.jjt
-$JAVACC_HOME/bin/javacc.bat JSPEL.jj
-sed -f fixtm.sed -i.bak JSPELParserTokenManager.java
-diff -w JSPELParserTokenManager.java JSPELParserTokenManager.java.bak
-sed -f fixparser.sed -i.bak JSPELParser.java
-diff -w JSPELParser.java JSPELParser.java.bak
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java
deleted file mode 100644
index 7b9ac0dc44..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/IndexWorkspaceJob.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.search;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceProxy;
-import org.eclipse.core.resources.IResourceProxyVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-
-/**
- * Re-indexes the entire workspace.
- * Ensures the JSP Index is in a stable state before performing a search.
- * (like after a crash or if previous indexing was canceled)
- *
- * @author pavery
- */
-public class IndexWorkspaceJob extends Job {
-
- // for debugging
- static final boolean DEBUG;
- static {
- String value= Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspindexmanager"); //$NON-NLS-1$
- DEBUG= value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- /**
- * Visitor that retrieves jsp project paths for all jsp files in the workspace,
- * and adds the files to be indexed as they are encountered
- */
- private class JSPFileVisitor implements IResourceProxyVisitor {
- private List files = new ArrayList();
-
- // monitor from the Job
- IProgressMonitor fInnerMonitor = null;
- public JSPFileVisitor(IProgressMonitor monitor) {
- this.fInnerMonitor = monitor;
- }
-
- public boolean visit(IResourceProxy proxy) throws CoreException {
-
- // check job canceled
- if (this.fInnerMonitor != null && this.fInnerMonitor.isCanceled()) {
- setCanceledState();
- return false;
- }
-
- // check search support canceled
- if(JSPSearchSupport.getInstance().isCanceled()) {
- setCanceledState();
- return false;
- }
-
- if (proxy.getType() == IResource.FILE) {
-
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3553
- // check this before description
- // check name before actually getting the file (less work)
- if(getJspContentType().isAssociatedWith(proxy.getName())) {
- IFile file = (IFile) proxy.requestResource();
- if(file.exists()) {
-
- if(DEBUG)
- System.out.println("(+) IndexWorkspaceJob adding file: " + file.getName()); //$NON-NLS-1$
- // this call will check the ContentTypeDescription, so don't need to do it here.
- //JSPSearchSupport.getInstance().addJspFile(file);
- this.files.add(file);
- this.fInnerMonitor.subTask(proxy.getName());
-
- // don't search deeper for files
- return false;
- }
- }
- }
- return true;
- }
-
- public final IFile[] getFiles() {
- return (IFile[])this.files.toArray(new IFile[this.files.size()]);
- }
- }
-
- private IContentType fContentTypeJSP = null;
-
- public IndexWorkspaceJob() {
- // pa_TODO may want to say something like "Rebuilding JSP Index" to be more
- // descriptive instead of "Updating JSP Index" since they are 2 different things
- super(JSPCoreMessages.JSPIndexManager_0);
- setPriority(Job.LONG);
- setSystem(true);
- }
-
- IContentType getJspContentType() {
- if(this.fContentTypeJSP == null)
- this.fContentTypeJSP = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- return this.fContentTypeJSP;
- }
-
- /**
- * @see org eclipse.core.internal.jobs.InternalJob#run(org.eclipse.core.runtime.IProgressMonitor)
- * for similar method
- */
- protected IStatus run(IProgressMonitor monitor) {
-
- IStatus status = Status.OK_STATUS;
-
- if(monitor.isCanceled()) {
- setCanceledState();
- return Status.CANCEL_STATUS;
- }
-
- if(DEBUG)
- System.out.println(" ^ IndexWorkspaceJob started: "); //$NON-NLS-1$
-
- long start = System.currentTimeMillis();
-
- try {
- JSPFileVisitor visitor = new JSPFileVisitor(monitor);
- // collect all jsp files
- ResourcesPlugin.getWorkspace().getRoot().accept(visitor, IResource.DEPTH_INFINITE);
- // request indexing
- // this is pretty much like faking an entire workspace resource delta
- JSPIndexManager.getInstance().indexFiles(visitor.getFiles());
- }
- catch (CoreException e) {
- if(DEBUG)
- e.printStackTrace();
- }
- finally {
- if(monitor != null)
- monitor.done();
- }
- long finish = System.currentTimeMillis();
- if(DEBUG)
- System.out.println(" ^ IndexWorkspaceJob finished\n total time running: " + (finish - start)); //$NON-NLS-1$
-
- return status;
- }
-
- void setCanceledState() {
- JSPIndexManager.getInstance().setIndexState(JSPIndexManager.S_CANCELED);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java
deleted file mode 100644
index e3bfbed3ff..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java
+++ /dev/null
@@ -1,722 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.search;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.jobs.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jdt.internal.core.JavaModelManager;
-import org.eclipse.jdt.internal.core.index.Index;
-import org.eclipse.jdt.internal.core.search.indexing.IndexManager;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.Bundle;
-
-/**
- * Responsible for keeping the JSP index up to date.
- *
- * @author pavery
- */
-public class JSPIndexManager {
-
- // for debugging
- // TODO move this to Logger, as we have in SSE
- static final boolean DEBUG;
- static {
- String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspindexmanager"); //$NON-NLS-1$
- DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- private static final String PKEY_INDEX_STATE = "jspIndexState"; //$NON-NLS-1$
-
- private IndexWorkspaceJob indexingJob = new IndexWorkspaceJob();
-
-
-
- // TODO: consider enumeration for these int constants
- // set to S_UPDATING once a resource change comes in
- // set to S_STABLE if:
- // - we know we aren't interested in the resource change
- // - or the ProcessFilesJob completes
- // set to S_CANCELED if an indexing job is canceled
- // set to S_REBUILDING if re-indexing the entire workspace
-
- // the int '0' is reserved for the default value if a preference is not
- // there
- /** index is reliable to use */
- public static final int S_STABLE = 1;
- /** index is being updated (from a resource delta) */
- public static final int S_UPDATING = 2;
- /** entire index is being rebuilt */
- public static final int S_REBUILDING = 3;
- /**
- * indexing job was canceled in the middle of it, index needs to be
- * rebuilt
- */
- public static final int S_CANCELED = 4;
-
- /** symbolic name for OSGI framework */
- private final String OSGI_FRAMEWORK_ID = "org.eclipse.osgi"; //$NON-NLS-1$
-
- /**
- * Collects JSP files from a resource delta.
- */
- private class JSPResourceVisitor implements IResourceDeltaVisitor {
- // using hash map ensures only one of each file
- // must be reset before every use
- private HashMap jspFiles = null;
-
- public JSPResourceVisitor() {
- this.jspFiles = new HashMap();
- }
-
- public boolean visit(IResourceDelta delta) throws CoreException {
-
- // in case JSP search was canceled (eg. when closing the editor)
- if (JSPSearchSupport.getInstance().isCanceled() || frameworkIsShuttingDown()) {
- setCanceledState();
- return false;
- }
-
- try {
- if (!isHiddenResource(delta.getFullPath())) {
-
- int kind = delta.getKind();
- boolean added = (kind & IResourceDelta.ADDED) == IResourceDelta.ADDED;
- boolean isInterestingChange = false;
- if ((kind & IResourceDelta.CHANGED) == IResourceDelta.CHANGED) {
- int flags = delta.getFlags();
- // ignore things like marker changes
- isInterestingChange = (flags & IResourceDelta.CONTENT) == IResourceDelta.CONTENT || (flags & IResourceDelta.REPLACED) == IResourceDelta.REPLACED;
- }
- boolean removed = (kind & IResourceDelta.REMOVED) == IResourceDelta.REMOVED;
- if (added || isInterestingChange) {
-
- visitAdded(delta);
- }
- else if (removed) {
- visitRemoved(delta);
- }
- }
- }
- catch (Exception e) {
- // need to set state here somehow, and reindex
- // otherwise index will be unreliable
- if (DEBUG)
- Logger.logException("Delta analysis may not be complete", e); //$NON-NLS-1$
- }
- // if the delta has children, continue to add/remove files
- return true;
- }
-
- private void visitRemoved(IResourceDelta delta) {
- // handle cleanup
- if (delta.getResource() != null) {
- IResource r = delta.getResource();
- if (r.getType() == IResource.FOLDER && r.exists()) {
- deleteIndex((IFile) r);
- }
- }
- }
-
- private void visitAdded(IResourceDelta delta) {
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3553
- // quick check if it's even JSP related to improve
- // performance
- // checking name from the delta before getting
- // resource because it's lighter
- int numSegments = delta.getFullPath().segmentCount();
- String filename = delta.getFullPath().segment(numSegments - 1);
- if (getJspContentType().isAssociatedWith(filename)) {
- IResource r = delta.getResource();
- if (r != null && r.exists() && r.getType() == IResource.FILE) {
- this.jspFiles.put(r.getFullPath(), r);
- }
- }
- }
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=93463
- private boolean isHiddenResource(IPath p) {
- String[] segments = p.segments();
- for (int i = 0; i < segments.length; i++) {
- if (segments[i].startsWith(".")) //$NON-NLS-1$
- return true;
- }
- return false;
- }
-
- private void deleteIndex(IFile folder) {
- // cleanup index
- IndexManager im = JavaModelManager.getJavaModelManager().getIndexManager();
- IPath folderPath = folder.getFullPath();
- IPath indexLocation = JSPSearchSupport.getInstance().computeIndexLocation(folderPath);
- im.removeIndex(indexLocation);
- // im.indexLocations.removeKey(folderPath);
- // im.indexLocations.removeValue(indexLocation);
- File f = indexLocation.toFile();
- f.delete();
- }
-
- public IFile[] getFiles() {
- return (IFile[]) this.jspFiles.values().toArray(new IFile[this.jspFiles.size()]);
- }
-
- public void reset() {
- this.jspFiles.clear();
- }
- }
-
- // end class JSPResourceVisitor
-
- /**
- * schedules JSP files for indexing by Java core
- */
- private class ProcessFilesJob extends Job {
- List fileList = null;
- // keep track of how many files we've indexed
- int lastFileCursor = 0;
-
- ProcessFilesJob(String taskName) {
- super(taskName);
- fileList = new ArrayList();
- }
-
- synchronized void process(IFile[] files) {
- for (int i = 0; i < files.length; i++) {
- fileList.add(files[i]);
- }
- if (DEBUG) {
- System.out.println("JSPIndexManager queuing " + files.length + " files"); //$NON-NLS-2$ //$NON-NLS-1$
- }
- }
-
- synchronized IFile[] getFiles() {
- return (IFile[]) fileList.toArray(new IFile[fileList.size()]);
- }
-
- synchronized void clearFiles() {
- fileList.clear();
- lastFileCursor = 0;
- //System.out.println("cleared files");
- }
-
- protected IStatus run(IProgressMonitor monitor) {
- // System.out.println("indexer monitor" + monitor);
- if (isCanceled(monitor) || frameworkIsShuttingDown()) {
- setCanceledState();
- return Status.CANCEL_STATUS;
- }
-
- long start = System.currentTimeMillis();
-
- try {
- IFile[] filesToBeProcessed = getFiles();
-
- if (DEBUG) {
- System.out.println("JSPIndexManager indexing " + filesToBeProcessed.length + " files"); //$NON-NLS-2$ //$NON-NLS-1$
- }
- // API indicates that monitor is never null
- monitor.beginTask("", filesToBeProcessed.length); //$NON-NLS-1$
- JSPSearchSupport ss = JSPSearchSupport.getInstance();
- String processingNFiles = ""; //$NON-NLS-1$
-
-
- for (;lastFileCursor < filesToBeProcessed.length; lastFileCursor++) {
-
- if (isCanceled(monitor) || frameworkIsShuttingDown()) {
- setCanceledState();
- return Status.CANCEL_STATUS;
- }
- try {
- ss.addJspFile(filesToBeProcessed[lastFileCursor]);
- // JSP Indexer processing n files
- processingNFiles = NLS.bind(JSPCoreMessages.JSPIndexManager_2, new String[]{Integer.toString((filesToBeProcessed.length - lastFileCursor))});
- monitor.subTask(processingNFiles + " - " + filesToBeProcessed[lastFileCursor].getName()); //$NON-NLS-1$
- monitor.worked(1);
-
- if (DEBUG) {
- System.out.println("JSPIndexManager Job added file: " + filesToBeProcessed[lastFileCursor].getName()); //$NON-NLS-1$
- }
- }
- catch (Exception e) {
- // RATLC00284776
- // ISSUE: we probably shouldn't be catching EVERY
- // exception, but
- // the framework only allows to return IStatus in
- // order to communicate
- // that something went wrong, which means the loop
- // won't complete, and we would hit the same problem
- // the next time.
- //
- // a possible solution is to keep track of the
- // exceptions logged
- // and only log a certain amt of the same one,
- // otherwise skip it.
- if (!frameworkIsShuttingDown()) {
- String filename = filesToBeProcessed[lastFileCursor] != null ? filesToBeProcessed[lastFileCursor].getFullPath().toString() : ""; //$NON-NLS-1$
- Logger.logException("JSPIndexer problem indexing:" + filename, e); //$NON-NLS-1$
- }
- }
- } // end for
- }
- finally {
- // just in case something didn't follow API (monitor is null)
- if (monitor != null)
- monitor.done();
- }
-
- // successfully finished, clear files list
- clearFiles();
-
- long finish = System.currentTimeMillis();
- long diff = finish - start;
- if (DEBUG) {
- fTotalTime += diff;
- System.out.println("============================================================================"); //$NON-NLS-1$
- System.out.println("this time: " + diff + " cumulative time for resource changed: " + fTotalTime); //$NON-NLS-1$ //$NON-NLS-2$
- System.out.println("============================================================================"); //$NON-NLS-1$
- }
- return Status.OK_STATUS;
- }
-
- private boolean isCanceled(IProgressMonitor runMonitor) {
-
- boolean canceled = false;
- // check specific monitor passed into run method (the progress
- // group in this case)
- // check main search support canceled
- if (runMonitor != null && runMonitor.isCanceled())
- canceled = true;
- else if (JSPSearchSupport.getInstance().isCanceled()) {
- canceled = true;
- if (runMonitor != null) {
- runMonitor.setCanceled(true);
- }
- }
- return canceled;
- }
-
- }
-
- // end class ProcessFilesJob
-
- private static JSPIndexManager fSingleton = null;
- private boolean initialized;
- private boolean initializing = true;
-
- private IndexJobCoordinator indexJobCoordinator;
- private IResourceChangeListener jspResourceChangeListener;
-
- private JSPResourceVisitor fVisitor = null;
- private IContentType fContentTypeJSP = null;
-
- static long fTotalTime = 0;
-
- // Job for processing resource delta
- private ProcessFilesJob processFilesJob = null;
-
- private JSPIndexManager() {
- processFilesJob = new ProcessFilesJob(JSPCoreMessages.JSPIndexManager_0);
- // only show in verbose mode
- processFilesJob.setSystem(true);
- processFilesJob.setPriority(Job.LONG);
- processFilesJob.addJobChangeListener(new JobChangeAdapter() {
- public void done(IJobChangeEvent event) {
- super.done(event);
- setStableState();
- }
- });
- }
-
- public synchronized static JSPIndexManager getInstance() {
-
- if (fSingleton == null)
- fSingleton = new JSPIndexManager();
- return fSingleton;
- }
-
- public void initialize() {
-
- JSPIndexManager singleInstance = getInstance();
-
-
- if (!singleInstance.initialized) {
- singleInstance.initialized = true;
-
- singleInstance.indexJobCoordinator = new IndexJobCoordinator();
- singleInstance.jspResourceChangeListener = new JSPResourceChangeListener();
-
- // added as JobChange listener so JSPIndexManager can be smarter
- // about when it runs
- Platform.getJobManager().addJobChangeListener(singleInstance.indexJobCoordinator);
-
- // add JSPIndexManager to keep JSP Index up to date
- // listening for IResourceChangeEvent.PRE_DELETE and
- // IResourceChangeEvent.POST_CHANGE
- ResourcesPlugin.getWorkspace().addResourceChangeListener(jspResourceChangeListener, IResourceChangeEvent.POST_CHANGE);
-
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=5091
- // makes sure IndexManager is aware of our indexes
- saveIndexes();
- singleInstance.initializing = false;
-
- }
-
- }
-
- synchronized void setIndexState(int state) {
- if (DEBUG) {
- System.out.println("JSPIndexManager setting index state to: " + state2String(state)); //$NON-NLS-1$
- }
- Plugin jspModelPlugin = JSPCorePlugin.getDefault();
- jspModelPlugin.getPluginPreferences().setValue(PKEY_INDEX_STATE, state);
- jspModelPlugin.savePluginPreferences();
-
- }
-
- private String state2String(int state) {
- String s = "UNKNOWN"; //$NON-NLS-1$
- switch (state) {
- case (S_STABLE) :
- s = "S_STABLE"; //$NON-NLS-1$
- break;
- case (S_UPDATING) :
- s = "S_UPDATING"; //$NON-NLS-1$
- break;
- case (S_CANCELED) :
- s = "S_CANCELED"; //$NON-NLS-1$
- break;
- case (S_REBUILDING) :
- s = "S_REBUILDING"; //$NON-NLS-1$
- break;
- }
- return s;
- }
-
- int getIndexState() {
- return JSPCorePlugin.getDefault().getPluginPreferences().getInt(PKEY_INDEX_STATE);
- }
-
- void setUpdatingState() {
- //if (getIndexState() != S_CANCELED)
- setIndexState(S_UPDATING);
- }
-
- void setCanceledState() {
- setIndexState(JSPIndexManager.S_CANCELED);
- }
-
- void setStableState() {
- //if (getIndexState() != S_CANCELED)
- setIndexState(S_STABLE);
- }
-
- void setRebuildingState() {
- setIndexState(S_REBUILDING);
- }
-
- synchronized void rebuildIndexIfNeeded() {
- if (getIndexState() != S_STABLE) {
- rebuildIndex();
- }
- }
-
- void rebuildIndex() {
-
- if (DEBUG)
- System.out.println("*** JSP Index unstable, requesting re-indexing"); //$NON-NLS-1$
-
- getIndexingJob().addJobChangeListener(new JobChangeAdapter() {
- public void aboutToRun(IJobChangeEvent event) {
- super.aboutToRun(event);
- setRebuildingState();
- }
-
- public void done(IJobChangeEvent event) {
- super.done(event);
- setStableState();
- getIndexingJob().removeJobChangeListener(this);
- }
- });
- // we're about to reindex everything anyway
- getProcessFilesJob().clearFiles();
- getIndexingJob().schedule();
-
- }
-
- /**
- * Creates and schedules a Job to process collected files. All JSP
- * indexing should be done through this method or processFiles(IFile file)
- *
- * @param files
- */
- final void indexFiles(IFile[] files) {
- // don't use this rule
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=4931
- // processFiles.setRule(new IndexFileRule());
- processFilesJob.process(files);
- }
-
-
- /**
- * Package protected for access by inner Job class in resourceChanged(...)
- *
- * @return
- */
- JSPResourceVisitor getVisitor() {
-
- if (this.fVisitor == null) {
- this.fVisitor = new JSPResourceVisitor();
- }
- return this.fVisitor;
- }
-
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=5091
- // makes sure IndexManager is aware of our indexes
- void saveIndexes() {
- IndexManager indexManager = JavaModelManager.getJavaModelManager().getIndexManager();
- IPath jspModelWorkingLocation = JSPSearchSupport.getInstance().getModelJspPluginWorkingLocation();
-
- File folder = new File(jspModelWorkingLocation.toOSString());
- String[] files = folder.list();
- String locay = ""; //$NON-NLS-1$
- Index index = null;
- try {
- for (int i = 0; i < files.length; i++) {
- if (files[i].toLowerCase().endsWith(".index")) { //$NON-NLS-1$
- locay = jspModelWorkingLocation.toString() + "/" + files[i]; //$NON-NLS-1$
- // reuse index file
- index = new Index(locay, "Index for " + locay, true); //$NON-NLS-1$
- indexManager.saveIndex(index);
- }
- }
- }
- catch (Exception e) {
- // we should be shutting down, want to shut down quietly
- if (DEBUG)
- e.printStackTrace();
- }
- }
-
- IContentType getJspContentType() {
- if (this.fContentTypeJSP == null)
- this.fContentTypeJSP = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- return this.fContentTypeJSP;
- }
-
- /**
- * A check to see if the OSGI framework is shutting down.
- *
- * @return true if the System Bundle is stopped (ie. the framework is
- * shutting down)
- */
- boolean frameworkIsShuttingDown() {
- // in the Framework class there's a note:
- // set the state of the System Bundle to STOPPING.
- // this must be done first according to section 4.19.2 from the OSGi
- // R3 spec.
- boolean shuttingDown = Platform.getBundle(OSGI_FRAMEWORK_ID).getState() == Bundle.STOPPING;
- if (DEBUG && shuttingDown) {
- System.out.println("JSPIndexManager: system is shutting down!"); //$NON-NLS-1$
- }
- return shuttingDown;
- }
-
-
- public void shutdown() {
-
- // stop listening
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(jspResourceChangeListener);
-
-
- // stop any searching
- JSPSearchSupport.getInstance().setCanceled(true);
-
- // stop listening to jobs
- Platform.getJobManager().removeJobChangeListener(indexJobCoordinator);
-
-
- int maxwait = 5000;
- if (processFilesJob != null) {
- processFilesJob.cancel();
- }
- // attempt to make sure this indexing job is litterally
- // done before continuing, since we are shutting down
- waitTillNotRunning(maxwait, processFilesJob);
-
- if (indexingJob != null) {
- indexingJob.cancel();
- }
- waitTillNotRunning(maxwait, processFilesJob);
- }
-
- private void waitTillNotRunning(int maxSeconds, Job job) {
- int pauseTime = 10;
- int maxtries = maxSeconds / pauseTime;
- int count = 0;
- while (count++ < maxtries && job.getState() == Job.RUNNING) {
- try {
- Thread.sleep(pauseTime);
- // System.out.println("count: " + count + " max: " +
- // maxtries);
- }
- catch (InterruptedException e) {
- Logger.logException(e);
- }
- }
- }
-
- private class IndexJobCoordinator extends JobChangeAdapter {
-
- public void aboutToRun(IJobChangeEvent event) {
- Job jobToCoordinate = event.getJob();
- if (isJobToAvoid(jobToCoordinate)) {
- // job will be rescheduled when the job we
- // are avoiding (eg. build) is done
- getProcessFilesJob().cancel();
- //System.out.println("cancel:" + jobToCoordinate.getName());
- }
- }
-
- public void done(IJobChangeEvent event) {
-
- Job jobToCoordinate = event.getJob();
- if (isJobToAvoid(jobToCoordinate)) {
- if (getProcessFilesJob().getFiles().length > 0) {
- getProcessFilesJob().schedule(500);
- //System.out.println("schedule:" + jobToCoordinate.getName());
- }
-
-
- }
- }
-
- private boolean isJobToAvoid(Job jobToCoordinate) {
- boolean result = false;
- if (jobToCoordinate.belongsTo(ResourcesPlugin.FAMILY_AUTO_BUILD) || jobToCoordinate.belongsTo(ResourcesPlugin.FAMILY_MANUAL_BUILD) || jobToCoordinate.belongsTo(ResourcesPlugin.FAMILY_AUTO_REFRESH)) {
- result = true;
- }
- return result;
-
- }
-
- }
-
- private class JSPResourceChangeListener implements IResourceChangeListener {
-
-
- /**
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
-
- if (isInitializing())
- return;
-
- // ignore resource changes if already rebuilding
- if (getIndexState() == S_REBUILDING)
- return;
- // previously canceled, needs entire index rebuild
- if (getIndexState() == S_CANCELED) {
- // rebuildIndex();
- // just resume indexing
- getProcessFilesJob().schedule(500);
- //System.out.println("schedule: resource changed, previously canceled");
- return;
- }
-
- IResourceDelta delta = event.getDelta();
- if (delta != null) {
- // only care about adds or changes right now...
- int kind = delta.getKind();
- boolean added = (kind & IResourceDelta.ADDED) == IResourceDelta.ADDED;
- boolean changed = (kind & IResourceDelta.CHANGED) == IResourceDelta.CHANGED;
- if (added || changed) {
-
- // only analyze the full (starting at root) delta
- // hierarchy
- if (delta.getFullPath().toString().equals("/")) { //$NON-NLS-1$
- try {
- JSPResourceVisitor v = getVisitor();
- // clear from last run
- v.reset();
- // count files, possibly do this in a job too...
- // don't include PHANTOM resources
- delta.accept(v, false);
-
- // process files from this delta
- IFile[] files = v.getFiles();
- if (files.length > 0) {
- /*
- * Job change listener should set back to
- * stable when finished
- */
- setUpdatingState();
- // processFiles(files);
- indexFiles(files);
- }
- }
- catch (CoreException e) {
- // need to set state here somehow, and reindex
- // otherwise index will be unreliable
- if (DEBUG)
- Logger.logException(e);
- }
- catch (Exception e) {
- // need to set state here somehow, and reindex
- // otherwise index will be unreliable
- if (DEBUG)
- Logger.logException(e);
- }
- }
- }
-
- }
- }
-
- }
-
- IndexWorkspaceJob getIndexingJob() {
- return indexingJob;
- }
-
- ProcessFilesJob getProcessFilesJob() {
- return processFilesJob;
- }
-
- boolean isInitializing() {
- return initializing;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPPathIndexer.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPPathIndexer.java
deleted file mode 100644
index 3919f96c37..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPPathIndexer.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.search;
-
-import java.util.HashMap;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceProxy;
-import org.eclipse.core.resources.IResourceProxyVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-import org.eclipse.jdt.core.search.SearchPattern;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-
-/**
- * pa_TODO Still need to take into consideration:
- * - focus in workspace
- * - search pattern
- *
- * @author pavery
- */
-public class JSPPathIndexer {
-
- // for debugging
- static final boolean DEBUG;
- static {
- String value= Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspsearch"); //$NON-NLS-1$
- DEBUG= value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- // visitor that retrieves jsp project paths for all jsp files in the workspace
- class JSPFileVisitor implements IResourceProxyVisitor {
- // hash map forces only one of each file
- private HashMap fPaths = new HashMap();
- IJavaSearchScope fScope = null;
- SearchPattern fPattern = null;
-
- public JSPFileVisitor(SearchPattern pattern, IJavaSearchScope scope) {
- this.fPattern = pattern;
- this.fScope = scope;
- }
-
- public boolean visit(IResourceProxy proxy) throws CoreException {
-
- if(JSPSearchSupport.getInstance().isCanceled())
- return false;
-
- if (proxy.getType() == IResource.FILE) {
-
- IContentType contentTypeJSP = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3553
- // check this before description
- // check name before actually getting the file (less work)
- if(contentTypeJSP.isAssociatedWith(proxy.getName())) {
-
- IFile file = (IFile)proxy.requestResource();
- IContentDescription contentDescription = file.getContentDescription();
- String ctId = null;
- if (contentDescription != null) {
- ctId = contentDescription.getContentType().getId();
- }
- if (ContentTypeIdForJSP.ContentTypeID_JSP.equals(ctId)) {
- if (this.fScope.encloses(proxy.requestFullPath().toString())) {
-
- if (DEBUG)
- System.out.println("adding selected index path:" + file.getParent().getFullPath()); //$NON-NLS-1$
-
- fPaths.put(file.getParent().getFullPath(), JSPSearchSupport.getInstance().computeIndexLocation(file.getParent().getFullPath()));
- }
- }
- }
- // don't search deeper for files
- return false;
- }
- return true;
- }
-
- public IPath[] getPaths() {
- return (IPath[]) fPaths.values().toArray(new IPath[fPaths.size()]);
- }
- }
-
- public IPath[] getVisibleJspPaths(SearchPattern pattern, IJavaSearchScope scope) {
-
- JSPFileVisitor jspFileVisitor = new JSPFileVisitor(pattern, scope);
- try {
- ResourcesPlugin.getWorkspace().getRoot().accept(jspFileVisitor, 0);
- }
- catch (CoreException e) {
- e.printStackTrace();
- }
- return jspFileVisitor.getPaths();
- }
-}
-
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchDocument.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchDocument.java
deleted file mode 100644
index 78a7f81397..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchDocument.java
+++ /dev/null
@@ -1,258 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.search;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.search.SearchParticipant;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.java.IJSPTranslation;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapter;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapterFactory;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslationExtension;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.exceptions.UnsupportedCharsetExceptionWithDetail;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-
-/**
- * Created with a .jsp file, but should appear to be a .java file for indexing
- * and searching purposes. There are purposely few fields in this class, and
- * those fields are lightweight since it's possible for many JSP search
- * documents to exist in memory at one time (eg. after importing a project
- * with a large number of JSP files)
- *
- * @author pavery
- */
-public class JSPSearchDocument {
-
- private String UNKNOWN_PATH = "**path unknown**"; //$NON-NLS-1$
- private String fJSPPathString = UNKNOWN_PATH;
- private String fCUPath = UNKNOWN_PATH;
- private SearchParticipant fParticipant = null;
- private long fLastModifiedStamp;
- private char[] fCachedCharContents;
-
- /**
- * @param file
- * @param participant
- * @throws CoreException
- */
- public JSPSearchDocument(String filePath, SearchParticipant participant) {
-
- this.fJSPPathString = filePath;
- this.fParticipant = participant;
- }
-
- public SearchParticipant getParticipant() {
- return this.fParticipant;
- }
-
- /**
- * @see org.eclipse.jdt.core.search.SearchDocument#getCharContents()
- */
- public char[] getCharContents() {
-
- if(fCachedCharContents == null || isDirty()) {
- JSPTranslation trans = getJSPTranslation();
- fCachedCharContents = trans != null ? trans.getJavaText().toCharArray() : new char[0];
- fCUPath = trans.getJavaPath();
- }
- return fCachedCharContents;
- }
-
- public String getJavaText() {
- return new String(getCharContents());
- }
-
- private IModelManager getModelManager() {
- return StructuredModelManager.getModelManager();
- }
-
- /**
- * It's not recommended for clients to hold on to this JSPTranslation
- * since it's kind of large. If possible, hold on to the
- * JSPSearchDocument, which is more of a lightweight proxy.
- *
- * @return the JSPTranslation for the jsp file, or null if it's an
- * unsupported file.
- */
- public final JSPTranslationExtension getJSPTranslation() {
- JSPTranslationExtension translation = null;
- IFile jspFile = getFile();
- if (!JSPSearchSupport.isJsp(jspFile))
- return translation;
-
- IStructuredModel model = null;
- try {
- // get existing model for read, then get document from it
- IModelManager modelManager = getModelManager();
- if (modelManager != null) {
- jspFile.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
- model = modelManager.getModelForRead(jspFile);
- }
- // handle unsupported
- if (model instanceof IDOMModel) {
- IDOMModel xmlModel = (IDOMModel)model;
- setupAdapterFactory(xmlModel);
- IDOMDocument doc = xmlModel.getDocument();
- JSPTranslationAdapter adapter = (JSPTranslationAdapter) doc.getAdapterFor(IJSPTranslation.class);
- translation = adapter.getJSPTranslation();
- }
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- catch (UnsupportedCharsetExceptionWithDetail e) {
- // no need to log this. Just consider it an invalid file for our
- // purposes.
- // Logger.logException(e);
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- return translation;
- }
-
- /**
- * add the factory for JSPTranslationAdapter here
- *
- * @param sm
- */
- private void setupAdapterFactory(IStructuredModel sm) {
- JSPTranslationAdapterFactory factory = new JSPTranslationAdapterFactory();
- sm.getFactoryRegistry().addFactory(factory);
- }
-
- /**
- * the path to the Java compilation unit
- *
- * @see org.eclipse.jdt.core.search.SearchDocument#getPath()
- */
- public String getPath() {
- // caching the path since it's expensive to get translation
- // important that isDirty() check is second to cache modification stamp
- if(this.fCUPath == null || isDirty() || this.fCUPath == UNKNOWN_PATH) {
- JSPTranslation trans = getJSPTranslation();
- if(trans != null) {
- this.fCUPath = trans.getJavaPath();
- // save since it's expensive to calculate again later
- fCachedCharContents = trans.getJavaText().toCharArray();
- }
- }
- return fCUPath != null ? fCUPath : UNKNOWN_PATH;
- }
-
- public int getJspOffset(int javaOffset) {
- // copied from JSPTranslation
- int result = -1;
- int offsetInRange = 0;
- Position jspPos, javaPos = null;
- JSPTranslation trans = getJSPTranslation();
- if (trans != null) {
- HashMap java2jspMap = trans.getJava2JspMap();
-
- // iterate all mapped java ranges
- Iterator it = java2jspMap.keySet().iterator();
- while (it.hasNext()) {
- javaPos = (Position) it.next();
- // need to count the last position as included
- if (!javaPos.includes(javaOffset) && !(javaPos.offset + javaPos.length == javaOffset))
- continue;
-
- offsetInRange = javaOffset - javaPos.offset;
- jspPos = (Position) java2jspMap.get(javaPos);
-
- if (jspPos != null)
- result = jspPos.offset + offsetInRange;
- else {
- Logger.log(Logger.ERROR, "jspPosition was null!" + javaOffset); //$NON-NLS-1$
- }
- break;
- }
- }
- return result;
- }
-
- public IFile getFile() {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IPath jspPath = new Path(this.fJSPPathString);
- IFile jspFile = root.getFile(jspPath);
- if (!jspFile.exists()) {
- // possibly outside workspace
- jspFile = root.getFileForLocation(jspPath);
- }
- return jspFile;
- }
-
-
- private boolean isDirty() {
- boolean modified = false;
- IFile f = getFile();
- if(f != null) {
- long currentStamp = f.getModificationStamp();
- if(currentStamp != fLastModifiedStamp)
- modified = true;
- fLastModifiedStamp = currentStamp;
- }
- return modified;
- }
-
- public void release() {
- // nothing to do now since JSPTranslation is created on the fly
- }
-
- /**
- * for debugging
- */
- public String toString() {
- return "[JSPSearchDocument:" + this.fJSPPathString + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jdt.core.search.SearchDocument#getEncoding()
- */
- public String getEncoding() {
- // TODO Auto-generated method stub
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jdt.core.search.SearchDocument#getByteContents()
- */
- public byte[] getByteContents() {
- // TODO Auto-generated method stub
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchParticipant.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchParticipant.java
deleted file mode 100644
index 81a3d6849f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchParticipant.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.search;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-import org.eclipse.jdt.core.search.SearchDocument;
-import org.eclipse.jdt.core.search.SearchEngine;
-import org.eclipse.jdt.core.search.SearchParticipant;
-import org.eclipse.jdt.core.search.SearchPattern;
-import org.eclipse.jdt.core.search.SearchRequestor;
-
-/**
- * Integration of JSP w/ java search.
- *
- * @author pavery
- */
-public class JSPSearchParticipant extends SearchParticipant {
-
- // for debugging
- private static final boolean DEBUG = calculateValue();
-
- private static boolean calculateValue() {
- String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspsearch"); //$NON-NLS-1$
- boolean debug = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- return debug;
- }
-
- /**
- * Important to never return null here or else Java search participation
- * will break.
- */
- public SearchDocument getDocument(String documentPath) {
- SearchDocument sDoc = JSPSearchSupport.getInstance().getSearchDocument(documentPath);
-
- if (sDoc == null) {
- // return a dummy doc here so search participation doesn't break
- return new NullSearchDocument(documentPath);
- }
- return sDoc;
- }
-
- public String getDescription() {
- return "JSP"; //$NON-NLS-1$
- }
-
- public IPath[] selectIndexes(SearchPattern pattern, IJavaSearchScope scope) {
- JSPPathIndexer indexer = new JSPPathIndexer();
- return indexer.getVisibleJspPaths(pattern, scope);
- }
-
- public void indexDocument(SearchDocument document, IPath indexPath) {
- if (!(document instanceof JavaSearchDocumentDelegate))
- return;
-
- // use Java search indexing
- SearchEngine.getDefaultSearchParticipant().indexDocument(document, indexPath);
- }
-
- public void locateMatches(SearchDocument[] indexMatches, SearchPattern pattern, IJavaSearchScope scope, SearchRequestor requestor, IProgressMonitor monitor) throws CoreException {
-
- if (monitor != null && monitor.isCanceled())
- return;
-
- // filter out null matches
- List filtered = new ArrayList();
- SearchDocument match = null;
- for (int i = 0; i < indexMatches.length; i++) {
- if (DEBUG)
- System.out.println("found possible matching JavaSearchDocumentDelegate: " + indexMatches[i]); //$NON-NLS-1$
- match = indexMatches[i];
- if (match != null) {
- // some matches may be null, or if the index is out of date,
- // the file may not even exist
- if (match instanceof JavaSearchDocumentDelegate && ((JavaSearchDocumentDelegate) match).getFile().exists())
- filtered.add(match);
- }
- }
-
- indexMatches = (SearchDocument[]) filtered.toArray(new SearchDocument[filtered.size()]);
- SearchEngine.getDefaultSearchParticipant().locateMatches(indexMatches, pattern, scope, requestor, monitor);
- }
-
- /**
- * @see org.eclipse.jdt.core.search.SearchParticipant#getDocument(org.eclipse.core.resources.IFile)
- */
- public SearchDocument getDocument(IFile file) {
- // never gets called?
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchScope.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchScope.java
deleted file mode 100644
index 49cc26de4f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchScope.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.search;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IResourceProxy;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-
-/**
- * Used to constrain JSP/java search to certain paths and elements.
- * @author pavery
- */
-public class JSPSearchScope implements IJavaSearchScope {
-
- private boolean fEnclosesAll = false;
- private List fResourcePaths = null;
- private List fJavaElements = null;
-
- public JSPSearchScope() {
- // empty constructor just returns true for everything
- // everything is in scope
- this.fEnclosesAll = true;
- init();
- }
-
- public JSPSearchScope(String[] resourceStringPath) {
- init();
- fResourcePaths.addAll(Arrays.asList(resourceStringPath));
- }
-
- public JSPSearchScope(IJavaElement[] javaElement) {
- init();
- fJavaElements.addAll(Arrays.asList(javaElement));
- }
-
- private void init() {
- this.fResourcePaths = new ArrayList();
- this.fJavaElements = new ArrayList();
- }
-
- public boolean encloses(String resourcePathString) {
-
- if (this.fEnclosesAll)
- return true;
- else if (enclosesPath(resourcePathString))
- return true;
-
- return false;
- }
-
- public boolean encloses(IJavaElement element) {
-
- // pa_TOD implement
- if (this.fEnclosesAll)
- return true;
-
- return true;
- }
-
- public boolean encloses(IResourceProxy element) {
-
- if (this.fEnclosesAll)
- return true;
- else if (enclosesPath(element.requestFullPath().toOSString()))
- return true;
-
- return true;
- }
-
- public void addPath(String path) {
- this.fResourcePaths.add(path);
- }
-
- public void addElement(IJavaElement element) {
- this.fJavaElements.add(element);
- }
-
- private boolean enclosesPath(String possible) {
-
- String[] paths = (String[]) fResourcePaths.toArray(new String[fResourcePaths.size()]);
- for (int i = 0; i < paths.length; i++) {
- if (possible.equals(paths[i]))
- return true;
- }
- return false;
- }
-
- public String getDescription() {
-
- return "JSPSearchScope"; //$NON-NLS-1$
- }
-
- public IPath[] enclosingProjectsAndJars() {
-
- // pa_TODO
- return null;
- }
-
- public boolean includesBinaries() {
- return false;
- }
-
- public boolean includesClasspaths() {
- return false;
- }
-
- public void setIncludesBinaries(boolean includesBinaries) {
- // do nothing
- }
-
- public void setIncludesClasspaths(boolean includesClasspaths) {
- // do nothing
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchSupport.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchSupport.java
deleted file mode 100644
index ce48e1a010..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchSupport.java
+++ /dev/null
@@ -1,542 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.search;
-
-import java.util.zip.CRC32;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.search.IJavaSearchConstants;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-import org.eclipse.jdt.core.search.SearchDocument;
-import org.eclipse.jdt.core.search.SearchEngine;
-import org.eclipse.jdt.core.search.SearchPattern;
-import org.eclipse.jdt.core.search.SearchRequestor;
-import org.eclipse.jdt.internal.core.JavaModelManager;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.java.JSP2ServletNameUtil;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-
-/**
- * Central access to java indexing and search. All contact between JDT indexing
- * and Searching should be done through here.
- *
- * Clients should access the methods of this class via the single instance via
- * <code>getInstance()</code>.
- *
- * @author pavery
- */
-public class JSPSearchSupport {
-
- // for debugging
- static final boolean DEBUG;
- static {
- String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspsearch"); //$NON-NLS-1$
- DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- private static JSPSearchSupport singleton = null;
-
- private JSPSearchParticipant fParticipant = null;
-
- private IPath fJspPluginLocation = null;
-
- // pa_TODO may be slow (esp for indexing entire workspace)
- private final CRC32 fChecksumCalculator = new CRC32();
-
- /** main cancel montior for all search support */
- private final IProgressMonitor fMonitor = new NullProgressMonitor();
-
- private JSPSearchSupport() {
- // force use of single instance
- }
-
- /**
- * This operation ensures that the live resource's search markers show up in
- * the open editor. It also allows the ability to pass in a ProgressMonitor
- */
- private class SearchJob extends Job implements IJavaSearchConstants {
-
- String fSearchText = ""; //$NON-NLS-1$
-
- IJavaSearchScope fScope = null;
-
- int fSearchFor = FIELD;
-
- int fLimitTo = ALL_OCCURRENCES;
-
- int fMatchMode = SearchPattern.R_PATTERN_MATCH;
-
- boolean fIsCaseSensitive = false;
-
- SearchRequestor fRequestor = null;
-
- IJavaElement fElement = null;
-
- // constructor w/ java element
- public SearchJob(IJavaElement element, IJavaSearchScope scope, SearchRequestor requestor) {
-
- super(JSPCoreMessages.JSP_Search + element.getElementName());
- this.fElement = element;
- this.fScope = scope;
- this.fRequestor = requestor;
- }
-
- // constructor w/ search text
- public SearchJob(String searchText, IJavaSearchScope scope, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive, SearchRequestor requestor) {
-
- super(JSPCoreMessages.JSP_Search + searchText);
- this.fSearchText = searchText;
- this.fScope = scope;
- this.fSearchFor = searchFor;
- this.fLimitTo = limitTo;
- this.fMatchMode = matchMode;
- this.fIsCaseSensitive = isCaseSensitive;
- this.fRequestor = requestor;
- }
-
- public IStatus run(IProgressMonitor jobMonitor) {
-
- if (jobMonitor != null && jobMonitor.isCanceled())
- return Status.CANCEL_STATUS;
- if (JSPSearchSupport.getInstance().isCanceled())
- return Status.CANCEL_STATUS;
-
- SearchPattern javaSearchPattern = null;
- // if an element is available, use that to create search pattern
- // (eg. LocalVariable)
- // otherwise use the text and other paramters
- if (this.fElement != null)
- javaSearchPattern = SearchPattern.createPattern(this.fElement, this.fLimitTo);
- else
- javaSearchPattern = SearchPattern.createPattern(this.fSearchText, this.fSearchFor, this.fLimitTo, this.fMatchMode);
-
- if (javaSearchPattern != null) {
- JSPSearchParticipant[] participants = { getSearchParticipant() };
- SearchEngine engine = new SearchEngine();
- try {
- if (jobMonitor != null)
- jobMonitor.beginTask("", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
- engine.search(javaSearchPattern, participants, this.fScope, this.fRequestor, jobMonitor);
- } catch (CoreException e) {
- if (DEBUG)
- Logger.logException(e);
- }
- // non-CoreExceptions will permanently stall the Worker thread
- catch (Exception e) {
- if (DEBUG)
- Logger.logException(e);
- } finally {
- if (jobMonitor != null)
- jobMonitor.done();
- }
- }
- return Status.OK_STATUS;
- }
- }
-
- // end SearchJob
- /**
- * Runnable forces caller to wait until finished (as opposed to using a Job)
- */
- private class SearchRunnable implements IWorkspaceRunnable, IJavaSearchConstants {
-
- String fSearchText = ""; //$NON-NLS-1$
-
- IJavaSearchScope fScope = null;
-
- int fSearchFor = FIELD;
-
- int fLimitTo = ALL_OCCURRENCES;
-
- int fMatchMode = SearchPattern.R_PATTERN_MATCH;
-
- boolean fIsCaseSensitive = false;
-
- SearchRequestor fRequestor = null;
-
- IJavaElement fElement = null;
-
- // constructor w/ java element
- public SearchRunnable(IJavaElement element, IJavaSearchScope scope, SearchRequestor requestor) {
-
- this.fElement = element;
- this.fScope = scope;
- this.fRequestor = requestor;
- }
-
- // constructor w/ search text
- public SearchRunnable(String searchText, IJavaSearchScope scope, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive, SearchRequestor requestor) {
-
- this.fSearchText = searchText;
- this.fScope = scope;
- this.fSearchFor = searchFor;
- this.fLimitTo = limitTo;
- this.fMatchMode = matchMode;
- this.fIsCaseSensitive = isCaseSensitive;
- this.fRequestor = requestor;
- }
-
- public void run(IProgressMonitor monitor) throws CoreException {
-
- if (monitor != null && monitor.isCanceled())
- return;
- if (JSPSearchSupport.getInstance().isCanceled())
- return;
-
- SearchPattern javaSearchPattern = null;
- // if an element is available, use that to create search pattern
- // (eg. LocalVariable)
- // otherwise use the text and other paramters
- if (this.fElement != null)
- javaSearchPattern = SearchPattern.createPattern(this.fElement, fLimitTo);
- else
- javaSearchPattern = SearchPattern.createPattern(fSearchText, fSearchFor, fLimitTo, fMatchMode);
-
- if (javaSearchPattern != null) {
- JSPSearchParticipant[] participants = { getSearchParticipant() };
- SearchEngine engine = new SearchEngine();
- try {
- if (monitor != null)
- monitor.beginTask("", 0); //$NON-NLS-1$
- engine.search(javaSearchPattern, participants, fScope, fRequestor, monitor);
- } catch (CoreException e) {
- Logger.logException(e);
- //throw e;
- }
- // non-CoreExceptions will permanently stall the Worker thread
- catch (Exception e) {
- Logger.logException(e);
- } finally {
- if (monitor != null)
- monitor.done();
- }
- }
- }
- }
-
- // end SearchRunnable
-
- /**
- * Clients should access the methods of this class via the single instance
- * via getInstance()
- *
- * @return
- */
- public synchronized static JSPSearchSupport getInstance() {
-
- if (singleton == null)
- singleton = new JSPSearchSupport();
- return singleton;
- }
-
- /**
- * Utility method to check if a file is a jsp file (since this is done
- * frequently)
- */
- public static boolean isJsp(IFile file) {
- // (pa) 20051025 removing deep content type check
- // because this method is called frequently
- // and IO is expensive
- boolean isJsp = false;
-
- if (file != null && file.exists()) {
-
- IContentType contentTypeJSP = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- // check this before description, it's less expensive
- if (contentTypeJSP.isAssociatedWith(file.getName())) {
- isJsp = true;
- }
- }
-
- return isJsp;
- }
-
- /**
- * schedules a search document representing this JSP file for indexing (by
- * the java indexer)
- *
- * @param file
- * the JSP file
- * @return true if indexing was successful, false otherwise
- * @throws CoreException
- */
- public SearchDocument addJspFile(IFile file) {
- if (JSPSearchSupport.getInstance().isCanceled() || !file.isAccessible()) {
- return null;
- }
-
- if (DEBUG)
- System.out.println("adding JSP file:" + file.getFullPath()); //$NON-NLS-1$
-
- // create
- SearchDocument delegate = createSearchDocument(file);
- // null if not a jsp file
- if (delegate != null) {
- try {
- getSearchParticipant().scheduleDocumentIndexing(delegate, computeIndexLocation(file.getParent().getFullPath()));
- } catch (Exception e) {
- // ensure that failure here doesn't keep other documents from
- // being indexed
- // if peformed in a batch call (like JSPIndexManager)
- if (DEBUG)
- e.printStackTrace();
- }
- }
-
- if (DEBUG)
- System.out.println("scheduled" + delegate + "for indexing"); //$NON-NLS-1$ //$NON-NLS-2$
-
- return delegate;
- }
-
- /**
- * Perform a java search w/ the given parameters. Runs in a background Job
- * (results may still come in after this method call)
- *
- * @param searchText
- * the string of text to search on
- * @param searchFor
- * IJavaSearchConstants.TYPE, METHOD, FIELD, PACKAGE, etc...
- * @param limitTo
- * IJavaSearchConstants.DECLARATIONS,
- * IJavaSearchConstants.REFERENCES,
- * IJavaSearchConstants.IMPLEMENTORS, or
- * IJavaSearchConstants.ALL_OCCURRENCES
- * @param matchMode
- * allow * wildcards or not
- * @param isCaseSensitive
- * @param requestor
- * passed in to accept search matches (and do "something" with
- * them)
- */
- public void search(String searchText, IJavaSearchScope scope, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive, SearchRequestor requestor) {
-
- JSPIndexManager.getInstance().rebuildIndexIfNeeded();
-
- SearchJob job = new SearchJob(searchText, scope, searchFor, limitTo, matchMode, isCaseSensitive, requestor);
- setCanceled(false);
- job.setUser(true);
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=5032
- // pops up user operation blocked dialog if you perform a long search,
- // then open a file because it locks the workspace
- //job.setRule(ResourcesPlugin.getWorkspace().getRoot());
- job.schedule();
- }
-
- /**
- * Search for an IJavaElement, constrained by the given parameters. Runs in
- * a background Job (results may still come in after this method call)
- *
- * @param element
- * @param scope
- * @param requestor
- */
- public void search(IJavaElement element, IJavaSearchScope scope, SearchRequestor requestor) {
-
- JSPIndexManager.getInstance().rebuildIndexIfNeeded();
-
- SearchJob job = new SearchJob(element, scope, requestor);
- setCanceled(false);
- job.setUser(true);
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=5032
- //job.setRule(ResourcesPlugin.getWorkspace().getRoot());
- job.schedule();
- }
-
- /**
- * Search for an IJavaElement, constrained by the given parameters. Runs in
- * an IWorkspace runnable (results will be reported by the end of this
- * method)
- *
- * @param element
- * @param scope
- * @param requestor
- */
- public void searchRunnable(IJavaElement element, IJavaSearchScope scope, SearchRequestor requestor) {
-
- JSPIndexManager.getInstance().rebuildIndexIfNeeded();
-
- SearchRunnable searchRunnable = new SearchRunnable(element, scope, requestor);
- try {
- setCanceled(false);
- ResourcesPlugin.getWorkspace().run(searchRunnable, JSPSearchSupport.getInstance().getProgressMonitor());
- } catch (CoreException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * @param jspFile
- * @return SearchDocument if the file is not null, exists, and is a JSP
- * file, otherwise null.
- */
- private SearchDocument createSearchDocument(IFile jspFile) {
-
- JavaSearchDocumentDelegate delegate = null;
- if (jspFile != null && jspFile.exists() && isJsp(jspFile)) {
-
- delegate = new JavaSearchDocumentDelegate(new JSPSearchDocument(jspFile.getFullPath().toString(), getSearchParticipant()));
- }
- return delegate;
-
- }
-
- /**
- * Centralized place to access JSPSearchDocuments (used by
- * JSPSearchParticipant and JSPSearchRequestor)
- *
- * @param searchDocPath
- * @param doc
- * @return the JSPSearchDocument or null if one is not found
- */
- public SearchDocument getSearchDocument(String searchDocPath) {
-
- SearchDocument delegate = null;
- IFile f = fileForCUPath(searchDocPath);
- if (f != null) {
- delegate = createSearchDocument(f);
- } else {
- // handle failure case... (file deleted maybe?)
- }
- return delegate;
- }
-
- /**
- * Unmangles the searchDocPath and returns the corresponding JSP file.
- *
- * @param searchDocPath
- */
- private IFile fileForCUPath(String searchDocPath) {
-
- String[] split = searchDocPath.split("/"); //$NON-NLS-1$
- String classname = split[split.length - 1];
-
- // ignore anything but .java matches (like .class binary matches)
- if(!searchDocPath.endsWith(".java")) { //$NON-NLS-1$
- return null;
- }
-
- String filePath = JSP2ServletNameUtil.unmangle(classname);
-
- // try absolute path
- IFile f = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(filePath));
- // workspace relative then
- if(f == null) {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=86009
- // must have a project name as well
- // which would mean >= 2 path segments
- IPath path = new Path(filePath);
- if(path.segmentCount() >= 2) {
- f = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- }
- return f;
- }
-
- JSPSearchParticipant getSearchParticipant() {
-
- if (this.fParticipant == null)
- this.fParticipant = new JSPSearchParticipant();
- return this.fParticipant;
- }
-
- // This is called from JSPPathIndexer
- // pa_TODO
- //how can we make sure participant indexLocations are updated at startup?
- public final IPath computeIndexLocation(IPath containerPath) {
-
- String indexLocation = null;
- // we don't want to inadvertently use a JDT Index
- // we want to be sure to use the Index from the JSP location
- //Object obj = indexLocations.get(containerPath);
- //if (obj != null) {
- // indexLocation = (String) obj;
- //} else {
- // create index entry
- String pathString = containerPath.toOSString();
- this.fChecksumCalculator.reset();
- this.fChecksumCalculator.update(pathString.getBytes());
- String fileName = Long.toString(this.fChecksumCalculator.getValue()) + ".index"; //$NON-NLS-1$
- // this is the only difference from
- // IndexManager#computeIndexLocation(...)
- indexLocation = getModelJspPluginWorkingLocation().append(fileName).toOSString();
-
- // pa_TODO need to add to java path too, so JDT search support knows
- // there should be a non internal way to do this.
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=77564
- JavaModelManager.getJavaModelManager().getIndexManager().indexLocations.put(containerPath, indexLocation);
- //}
- return new Path(indexLocation);
- }
-
- // copied from JDT IndexManager
- public IPath getModelJspPluginWorkingLocation() {
-
- if (this.fJspPluginLocation != null)
- return this.fJspPluginLocation;
-
- IPath stateLocation = JSPCorePlugin.getDefault().getStateLocation();
-
- // pa_TODO workaround for
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=62267
- // copied from IndexManager
- String device = stateLocation.getDevice();
- if (device != null && device.charAt(0) == '/')
- stateLocation = stateLocation.setDevice(device.substring(1));
-
- return this.fJspPluginLocation = stateLocation;
- }
-
- /**
- * JSP Indexing and Search jobs check this
- *
- * @return
- */
- public synchronized final void setCanceled(boolean cancel) {
- //System.out.println("search support monitor" + fMonitor);
- fMonitor.setCanceled(cancel);
- }
-
- /**
- * JSP Indexing and Search jobs check this
- *
- * @return
- */
- public synchronized final boolean isCanceled() {
-
- return fMonitor.isCanceled();
- }
-
- /**
- * JSP Indexing and Search jobs check this
- *
- * @return
- */
- public final IProgressMonitor getProgressMonitor() {
-
- return this.fMonitor;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JavaSearchDocumentDelegate.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JavaSearchDocumentDelegate.java
deleted file mode 100644
index 83f13d1940..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JavaSearchDocumentDelegate.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.search;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jdt.core.search.SearchDocument;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslationExtension;
-
-
-/**
- * Wrapper method to set getPath() path to be the path of the compilation unit
- * for the jsp file. (since it's a final method, it needs to be set via constructor)
- *
- * @author pavery
- */
-public class JavaSearchDocumentDelegate extends SearchDocument {
-
- private JSPSearchDocument fJSPSearchDoc = null;
-
- public JavaSearchDocumentDelegate(JSPSearchDocument jspSearchDoc) {
-
- super(jspSearchDoc.getPath(), jspSearchDoc.getParticipant());
- this.fJSPSearchDoc = jspSearchDoc;
- }
-
- public byte[] getByteContents() {
-
- return this.fJSPSearchDoc.getByteContents();
- }
-
- public char[] getCharContents() {
-
- return this.fJSPSearchDoc.getCharContents();
- }
-
- public String getJavaText() {
- return this.fJSPSearchDoc.getJavaText();
- }
-
- public String getEncoding() {
-
- return this.fJSPSearchDoc.getEncoding();
- }
-
- public IFile getFile() {
-
- return this.fJSPSearchDoc.getFile();
- }
-
- public JSPTranslationExtension getJspTranslation() {
-
- return this.fJSPSearchDoc.getJSPTranslation();
- }
-
- public int getJspOffset(int javaOffset) {
-
- return this.fJSPSearchDoc.getJspOffset(javaOffset);
- }
-
- public void release() {
- this.fJSPSearchDoc.release();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/NullSearchDocument.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/NullSearchDocument.java
deleted file mode 100644
index ad99a1023d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/NullSearchDocument.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.search;
-
-import org.eclipse.jdt.core.search.SearchDocument;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslator;
-
-
-
-/**
- * An empty servlet, safe for Java search participation
- *
- * @author pavery
- */
-public class NullSearchDocument extends SearchDocument {
-
- StringBuffer fEmptyServletBuffer = null;
-
- public NullSearchDocument(String documentPath) {
- super(documentPath, new JSPSearchParticipant()); //$NON-NLS-1$
- this.fEmptyServletBuffer = new JSPTranslator().getEmptyTranslation();
- }
-
- public byte[] getByteContents() {
- return this.fEmptyServletBuffer.toString().getBytes();
- }
-
- public char[] getCharContents() {
- return this.fEmptyServletBuffer.toString().toCharArray();
- }
-
- public String getEncoding() {
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/EmbeddedTypeStateData.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/EmbeddedTypeStateData.java
deleted file mode 100644
index 87d76a4f08..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/EmbeddedTypeStateData.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.modelhandler;
-
-
-
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.EmbeddedTypeHandler;
-
-/**
- * This class is only for remembering old and new embedded handlers,
- * in the event a re-init is needed.
- */
-public class EmbeddedTypeStateData {
-
-
- EmbeddedTypeHandler oldHandler;
- EmbeddedTypeHandler newHandler;
-
- public EmbeddedTypeStateData(EmbeddedTypeHandler oldHandler, EmbeddedTypeHandler newHandler) {
- this.oldHandler = oldHandler;
- this.newHandler = newHandler;
- }
-
- public EmbeddedTypeHandler getNewHandler() {
- return newHandler;
- }
-
- public EmbeddedTypeHandler getOldHandler() {
- return oldHandler;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/JSPModelLoader.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/JSPModelLoader.java
deleted file mode 100644
index 104344facf..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/JSPModelLoader.java
+++ /dev/null
@@ -1,665 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.modelhandler;
-
-import java.io.BufferedInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.contentproperties.JSPFContentProperties;
-import org.eclipse.jst.jsp.core.internal.document.PageDirectiveAdapter;
-import org.eclipse.jst.jsp.core.internal.document.PageDirectiveAdapterFactory;
-import org.eclipse.jst.jsp.core.internal.document.PageDirectiveWatcherFactory;
-import org.eclipse.jst.jsp.core.internal.domdocument.DOMModelForJSP;
-import org.eclipse.jst.jsp.core.internal.encoding.IJSPHeadContentDetector;
-import org.eclipse.jst.jsp.core.internal.encoding.JSPDocumentHeadContentDetector;
-import org.eclipse.jst.jsp.core.internal.encoding.JSPDocumentLoader;
-import org.eclipse.jst.jsp.core.internal.modelquery.JSPModelQueryAdapterImpl;
-import org.eclipse.jst.jsp.core.internal.modelquery.ModelQueryAdapterFactoryForJSP;
-import org.eclipse.jst.jsp.core.internal.parser.JSPReParser;
-import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.IContentDescriptionForJSP;
-import org.eclipse.jst.jsp.core.internal.text.StructuredTextPartitionerForJSP;
-import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeFamilyForHTML;
-import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeIdForHTML;
-import org.eclipse.wst.html.core.internal.text.StructuredTextPartitionerForHTML;
-import org.eclipse.wst.sse.core.internal.PropagatingAdapter;
-import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.internal.document.StructuredDocumentFactory;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.EmbeddedTypeHandler;
-import org.eclipse.wst.sse.core.internal.ltk.parser.JSPCapableParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.model.AbstractModelLoader;
-import org.eclipse.wst.sse.core.internal.modelhandler.EmbeddedTypeRegistry;
-import org.eclipse.wst.sse.core.internal.modelhandler.EmbeddedTypeRegistryImpl;
-import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocument;
-import org.eclipse.wst.sse.core.internal.util.Assert;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.sse.core.internal.util.DocumentInputStream;
-import org.eclipse.wst.xml.core.internal.DebugAdapterFactory;
-import org.eclipse.wst.xml.core.internal.document.DOMModelImpl;
-import org.eclipse.wst.xml.core.internal.propagate.PropagatingAdapterFactoryImpl;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
-import org.eclipse.wst.xml.core.internal.text.rules.StructuredTextPartitionerForXML;
-import org.w3c.dom.Document;
-
-public class JSPModelLoader extends AbstractModelLoader {
- protected final int MAX_BUFFERED_SIZE_FOR_RESET_MARK = 200000;
-
- /**
- * DMW - Note: I think the embeddedTypeRegistry in IModelManager can be
- * removed
- */
- private EmbeddedTypeRegistry embeddedContentTypeRegistry;
- private final static String DEFAULT_MIME_TYPE = "text/html"; //$NON-NLS-1$
- private final static String DEFAULT_LANGUAGE = "java"; //$NON-NLS-1$
-
- public JSPModelLoader() {
- super();
- }
-
- /**
- * Gets the embeddedContentTypeRegistry.
- *
- * @return Returns a EmbeddedContentTypeRegistry
- */
- private EmbeddedTypeRegistry getEmbeddedContentTypeRegistry() {
- if (embeddedContentTypeRegistry == null) {
- embeddedContentTypeRegistry = EmbeddedTypeRegistryImpl.getInstance();
- }
- return embeddedContentTypeRegistry;
- }
-
- public IStructuredModel newModel() {
- DOMModelForJSP model = new DOMModelForJSP();
- return model;
- }
-
- /**
- * For JSP files, text/html is the default content type. This may want
- * this different for types like jsv (jsp for voice xml) For now, hard
- * code to new instance. In future, should get instance from registry.
- *
- * Specification cites HTML as the default contentType.
- */
- private EmbeddedTypeHandler getJSPDefaultEmbeddedType(IStructuredModel model) {
- EmbeddedTypeRegistry reg = getEmbeddedContentTypeRegistry();
-
- String mimeType = null;
- // default embedded type for fragments
- if (model != null) {
- IFile file = getFile(model);
- if (file != null) {
- mimeType = JSPFContentProperties.getProperty(JSPFContentProperties.JSPCONTENTTYPE, file, true);
- }
- }
- mimeType = mimeType == null ? getDefaultMimeType() : mimeType;
- return reg.getTypeFor(mimeType);
- }
-
- /**
- * Method getDefaultMimeType.
- *
- * @return String
- */
- private String getDefaultMimeType() {
- return DEFAULT_MIME_TYPE;
- }
-
- /**
- * This method must return a new instance of IStructuredDocument, that has
- * been initialized with appropriate parser. For many loaders, the
- * (default) parser used is known for any input. For others, the correct
- * parser (and its initialization) is normall dependent on the content of
- * the file. This no-argument method should assume "empty input" and would
- * therefore return the default parser for the default contentType.
- *
- * If the parser is to handle tag libraries, it must have a TaglibSupport
- * object with a valid URIResolver and this IStructuredDocument attached
- * to it before the contents are set on the IStructuredDocument.
- */
- public IStructuredDocument newStructuredDocument() {
- IStructuredDocument structuredDocument = StructuredDocumentFactory.getNewStructuredDocumentInstance(getParser());
- ((BasicStructuredDocument) structuredDocument).setReParser(new JSPReParser());
- // structuredDocument.setDocumentPartitioner(new
- // JSPJavaDocumentPartioner());
- // even though this is an "empty model" ... we want it to have at
- // least the
- // default embeddeded content type handler
- EmbeddedTypeHandler embeddedType = getJSPDefaultEmbeddedType(null);
- embeddedType.initializeParser((JSPCapableParser) structuredDocument.getParser());
- return structuredDocument;
- }
-
- public RegionParser getParser() {
- // remember, the Loader
- // will need to finish initialization of parser
- // based on "embedded content"
- return new JSPSourceParser();
- }
-
- protected void preLoadAdapt(IStructuredModel structuredModel) {
- super.preLoadAdapt(structuredModel);
- IDOMModel domModel = (IDOMModel) structuredModel;
- //
- // document must have already been set for this to
- // work.
- Document document = domModel.getDocument();
- Assert.isNotNull(document);
- // if there is a model in the adapter, this will adapt it to
- // first node. After that the PropagatingAdater spreads over the
- // children being
- // created. Each time that happends, a side effect is to
- // also "spread" sprecific registered adapters,
- // they two can propigate is needed.
- // This 'get' causes first to be be attached.
- PropagatingAdapter propagatingAdapter = (PropagatingAdapter) ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
- // may make this easier to use in futue
- propagatingAdapter.addAdaptOnCreateFactory(new PageDirectiveWatcherFactory());
- if (Debug.debugNotificationAndEvents) {
- propagatingAdapter.addAdaptOnCreateFactory(new DebugAdapterFactory());
- }
- // For JSPs, the ModelQueryAdapter must be "attached" to the document
- // before content is set in the model, so taglib initization can
- // take place.
- ((INodeNotifier) document).getAdapterFor(ModelQueryAdapter.class);
- //
-
- }
-
- /**
- * This method must return those factories which must be attached to the
- * structuredModel before content is applied.
- */
- public List getAdapterFactories() {
- List result = new ArrayList();
- INodeAdapterFactory factory = null;
- //
- factory = new ModelQueryAdapterFactoryForJSP();
- result.add(factory);
- factory = new PropagatingAdapterFactoryImpl();
- result.add(factory);
- factory = new PageDirectiveAdapterFactory();
- result.add(factory);
-
- return result;
- }
-
-
- public IJSPHeadContentDetector getHeadParser() {
- return new JSPDocumentHeadContentDetector();
- }
-
- private IContentDescription getContentDescription(IDocument doc) {
- if (doc == null)
- return null;
- DocumentInputStream in = new DocumentInputStream(doc);
- return getContentDescription(in);
- }
-
- /**
- *
- * @param filePath
- * @return the content description, or null if there's no buffer for the
- * filepath
- */
- private IContentDescription getContentDescription(String filePath) {
- if (filePath == null)
- return null;
-
- IDocument doc = null;
- ITextFileBuffer buf = FileBuffers.getTextFileBufferManager().getTextFileBuffer(new Path(filePath));
- if (buf != null) {
- doc = buf.getDocument();
- }
-
- IContentDescription contentDescription = null;
- if (doc != null) {
- contentDescription = getContentDescription(doc);
- }
- return contentDescription;
- }
-
- /**
- * Returns content description for an input stream Assumes it's JSP
- * content. Closes the input stream when finished.
- *
- * @param in
- * @return the IContentDescription for in, or null if in is null
- */
- private IContentDescription getContentDescription(InputStream in) {
-
- if (in == null)
- return null;
-
- IContentDescription desc = null;
- try {
-
- IContentType contentTypeJSP = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- desc = contentTypeJSP.getDescriptionFor(in, IContentDescription.ALL);
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- finally {
- if (in != null) {
- try {
- in.close();
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- }
- }
- return desc;
- }
-
- private IFile getFile(IStructuredModel model) {
- if (model != null) {
- String location = model.getBaseLocation();
- if (location != null) {
- IPath path = new Path(location);
- if (!path.toFile().exists() && path.segmentCount() > 1) {
- return ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- }
- }
- return null;
- }
-
- /**
- * Method getLanguage.
- *
- * @param model
- * @return String
- */
- private String getLanguage(IStructuredModel model) {
- String result = null;
- // first check the model (document itself) to see if contains
- result = getLanguageFromStructuredDocument(model.getStructuredDocument());
- // Note: if model contains an unsupported
- // language, we'll even return it,
- // since who knows what future holds.
-
- // get default language specified in properties page
- IFile file = getFile(model);
- result = JSPFContentProperties.getProperty(JSPFContentProperties.JSPLANGUAGE, file, true);
-
- // always return something
- if (result == null) {
- result = DEFAULT_LANGUAGE;
- }
- return result;
- }
-
- /**
- * Method getLanguageFromStructuredDocument.
- *
- * @param structuredDocument
- * @return String
- */
- private String getLanguageFromStructuredDocument(IStructuredDocument structuredDocument) {
- if (structuredDocument == null)
- return null;
- String result = null;
- // bascially same algorithm as get encoding or
- // get content type from structuredDocument.
- IJSPHeadContentDetector localHeadParser = getHeadParser();
- // we can be assured that its already been
- // parsed. If not call parseHeaderForPageDirective()
- // before calling getLanguage;
- localHeadParser.set(structuredDocument);
- try {
- result = localHeadParser.getLanguage();
- }
- catch (IOException e) {
- // impossible
- // TODO need to reconsider design to avoid
- throw new Error(e);
- }
- return result;
- }
-
- /**
- * This is "reinitialize" since there should always be at least the
- * default one assigned, before we start checking the stream
- */
- private void reInitializeEmbeddedType(IStructuredModel model, EmbeddedTypeHandler oldEmbeddedContentType, EmbeddedTypeHandler newEmbeddedContentType) {
- // check program logic
- Assert.isNotNull(oldEmbeddedContentType, "Program error: invalid call during model initialization"); //$NON-NLS-1$
- // once we know the embedded content type, we need to set it in the
- // PageDirectiveAdapter ... the order of initialization is
- // critical here, the doc must have been created, but its contents not
- // set yet,
- // and all factories must have been set up also.
- IDOMModel domModel = (IDOMModel) model;
- IStructuredDocument structuredDocument = model.getStructuredDocument();
- IDOMDocument document = domModel.getDocument();
- PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getExistingAdapter(PageDirectiveAdapter.class);
- // ==> // PropagatingAdapter propagatingAdapter = (PropagatingAdapter)
- // ((INodeNotifier)
- // document).getExistingAdapter(PropagatingAdapter.class);
- // ==> // ModelQueryAdapter modelQueryAdapter = (ModelQueryAdapter)
- // ((INodeNotifier)
- // document).getExistingAdapter(ModelQueryAdapter.class);
- oldEmbeddedContentType.uninitializeFactoryRegistry(model.getFactoryRegistry());
- oldEmbeddedContentType.uninitializeParser((JSPCapableParser) structuredDocument.getParser());
- // since 'document' is not recreated in this
- // reinit path, we need to remove all adapters,
- // except for the propagated adapters (including page
- // directive adapter, and model query adapter).
- // to accomplish this, we'll just remove all, then
- // add back with a call to pre-load adapt.
- // let clients decide to unload adapters from document
- // Collection oldAdapters = document.getAdapters();
- // Iterator oldAdaptersIterator = oldAdapters.iterator();
- // while (oldAdaptersIterator.hasNext()) {
- // INodeAdapter oldAdapter = (INodeAdapter)
- // oldAdaptersIterator.next();
- // if (oldAdapter != pageDirectiveAdapter && oldAdapter !=
- // propagatingAdapter && oldAdapter != modelQueryAdapter) {
- // // DO NOT remove directly!
- // // can change contents while in notifity loop!
- // //oldAdaptersIterator.remove();
- // document.removeAdapter(oldAdapter);
- // }
- // }
- // DMW: I believe something like the following is needed,
- // since releases cached adapters
- // if (document instanceof DocumentImpl) {
- // ((DocumentImpl) document).releaseDocumentType();
- // ((DocumentImpl) document).releaseStyleSheets();
- // }
- // remember, embedded type factories are automatically cleared when
- // embededType changed
- pageDirectiveAdapter.setEmbeddedType(newEmbeddedContentType);
- // // but still need to clear the page directive watchers, and let
- // them be rediscovered (with new, accurate node as target)
- // pageDirectiveAdapter.clearPageWatchers();
- if (newEmbeddedContentType != null) {
-
- // need to null out or else ModelParserAdapter
- // won't get reinitialized
- ((DOMModelImpl) model).setModelParser(null);
-
- newEmbeddedContentType.initializeFactoryRegistry(model.getFactoryRegistry());
- newEmbeddedContentType.initializeParser((JSPCapableParser) structuredDocument.getParser());
-
- // partitioner setup is the responsibility of this loader
- IDocumentPartitioner documentPartitioner = structuredDocument.getDocumentPartitioner();
- // ISSUE: this logic is flawed, not sure of original intent, but
- // added null/type checks for safety.
- if (documentPartitioner != null && documentPartitioner instanceof StructuredTextPartitionerForJSP) {
- if (newEmbeddedContentType.getFamilyId().equals(ContentTypeIdForXML.ContentTypeID_XML)) {
- ((StructuredTextPartitionerForJSP) documentPartitioner).setEmbeddedPartitioner(new StructuredTextPartitionerForXML());
- }
- else if (newEmbeddedContentType.getFamilyId().equals(ContentTypeIdForHTML.ContentTypeID_HTML)) {
- ((StructuredTextPartitionerForJSP) documentPartitioner).setEmbeddedPartitioner(new StructuredTextPartitionerForHTML());
- }
- }
- }
- // adding language here, in this convienent central
- // location, but some obvious renaming or refactoring
- // wouldn't hurt, in future.
- // I needed to add this language setting for JSP Fragment support
- // Note: this is the one that counts, since at this point,
- // the model has an ID, so we can look up IFile, etc.
- String language = getLanguage(model);
- if (language != null && language.length() > 0) {
- pageDirectiveAdapter.setLanguage(language);
- }
- }
-
- /**
- * This is "reinitialize" since there should always be at least the
- * default one assigned, before we start checking the stream
- */
- private void initCloneOfEmbeddedType(IStructuredModel model, EmbeddedTypeHandler oldEmbeddedContentType, EmbeddedTypeHandler newEmbeddedContentType) {
- // check program logic
- Assert.isNotNull(oldEmbeddedContentType, "Program error: invalid call during model initialization"); //$NON-NLS-1$
- // once we know the embedded content type, we need to set it in the
- // PageDirectiveAdapter ... the order of initialization is
- // critical here, the doc must have been created, but its contents not
- // set yet,
- // and all factories must have been set up also.
- IDOMModel domModel = (IDOMModel) model;
- IStructuredDocument structuredDocument = model.getStructuredDocument();
- IDOMDocument document = domModel.getDocument();
- PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
- // ==> // PropagatingAdapter propagatingAdapter = (PropagatingAdapter)
- // ((INodeNotifier) document).getAdapterFor(PropagatingAdapter.class);
- // ==> // ModelQueryAdapter modelQueryAdapter = (ModelQueryAdapter)
- // ((INodeNotifier) document).getAdapterFor(ModelQueryAdapter.class);
- // because, even in the clone case, the model has been paritally
- // intialized with
- // the old embedded type (during createModel), we need to unitialize
- // parts of it, based on the old (or default) ones
- oldEmbeddedContentType.uninitializeFactoryRegistry(model.getFactoryRegistry());
- oldEmbeddedContentType.uninitializeParser((JSPCapableParser) structuredDocument.getParser());
- // remember, embedded type factories are automatically cleared when
- // embededType changed
- pageDirectiveAdapter.setEmbeddedType(newEmbeddedContentType);
- if (newEmbeddedContentType != null) {
- newEmbeddedContentType.initializeFactoryRegistry(model.getFactoryRegistry());
- newEmbeddedContentType.initializeParser((JSPCapableParser) structuredDocument.getParser());
- }
- // adding language here, in this convienent central
- // location, but some obvious renaming or refactoring
- // wouldn't hurt, in future.
- // I needed to add this language setting for JSP Fragment support
- // Note: this is the one that counts, since at this point,
- // the model has an ID, so we can look up IFile, etc.
- String language = getLanguage(model);
- if (language != null && language.length() > 0) {
- pageDirectiveAdapter.setLanguage(language);
- }
- }
-
- private EmbeddedTypeHandler getEmbeddedType(IStructuredModel model) {
- Document doc = ((IDOMModel) model).getDocument();
- PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) ((INodeNotifier) doc).getAdapterFor(PageDirectiveAdapter.class);
- EmbeddedTypeHandler embeddedHandler = pageDirectiveAdapter.getEmbeddedType();
- return embeddedHandler;
- }
-
- protected void initEmbeddedTypePre(IStructuredModel model) {
-
- // note: this will currently only work for models backed by files
- EmbeddedTypeHandler embeddedContentType = null;
- IDOMModel domModel = (IDOMModel) model;
-
- String possibleFileBaseLocation = model.getBaseLocation();
-
- if (embeddedContentType == null) {
- IContentDescription desc = getContentDescription(possibleFileBaseLocation);
- if (desc != null) {
- Object prop = null;
-
- prop = desc.getProperty(IContentDescriptionForJSP.CONTENT_FAMILY_ATTRIBUTE);
- if (prop != null) {
- if (ContentTypeFamilyForHTML.HTML_FAMILY.equals(prop)) {
- embeddedContentType = EmbeddedTypeRegistryImpl.getInstance().getTypeFor("text/html");
- }
- }
-
- if (embeddedContentType == null) {
-
- prop = desc.getProperty(IContentDescriptionForJSP.CONTENT_TYPE_ATTRIBUTE);
- if (prop != null) {
- embeddedContentType = EmbeddedTypeRegistryImpl.getInstance().getTypeFor((String) prop);
- }
- }
- }
- }
-
- IDOMDocument document = domModel.getDocument();
- PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
-
- if (embeddedContentType != null) {
- pageDirectiveAdapter.setEmbeddedType(embeddedContentType);
- embeddedContentType.initializeFactoryRegistry(model.getFactoryRegistry());
- }
- else {
- // use default embeddedType if it couldn't determine one
- embeddedContentType = getJSPDefaultEmbeddedType(model);
- pageDirectiveAdapter.setEmbeddedType(embeddedContentType);
- embeddedContentType.initializeFactoryRegistry(model.getFactoryRegistry());
- }
- }
-
- protected void initEmbeddedTypePost(IStructuredModel model) {
- // should already be initialized (from initEmbeddedTypePre)
- // via IContentDescription
- setLanguageInPageDirective(model);
- }
-
- /**
- * Method initEmbeddedType.
- */
- protected void initEmbeddedType(IStructuredModel oldModel, IStructuredModel newModel) {
- EmbeddedTypeHandler existingEmbeddedType = getEmbeddedType(oldModel);
- EmbeddedTypeHandler newEmbeddedContentType = existingEmbeddedType.newInstance();
- if (existingEmbeddedType == null) {
- initEmbeddedTypePre(newModel);
- initEmbeddedTypePost(newModel);
- }
- else {
- // initEmbeddedType(newModel);
- initCloneOfEmbeddedType(newModel, existingEmbeddedType, newEmbeddedContentType);
- setLanguageInPageDirective(newModel);
- }
- }
-
- protected void setLanguageInPageDirective(IStructuredModel newModel) {
- if (newModel instanceof IDOMModel) {
- IDOMDocument document = ((IDOMModel) newModel).getDocument();
- PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) document.getAdapterFor(PageDirectiveAdapter.class);
- String language = getLanguage(newModel);
- pageDirectiveAdapter.setLanguage(language);
- }
- }
-
- public IStructuredModel reinitialize(IStructuredModel model) {
- EmbeddedTypeHandler oldHandler = null;
- EmbeddedTypeHandler newHandler = null;
- Object reinitStateData = model.getReinitializeStateData();
- if (reinitStateData instanceof EmbeddedTypeStateData) {
- EmbeddedTypeStateData oldStateData = (EmbeddedTypeStateData) reinitStateData;
- oldHandler = oldStateData.getOldHandler();
- newHandler = oldStateData.getNewHandler();
- // note. We should already have the new handler in the model's
- // (documents) adapters,
- // so need need to use the old one to undo the old state data
- reInitializeEmbeddedType(model, oldHandler, newHandler);
- }
- else {
- // for language ... we someday MIGHT have to do something
- // here, but for now, we don't have any model-side language
- // sensitive adapters.
- }
- return super.reinitialize(model);
- }
-
- public IModelLoader newInstance() {
- return new JSPModelLoader();
- }
-
- public IDocumentLoader getDocumentLoader() {
- if (documentLoaderInstance == null) {
- documentLoaderInstance = new JSPDocumentLoader();
- }
- return documentLoaderInstance;
- }
-
- /**
- * Ensures that an InputStream has mark/reset support.
- */
- public static InputStream getMarkSupportedStream(InputStream original) {
- if (original == null)
- return null;
- if (original.markSupported())
- return original;
- return new BufferedInputStream(original);
- }
-
- protected byte[] getBytes(InputStream inputStream, int max) throws IOException {
- byte[] smallBuffer = new byte[max];
- byte[] returnBuffer = null;
- int nRead = inputStream.read(smallBuffer, 0, max);
- if (nRead < max) {
- // empty file will return -1;
- if (nRead < 0)
- nRead = 0;
- byte[] smallerBuffer = new byte[nRead];
- System.arraycopy(smallBuffer, 0, smallerBuffer, 0, nRead);
- returnBuffer = smallerBuffer;
- }
- else {
- returnBuffer = smallBuffer;
- }
- return returnBuffer;
- }
-
- public IStructuredModel createModel(IStructuredModel oldModel) {
- IStructuredModel model = super.createModel(oldModel);
- // For JSPs, the ModelQueryAdapter must be "attached" to the document
- // before content is set in the model, so taglib initization can
- // take place.
- // In this "clone model" case, we create a ModelQuery adapter
- // create a new instance from the old data. Note: I think this
- // "forced fit" only works here since the implimentaiton of
- // ModelQueryAdatper does not
- // have to be released.
-
- ModelQueryAdapter modelQueryAdapter = getModelQueryAdapter(model);
- if (modelQueryAdapter == null) {
- modelQueryAdapter = getModelQueryAdapter(oldModel);
- IDOMDocument document = ((IDOMModel) model).getDocument();
- document.addAdapter(new JSPModelQueryAdapterImpl(modelQueryAdapter.getCMDocumentCache(), modelQueryAdapter.getModelQuery(), modelQueryAdapter.getIdResolver()));
-
- }
-
-
-
- return model;
- }
-
- private ModelQueryAdapter getModelQueryAdapter(IStructuredModel model) {
- IDOMDocument document = ((IDOMModel) model).getDocument();
-
- ModelQueryAdapter modelQueryAdapter = (ModelQueryAdapter) ((INodeNotifier) document).getAdapterFor(ModelQueryAdapter.class);
- return modelQueryAdapter;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/ModelHandlerForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/ModelHandlerForJSP.java
deleted file mode 100644
index 0ad55b19c1..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/ModelHandlerForJSP.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.modelhandler;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.encoding.JSPDocumentHeadContentDetector;
-import org.eclipse.jst.jsp.core.internal.encoding.JSPDocumentLoader;
-import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.document.IDocumentCharsetDetector;
-import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.AbstractModelHandler;
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker;
-import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
-
-public class ModelHandlerForJSP extends AbstractModelHandler {
-
- /**
- * Needs to match what's in plugin registry. In fact, can be overwritten
- * at run time with what's in registry! (so should never be 'final')
- */
- static String AssociatedContentTypeID = "org.eclipse.jst.jsp.core.jspsource"; //$NON-NLS-1$
- /**
- * Needs to match what's in plugin registry. In fact, can be overwritten
- * at run time with what's in registry! (so should never be 'final')
- */
- private static String ModelHandlerID = "org.eclipse.jst.jsp.core.modelhandler"; //$NON-NLS-1$
-
-
- public ModelHandlerForJSP() {
- super();
- setId(ModelHandlerID);
- setAssociatedContentTypeId(AssociatedContentTypeID);
- }
-
- protected void addJSPTagName(JSPSourceParser parser, String tagname) {
- BlockMarker bm = new BlockMarker(tagname, null, DOMJSPRegionContexts.JSP_CONTENT, true);
- parser.addBlockMarker(bm);
- }
-
- public IModelLoader getModelLoader() {
- return new JSPModelLoader();
- }
-
- public Preferences getPreferences() {
- return JSPCorePlugin.getDefault().getPluginPreferences();
- }
-
- public IDocumentCharsetDetector getEncodingDetector() {
- return new JSPDocumentHeadContentDetector();
- }
-
- public IDocumentLoader getDocumentLoader() {
- return new JSPDocumentLoader();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryAdapterImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryAdapterImpl.java
deleted file mode 100644
index b3e02bf16b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryAdapterImpl.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.modelquery;
-
-
-
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapterImpl;
-
-
-public class JSPModelQueryAdapterImpl extends ModelQueryAdapterImpl {
- public JSPModelQueryAdapterImpl(CMDocumentCache cmDocumentCache, ModelQuery modelQuery, URIResolver idResolver) {
- super(cmDocumentCache, modelQuery, idResolver);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryAssociationProvider.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryAssociationProvider.java
deleted file mode 100644
index b7b1273d7e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryAssociationProvider.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.modelquery;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.SimpleAssociationProvider;
-
-/**
- */
-public class JSPModelQueryAssociationProvider extends SimpleAssociationProvider {
-
- /**
- * @param modelQueryCMProvider
- * org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQueryCMProvider
- */
- public JSPModelQueryAssociationProvider() {
- super(new JSPModelQueryCMProvider());
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryCMProvider.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryCMProvider.java
deleted file mode 100644
index 8f8367533c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryCMProvider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.modelquery;
-
-
-
-import java.util.List;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.JSPCMDocumentFactory;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQueryCMProvider;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Node;
-
-/**
- * CMDocument provider for HTML and JSP documents.
- */
-public class JSPModelQueryCMProvider implements ModelQueryCMProvider {
-
- protected JSPModelQueryCMProvider() {
- super();
- }
-
- /**
- * Returns the CMDocument that corresponds to the DOM Node. or null if no
- * CMDocument is appropriate for the DOM Node.
- */
- public CMDocument getCorrespondingCMDocument(Node node) {
- CMDocument jcmdoc = JSPCMDocumentFactory.getCMDocument();
-
- CMDocument result = null;
- try {
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- String elementName = node.getNodeName();
-
- // test to see if this node belongs to JSP's CMDocument (case
- // sensitive)
- CMElementDeclaration dec = (CMElementDeclaration) jcmdoc.getElements().getNamedItem(elementName);
- if (dec != null) {
- result = jcmdoc;
- }
- }
-
- String prefix = node.getPrefix();
-
- if (result == null && prefix != null && prefix.length() > 0 && node instanceof IDOMNode) {
- // check position dependent
- IDOMNode xmlNode = (IDOMNode) node;
- TLDCMDocumentManager tldmgr = TaglibController.getTLDCMDocumentManager(xmlNode.getStructuredDocument());
- if (tldmgr != null) {
- List documents = tldmgr.getCMDocumentTrackers(node.getPrefix(), xmlNode.getStartOffset());
- // there shouldn't be more than one cmdocument returned
- if (documents != null && documents.size() > 0)
- result = (CMDocument) documents.get(0);
- }
- }
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- return result;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryImpl.java
deleted file mode 100644
index 1f9dacf975..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryImpl.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.modelquery;
-
-
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.jst.jsp.core.internal.document.PageDirectiveAdapter;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
-import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeFamilyForHTML;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.ModelQueryImpl;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-public class JSPModelQueryImpl extends ModelQueryImpl {
-
- // ISSUE: jspModel doesn't seem used?
- protected IStructuredModel jspModel = null;
- private HashMap embeddedModelQueries = new HashMap();
-
- public JSPModelQueryImpl(IStructuredModel model, URIResolver resolver) {
- super(new JSPModelQueryAssociationProvider());
- jspModel = model;
- }
-
- /*
- * @see ModelQuery#getCMElementDeclaration(Element)
- */
- public CMElementDeclaration getCMElementDeclaration(Element element) {
- CMElementDeclaration result = super.getCMElementDeclaration(element);
- if (result == null) {
- ModelQuery query = getEmbeddedModelQuery(element);
- if (query != null) {
- result = query.getCMElementDeclaration(element);
- }
- }
- return result;
- }
-
- /*
- * @see ModelQuery#getCorrespondingCMDocument(Node)
- */
- public CMDocument getCorrespondingCMDocument(Node node) {
- CMDocument doc = super.getCorrespondingCMDocument(node);
- if (doc == null) {
- ModelQuery query = getEmbeddedModelQuery(node);
- if (query != null) {
- doc = query.getCorrespondingCMDocument(node);
- }
- }
- return doc;
- }
-
- /*
- * @see ModelQuery#getCMNode(Node)
- */
- public CMNode getCMNode(Node node) {
- CMNode result = super.getCMNode(node);
- if (result == null) {
- ModelQuery query = getEmbeddedModelQuery(node);
- if (query != null) {
- result = query.getCMNode(node);
- }
- }
- return result;
- }
-
- public List getAvailableContent(Element element, CMElementDeclaration ed, int includeOptions) {
- ModelQuery emq = getEmbeddedModelQuery(element);
- if (emq != null)
- return emq.getAvailableContent(element, ed, includeOptions);
- else
- return super.getAvailableContent(element, ed, includeOptions);
- }
-
- // ISSUE: shouldn't this be private?
- protected ModelQuery getEmbeddedModelQuery(Node node) {
- ModelQuery embeddedModelQuery = null;
-
- if (node instanceof INodeNotifier) {
- Node ownerNode = node.getOwnerDocument();
- if (ownerNode == null) {
- // then must be the document itself
- ownerNode = node;
- }
- PageDirectiveAdapter pageDirectiveAdapter = (PageDirectiveAdapter) ((INodeNotifier) ownerNode).getAdapterFor(PageDirectiveAdapter.class);
- if (pageDirectiveAdapter != null) {
-
- String effectiveContentType = null;
- ModelQuery potentialModelQueryObject = null;
-
- String familyId = pageDirectiveAdapter.getEmbeddedType().getFamilyId();
- if (ContentTypeFamilyForHTML.HTML_FAMILY.equals(familyId)) {
- effectiveContentType = "text/html";
- }
- else {
- effectiveContentType = pageDirectiveAdapter.getContentType();
- }
-
- potentialModelQueryObject = (ModelQuery) embeddedModelQueries.get(effectiveContentType);
-
- if (potentialModelQueryObject == null) {
- ModelQueryAdapter embeddedAdapter = (ModelQueryAdapter) pageDirectiveAdapter.adapt((INodeNotifier) node, ModelQueryAdapter.class);
- if (embeddedAdapter != null) {
- // we will cache one model query per content type
- embeddedModelQuery = embeddedAdapter.getModelQuery();
- embeddedModelQueries.put(effectiveContentType, embeddedModelQuery);
- }
- }
- else {
- embeddedModelQuery = potentialModelQueryObject;
- }
- }
- }
- return embeddedModelQuery;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery#getCMAttributeDeclaration(org.w3c.dom.Attr)
- */
- public CMAttributeDeclaration getCMAttributeDeclaration(Attr attr) {
- CMAttributeDeclaration result = super.getCMAttributeDeclaration(attr);
- if (result == null) {
- ModelQuery query = getEmbeddedModelQuery(attr);
- if (query != null) {
- result = query.getCMAttributeDeclaration(attr);
- }
- }
- return result;
- }
-
- /**
- * NOT API -- this is provided, and is public, only to make some JUnit testing
- * more straightforward. It will be changed in future, and from release to release.
- *
- * @param node
- * @return
- */
- public ModelQuery internalTestOnly_getEmbeddedModelQuery(Node node) {
- return getEmbeddedModelQuery(node);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/ModelQueryAdapterFactoryForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/ModelQueryAdapterFactoryForJSP.java
deleted file mode 100644
index 4cb7251f13..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/ModelQueryAdapterFactoryForJSP.java
+++ /dev/null
@@ -1,169 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.modelquery;
-
-import java.io.File;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
-import org.eclipse.wst.sse.core.internal.provisional.AbstractAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.IModelStateListener;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.util.CMDocumentCache;
-import org.eclipse.wst.xml.core.internal.modelquery.XMLCatalogIdResolver;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
-
-public class ModelQueryAdapterFactoryForJSP extends AbstractAdapterFactory implements IModelStateListener {
-
- protected JSPModelQueryAdapterImpl modelQueryAdapterImpl;
-
- protected IStructuredModel stateNotifier = null;
-
- public ModelQueryAdapterFactoryForJSP() {
- this(ModelQueryAdapter.class, true);
- }
-
- /**
- * ModelQueryAdapterFactoryForJSP constructor comment.
- *
- * @param adapterKey
- * java.lang.Object
- * @param registerAdapters
- * boolean
- */
- public ModelQueryAdapterFactoryForJSP(Object key, boolean registerAdapters) {
- super(key, registerAdapters);
- }
-
- public INodeAdapterFactory copy() {
- return new ModelQueryAdapterFactoryForJSP(getAdapterKey(), isShouldRegisterAdapter());
- }
-
- /**
- * createAdapter method comment.
- */
- protected INodeAdapter createAdapter(INodeNotifier target) {
-
- if (Debug.displayInfo)
- System.out.println("-----------------------ModelQueryAdapterFactoryForJSP.createAdapter" + target); //$NON-NLS-1$
- if (modelQueryAdapterImpl == null) {
- if (target instanceof IDOMNode) {
- IDOMNode xmlNode = (IDOMNode) target;
- IStructuredModel model = stateNotifier = xmlNode.getModel();
- String baseLocation = model.getBaseLocation();
- // continue only if the location is known
- if (baseLocation != null) {
- stateNotifier.addModelStateListener(this);
- CMDocumentCache cmDocumentCache = new CMDocumentCache();
- File file = new Path(model.getBaseLocation()).toFile();
- if (file.exists()) {
- baseLocation = file.getAbsolutePath();
- }
- else {
- IPath basePath = new Path(model.getBaseLocation());
- IPath derivedPath = null;
- if (basePath.segmentCount() > 1)
- derivedPath = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath).getLocation();
- else
- derivedPath = ResourcesPlugin.getWorkspace().getRoot().getLocation().append(basePath);
- if (derivedPath != null) {
- baseLocation = derivedPath.toString();
- }
- }
- URIResolver resolver = new XMLCatalogIdResolver(baseLocation, model.getResolver());
-
- ModelQuery modelQuery = new JSPModelQueryImpl(model, resolver);
- modelQuery.setEditMode(ModelQuery.EDIT_MODE_UNCONSTRAINED);
- modelQueryAdapterImpl = new JSPModelQueryAdapterImpl(cmDocumentCache, modelQuery, resolver);
- }
- }
- }
- return modelQueryAdapterImpl;
- }
-
- /**
- * @see IModelStateListener#modelAboutToBeChanged(IStructuredModel)
- */
- public void modelAboutToBeChanged(IStructuredModel model) {
- }
-
- /**
- * @see IModelStateListener#modelChanged(IStructuredModel)
- */
- public void modelChanged(IStructuredModel model) {
- }
-
- /**
- * @see IModelStateListener#modelDirtyStateChanged(IStructuredModel,
- * boolean)
- */
- public void modelDirtyStateChanged(IStructuredModel model, boolean isDirty) {
- }
-
- /**
- * @see IModelStateListener#modelResourceDeleted(IStructuredModel)
- */
- public void modelResourceDeleted(IStructuredModel model) {
- }
-
- /**
- * @see IModelStateListener#modelResourceMoved(IStructuredModel,
- * IStructuredModel)
- */
- public void modelResourceMoved(IStructuredModel oldModel, IStructuredModel newModel) {
- // if oldModel != newModel, bad things might happen with the adapter
- stateNotifier.removeModelStateListener(this);
- stateNotifier = newModel;
- updateResolver(stateNotifier);
- stateNotifier.addModelStateListener(this);
- }
-
-
- public void release() {
- super.release();
- if (stateNotifier != null) {
- stateNotifier.removeModelStateListener(this);
- }
- stateNotifier = null;
- if (modelQueryAdapterImpl != null) {
- modelQueryAdapterImpl.release();
- }
- }
-
- protected void updateResolver(IStructuredModel model) {
- String baseLocation = model.getBaseLocation();
- IFile baseFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(model.getBaseLocation()));
- if (baseFile != null) {
- baseLocation = baseFile.getLocation().toString();
- }
- modelQueryAdapterImpl.setIdResolver(new XMLCatalogIdResolver(baseLocation, model.getResolver()));
- }
-
- public void modelAboutToBeReinitialized(IStructuredModel structuredModel) {
- // TODO Auto-generated method stub
-
- }
-
- public void modelReinitialized(IStructuredModel structuredModel) {
- updateResolver(structuredModel);
-
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPDirectiveStructuredDocumentRegion.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPDirectiveStructuredDocumentRegion.java
deleted file mode 100644
index 522c4930ab..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPDirectiveStructuredDocumentRegion.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.parser;
-
-import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.internal.text.XMLStructuredDocumentRegion;
-
-public class JSPDirectiveStructuredDocumentRegion extends XMLStructuredDocumentRegion {
- /**
- * JSPDirectiveStructuredDocumentRegion constructor comment.
- */
- public JSPDirectiveStructuredDocumentRegion() {
- super();
- }
-
- protected StructuredDocumentEvent reparse(Object requester, String changes, int requestStart, int lengthToReplace) {
- return null;
- }
-
- // This is a language specific method (e.g. HTML, Java, Prolog, etc.) so
- // could/should be made configurable.
- public StructuredDocumentEvent updateModel(Object requester, String changes, int requestStart, int lengthToReplace, IStructuredDocumentRegion flatnode) {
- return null;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPReParser.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPReParser.java
deleted file mode 100644
index f463600b7f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPReParser.java
+++ /dev/null
@@ -1,369 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.parser;
-
-
-import java.util.Iterator;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP11TLDNames;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionParser;
-import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegionList;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredTextReParser;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.text.CoreNodeList;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.xml.core.internal.parser.XMLStructuredDocumentReParser;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-public class JSPReParser extends XMLStructuredDocumentReParser {
-
- /**
- * Allow a reparser to check for extra syntactic cases that require
- * parsing beyond the flatNode boundary.
- *
- * This implementation adds JSP language markers (comments are handled
- * elsewhere).
- */
- protected StructuredDocumentEvent checkForCrossStructuredDocumentRegionSyntax() {
- StructuredDocumentEvent result = super.checkForCrossStructuredDocumentRegionSyntax();
- // None of the superclass' cases were valid, so check for JSP cases
- if (result == null) {
- result = checkForJSP();
- }
- return result;
- }
-
- /**
- * A change to a JSP tag can result in all being reparsed.
- */
- private StructuredDocumentEvent checkForJSP() {
- StructuredDocumentEvent result = null;
- result = checkForCriticalKey("<%"); //$NON-NLS-1$
- if (result == null)
- result = checkForCriticalKey("<%="); //$NON-NLS-1$
- if (result == null)
- result = checkForCriticalKey("<%!"); //$NON-NLS-1$
- if (result == null)
- result = checkForCriticalKey("%>"); //$NON-NLS-1$
-
- return result;
- }
-
- /**
- * If a comment start or end tag is being added or deleted, we'll rescan
- * the whole document. The reason is that content that is revealed or
- * commented out can effect the interpretation of the rest of the
- * document. Note: for now this is very XML/JSP specific, can
- * refactor/improve later.
- */
- protected StructuredDocumentEvent checkForComments() {
-
- StructuredDocumentEvent result = super.checkForComments();
-
- if (result == null)
- result = checkForCriticalKey("<%--"); //$NON-NLS-1$
- if (result == null)
- result = checkForCriticalKey("--%>"); //$NON-NLS-1$
- // we'll also check for these degenerate cases
- if (result == null)
- result = checkForCriticalKey("<%---%>"); //$NON-NLS-1$
-
- return result;
- }
-
- /**
- * The core reparsing method ... after the dirty start and dirty end have
- * been calculated elsewhere. - this method overrides, does not extend
- * super's method. changes/fixes to super may have to be made here as
- * well.
- */
- protected StructuredDocumentEvent reparse(IStructuredDocumentRegion dirtyStart, IStructuredDocumentRegion dirtyEnd) {
- StructuredDocumentEvent result = null;
- int rescanStart = -1;
- int rescanEnd = -1;
- boolean firstTime = false;
- boolean detectedBreakingChange = false;
-
- //
- // "save" the oldNodes (that may be replaced) in a list
- CoreNodeList oldNodes = formOldNodes(dirtyStart, dirtyEnd);
-
- if (containsBreakingChange(oldNodes) || isBreakingWithNestedTag(dirtyStart, dirtyEnd)) {
- if (Debug.debugTaglibs)
- System.out.println("reparse: is taglib or include"); //$NON-NLS-1$
- detectedBreakingChange = true;
- rescanStart = 0;
- rescanEnd = fStructuredDocument.getLength() + fLengthDifference;
- oldNodes = formOldNodes(fStructuredDocument.getFirstStructuredDocumentRegion(), fStructuredDocument.getLastStructuredDocumentRegion());
- clearTaglibInfo();
- }
- else if (dirtyStart == null || dirtyEnd == null) {
- // dirtyStart or dirty end are null, then that means we didn't
- // have a
- // cached node, which means we have an empty document, so we
- // just need to rescan the changes
- rescanStart = 0;
- rescanEnd = fChanges.length();
- firstTime = true;
- }
- else {
- // set the start of the text to rescan
- rescanStart = dirtyStart.getStart();
- //
- // set the end of the text to rescan
- // notice we use the same rationale as for the rescanStart,
- // with the added caveat that length has to be added to it,
- // to compensate for the new text which has been added or deleted.
- // If changes has zero length, then "length" will be negative,
- // since
- // we are deleting text. Otherwise, use the difference between
- // what's selected to be replaced and the length of the new text.
- rescanEnd = dirtyEnd.getEnd() + fLengthDifference;
- }
-
- // now that we have the old stuff "saved" away, update the document
- // with the changes.
- fStructuredDocument.updateDocumentData(fStart, fLengthToReplace, fChanges);
- // ------------------ now the real work
- result = core_reparse(rescanStart, rescanEnd, oldNodes, firstTime);
- //
-
- // if we did not detect a breaking type of change at the beginning,
- // but
- // do now, then reparse all! If we did detect them, then we may or may
- // not detect again, but presumably we've already set up to re-parsed
- // everthing, so no need to do again.
- if ((!detectedBreakingChange) && (containsBreakingChange(oldNodes))) {
- clearTaglibInfo();
- // reparse all
- oldNodes = formOldNodes(fStructuredDocument.getFirstStructuredDocumentRegion(), fStructuredDocument.getLastStructuredDocumentRegion());
- result = core_reparse(0, fStructuredDocument.getLength(), oldNodes, firstTime);
- }
-
- // event is returned to the caller, incase there is
- // some optimization they can do
- return result;
- }
-
- /**
- * Verifies that the regions given, representing the contents of a
- * IStructuredDocumentRegion, contain regions that could alter the
- * behavior of the parser or the parsing of areas outside of the regions
- * given.
- */
- private boolean isBreakingChange(IStructuredDocumentRegion node, ITextRegionList regions) {
- return isTaglibOrInclude(node, regions) || isJspRoot(regions);
- }
-
- /**
- * Verifies that the regions given, representing the regions touched by a
- * text change have: 1) ...an insertion at the textEndOffset of an
- * XML_TAG_OPEN that's in it's own IStructuredDocumentRegion and preceded
- * by an unended IStructuredDocumentRegion 2) ...a deletion happening in
- * an XML_EMPTY_TAG_CLOSE that ends a ITextRegionContainer 3) ...an
- * insertion happening with a ' <' character somewhere in an XML attribute
- * name or value 4) ...a deletion of a normal XML_TAG_CLOSE since
- * subsequent tags become attribute values
- */
-
- private boolean isBreakingWithNestedTag(boolean changesIncludeA_lt, boolean delsIncludeA_gt, IStructuredDocumentRegion parent, ITextRegion region) {
- boolean result = false;
-
- IStructuredDocumentRegion previous = parent.getPrevious();
- // case 1 test
- if (parent.getRegions().size() == 1 && region.getType() == DOMRegionContext.XML_TAG_OPEN && (previous == null || (!previous.isEnded() || previous.getType() == DOMRegionContext.XML_CONTENT))) {
- result = true;
- }
- // case 2 test
- if (region instanceof ITextRegionContainer) {
- ITextRegionContainer container = (ITextRegionContainer) region;
- ITextRegion internal = container.getRegions().get(container.getRegions().size() - 1);
- if (internal.getType() == DOMRegionContext.WHITE_SPACE && container.getRegions().size() >= 2)
- internal = container.getRegions().get(container.getRegions().size() - 2);
- if (internal.getType() == DOMRegionContext.XML_EMPTY_TAG_CLOSE) {
- result = true;
- }
- }
- // case 3 test
- if (changesIncludeA_lt && (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME || region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)) {
- result = true;
- }
- // case 4 test
- if (delsIncludeA_gt && region.getType() == DOMRegionContext.XML_TAG_CLOSE) {
- result = true;
- }
- return result;
- }
-
- /**
- * Verifies that the regions given, representing the contents of a
- * IStructuredDocumentRegion, includes a jsp:root tag
- */
- private boolean isJspRoot(ITextRegionList regions) {
- return regions.size() > 1 && regions.get(0).getType() == DOMRegionContext.XML_TAG_OPEN && regions.get(1).getType() == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME;
- }
-
- /**
- * Verifies that the regions given, representing the contents of a
- * IStructuredDocumentRegion, includes a valid taglib directive or include
- * directive
- */
- private boolean isTaglibOrInclude(IStructuredDocumentRegion node, ITextRegionList regions) {
- boolean sizeAndTypesMatch = (regions.size() > 1) && (regions.get(1).getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) && (regions.get(0).getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || regions.get(0).getType() == DOMRegionContext.XML_TAG_OPEN);
- if (!sizeAndTypesMatch)
- return false;
- ITextRegion region = regions.get(1);
- String directiveName = node.getText(region);
- return sizeAndTypesMatch && (directiveName.equals(JSP11TLDNames.TAGLIB) || directiveName.equals(JSP11TLDNames.INCLUDE) || directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB) || directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_INCLUDE));
- }
-
- private void clearTaglibInfo() {
- if (Debug.debugTaglibs)
- System.out.println("clearing taglib info"); //$NON-NLS-1$
- RegionParser parser = fStructuredDocument.getParser();
- if (parser instanceof StructuredDocumentRegionParser)
- ((StructuredDocumentRegionParser) parser).resetHandlers();
- }
-
- private boolean containsBreakingChange(IStructuredDocumentRegionList list) {
- boolean contains = false;
- for (int i = 0; i < list.getLength(); i++) {
- IStructuredDocumentRegion node = list.item(i);
- if (isBreakingChange(node, node.getRegions())) {
- contains = true;
- break;
- }
- }
- return contains;
- }
-
- protected IStructuredDocumentRegion findDirtyEnd(int end) {
-
- IStructuredDocumentRegion result = super.findDirtyEnd(end);
-
- // if not well formed, get one past, if its not null
-
- // now, if any of to-be-scanned flatnodes are the start of a jsp
- // region, we'll
- // reparse all the way to the end, to be sure we detect embedded
- // regions (or not-embedded regions) correctly.
- // notice we don't need to do if we're only processing one node.
- // notice too we have a strong assumption here that dirtyStart has
- // already been found!
- //
- // note that dirtyEnd is not checked in the do-block below, so we'll
- // check it first.
- if (isJSPEmbeddedStartOrEnd(result)) {
- result = fStructuredDocument.getLastStructuredDocumentRegion();
- }
- else {
- // when end node and start node are the same, we only need the
- // above
- // check, otherwise, there's a few cases that we'll search the
- // rest of the
- // flatnodes needlessly.
- if (result != dirtyStart) {
- IStructuredDocumentRegion searchNode = dirtyStart;
- do {
- if (isJSPEmbeddedStartOrEnd(searchNode)) {
- result = fStructuredDocument.getLastStructuredDocumentRegion();
- break;
- }
- else {
- searchNode = searchNode.getNext();
- }
- // if we get to the current dirty end, or end of
- // flatnodes, without finding JSP region then we
- // don't need to check further
- }
- while ((searchNode != result) && (searchNode != null));
- }
- }
- // result should never be null, but cachedNode needs to be protected
- // from being changed to null
- if (result != null)
- fStructuredDocument.setCachedDocumentRegion(result);
- dirtyEnd = result;
- return dirtyEnd;
- }
-
- private boolean isBreakingWithNestedTag(IStructuredDocumentRegion start, IStructuredDocumentRegion end) {
- boolean result = false;
- boolean changesIncludeA_lt = fChanges != null && fChanges.indexOf('<') >= 0;
- boolean delsIncludeA_gt = fDeletedText != null && fDeletedText.indexOf('>') >= 0;
-
- // List regions = new ArrayList();
- IStructuredDocumentRegion node = start;
- int endReplace = fStart + fLengthToReplace;
- while (end != null && node != end.getNext()) {
- Iterator i = node.getRegions().iterator();
- while (i.hasNext()) {
- ITextRegion region = (ITextRegion) i.next();
- if (intersects(node, region, fStart, endReplace)) {
-
- result = isBreakingWithNestedTag(changesIncludeA_lt, delsIncludeA_gt, node, region);
-
- if (result)
- break;
- }
- }
- node = node.getNext();
- if (result)
- break;
- }
- return result;
- }
-
- private boolean intersects(IStructuredDocumentRegion node, ITextRegion region, int low, int high) {
- int start = node.getStartOffset(region);
- int end = node.getEndOffset(region);
- return (end >= low && start <= high) || (start <= low && end >= low) || (start <= high && end >= high);
- }
-
- /**
- * Returns true if potentially could be a jsp embedded region. Things like
- * JSP Declaration can't be embedded.
- */
- private boolean isJSPEmbeddedStartOrEnd(IStructuredDocumentRegion flatNode) {
- boolean result = false;
- String type = flatNode.getType();
- result = ((type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) || (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) || (type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN));
- return result;
- }
-
- /**
- * extends super class behavior
- */
- protected boolean isPartOfBlockRegion(IStructuredDocumentRegion flatNode) {
- boolean result = false;
- String type = flatNode.getType();
- result = ((type == DOMJSPRegionContexts.JSP_CLOSE) || (type == DOMJSPRegionContexts.JSP_CONTENT) || super.isPartOfBlockRegion(flatNode));
- return result;
- }
-
- public IStructuredTextReParser newInstance() {
- return new JSPReParser();
- }
-
- public StructuredDocumentEvent quickCheck() {
- if (containsBreakingChange(new CoreNodeList(dirtyStart, dirtyEnd)))
- return null;
- return super.quickCheck();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPSourceParser.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPSourceParser.java
deleted file mode 100644
index fdb1db0931..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPSourceParser.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.parser;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.internal.parser.internal.JSPTokenizer;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockTokenizer;
-import org.eclipse.wst.sse.core.internal.ltk.parser.JSPCapableParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionHandler;
-import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionHandlerExtension;
-import org.eclipse.wst.sse.core.internal.ltk.parser.StructuredDocumentRegionParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.text.IRegionComparible;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.parser.XMLSourceParser;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-/**
- * Takes input from the JSPTokenizer and creates a tag list
- */
-
-public class JSPSourceParser extends XMLSourceParser implements JSPCapableParser {
- protected class NestablePrefixHandler implements StructuredDocumentRegionHandler, StructuredDocumentRegionHandlerExtension {
-
- private static final String XMLNS = "xmlns:"; //$NON-NLS-1$
-
- /**
- * Enables a TLD owning the given prefix loaded from the given URI at
- * the anchorFlatNode. The list of additionalCMDocuments will claim to
- * not know any of its tags at positions earlier than that
- * IStructuredDocumentRegion's position.
- *
- * For taglib directives, the taglib is the anchor while taglibs
- * registered through include directives use the primary include
- * directive as their anchor.
- */
- protected void enableForTaglib(String prefix, IStructuredDocumentRegion anchorFlatNode) {
- if (prefix == null)
- return;
- List tagmarkers = ((JSPTokenizer) getTokenizer()).getNestablePrefixes();
- for (int i = 0; i < tagmarkers.size(); i++) {
- if (((TagMarker) tagmarkers.get(i)).getTagName().equals(prefix))
- return;
- }
- ((JSPTokenizer) getTokenizer()).getNestablePrefixes().add(new TagMarker(prefix, anchorFlatNode));
- }
-
- public void nodeParsed(IStructuredDocumentRegion aCoreFlatNode) {
- // could test > 1, but since we only care if there are 8 (<%@,
- // taglib, uri, =, where, prefix, =, what) [or 4 for includes]
- if (aCoreFlatNode.getNumberOfRegions() > 4 && aCoreFlatNode.getRegions().get(1).getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- ITextRegion name = aCoreFlatNode.getRegions().get(1);
- try {
- int offset = aCoreFlatNode.getStartOffset(name);
- int length = name.getTextLength();
- boolean taglibdetected = false;
- boolean taglibdirectivedetected = false;
- if (fCharSequenceSource instanceof IRegionComparible) {
- taglibdetected = ((IRegionComparible) fCharSequenceSource).regionMatches(offset, length, JSP12TLDNames.TAGLIB);
- taglibdirectivedetected = ((IRegionComparible) fCharSequenceSource).regionMatches(offset, length, JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
- }
- else {
- // old fashioned way
- String directiveName = getText(offset, length);
- taglibdetected = directiveName.equals(JSP12TLDNames.TAGLIB);
- taglibdirectivedetected = directiveName.equals(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
- }
- boolean processDirectiveName = taglibdetected || taglibdirectivedetected;
- if (processDirectiveName) {
- processTaglib(aCoreFlatNode);
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // do nothing
- }
- }
- // could test > 1, but since we only care if there are 5 (<,
- // jsp:root, xmlns:prefix, =, where)
- else if (aCoreFlatNode.getNumberOfRegions() > 4 && (aCoreFlatNode.getRegions().get(1)).getType() == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME) {
- processJSPRoot(aCoreFlatNode);
- }
- }
-
- protected void processJSPRoot(IStructuredDocumentRegion taglibFlatNode) {
- ITextRegionList regions = taglibFlatNode.getRegions();
- String prefix = null;
- boolean taglib = false;
- try {
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- int offset = taglibFlatNode.getStartOffset(region);
- int length = region.getTextLength();
-
- String name = getText(offset, length);
- if (name.startsWith(XMLNS) && name.length() > XMLNS.length()) { //$NON-NLS-1$
- prefix = name.substring(6);
- taglib = true;
- }
- else {
- prefix = null;
- taglib = false;
- }
- }
- else if (taglib && region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- prefix = StringUtils.strip(prefix);
- if (prefix != null && prefix.length() > 0) {
- enableForTaglib(prefix, taglibFlatNode);
- prefix = null;
- }
- }
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // nothing to be done
- prefix = null;
- }
- }
-
- /**
- * Pulls the prefix from the given taglib directive
- * IStructuredDocumentRegion and makes sure the prefix is nestable.
- */
- protected void processTaglib(IStructuredDocumentRegion taglibFlatNode) {
- ITextRegionList regions = taglibFlatNode.getRegions();
- String prefix = null;
- boolean prefixname = false;
- try {
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- if (fCharSequenceSource != null && fCharSequenceSource instanceof IRegionComparible) {
- int offset = taglibFlatNode.getStartOffset(region);
- int length = region.getTextLength();
- prefixname = ((IRegionComparible) fCharSequenceSource).regionMatches(offset, length, JSP12TLDNames.PREFIX);
- }
- else {
- // old fashioned way
- prefixname = (getText(taglibFlatNode.getStartOffset(region), region.getTextLength()).equals(JSP12TLDNames.PREFIX));
- }
- }
- else if (prefixname && region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- prefix = getText(taglibFlatNode.getStartOffset(region), region.getTextLength());
- }
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // nothing to be done
- prefix = null;
- }
- prefix = StringUtils.strip(prefix);
- if (prefix != null && prefix.length() > 0) {
- enableForTaglib(prefix, taglibFlatNode);
- }
- }
-
- public void resetNodes() {
- Iterator tagmarkers = ((JSPTokenizer) getTokenizer()).getNestablePrefixes().iterator();
- while (tagmarkers.hasNext()) {
- if (!((TagMarker) tagmarkers.next()).isGlobal())
- tagmarkers.remove();
- }
- }
-
- public void setStructuredDocument(IStructuredDocument newDocument) {
- resetNodes();
- getStructuredDocumentRegionHandlers().remove(this);
- if (newDocument != null && newDocument.getParser() instanceof StructuredDocumentRegionParser) {
- ((StructuredDocumentRegionParser) newDocument.getParser()).addStructuredDocumentRegionHandler(this);
- }
- }
- }
-
- /**
- * JSPSourceParser constructor comment.
- */
- public JSPSourceParser() {
- super();
- }
-
- public void addNestablePrefix(TagMarker marker) {
- ((JSPTokenizer) getTokenizer()).addNestablePrefix(marker);
- }
-
- public List getNestablePrefixes() {
- return ((JSPTokenizer) getTokenizer()).getNestablePrefixes();
- }
-
- protected BlockTokenizer getTokenizer() {
- if (fTokenizer == null) {
- fTokenizer = new JSPTokenizer();
- getStructuredDocumentRegionHandlers().add(new NestablePrefixHandler());
- }
- return fTokenizer;
- }
-
-
- public RegionParser newInstance() {
- JSPSourceParser newInstance = new JSPSourceParser();
- newInstance.setTokenizer(getTokenizer().newInstance());
- return newInstance;
- }
-
- protected IStructuredDocumentRegion parseNodes() {
- // regions are initially reported as complete offsets within the
- // scanned input
- // they are adjusted here to be indexes from the currentNode's start
- // offset
- IStructuredDocumentRegion headNode = null;
- IStructuredDocumentRegion lastNode = null;
- ITextRegion region = null;
- // DMW: 2/12/03. Made current node local variable, since
- // we changed class to not require state
- IStructuredDocumentRegion currentNode = null;
- String type = null;
-
- while ((region = getNextRegion()) != null) {
- type = region.getType();
- // these types (might) demand a IStructuredDocumentRegion for each
- // of them
- if (type == DOMRegionContext.BLOCK_TEXT) {
- if (currentNode != null && currentNode.getLastRegion().getType() == DOMRegionContext.BLOCK_TEXT) {
- // multiple block texts indicated embedded containers; no
- // new IStructuredDocumentRegion
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(currentNode);
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
- }
- else {
- // not continuing a IStructuredDocumentRegion
- if (currentNode != null) {
- // ensure that any existing node is at least
- // terminated
- if (!currentNode.isEnded()) {
- currentNode.setLength(region.getStart() - currentNode.getStart());
- // fCurrentNode.setTextLength(region.getStart() -
- // fCurrentNode.getStart());
- }
- lastNode = currentNode;
- }
- fireNodeParsed(currentNode);
- currentNode = createStructuredDocumentRegion(type);
- if (lastNode != null) {
- lastNode.setNext(currentNode);
- }
- currentNode.setPrevious(lastNode);
- currentNode.setStart(region.getStart());
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- currentNode.setEnded(true);
- region.adjustStart(-currentNode.getStart());
- currentNode.addRegion(region);
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(currentNode);
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
-
- }
- }
- // the following contexts OPEN new StructuredDocumentRegions
- else if ((currentNode != null && currentNode.isEnded()) || (type == DOMRegionContext.XML_CONTENT) || (type == DOMRegionContext.XML_CHAR_REFERENCE) || (type == DOMRegionContext.XML_ENTITY_REFERENCE) || (type == DOMRegionContext.XML_PI_OPEN) || (type == DOMRegionContext.XML_TAG_OPEN) || (type == DOMRegionContext.XML_END_TAG_OPEN) || (type == DOMRegionContext.XML_COMMENT_OPEN) || (type == DOMRegionContext.XML_CDATA_OPEN) || (type == DOMRegionContext.XML_DECLARATION_OPEN) || (type == DOMJSPRegionContexts.JSP_COMMENT_OPEN) || (type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN) || (type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN) || (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) || (type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) || (type == DOMJSPRegionContexts.JSP_CLOSE) || type == DOMJSPRegionContexts.JSP_EL_OPEN) {
- if (currentNode != null) {
- // ensure that any existing node is at least terminated
- if (!currentNode.isEnded()) {
- currentNode.setLength(region.getStart() - currentNode.getStart());
- // fCurrentNode.setTextLength(region.getStart() -
- // fCurrentNode.getStart());
- }
- lastNode = currentNode;
- }
- fireNodeParsed(currentNode);
- currentNode = createStructuredDocumentRegion(type);
- if (lastNode != null) {
- lastNode.setNext(currentNode);
- }
- currentNode.setPrevious(lastNode);
- currentNode.setStart(region.getStart());
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(currentNode);
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
-
- }
- // the following contexts NEITHER open nor close
- // StructuredDocumentRegions; just add to them
- else if ((type == DOMRegionContext.XML_TAG_NAME) || (type == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) || (type == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) || (type == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) || (type == DOMRegionContext.XML_COMMENT_TEXT) || (type == DOMRegionContext.XML_PI_CONTENT) || (type == DOMRegionContext.XML_DOCTYPE_INTERNAL_SUBSET) || (type == DOMJSPRegionContexts.JSP_COMMENT_TEXT) || (type == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME) || (type == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) || type == DOMJSPRegionContexts.JSP_EL_CONTENT) {
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(currentNode);
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
- }
- // the following contexts close off StructuredDocumentRegions
- // cleanly
- else if ((type == DOMRegionContext.XML_PI_CLOSE) || (type == DOMRegionContext.XML_TAG_CLOSE) || (type == DOMRegionContext.XML_EMPTY_TAG_CLOSE) || (type == DOMRegionContext.XML_COMMENT_CLOSE) || (type == DOMRegionContext.XML_CDATA_CLOSE) || (type == DOMJSPRegionContexts.JSP_CLOSE) || (type == DOMJSPRegionContexts.JSP_COMMENT_CLOSE) || (type == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE) || (type == DOMRegionContext.XML_DECLARATION_CLOSE) || type == DOMJSPRegionContexts.JSP_EL_CLOSE) {
- currentNode.setEnded(true);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- currentNode.addRegion(region);
- region.adjustStart(-currentNode.getStart());
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(currentNode);
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
- }
- // this is extremely rare, but valid
- else if (type == DOMRegionContext.WHITE_SPACE) {
- ITextRegion lastRegion = currentNode.getLastRegion();
- // pack the embedded container with this region
- if (lastRegion instanceof ITextRegionContainer) {
- ITextRegionContainer container = (ITextRegionContainer) lastRegion;
- container.getRegions().add(region);
- // DW, 4/16/2003 container regions have parent. Probably a
- // better place to set,
- // but for now, will (re)set each time through
- container.setParent(currentNode);
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(container);
- region.adjustStart(container.getLength() - region.getStart());
- }
- currentNode.getLastRegion().adjustLength(region.getLength());
- currentNode.adjustLength(region.getLength());
- }
- else if (type == DOMRegionContext.UNDEFINED && currentNode != null) {
- // skip on a very-first region situation as the default
- // behavior is good enough
- // combine with previous if also undefined
- if (currentNode.getLastRegion() != null && currentNode.getLastRegion().getType() == DOMRegionContext.UNDEFINED) {
- currentNode.getLastRegion().adjustLength(region.getLength());
- currentNode.adjustLength(region.getLength());
- }
- // previous wasn't undefined
- else {
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- }
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
- }
- else {
- // if an unknown type is the first region in the document,
- // ensure that a node exists
- if (currentNode == null) {
- currentNode = createStructuredDocumentRegion(type);
- currentNode.setStart(region.getStart());
- }
- currentNode.addRegion(region);
- currentNode.setLength(region.getStart() + region.getLength() - currentNode.getStart());
- region.adjustStart(-currentNode.getStart());
- // DW, 4/16/2003 token regions no longer have parents
- // region.setParent(currentNode);
- if (region instanceof ITextRegionContainer) {
- ((ITextRegionContainer) region).setParent(currentNode);
- }
-
- if (Debug.debugTokenizer)
- System.out.println(getClass().getName() + " found region of not specifically handled type " + region.getType() + " @ " + region.getStart() + "[" + region.getLength() + "]");//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
-
- }
-
- // these regions also get their own node, so close them cleanly
- // NOTE: these regions have new StructuredDocumentRegions created
- // for them above; it may
- // be more readable if that is handled here as well, but the
- // current layout
- // ensures that they open StructuredDocumentRegions the same way
- if ((type == DOMRegionContext.XML_CONTENT) || (type == DOMRegionContext.XML_CHAR_REFERENCE) || (type == DOMRegionContext.XML_ENTITY_REFERENCE) || (type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN) || (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) || (type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) || (type == DOMJSPRegionContexts.JSP_CONTENT) || (type == DOMJSPRegionContexts.JSP_CLOSE)) {
- currentNode.setEnded(true);
- }
- if (headNode == null && currentNode != null) {
- headNode = currentNode;
- }
- }
- if (currentNode != null) {
- fireNodeParsed(currentNode);
- currentNode.setPrevious(lastNode);
- }
- primReset();
- return headNode;
- }
-
- public void removeNestablePrefix(String tagName) {
- ((JSPTokenizer) getTokenizer()).removeNestablePrefix(tagName);
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPParserRegionFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPParserRegionFactory.java
deleted file mode 100644
index 17ee2374fc..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPParserRegionFactory.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.parser.internal;
-
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.parser.ForeignRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.parser.regions.XMLParserRegionFactory;
-
-/**
- *
- * This region factory is very specific to the parser output, and the specific
- * implementation classes for various regions.
- */
-public class JSPParserRegionFactory extends XMLParserRegionFactory {
- public JSPParserRegionFactory() {
- super();
- }
-
- public ITextRegion createToken(String context, int start, int textLength, int length, String lang, String surroundingTag) {
- ITextRegion newRegion = null;
- if (context == DOMJSPRegionContexts.JSP_CONTENT) {
- newRegion = new ForeignRegion(context, start, textLength, length);
- }
- else
- newRegion = super.createToken(context, start, textLength, length, lang, surroundingTag);
- return newRegion;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPStructuredRegionFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPStructuredRegionFactory.java
deleted file mode 100644
index 16be426152..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPStructuredRegionFactory.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.parser.internal;
-
-import org.eclipse.jst.jsp.core.internal.parser.JSPDirectiveStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.internal.parser.XMLStructuredRegionFactory;
-
-/**
- * A simple class to generate instances of StructuredRegions.
- */
-public class JSPStructuredRegionFactory extends XMLStructuredRegionFactory {
-
- public static IStructuredDocumentRegion createRegion(int type) {
- IStructuredDocumentRegion instance = null;
- switch (type) {
- case JSP_DIRECTIVE :
- instance = new JSPDirectiveStructuredDocumentRegion();
- break;
- default :
- instance = XMLStructuredRegionFactory.createRegion(type);
- }
- return instance;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java
deleted file mode 100644
index 46d9faff58..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java
+++ /dev/null
@@ -1,3706 +0,0 @@
-/* The following code was generated by JFlex 1.2.2 on 6/7/06 1:46 AM */
-
-/*******************************************************************************
- * Copyright (c) 2004, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-/*nlsXXX*/
-
-package org.eclipse.jst.jsp.core.internal.parser.internal;
-
-import java.io.CharArrayReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockMarker;
-import org.eclipse.wst.sse.core.internal.ltk.parser.BlockTokenizer;
-import org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.util.Debug;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.parser.ContextRegionContainer;
-import org.eclipse.wst.xml.core.internal.parser.IntStack;
-
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.informatik.tu-muenchen.de/~kleing/jflex/">JFlex</a> 1.2.2
- * on 6/7/06 1:46 AM from the specification file
- * <tt>file:/D:/eclipse.wtp/workspace/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/JSPTokenizer.jflex</tt>
- */
-public class JSPTokenizer implements BlockTokenizer, DOMJSPRegionContexts {
-
- /** this character denotes the end of file */
- final public static int YYEOF = -1;
-
- /** lexical states */
- final public static int ST_JSP_VBL_DQUOTES = 52;
- final public static int ST_JSP_VBL_SQUOTES = 51;
- final public static int ST_JSP_VBL_SQUOTES_END = 53;
- final public static int ST_XML_COMMENT_END = 4;
- final public static int ST_JSP_DIRECTIVE_ATTRIBUTE_VALUE = 21;
- final public static int ST_JSP_EL_SQUOTES_END = 46;
- final public static int ST_JSP_EL_DQUOTES = 45;
- final public static int ST_JSP_EL = 43;
- final public static int ST_BLOCK_TAG_SCAN = 36;
- final public static int ST_JSP_EL_SQUOTES = 44;
- final public static int ST_DHTML_ATTRIBUTE_VALUE = 14;
- final public static int ST_XML_PI_ATTRIBUTE_NAME = 8;
- final public static int ST_DHTML_TAG_CLOSE = 15;
- final public static int ST_XML_ATTRIBUTE_VALUE_DQUOTED = 41;
- final public static int ST_DHTML_EQUALS = 13;
- final public static int ST_XML_PI_ATTRIBUTE_VALUE = 10;
- final public static int ST_XML_ATTRIBUTE_VALUE = 25;
- final public static int ST_JSP_VBL = 50;
- final public static int ST_JSP_SQUOTED_VBL = 56;
- final public static int ST_XML_ATTRIBUTE_VALUE_SQUOTED = 40;
- final public static int ST_XML_ATTRIBUTE_NAME = 23;
- final public static int ST_XML_EQUALS = 24;
- final public static int YYINITIAL = 0;
- final public static int ST_JSP_DIRECTIVE_ATTRIBUTE_NAME = 19;
- final public static int ST_JSP_CONTENT = 16;
- final public static int ST_XML_DOCTYPE_ID_SYSTEM = 31;
- final public static int ST_XML_ELEMENT_DECLARATION = 32;
- final public static int ST_XML_DECLARATION_CLOSE = 27;
- final public static int ST_JSP_DIRECTIVE_EQUALS = 20;
- final public static int ST_JSP_VBL_DQUOTES_END = 54;
- final public static int ST_JSP_DQUOTED_EL = 48;
- final public static int ST_XML_DOCTYPE_DECLARATION = 28;
- final public static int ST_CDATA_END = 2;
- final public static int ST_PI_WS = 6;
- final public static int ST_CDATA_TEXT = 1;
- final public static int ST_JSP_DIRECTIVE_NAME_WHITESPACE = 18;
- final public static int ST_XML_ELEMENT_DECLARATION_CONTENT = 33;
- final public static int ST_XML_ATTLIST_DECLARATION = 34;
- final public static int ST_JSP_EL_DQUOTES_END = 47;
- final public static int ST_JSP_SQUOTED_EL = 49;
- final public static int ST_JSP_COMMENT_END = 39;
- final public static int ST_XML_PI_EQUALS = 9;
- final public static int ST_XML_ATTLIST_DECLARATION_CONTENT = 35;
- final public static int ST_XML_DOCTYPE_ID_PUBLIC = 30;
- final public static int ST_JSP_DQUOTED_VBL = 55;
- final public static int ST_DHTML_ATTRIBUTE_NAME = 12;
- final public static int ST_ABORT_EMBEDDED = 42;
- final public static int ST_XML_DOCTYPE_EXTERNAL_ID = 29;
- final public static int ST_JSP_COMMENT = 38;
- final public static int ST_PI_CONTENT = 7;
- final public static int ST_BLOCK_TAG_INTERNAL_SCAN = 37;
- final public static int ST_PI = 5;
- final public static int ST_XML_DECLARATION = 26;
- final public static int ST_JSP_DIRECTIVE_NAME = 17;
- final public static int ST_XML_TAG_NAME = 22;
- final public static int ST_XML_PI_TAG_CLOSE = 11;
- final public static int ST_XML_COMMENT = 3;
-
- /**
- * Translates characters to character classes
- */
- final private static String yycmap_packed =
- "\11\0\1\5\1\26\2\0\1\17\22\0\1\17\1\25\1\12\1\63"+
- "\1\15\1\22\1\13\1\14\1\24\1\24\1\24\1\24\1\24\1\7"+
- "\1\6\1\3\12\20\1\11\1\70\1\1\1\50\1\2\1\4\1\21"+
- "\1\37\1\71\1\35\1\36\1\54\1\66\1\60\1\60\1\61\1\60"+
- "\1\60\1\32\1\31\1\62\1\51\1\53\1\60\1\65\1\64\1\40"+
- "\1\67\2\60\1\27\1\52\1\60\1\34\1\102\1\23\1\0\1\10"+
- "\1\0\1\56\1\101\1\72\1\57\1\42\1\66\1\73\1\60\1\45"+
- "\1\76\1\60\1\33\1\31\1\47\1\46\1\77\1\60\1\43\1\44"+
- "\1\55\1\100\1\41\1\60\1\30\1\52\1\60\1\16\1\0\1\103"+
- "\71\0\1\75\10\0\27\74\1\0\37\74\1\0\72\74\2\0\13\74"+
- "\2\0\10\74\1\0\65\74\1\0\104\74\11\0\44\74\3\0\2\74"+
- "\4\0\36\74\70\0\131\74\22\0\7\74\16\0\2\75\56\0\106\75"+
- "\32\0\2\75\44\0\1\74\1\75\3\74\1\0\1\74\1\0\24\74"+
- "\1\0\54\74\1\0\7\74\3\0\1\74\1\0\1\74\1\0\1\74"+
- "\1\0\1\74\1\0\22\74\15\0\14\74\1\0\102\74\1\0\14\74"+
- "\1\0\44\74\1\0\4\75\11\0\65\74\2\0\2\74\2\0\2\74"+
- "\3\0\34\74\2\0\10\74\2\0\2\74\67\0\46\74\2\0\1\74"+
- "\7\0\46\74\12\0\21\75\1\0\27\75\1\0\3\75\1\0\1\75"+
- "\1\0\2\75\1\0\1\75\13\0\33\74\5\0\3\74\56\0\32\74"+
- "\5\0\1\75\12\74\10\75\15\0\12\75\6\0\1\75\107\74\2\0"+
- "\5\74\1\0\17\74\1\0\4\74\1\0\1\74\17\75\2\74\2\75"+
- "\1\0\4\75\2\0\12\75\u0207\0\3\75\1\0\65\74\2\0\1\75"+
- "\1\74\20\75\3\0\4\75\3\0\12\74\2\75\2\0\12\75\21\0"+
- "\3\75\1\0\10\74\2\0\2\74\2\0\26\74\1\0\7\74\1\0"+
- "\1\74\3\0\4\74\2\0\1\75\1\0\7\75\2\0\2\75\2\0"+
- "\3\75\11\0\1\75\4\0\2\74\1\0\3\74\2\75\2\0\12\75"+
- "\2\74\20\0\1\75\2\0\6\74\4\0\2\74\2\0\26\74\1\0"+
- "\7\74\1\0\2\74\1\0\2\74\1\0\2\74\2\0\1\75\1\0"+
- "\5\75\4\0\2\75\2\0\3\75\13\0\4\74\1\0\1\74\7\0"+
- "\12\75\2\75\3\74\14\0\3\75\1\0\7\74\1\0\1\74\1\0"+
- "\3\74\1\0\26\74\1\0\7\74\1\0\2\74\1\0\5\74\2\0"+
- "\1\75\1\74\10\75\1\0\3\75\1\0\3\75\22\0\1\74\5\0"+
- "\12\75\21\0\3\75\1\0\10\74\2\0\2\74\2\0\26\74\1\0"+
- "\7\74\1\0\2\74\2\0\4\74\2\0\1\75\1\74\6\75\3\0"+
- "\2\75\2\0\3\75\10\0\2\75\4\0\2\74\1\0\3\74\4\0"+
- "\12\75\22\0\2\75\1\0\6\74\3\0\3\74\1\0\4\74\3\0"+
- "\2\74\1\0\1\74\1\0\2\74\3\0\2\74\3\0\3\74\3\0"+
- "\10\74\1\0\3\74\4\0\5\75\3\0\3\75\1\0\4\75\11\0"+
- "\1\75\17\0\11\75\21\0\3\75\1\0\10\74\1\0\3\74\1\0"+
- "\27\74\1\0\12\74\1\0\5\74\4\0\7\75\1\0\3\75\1\0"+
- "\4\75\7\0\2\75\11\0\2\74\4\0\12\75\22\0\2\75\1\0"+
- "\10\74\1\0\3\74\1\0\27\74\1\0\12\74\1\0\5\74\4\0"+
- "\7\75\1\0\3\75\1\0\4\75\7\0\2\75\7\0\1\74\1\0"+
- "\2\74\4\0\12\75\22\0\2\75\1\0\10\74\1\0\3\74\1\0"+
- "\27\74\1\0\20\74\4\0\6\75\2\0\3\75\1\0\4\75\11\0"+
- "\1\75\10\0\2\74\4\0\12\75\221\0\56\74\1\0\1\74\1\75"+
- "\2\74\7\75\5\0\6\74\1\75\10\75\1\0\12\75\47\0\2\74"+
- "\1\0\1\74\2\0\2\74\1\0\1\74\2\0\1\74\6\0\4\74"+
- "\1\0\7\74\1\0\3\74\1\0\1\74\1\0\1\74\2\0\2\74"+
- "\1\0\2\74\1\0\1\74\1\75\2\74\6\75\1\0\2\75\1\74"+
- "\2\0\5\74\1\0\1\75\1\0\6\75\2\0\12\75\76\0\2\75"+
- "\6\0\12\75\13\0\1\75\1\0\1\75\1\0\1\75\4\0\2\75"+
- "\10\74\1\0\41\74\7\0\24\75\1\0\6\75\4\0\6\75\1\0"+
- "\1\75\1\0\25\75\3\0\7\75\1\0\1\75\346\0\46\74\12\0"+
- "\47\74\11\0\1\74\1\0\2\74\1\0\3\74\1\0\1\74\1\0"+
- "\2\74\1\0\5\74\51\0\1\74\1\0\1\74\1\0\1\74\13\0"+
- "\1\74\1\0\1\74\1\0\1\74\3\0\2\74\3\0\1\74\5\0"+
- "\3\74\1\0\1\74\1\0\1\74\1\0\1\74\1\0\1\74\3\0"+
- "\2\74\3\0\2\74\1\0\1\74\50\0\1\74\11\0\1\74\2\0"+
- "\1\74\2\0\2\74\7\0\2\74\1\0\1\74\1\0\7\74\50\0"+
- "\1\74\4\0\1\74\10\0\1\74\u0c06\0\234\74\4\0\132\74\6\0"+
- "\26\74\2\0\6\74\2\0\46\74\2\0\6\74\2\0\10\74\1\0"+
- "\1\74\1\0\1\74\1\0\1\74\1\0\37\74\2\0\65\74\1\0"+
- "\7\74\1\0\1\74\3\0\3\74\1\0\7\74\3\0\4\74\2\0"+
- "\6\74\4\0\15\74\5\0\3\74\1\0\7\74\323\0\15\75\4\0"+
- "\1\75\104\0\1\74\3\0\2\74\2\0\1\74\121\0\3\74\u0e82\0"+
- "\1\75\1\0\1\74\31\0\11\74\6\75\1\0\5\75\13\0\124\74"+
- "\4\0\2\75\2\0\2\75\2\0\132\74\1\0\3\75\6\0\50\74"+
- "\u1cd3\0\u51a6\74\u0c5a\0\u2ba4\74\134\0\u0800\0\u1ffe\0\2\0";
-
- /**
- * Translates characters to character classes
- */
- final private static char [] yycmap = yy_unpack_cmap(yycmap_packed);
-
- /**
- * Translates a state to a row index in the transition table
- */
- final private static int yy_rowMap [] = {
- 0, 68, 136, 204, 272, 340, 408, 476, 544, 612,
- 680, 748, 816, 884, 952, 1020, 1088, 1156, 1224, 1292,
- 1360, 1428, 1496, 1564, 1632, 1700, 1768, 1836, 1904, 1972,
- 2040, 2108, 2176, 2244, 2312, 2380, 2448, 2516, 2584, 2652,
- 2720, 2788, 2856, 2924, 2992, 3060, 3128, 3196, 3264, 3332,
- 3400, 3468, 3536, 3604, 3672, 3740, 3808, 3876, 3944, 4012,
- 4080, 4148, 4216, 4284, 4352, 4284, 4352, 4420, 4284, 4284,
- 4352, 4488, 4556, 4624, 4692, 4760, 4828, 4896, 4284, 4352,
- 4964, 5032, 5100, 4284, 5168, 5168, 5236, 5304, 5372, 4964,
- 4284, 5440, 5508, 4284, 5576, 5644, 5712, 5780, 4284, 4352,
- 5848, 5916, 5984, 6052, 6120, 6188, 4284, 6256, 6256, 6324,
- 6392, 6460, 6528, 6596, 4284, 6664, 6732, 6800, 6868, 6936,
- 7004, 4284, 7072, 7140, 7208, 7276, 7344, 7412, 7480, 7548,
- 4284, 7616, 7684, 7752, 7820, 7888, 7956, 8024, 8092, 8092,
- 8160, 8228, 8296, 8364, 8364, 8432, 8500, 8568, 8636, 8636,
- 8704, 8772, 8840, 8908, 4284, 8976, 8976, 9044, 9112, 9180,
- 9248, 4284, 4284, 4352, 9316, 4284, 4352, 9384, 9452, 9520,
- 9588, 4284, 9656, 9724, 9792, 9860, 4284, 9928, 9996, 10064,
- 10132, 4284, 4284, 10200, 4284, 10268, 10336, 10268, 10404, 10472,
- 10404, 4284, 4284, 10540, 10608, 10676, 4284, 10744, 10812, 10880,
- 10948, 11016, 4284, 4284, 11084, 4284, 11152, 11220, 11152, 11288,
- 11356, 11288, 4284, 4284, 11424, 11492, 11560, 4284, 11628, 11696,
- 11764, 4284, 4284, 11832, 11900, 11968, 12036, 12104, 4284, 12172,
- 12240, 12308, 12376, 12444, 12512, 12580, 12648, 12716, 4284, 12784,
- 12852, 4284, 4284, 5168, 5304, 4284, 12920, 5372, 12988, 5440,
- 5576, 5644, 13056, 5712, 4284, 13124, 13192, 5780, 13260, 4284,
- 11900, 4284, 6256, 6324, 4284, 13328, 6392, 13396, 4284, 13464,
- 13532, 7072, 13600, 7276, 4284, 13668, 7344, 13736, 13804, 13872,
- 13940, 14008, 14076, 7820, 4284, 14144, 14212, 8092, 8160, 4284,
- 14280, 14348, 14416, 14484, 14552, 8296, 8092, 8364, 8432, 4284,
- 8500, 8568, 8364, 8636, 8704, 4284, 14620, 14688, 14756, 14824,
- 14892, 14960, 15028, 8976, 9044, 4284, 15096, 15164, 15232, 15300,
- 15368, 15436, 15504, 15572, 15640, 4284, 4284, 4284, 15708, 4284,
- 4284, 15776, 15844, 15912, 15980, 10268, 4284, 16048, 16116, 10404,
- 4284, 16184, 16252, 16320, 16388, 16456, 16524, 16592, 16660, 16728,
- 10948, 11152, 4284, 16796, 16864, 11288, 4284, 16932, 17000, 17068,
- 17136, 17204, 17272, 17340, 17408, 17476, 4284, 4284, 4284, 17544,
- 17612, 17680, 17748, 17816, 4284, 17884, 17952, 4284, 4284, 4284,
- 4284, 4284, 4692, 18020, 18088, 18156, 18224, 18292, 18360, 18292,
- 18428, 18496, 18428, 18564, 18632, 18700, 18768, 18836, 18904, 18972,
- 18972, 19040, 19108, 19108, 19176, 8840, 8840, 19244, 19312, 19380,
- 19380, 19448, 9180, 9180, 19516, 19584, 15912, 19652, 10064, 10064,
- 19720, 19788, 10268, 10268, 19856, 19924, 10404, 10404, 19992, 20060,
- 10540, 10540, 16456, 20128, 20196, 10744, 10744, 16660, 20264, 20332,
- 10948, 10948, 20400, 11152, 11152, 20468, 20536, 11288, 11288, 20604,
- 20672, 11424, 11424, 17204, 20740, 20808, 11628, 11628, 17408, 20876,
- 4284, 4284, 20944, 21012, 4284, 21080, 21148, 21216, 7072, 4284,
- 4284, 21284, 21352, 21420, 21488, 21556, 14484, 14824, 8840, 21624,
- 15300, 9180, 21692, 4284, 10064, 10268, 21760, 10404, 21828, 10540,
- 21896, 4284, 10744, 21964, 10948, 11152, 22032, 11288, 22100, 11424,
- 22168, 4284, 11628, 22236, 22304, 22372, 22440, 22508, 22576, 22644,
- 22712, 22780, 22848, 22916, 22984, 23052, 23120, 23188, 23256, 23324,
- 23392, 23460, 23528, 23596, 4692, 23664, 23732, 23800, 23868, 23936,
- 4284, 4284, 24004, 24072, 24140, 24208, 16456, 16660, 24276, 24344,
- 17204, 17408, 24412, 24480, 24548, 4284, 4284, 4284, 24616, 24684,
- 24752, 24820, 24888, 24956, 25024, 6800, 25092, 25160, 25228, 25296,
- 25364, 25432, 25500, 4284, 25568, 8840, 9180, 10268, 10404, 11152,
- 11288, 25636, 25704, 25772, 25840, 25908, 25976, 26044, 26112, 26180,
- 26248, 26316, 26384, 26452, 26520, 26588, 26656, 26724, 26792, 26860,
- 26928, 26996, 27064, 27132, 27200, 27268, 27336, 27404, 27472, 27540,
- 27608, 27676, 27744, 27812, 27880, 27948, 28016, 28084, 28152, 28220,
- 28288, 4284, 28356, 28424, 28492, 28560, 6800, 28628, 28696, 28764,
- 28832, 28900, 28968, 29036, 29104, 29172, 29240, 29308, 29376, 29444,
- 29512
- };
-
- /**
- * The packed transition table of the DFA
- */
- final private static String yy_packed =
- "\1\72\1\73\11\72\1\74\1\72\1\75\4\72\1\76"+
- "\40\72\1\77\20\72\1\100\1\101\102\100\1\102\1\103"+
- "\21\102\1\104\2\102\1\105\55\102\1\106\1\107\102\106"+
- "\1\102\1\103\5\102\1\110\16\102\1\105\56\102\1\103"+
- "\2\102\1\111\1\112\2\102\2\113\5\102\1\112\6\102"+
- "\1\112\2\114\3\113\1\102\10\113\1\115\2\113\1\102"+
- "\10\113\1\115\1\113\1\102\4\113\1\102\4\113\1\102"+
- "\4\113\3\102\1\103\2\102\1\111\1\116\11\102\1\116"+
- "\6\102\1\116\55\102\1\117\1\120\2\117\1\121\21\117"+
- "\1\105\55\117\1\102\1\103\2\102\1\122\1\112\2\102"+
- "\2\123\5\102\1\112\6\102\1\112\5\123\1\102\13\123"+
- "\1\102\12\123\1\102\4\123\1\102\4\123\1\102\4\123"+
- "\3\102\1\103\2\102\1\122\1\112\2\102\2\123\5\102"+
- "\1\112\6\102\1\112\5\123\1\102\13\123\1\124\12\123"+
- "\1\102\4\123\1\102\4\123\1\102\4\123\2\102\1\125"+
- "\1\103\1\102\1\126\1\127\1\112\4\125\1\130\1\125"+
- "\1\131\2\125\1\112\6\125\1\112\55\125\1\102\1\103"+
- "\2\102\1\132\21\102\1\105\56\102\1\103\1\133\1\134"+
- "\1\102\1\112\2\102\2\135\5\102\1\112\6\102\1\112"+
- "\5\135\1\102\13\135\1\102\12\135\1\102\4\135\1\102"+
- "\4\135\1\102\4\135\3\102\1\103\1\133\1\134\1\102"+
- "\1\112\2\102\2\135\5\102\1\112\6\102\1\112\5\135"+
- "\1\102\13\135\1\136\12\135\1\102\4\135\1\102\4\135"+
- "\1\102\4\135\2\102\1\137\1\103\1\133\1\140\1\137"+
- "\1\112\4\137\1\141\1\137\1\142\2\137\1\112\6\137"+
- "\1\112\55\137\1\102\1\103\3\102\1\112\11\102\1\112"+
- "\6\102\1\112\55\102\1\143\1\144\20\143\1\145\61\143"+
- "\1\102\1\146\3\102\1\112\2\102\2\147\5\102\1\112"+
- "\2\102\1\150\3\102\1\112\5\147\1\102\13\147\1\102"+
- "\12\147\1\102\4\147\1\102\4\147\1\102\4\147\3\102"+
- "\1\146\3\102\1\151\11\102\1\151\2\102\1\150\3\102"+
- "\1\151\56\102\1\146\3\102\1\112\2\102\2\152\5\102"+
- "\1\112\2\102\1\150\3\102\1\112\5\152\1\102\13\152"+
- "\1\102\12\152\1\102\4\152\1\102\4\152\1\102\4\152"+
- "\3\102\1\146\3\102\1\112\2\102\2\152\5\102\1\112"+
- "\2\102\1\150\3\102\1\112\5\152\1\102\13\152\1\153"+
- "\12\152\1\102\4\152\1\102\4\152\1\102\4\152\2\102"+
- "\1\154\1\146\1\102\1\155\1\154\1\112\4\154\1\156"+
- "\1\154\1\157\2\154\1\112\2\154\1\160\3\154\1\112"+
- "\55\154\1\161\1\162\1\163\1\164\4\161\2\165\15\161"+
- "\5\166\1\161\13\166\1\161\12\166\1\161\4\166\1\161"+
- "\4\166\1\161\1\167\3\166\2\161\1\102\1\170\1\163"+
- "\1\164\1\102\1\112\2\102\2\171\5\102\1\112\6\102"+
- "\1\112\5\171\1\102\13\171\1\102\12\171\1\102\4\171"+
- "\1\102\4\171\1\102\4\171\3\102\1\170\1\163\1\164"+
- "\1\102\1\112\2\102\2\171\5\102\1\112\6\102\1\112"+
- "\5\171\1\102\13\171\1\172\12\171\1\102\4\171\1\102"+
- "\4\171\1\102\4\171\2\102\1\173\1\174\1\163\1\175"+
- "\1\173\1\112\4\173\1\176\1\173\1\177\1\200\1\173"+
- "\1\112\6\173\1\112\34\173\1\201\20\173\1\102\1\202"+
- "\1\203\2\102\1\112\11\102\1\112\6\102\1\112\7\102"+
- "\1\204\1\205\2\102\1\206\11\102\1\206\1\102\1\205"+
- "\1\204\25\102\1\103\1\203\2\102\1\112\11\102\1\112"+
- "\6\102\1\112\5\102\1\207\50\102\1\103\1\203\2\102"+
- "\1\112\2\102\2\210\5\102\1\112\6\102\1\112\5\210"+
- "\1\207\13\210\1\102\12\210\1\102\4\210\1\102\4\210"+
- "\1\102\4\210\3\102\1\103\1\203\2\102\1\112\11\102"+
- "\1\112\6\102\1\112\5\102\1\207\7\102\1\211\6\102"+
- "\1\212\10\102\1\211\12\102\1\212\4\102\1\213\1\103"+
- "\1\203\1\214\1\213\1\112\4\213\1\215\1\213\1\216"+
- "\2\213\1\112\6\213\1\112\5\213\1\217\47\213\1\220"+
- "\1\103\1\203\1\221\1\220\1\112\4\220\1\222\1\220"+
- "\1\223\2\220\1\112\6\220\1\112\5\220\1\224\47\220"+
- "\1\225\1\103\1\203\1\226\1\225\1\112\4\225\1\227"+
- "\1\225\1\230\2\225\1\112\6\225\1\112\55\225\1\231"+
- "\1\232\1\233\101\231\1\234\1\103\1\203\1\235\1\234"+
- "\1\112\4\234\1\236\1\234\1\237\2\234\1\112\6\234"+
- "\1\112\55\234\1\240\1\241\1\242\101\240\1\243\1\244"+
- "\102\243\1\102\1\245\24\102\1\105\55\102\1\246\1\247"+
- "\102\246\1\102\1\103\5\102\1\250\16\102\1\105\55\102"+
- "\1\251\1\252\3\251\1\253\6\251\1\254\1\255\1\251"+
- "\1\253\6\251\1\253\34\251\1\256\20\251\1\257\1\252"+
- "\3\257\1\260\4\257\1\261\2\257\1\262\1\257\1\260"+
- "\6\257\1\260\34\257\1\263\20\257\1\102\1\103\24\102"+
- "\1\105\55\102\1\264\1\265\10\264\1\266\1\264\1\267"+
- "\1\270\65\264\1\271\1\272\1\273\12\272\1\102\11\272"+
- "\1\274\55\272\1\275\1\276\10\275\1\102\13\275\1\277"+
- "\55\275\1\102\1\103\12\102\1\300\11\102\1\105\56\102"+
- "\1\103\10\102\1\301\13\102\1\105\55\102\1\302\1\303"+
- "\10\302\1\261\67\302\1\304\1\305\1\306\1\307\12\306"+
- "\1\254\65\306\1\310\1\305\1\311\1\312\10\311\1\313"+
- "\1\311\1\314\46\311\1\315\17\311\1\316\1\317\1\320"+
- "\12\317\1\102\11\317\1\321\55\317\1\322\1\323\10\322"+
- "\1\102\13\322\1\324\55\322\1\102\1\103\12\102\1\325"+
- "\11\102\1\105\56\102\1\103\10\102\1\326\13\102\1\105"+
- "\55\102\1\327\1\330\10\327\1\261\67\327\1\331\1\332"+
- "\1\333\1\334\12\333\1\254\65\333\1\335\1\332\1\72"+
- "\1\0\11\72\1\0\1\72\1\0\4\72\1\0\40\72"+
- "\1\0\20\72\3\0\1\336\1\337\15\0\1\340\2\0"+
- "\1\341\63\0\1\342\2\0\2\343\5\0\1\342\6\0"+
- "\1\342\5\343\1\0\13\343\1\0\12\343\1\344\4\343"+
- "\1\0\4\343\1\0\4\343\2\0\1\345\1\0\11\345"+
- "\1\0\1\345\1\346\1\347\3\345\1\0\61\345\5\0"+
- "\1\342\2\0\2\350\5\0\1\342\6\0\1\342\5\350"+
- "\1\0\13\350\1\0\12\350\1\0\4\350\1\0\4\350"+
- "\1\0\4\350\2\0\1\345\1\0\11\345\1\0\2\345"+
- "\1\351\3\345\1\0\40\345\1\352\20\345\126\0\1\353"+
- "\2\0\1\354\101\0\1\355\67\0\1\356\76\0\1\357"+
- "\106\0\1\112\11\0\1\112\6\0\1\112\63\0\4\113"+
- "\6\0\1\113\6\0\5\113\1\0\13\113\1\0\12\113"+
- "\1\0\4\113\1\0\11\113\10\0\4\113\6\0\1\113"+
- "\6\0\2\113\1\360\2\113\1\0\13\113\1\0\12\113"+
- "\1\0\4\113\1\0\11\113\10\0\4\113\6\0\1\113"+
- "\6\0\2\113\1\361\2\113\1\0\13\113\1\0\12\113"+
- "\1\0\4\113\1\0\11\113\7\0\1\116\11\0\1\116"+
- "\6\0\1\116\57\0\1\362\103\0\1\363\107\0\4\123"+
- "\6\0\1\123\6\0\5\123\1\0\13\123\1\0\12\123"+
- "\1\0\4\123\1\0\11\123\2\0\1\125\2\0\1\364"+
- "\1\125\1\0\4\125\1\0\1\125\1\0\2\125\1\0"+
- "\6\125\1\0\56\125\1\0\1\363\1\364\1\125\1\0"+
- "\4\125\1\0\1\125\1\0\2\125\1\0\6\125\1\0"+
- "\55\125\1\365\1\0\10\365\1\366\2\365\1\367\45\365"+
- "\1\367\20\365\1\370\1\0\12\370\1\366\1\371\45\370"+
- "\1\371\20\370\2\0\1\133\1\372\106\0\4\135\6\0"+
- "\1\135\6\0\5\135\1\0\13\135\1\0\12\135\1\0"+
- "\4\135\1\0\11\135\2\0\1\137\2\0\1\373\1\137"+
- "\1\0\4\137\1\0\1\137\1\0\2\137\1\0\6\137"+
- "\1\0\56\137\1\0\1\133\1\374\1\137\1\0\4\137"+
- "\1\0\1\137\1\0\2\137\1\0\6\137\1\0\55\137"+
- "\1\141\1\0\1\375\1\376\1\141\1\375\4\141\1\377"+
- "\1\141\1\375\1\u0100\1\141\1\375\6\141\1\375\34\141"+
- "\1\u0100\20\141\1\142\1\0\1\u0101\1\u0102\1\142\1\u0101"+
- "\4\142\1\u0101\1\142\1\377\1\u0103\1\142\1\u0101\6\142"+
- "\1\u0101\34\142\1\u0103\20\142\2\0\1\u0104\123\0\1\353"+
- "\2\0\1\u0105\64\0\4\147\6\0\1\147\6\0\5\147"+
- "\1\0\13\147\1\0\12\147\1\0\4\147\1\0\11\147"+
- "\4\0\1\u0106\106\0\1\151\11\0\1\151\6\0\1\151"+
- "\63\0\4\152\6\0\1\152\6\0\5\152\1\0\13\152"+
- "\1\0\12\152\1\0\4\152\1\0\11\152\2\0\1\154"+
- "\2\0\1\u0107\1\154\1\0\4\154\1\0\1\154\1\0"+
- "\2\154\1\0\6\154\1\0\55\154\1\u0108\1\0\10\u0108"+
- "\1\u0109\2\u0108\1\u010a\45\u0108\1\u010a\20\u0108\1\u010b\1\0"+
- "\12\u010b\1\u0109\1\u010c\45\u010b\1\u010c\20\u010b\1\154\1\0"+
- "\1\u0106\1\u0107\1\154\1\0\4\154\1\0\1\154\1\0"+
- "\2\154\1\0\6\154\1\0\55\154\1\161\3\0\23\161"+
- "\5\0\1\161\13\0\1\161\12\0\1\161\4\0\1\161"+
- "\4\0\1\161\4\0\2\161\3\0\1\336\16\0\1\353"+
- "\2\0\1\341\60\0\1\u010d\101\0\1\161\3\0\2\161"+
- "\4\165\6\161\1\165\6\161\5\166\1\161\13\166\1\161"+
- "\12\166\1\161\4\166\1\161\4\166\1\165\4\166\2\161"+
- "\6\0\4\166\6\0\1\166\6\0\5\166\1\0\13\166"+
- "\1\0\12\166\1\0\4\166\1\0\11\166\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\7\166\1\u010e\3\166"+
- "\1\0\12\166\1\0\4\166\1\0\11\166\5\0\1\336"+
- "\4\0\2\u010f\10\0\1\353\2\0\1\341\1\0\5\u010f"+
- "\1\0\13\u010f\1\0\12\u010f\1\0\4\u010f\1\0\4\u010f"+
- "\1\0\4\u010f\10\0\4\171\6\0\1\171\6\0\5\171"+
- "\1\0\13\171\1\0\12\171\1\0\4\171\1\0\11\171"+
- "\2\0\1\173\2\0\1\u0110\1\173\1\0\4\173\1\0"+
- "\1\173\1\0\2\173\1\0\6\173\1\0\55\173\3\0"+
- "\1\336\4\0\2\u0111\10\0\1\353\2\0\1\341\1\0"+
- "\5\u0111\1\0\13\u0111\1\0\12\u0111\1\0\4\u0111\1\0"+
- "\4\u0111\1\0\4\u0111\2\0\1\173\1\0\1\u010d\1\u0110"+
- "\1\173\1\0\4\173\1\0\1\173\1\0\2\173\1\0"+
- "\6\173\1\0\55\173\1\u0112\1\0\10\u0112\1\u0113\2\u0112"+
- "\1\u0114\45\u0112\1\u0114\20\u0112\1\u0115\1\0\12\u0115\1\u0113"+
- "\1\u0116\45\u0115\1\u0116\20\u0115\1\173\2\0\1\u0110\1\173"+
- "\1\0\4\173\1\0\1\173\1\0\1\173\1\u0117\1\0"+
- "\6\173\1\0\56\173\2\0\1\u0110\1\173\1\0\4\173"+
- "\1\0\1\173\1\0\1\173\1\u0118\1\0\6\173\1\0"+
- "\55\173\3\0\1\336\16\0\1\353\2\0\1\u0105\124\0"+
- "\1\u0119\2\0\1\u0119\72\0\1\u011a\14\0\1\u011a\60\0"+
- "\2\u011b\50\0\23\u011c\1\u011d\60\u011c\6\0\4\210\6\0"+
- "\1\210\6\0\5\210\1\0\13\210\1\0\12\210\1\0"+
- "\4\210\1\0\11\210\54\0\1\u011e\120\0\1\u011f\10\0"+
- "\1\u011f\3\0\1\213\2\0\1\u0120\1\213\1\0\4\213"+
- "\1\0\1\213\1\0\2\213\1\0\6\213\1\0\55\213"+
- "\1\u0121\1\0\10\u0121\1\u0122\2\u0121\1\u0123\45\u0121\1\u0123"+
- "\20\u0121\1\u0124\1\0\1\u0124\2\u0125\1\u0124\4\u0125\2\u0124"+
- "\1\u0126\1\u0127\1\u0124\4\u0125\1\u0124\10\u0125\1\u0124\26\u0125"+
- "\1\u0127\10\u0125\2\u0124\4\u0125\2\u0124\1\217\2\u011c\1\u0128"+
- "\1\217\1\u011c\4\217\1\u011c\1\217\1\u011c\2\217\1\u011c"+
- "\3\217\1\u0129\2\217\1\u011c\55\217\1\220\2\0\1\u012a"+
- "\1\220\1\0\4\220\1\0\1\220\1\0\2\220\1\0"+
- "\6\220\1\0\55\220\12\u012b\1\u012c\71\u012b\14\u012d\1\u012c"+
- "\67\u012d\1\224\2\u011c\1\u012e\1\224\1\u011c\4\224\1\u011c"+
- "\1\224\1\u011c\2\224\1\u011c\3\224\1\u012f\2\224\1\u011c"+
- "\55\224\1\225\2\0\1\u0130\1\225\1\0\4\225\1\0"+
- "\1\225\1\0\2\225\1\0\6\225\1\0\55\225\1\u0131"+
- "\1\0\10\u0131\1\u0132\2\u0131\1\u0133\45\u0131\1\u0133\20\u0131"+
- "\1\u0134\1\0\1\u0134\2\u0135\1\u0134\4\u0135\2\u0134\1\u0136"+
- "\1\u0137\1\u0134\4\u0135\1\u0134\10\u0135\1\u0134\26\u0135\1\u0137"+
- "\10\u0135\2\u0134\4\u0135\2\u0134\2\231\1\0\103\231\1\0"+
- "\17\231\1\u0138\2\231\1\u0139\56\231\1\234\2\0\1\u013a"+
- "\1\234\1\0\4\234\1\0\1\234\1\0\2\234\1\0"+
- "\6\234\1\0\55\234\1\u013b\1\0\10\u013b\1\u013c\2\u013b"+
- "\1\u013d\45\u013b\1\u013d\20\u013b\1\u013e\1\0\1\u013e\2\u013f"+
- "\1\u013e\4\u013f\2\u013e\1\u0140\1\u0141\1\u013e\4\u013f\1\u013e"+
- "\10\u013f\1\u013e\26\u013f\1\u0141\10\u013f\2\u013e\4\u013f\2\u013e"+
- "\2\240\1\0\103\240\1\0\17\240\1\u0142\2\240\1\u0143"+
- "\56\240\22\0\1\340\2\0\1\354\65\0\1\u0144\74\0"+
- "\1\251\1\0\12\251\1\0\1\u0145\45\251\1\u0145\20\251"+
- "\3\0\1\u0146\16\0\1\353\2\0\1\354\56\0\1\251"+
- "\1\0\3\251\1\253\6\251\1\0\1\u0145\1\251\1\253"+
- "\6\251\1\253\34\251\1\u0145\36\251\1\u0147\103\251\1\u0148"+
- "\65\251\1\257\1\0\10\257\1\0\2\257\1\u0149\45\257"+
- "\1\u0149\21\257\1\0\3\257\1\260\4\257\1\0\2\257"+
- "\1\u0149\1\257\1\260\6\257\1\260\34\257\1\u0149\36\257"+
- "\1\u014a\103\257\1\u014b\65\257\12\264\1\0\1\264\1\0"+
- "\1\u014c\65\264\1\0\12\264\1\0\1\264\1\0\1\u014c"+
- "\4\264\1\u014d\60\264\1\0\12\264\1\0\1\264\1\0"+
- "\1\264\1\u014e\64\264\1\u014f\14\u0150\1\u0151\103\u0150\1\u0151"+
- "\5\u0150\1\u0152\2\u0150\1\u0153\56\u0150\12\u0154\1\u0155\103\u0154"+
- "\1\u0155\7\u0154\1\u0156\2\u0154\1\u0157\56\u0154\12\302\1\0"+
- "\67\302\1\u0158\1\0\12\302\1\0\7\302\1\u0159\57\302"+
- "\1\u0158\1\0\12\302\1\u015a\71\302\14\306\1\0\65\306"+
- "\1\u015b\1\0\14\306\1\0\5\306\1\u015c\57\306\1\u015b"+
- "\1\0\14\306\1\u015d\67\306\12\311\1\0\1\311\1\0"+
- "\66\311\1\0\12\311\1\0\1\311\1\0\5\311\1\u015e"+
- "\60\311\1\0\12\311\1\0\1\311\1\0\1\311\1\u015f"+
- "\64\311\1\0\14\u0160\1\u0161\103\u0160\1\u0161\5\u0160\1\u0162"+
- "\2\u0160\1\u0163\56\u0160\12\u0164\1\u0165\103\u0164\1\u0165\7\u0164"+
- "\1\u0166\2\u0164\1\u0167\56\u0164\12\327\1\0\67\327\1\u0168"+
- "\1\0\12\327\1\0\7\327\1\u0169\57\327\1\u0168\1\0"+
- "\12\327\1\u016a\71\327\14\333\1\0\65\333\1\u016b\1\0"+
- "\14\333\1\0\5\333\1\u016c\57\333\1\u016b\1\0\14\333"+
- "\1\u016d\67\333\7\0\1\u016e\11\0\1\u016f\3\0\1\u0170"+
- "\22\0\1\u0171\42\0\1\u0172\24\0\1\u0173\54\0\1\342"+
- "\2\0\2\u0174\5\0\1\342\6\0\1\342\5\u0174\1\0"+
- "\13\u0174\1\0\12\u0174\1\0\4\u0174\1\0\4\u0174\1\0"+
- "\4\u0174\2\0\1\u0175\1\0\3\u0175\1\u0176\4\343\1\u0175"+
- "\1\0\3\u0175\1\u0176\1\343\1\u0175\1\0\3\u0175\1\u0176"+
- "\5\343\1\u0175\13\343\1\u0175\12\343\1\u0175\4\343\1\u0177"+
- "\11\343\2\u0175\20\0\1\u0178\7\0\1\u0179\70\0\1\346"+
- "\66\0\103\347\1\u017a\1\u0175\1\0\3\u0175\1\u0176\4\350"+
- "\1\u0175\1\0\3\u0175\1\u0176\1\350\1\u0175\1\0\3\u0175"+
- "\1\u0176\5\350\1\u0175\13\350\1\u0175\12\350\1\u0175\4\350"+
- "\1\u017b\11\350\2\u0175\103\351\1\u017c\63\0\1\352\27\0"+
- "\1\u016e\15\0\1\u0170\22\0\1\u0171\67\0\1\u0173\51\0"+
- "\1\u017d\103\0\1\u017e\107\0\4\113\6\0\1\113\6\0"+
- "\3\113\2\u017f\1\0\13\113\1\0\12\113\1\0\4\113"+
- "\1\0\11\113\10\0\4\113\6\0\1\113\6\0\5\113"+
- "\1\0\13\113\1\0\2\113\1\u0180\7\113\1\0\4\113"+
- "\1\0\6\113\1\u0180\2\113\2\0\12\365\1\366\3\365"+
- "\1\0\65\365\14\370\1\366\1\370\1\0\65\370\1\375"+
- "\1\0\10\375\1\377\2\375\1\u0181\45\375\1\u0181\20\375"+
- "\1\141\2\375\1\376\1\141\1\375\4\141\1\377\1\141"+
- "\1\375\1\141\1\137\1\375\6\141\1\375\55\141\1\u0101"+
- "\1\0\12\u0101\1\377\1\u0182\45\u0101\1\u0182\20\u0101\1\142"+
- "\2\u0101\1\u0102\1\142\1\u0101\4\142\1\u0101\1\142\1\377"+
- "\1\142\1\137\1\u0101\6\142\1\u0101\55\142\12\u0108\1\u0109"+
- "\3\u0108\1\0\65\u0108\14\u010b\1\u0109\1\u010b\1\0\65\u010b"+
- "\6\0\4\166\6\0\1\166\6\0\5\166\1\0\13\166"+
- "\1\0\12\166\1\0\4\166\1\0\6\166\1\u0183\2\166"+
- "\10\0\4\u010f\6\0\1\u010f\6\0\5\u010f\1\0\13\u010f"+
- "\1\0\12\u010f\1\0\4\u010f\1\0\11\u010f\10\0\4\u0111"+
- "\6\0\1\u0111\6\0\5\u0111\1\0\13\u0111\1\0\12\u0111"+
- "\1\0\4\u0111\1\0\11\u0111\2\0\12\u0112\1\u0113\3\u0112"+
- "\1\0\65\u0112\14\u0115\1\u0113\1\u0115\1\0\65\u0115\1\u0184"+
- "\2\u0185\1\u0186\1\u0184\1\u0185\4\u0184\1\u0185\1\u0184\1\u0185"+
- "\2\u0184\1\u0185\6\u0184\1\u0185\54\u0184\1\173\1\u0187\2\u0188"+
- "\1\u0189\1\u0187\1\u0188\4\u0187\1\u0188\1\u0187\1\u0188\2\u0187"+
- "\1\u0188\6\u0187\1\u0188\54\u0187\1\173\35\0\1\u018a\34\0"+
- "\1\u018a\51\0\1\u018b\14\0\1\u018b\70\0\1\u018c\11\0"+
- "\1\u018c\73\0\1\u018d\17\0\1\u018d\110\0\1\u018e\7\0"+
- "\1\u018e\2\0\12\u0121\1\u0122\3\u0121\1\0\65\u0121\1\u0124"+
- "\1\0\12\u0124\1\u0122\1\u018f\45\u0124\1\u018f\21\u0124\1\0"+
- "\12\u0124\1\u0190\1\u018f\45\u0124\1\u018f\20\u0124\14\0\1\u0191"+
- "\67\0\14\u0124\1\u0190\1\u0124\1\0\65\u0124\12\u0131\1\u0132"+
- "\3\u0131\1\0\65\u0131\1\u0134\1\0\12\u0134\1\u0132\1\u0192"+
- "\45\u0134\1\u0192\21\u0134\1\0\12\u0134\1\u0193\1\u0192\45\u0134"+
- "\1\u0192\20\u0134\14\0\1\u0194\67\0\14\u0134\1\u0193\1\u0134"+
- "\1\0\65\u0134\2\231\1\0\4\231\1\u0195\15\231\1\u0196"+
- "\22\231\1\u0197\35\231\1\0\31\231\1\u0198\47\231\12\u013b"+
- "\1\u013c\3\u013b\1\0\65\u013b\1\u013e\1\0\12\u013e\1\u013c"+
- "\1\u0199\45\u013e\1\u0199\21\u013e\1\0\12\u013e\1\u019a\1\u0199"+
- "\45\u013e\1\u0199\20\u013e\14\0\1\u019b\67\0\14\u013e\1\u019a"+
- "\1\u013e\1\0\65\u013e\2\240\1\0\4\240\1\u019c\15\240"+
- "\1\u019d\22\240\1\u019e\35\240\1\0\31\240\1\u019f\47\240"+
- "\22\0\1\u01a0\61\0\16\251\1\0\65\251\16\257\1\0"+
- "\65\257\12\264\1\0\1\264\1\0\1\264\1\u01a1\64\264"+
- "\1\u014f\7\264\1\u01a2\2\264\1\0\1\264\1\0\1\u014c"+
- "\7\264\1\u01a3\22\264\1\u01a4\32\264\1\0\12\u01a1\1\0"+
- "\1\u01a1\1\0\66\u01a1\1\0\12\u014f\1\0\1\u014f\1\0"+
- "\1\u01a5\65\u014f\1\0\7\u0150\1\u01a6\4\u0150\1\u0151\10\u0150"+
- "\1\u01a7\22\u0150\1\u01a8\47\u0150\1\u0151\17\u0150\1\u01a9\47\u0150"+
- "\7\u0154\1\u01aa\2\u0154\1\u0155\12\u0154\1\u01ab\22\u0154\1\u01ac"+
- "\45\u0154\1\u0155\21\u0154\1\u01ad\47\u0154\12\302\1\0\100\302"+
- "\1\u01ae\2\302\1\0\12\302\1\u01af\22\302\1\u01b0\31\302"+
- "\1\u0158\1\0\102\u01b1\1\u01b2\1\u01b1\14\306\1\0\76\306"+
- "\1\u01b3\4\306\1\0\10\306\1\u01b4\22\306\1\u01b5\31\306"+
- "\1\u015b\1\0\102\u01b6\1\u01b7\1\u01b6\7\311\1\u01b8\2\311"+
- "\1\0\1\311\1\0\10\311\1\u01b9\22\311\1\u01ba\32\311"+
- "\1\0\7\u0160\1\u01bb\4\u0160\1\u0161\10\u0160\1\u01bc\22\u0160"+
- "\1\u01bd\47\u0160\1\u0161\17\u0160\1\u01be\47\u0160\7\u0164\1\u01bf"+
- "\2\u0164\1\u0165\12\u0164\1\u01c0\22\u0164\1\u01c1\45\u0164\1\u0165"+
- "\21\u0164\1\u01c2\47\u0164\12\327\1\0\100\327\1\u01c3\2\327"+
- "\1\0\12\327\1\u01c4\22\327\1\u01c5\31\327\1\u0168\1\0"+
- "\102\u01c6\1\u01c7\1\u01c6\14\333\1\0\76\333\1\u01c8\4\333"+
- "\1\0\10\333\1\u01c9\22\333\1\u01ca\31\333\1\u016b\1\0"+
- "\102\u01cb\1\u01cc\1\u01cb\7\0\1\u01cd\103\0\1\u01ce\131\0"+
- "\1\u01cf\46\0\1\u0174\1\0\11\u0174\1\0\6\u0174\1\0"+
- "\61\u0174\1\u0175\1\0\11\u0175\1\0\6\u0175\1\0\45\u0175"+
- "\1\0\14\u0175\1\0\3\u0175\1\u0176\5\u0175\1\0\3\u0175"+
- "\1\u0176\2\u0175\1\0\3\u0175\1\u0176\41\u0175\1\u01d0\13\u0175"+
- "\20\0\1\u0178\47\0\1\u01d1\33\0\1\u01d2\14\0\3\u01d2"+
- "\2\0\1\u01d2\11\0\1\u01d2\1\0\2\u01d2\6\0\1\u01d2"+
- "\2\0\2\u01d2\6\0\1\u01d2\10\0\4\113\6\0\1\113"+
- "\6\0\5\113\1\0\11\113\1\u01d3\1\113\1\0\1\u01d3"+
- "\11\113\1\0\4\113\1\0\11\113\2\0\12\375\1\377"+
- "\3\375\1\0\65\375\14\u0101\1\377\1\u0101\1\0\65\u0101"+
- "\6\0\3\166\1\u01d4\6\0\1\166\6\0\5\166\1\0"+
- "\13\166\1\0\12\166\1\0\4\166\1\0\11\166\2\0"+
- "\1\u0184\2\u0185\1\u0186\1\u0184\1\u0185\4\u0184\1\u0185\1\u0184"+
- "\1\u0185\2\u0184\1\u0185\6\u0184\1\u0185\54\u0184\1\u01d5\103\u0185"+
- "\1\u01d6\1\u0187\2\u0188\1\u0189\1\u0187\1\u0188\4\u0187\1\u0188"+
- "\1\u0187\1\u0188\2\u0187\1\u0188\6\u0187\1\u0188\54\u0187\1\u01d5"+
- "\103\u0188\1\u01d7\40\0\1\u01d8\14\0\1\u01d8\60\0\2\u01d9"+
- "\101\0\1\u01da\112\0\1\u01db\14\0\1\u01db\60\0\2\u01dc"+
- "\50\0\14\u0124\1\u0122\1\u0124\1\0\65\u0124\3\0\2\u01dd"+
- "\1\0\4\u01dd\2\0\1\u0126\1\u01dd\1\0\4\u01dd\1\0"+
- "\10\u01dd\1\0\37\u01dd\2\0\4\u01dd\2\0\14\u0134\1\u0132"+
- "\1\u0134\1\0\65\u0134\3\0\2\u01de\1\0\4\u01de\2\0"+
- "\1\u0136\1\u01de\1\0\4\u01de\1\0\10\u01de\1\0\37\u01de"+
- "\2\0\4\u01de\2\0\2\231\1\0\4\231\1\u01df\76\231"+
- "\1\0\32\231\1\u01e0\46\231\14\u013e\1\u013c\1\u013e\1\0"+
- "\65\u013e\3\0\2\u01e1\1\0\4\u01e1\2\0\1\u0140\1\u01e1"+
- "\1\0\4\u01e1\1\0\10\u01e1\1\0\37\u01e1\2\0\4\u01e1"+
- "\2\0\2\240\1\0\4\240\1\u01e2\76\240\1\0\32\240"+
- "\1\u01e3\46\240\2\0\1\u01e4\101\0\7\264\1\u01e5\2\264"+
- "\1\0\1\264\1\0\1\u014c\65\264\1\0\12\u014f\1\0"+
- "\1\u014f\1\0\1\u014f\1\0\65\u014f\7\u0150\1\u01e6\4\u0150"+
- "\1\u0151\103\u0150\1\u0151\20\u0150\1\u01e7\46\u0150\7\u0154\1\u01e8"+
- "\2\u0154\1\u0155\103\u0154\1\u0155\22\u0154\1\u01e9\46\u0154\7\302"+
- "\1\u01ea\2\302\1\0\67\302\1\u0158\1\0\12\u01eb\1\u01ec"+
- "\70\u01eb\1\0\7\306\1\u01ed\4\306\1\0\65\306\1\u015b"+
- "\1\0\14\u01ee\1\u01ec\66\u01ee\1\0\7\311\1\u01ef\2\311"+
- "\1\0\1\311\1\0\66\311\1\0\7\u0160\1\u01f0\4\u0160"+
- "\1\u0161\103\u0160\1\u0161\20\u0160\1\u01f1\46\u0160\7\u0164\1\u01f2"+
- "\2\u0164\1\u0165\103\u0164\1\u0165\22\u0164\1\u01f3\46\u0164\7\327"+
- "\1\u01f4\2\327\1\0\67\327\1\u0168\1\0\12\u01f5\1\u01f6"+
- "\70\u01f5\1\0\7\333\1\u01f7\4\333\1\0\65\333\1\u016b"+
- "\1\0\14\u01f8\1\u01f6\66\u01f8\37\0\1\u01f9\135\0\1\u01d0"+
- "\33\0\1\u01d2\14\0\3\u01d2\2\0\1\u01d2\11\0\1\u01d2"+
- "\1\0\2\u01d2\6\0\1\u01d2\1\0\1\u01d1\2\u01d2\6\0"+
- "\1\u01d2\10\0\4\113\6\0\1\113\6\0\5\113\1\0"+
- "\6\113\1\u01fa\4\113\1\0\12\113\1\0\1\113\1\u01fa"+
- "\2\113\1\0\11\113\10\0\4\166\6\0\1\166\6\0"+
- "\5\166\1\0\6\166\1\u01fb\4\166\1\0\6\166\1\u01fc"+
- "\3\166\1\0\4\166\1\0\11\166\54\0\1\u01fd\76\0"+
- "\1\u01fe\13\0\1\u01fe\64\0\1\u01ff\11\0\1\u01ff\71\0"+
- "\1\u0200\11\0\1\u0200\74\0\1\u0201\13\0\1\u0201\22\0"+
- "\2\231\1\0\33\231\1\u0202\45\231\2\240\1\0\33\240"+
- "\1\u0203\45\240\14\u0150\1\u0151\21\u0150\1\u0204\45\u0150\12\u0154"+
- "\1\u0155\23\u0154\1\u0205\45\u0154\12\u01eb\1\u01b1\67\u01eb\1\u0206"+
- "\1\u01b1\14\u01ee\1\u01b6\65\u01ee\1\u0207\1\u01b6\14\u0160\1\u0161"+
- "\21\u0160\1\u0208\45\u0160\12\u0164\1\u0165\23\u0164\1\u0209\45\u0164"+
- "\12\u01f5\1\u01c6\67\u01f5\1\u020a\1\u01c6\14\u01f8\1\u01cb\65\u01f8"+
- "\1\u020b\1\u01cb\37\0\1\u020c\52\0\4\113\6\0\1\113"+
- "\6\0\5\113\1\0\3\113\1\u020d\7\113\1\0\4\113"+
- "\1\u020d\5\113\1\0\4\113\1\0\11\113\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\11\166\1\u020e\1\166"+
- "\1\0\12\166\1\0\4\166\1\0\11\166\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\10\166\1\u020f\2\166"+
- "\1\0\12\166\1\0\4\166\1\0\11\166\55\0\1\u0210"+
- "\23\0\1\u0210\50\0\1\u0211\17\0\1\u0211\66\0\1\u0212"+
- "\12\0\1\u0212\52\0\1\u0213\107\0\1\u0214\34\0\1\u0214"+
- "\11\0\2\231\1\0\34\231\1\u0215\44\231\2\240\1\0"+
- "\34\240\1\u0216\44\240\14\u0150\1\u0151\22\u0150\1\u0217\44\u0150"+
- "\12\u0154\1\u0155\24\u0154\1\u0218\44\u0154\12\u01eb\1\u0219\67\u01eb"+
- "\1\u0206\1\u01b1\14\u01ee\1\u021a\65\u01ee\1\u0207\1\u01b6\14\u0160"+
- "\1\u0161\22\u0160\1\u021b\44\u0160\12\u0164\1\u0165\24\u0164\1\u021c"+
- "\44\u0164\12\u01f5\1\u021d\67\u01f5\1\u020a\1\u01c6\14\u01f8\1\u021e"+
- "\65\u01f8\1\u020b\1\u01cb\40\0\1\u021f\51\0\4\166\6\0"+
- "\1\166\6\0\5\166\1\0\11\166\1\u0220\1\166\1\0"+
- "\12\166\1\0\4\166\1\0\11\166\10\0\4\166\6\0"+
- "\1\166\6\0\5\166\1\0\6\166\1\u0221\4\166\1\0"+
- "\12\166\1\0\4\166\1\0\11\166\44\0\1\u0222\11\0"+
- "\1\u0222\67\0\1\u0223\14\0\1\u0223\66\0\1\u0224\14\0"+
- "\1\u0224\26\0\2\231\1\0\35\231\1\u0225\43\231\2\240"+
- "\1\0\35\240\1\u0226\43\240\14\u0150\1\u0151\23\u0150\1\u0227"+
- "\43\u0150\12\u0154\1\u0155\25\u0154\1\u0228\43\u0154\14\u0160\1\u0161"+
- "\23\u0160\1\u0229\43\u0160\12\u0164\1\u0165\25\u0164\1\u022a\43\u0164"+
- "\37\0\1\u022b\52\0\4\166\6\0\1\166\6\0\5\166"+
- "\1\0\13\166\1\0\4\166\1\u022c\5\166\1\0\4\166"+
- "\1\0\11\166\10\0\4\166\6\0\1\166\6\0\5\166"+
- "\1\0\5\166\1\u022d\5\166\1\0\12\166\1\0\4\166"+
- "\1\0\11\166\2\0\2\231\1\0\34\231\1\u022e\44\231"+
- "\2\240\1\0\34\240\1\u022f\44\240\14\u0150\1\u0151\22\u0150"+
- "\1\u0230\44\u0150\12\u0154\1\u0155\24\u0154\1\u0231\44\u0154\14\u0160"+
- "\1\u0161\22\u0160\1\u0232\44\u0160\12\u0164\1\u0165\24\u0164\1\u0233"+
- "\44\u0164\34\0\1\u0234\55\0\4\166\6\0\1\166\6\0"+
- "\5\166\1\0\13\166\1\0\12\166\1\0\4\166\1\0"+
- "\1\166\1\u0235\7\166\2\0\2\231\1\0\31\231\1\u0236"+
- "\47\231\2\240\1\0\31\240\1\u0237\47\240\14\u0150\1\u0151"+
- "\17\u0150\1\u0238\47\u0150\12\u0154\1\u0155\21\u0154\1\u0239\47\u0154"+
- "\14\u0160\1\u0161\17\u0160\1\u023a\47\u0160\12\u0164\1\u0165\21\u0164"+
- "\1\u023b\47\u0164\6\0\4\166\6\0\1\166\6\0\5\166"+
- "\1\0\13\166\1\0\4\166\1\u023c\5\166\1\0\4\166"+
- "\1\0\11\166\10\0\4\166\6\0\1\166\6\0\5\166"+
- "\1\0\10\166\1\u023d\2\166\1\0\12\166\1\0\4\166"+
- "\1\0\11\166\10\0\4\166\6\0\1\166\6\0\5\166"+
- "\1\0\4\166\1\u023e\6\166\1\0\12\166\1\0\4\166"+
- "\1\0\11\166\10\0\4\166\6\0\1\166\6\0\5\166"+
- "\1\0\5\166\1\u023f\5\166\1\0\12\166\1\0\4\166"+
- "\1\0\11\166\2\0\6\u0240\4\u0241\6\u0240\1\u0241\5\u0240"+
- "\1\0\5\u0241\1\u0240\13\u0241\1\u0240\12\u0241\1\u0240\4\u0241"+
- "\1\u0240\11\u0241\2\u0240\41\0\1\u0242\3\0\1\u0243\7\0"+
- "\1\u0244\1\u0245\20\0\1\u0246\12\0\4\166\6\0\1\166"+
- "\6\0\5\166\1\0\4\166\1\u0247\3\166\1\u0248\2\166"+
- "\1\0\4\166\1\u0249\1\u024a\4\166\1\0\4\166\1\0"+
- "\6\166\1\u024b\2\166\60\0\1\u024c\74\0\1\u024d\112\0"+
- "\1\u024e\102\0\1\u024f\104\0\1\u0250\33\0\4\166\6\0"+
- "\1\166\6\0\5\166\1\0\13\166\1\0\5\166\1\u0251"+
- "\4\166\1\0\4\166\1\0\11\166\10\0\4\166\6\0"+
- "\1\166\6\0\5\166\1\0\12\166\1\u0252\1\0\12\166"+
- "\1\0\4\166\1\0\11\166\10\0\4\166\6\0\1\166"+
- "\6\0\5\166\1\0\13\166\1\0\5\166\1\u0253\4\166"+
- "\1\0\4\166\1\0\11\166\10\0\4\166\6\0\1\166"+
- "\6\0\5\166\1\0\13\166\1\0\4\166\1\u0254\5\166"+
- "\1\0\4\166\1\0\11\166\10\0\4\166\6\0\1\166"+
- "\6\0\5\166\1\0\13\166\1\0\5\166\1\u0255\4\166"+
- "\1\0\4\166\1\0\11\166\45\0\1\u0256\132\0\1\u0257"+
- "\104\0\1\u0258\65\0\1\u0259\121\0\1\u025a\16\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\6\166\1\u025b\4\166"+
- "\1\0\12\166\1\0\4\166\1\0\11\166\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\13\166\1\0\12\166"+
- "\1\0\4\166\1\0\1\166\1\u025c\7\166\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\13\166\1\0\12\166"+
- "\1\0\4\166\1\0\2\166\1\u025d\6\166\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\13\166\1\0\4\166"+
- "\1\u025e\5\166\1\0\4\166\1\0\11\166\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\13\166\1\0\12\166"+
- "\1\0\4\166\1\0\2\166\1\u025f\6\166\47\0\1\u0260"+
- "\71\0\1\u0261\103\0\1\u0262\113\0\1\u0263\102\0\1\u0264"+
- "\47\0\4\166\6\0\1\166\6\0\5\166\1\0\10\166"+
- "\1\u0265\2\166\1\0\12\166\1\0\4\166\1\0\11\166"+
- "\10\0\4\166\6\0\1\166\6\0\4\166\1\u0266\1\0"+
- "\13\166\1\0\12\166\1\0\4\166\1\0\11\166\10\0"+
- "\4\166\6\0\1\166\6\0\4\166\1\u0267\1\0\13\166"+
- "\1\0\12\166\1\0\4\166\1\0\11\166\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\6\166\1\u0268\4\166"+
- "\1\0\12\166\1\0\4\166\1\0\11\166\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\5\166\1\u0269\5\166"+
- "\1\0\12\166\1\0\4\166\1\0\11\166\60\0\1\u026a"+
- "\125\0\1\u026b\50\0\1\u026c\103\0\1\u026d\44\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\13\166\1\0\5\166"+
- "\1\u026e\4\166\1\0\4\166\1\0\11\166\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\13\166\1\0\12\166"+
- "\1\0\4\166\1\0\7\166\1\u026f\1\166\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\10\166\1\u0270\2\166"+
- "\1\0\12\166\1\0\4\166\1\0\11\166\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\10\166\1\u0271\2\166"+
- "\1\0\12\166\1\0\4\166\1\0\11\166\103\0\1\u0272"+
- "\61\0\1\u025a\125\0\1\u0264\103\0\1\u0273\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\13\166\1\0\12\166"+
- "\1\0\4\166\1\0\10\166\1\u0274\10\0\4\166\6\0"+
- "\1\166\6\0\5\166\1\0\13\166\1\0\6\166\1\u025f"+
- "\3\166\1\0\4\166\1\0\11\166\10\0\4\166\6\0"+
- "\1\166\6\0\5\166\1\0\13\166\1\0\12\166\1\0"+
- "\4\166\1\0\10\166\1\u0269\10\0\4\166\6\0\1\166"+
- "\6\0\5\166\1\0\13\166\1\0\12\166\1\0\4\166"+
- "\1\0\10\166\1\u0275\35\0\1\u025a\150\0\1\u0276\11\0"+
- "\4\166\6\0\1\166\6\0\4\166\1\u025f\1\0\13\166"+
- "\1\0\12\166\1\0\4\166\1\0\11\166\10\0\4\166"+
- "\6\0\1\166\6\0\5\166\1\0\13\166\1\0\12\166"+
- "\1\0\4\166\1\0\7\166\1\u0277\1\166\57\0\1\u025a"+
- "\34\0\4\166\6\0\1\166\6\0\5\166\1\0\13\166"+
- "\1\0\4\166\1\u025f\5\166\1\0\4\166\1\0\11\166"+
- "\2\0";
-
- /**
- * The transition table of the DFA
- */
- final private static int yytrans [] = yy_unpack(yy_packed);
-
-
- /* error codes */
- final private static int YY_UNKNOWN_ERROR = 0;
- // final private static int YY_ILLEGAL_STATE = 1;
- final private static int YY_NO_MATCH = 2;
- final private static int YY_PUSHBACK_2BIG = 3;
-
- /* error messages for the codes above */
- final private static String YY_ERROR_MSG[] = {
- "Unkown internal scanner error", //$NON-NLS-1$
- "Internal error: unknown state", //$NON-NLS-1$
- "Error: could not match input", //$NON-NLS-1$
- "Error: pushback value was too large" //$NON-NLS-1$
- };
-
- /**
- * YY_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
- */
- private final static byte YY_ATTRIBUTE[] = {
- 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1,
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 9,
- 1, 9, 1, 1, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1,
- 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 9, 1, 1, 9, 1, 1,
- 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1,
- 1, 1, 9, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1,
- 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1,
- 1, 9, 9, 1, 1, 9, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1,
- 9, 1, 1, 1, 1, 9, 9, 1, 9, 3, 3, 3, 3, 3, 3, 9,
- 9, 1, 1, 1, 9, 1, 1, 1, 1, 1, 9, 9, 1, 9, 3, 3,
- 3, 3, 3, 3, 9, 9, 1, 1, 1, 9, 1, 1, 1, 9, 9, 1,
- 1, 0, 1, 0, 9, 1, 2, 1, 2, 1, 1, 0, 0, 0, 9, 1,
- 1, 9, 9, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1,
- 0, 0, 1, 9, 0, 9, 0, 0, 9, 0, 0, 0, 9, 1, 1, 0,
- 1, 0, 9, 0, 0, 0, 1, 1, 0, 0, 0, 0, 9, 0, 0, 0,
- 0, 9, 0, 0, 0, 1, 0, 0, 1, 0, 0, 9, 0, 0, 1, 0,
- 0, 9, 0, 0, 0, 1, 0, 1, 1, 0, 0, 9, 0, 0, 0, 1,
- 0, 1, 1, 0, 0, 9, 9, 9, 0, 9, 9, 1, 1, 1, 1, 2,
- 13, 3, 2, 2, 13, 3, 2, 0, 1, 1, 0, 1, 1, 1, 1, 2,
- 13, 3, 2, 2, 13, 3, 2, 0, 1, 1, 0, 1, 1, 0, 9, 9,
- 9, 0, 0, 1, 1, 1, 9, 0, 0, 13, 9, 13, 9, 9, 1, 1,
- 0, 0, 1, 3, 2, 2, 3, 2, 2, 0, 0, 0, 0, 0, 0, 1,
- 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0,
- 1, 1, 1, 1, 0, 2, 3, 3, 2, 2, 3, 3, 2, 1, 1, 1,
- 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 2, 3, 3, 2, 2, 3,
- 3, 2, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 9, 9, 0, 1,
- 9, 0, 1, 1, 5, 13, 13, 0, 0, 0, 0, 0, 0, 0, 1, 1,
- 0, 1, 1, 9, 1, 3, 2, 3, 2, 1, 0, 9, 1, 0, 1, 3,
- 2, 3, 2, 1, 0, 9, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0,
- 0, 1, 1, 2, 2, 0, 0, 2, 2, 0, 0, 0, 1, 1, 1, 0,
- 0, 0, 9, 9, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 0, 1,
- 1, 9, 9, 9, 1, 1, 2, 2, 2, 2, 0, 1, 1, 1, 1, 2,
- 2, 2, 2, 9, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 1, 0,
- 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0,
- 0, 0, 0, 9, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1,
- 1, 0, 0, 1, 1, 0, 1
- };
-
- /** the input device */
- private java.io.Reader yy_reader;
-
- /** the current state of the DFA */
- private int yy_state;
-
- /** the current lexical state */
- private int yy_lexical_state = YYINITIAL;
-
- /** this buffer contains the current text to be matched and is
- the source of the yytext() string */
- private char yy_buffer[] = new char[16384];
-
- /** the textposition at the last accepting state */
- private int yy_markedPos;
-
- /** the textposition at the last state to be included in yytext */
- private int yy_pushbackPos;
-
- /** the current text position in the buffer */
- private int yy_currentPos;
-
- /** startRead marks the beginning of the yytext() string in the buffer */
- private int yy_startRead;
-
- /** endRead marks the last character in the buffer, that has been read
- from input */
- private int yy_endRead;
-
- /** number of newlines encountered up to the start of the matched text */
- private int yyline;
-
- /** the number of characters up to the start of the matched text */
- private int yychar;
-
- /**
- * the number of characters from the last newline up to the start of the
- * matched text
- */
- // private int yycolumn;
-
- /**
- * yy_atBOL == true <=> the scanner is currently at the beginning of a line
- */
- // private boolean yy_atBOL;
-
- /** yy_atEOF == true <=> the scanner has returned a value for EOF */
- private boolean yy_atEOF;
-
- /** denotes if the user-EOF-code has already been executed */
- private boolean yy_eof_done;
-
- /* user code: */
- private int fTokenCount = 0;
-
- // required holders for white-space compacting
- private boolean fShouldLoadBuffered = false;
- private String fBufferedContext = null;
- private int fBufferedStart = 1;
- private int fBufferedLength = 0;
- private ContextRegionContainer fBufferedEmbeddedContainer = null;
- private String f_context = null;
-
- // state stack for handling embedded regions
- private IntStack fStateStack = new IntStack();
- // a "hint" as to what an embedded region should be evaluated
- private String fEmbeddedHint = UNDEFINED;
- // a "hint" as to what state to enter once an embedded region has
- // been completed
- private int fEmbeddedPostState = YYINITIAL;
- // the container used to create embedded regions
- private ContextRegionContainer fEmbeddedContainer = null;
- private static final String PROXY_CONTEXT = "PROXY_CONTEXT";
-
- private String context = null;
- private int start = 0;
- private int textLength = 0;
- private int length = 0;
-
- // offset for tracking position specific block tags
- private int fOffset = 0;
-
- // the name of the current tag being opened
- private String fCurrentTagName = null;
-
- // the name of the current tag inside of an embedded region
- private String internalTagName = null;
- private String internalContext = null;
-
- // the list of tag name BlockMarkers
- private List fBlockMarkers = new ArrayList(0);
- private List fNestablePrefixes = new ArrayList(1);
-
- // where the last internal container block was found
- private int fLastInternalBlockStart = -1;
-
- // required to not seek text blocks on an end tag
- private boolean fIsBlockingEnabled = false;
- private boolean fIsCaseSensitiveBlocking = true;
-
- private static final boolean fForbidJSP = false;
-
- private int fELlevel = 0;
-
- private JSPParserRegionFactory fRegionFactory = new JSPParserRegionFactory();
-
- /**
- * user method
- */
- public final void addBlockMarker(BlockMarker marker) {
- if(containsTagName(marker.getTagName()))
- return;
- fBlockMarkers.add(marker);
- }
- /**
- * user method
- */
- public final void addNestablePrefix(TagMarker marker) {
- fNestablePrefixes.add(marker);
- }
- /* user method */
- public List getNestablePrefixes() {
- return fNestablePrefixes;
- }
- /**
- * user method
- */
- private boolean isNestable(String tagName) {
- //Iterator blocks = fNestablePrefixes.iterator();
- //while(blocks.hasNext()) {
- // TagMarker marker = (TagMarker)blocks.next();
- // String markerName = marker.getTagName();
- // if(tagName.length() > markerName.length() + 1 && tagName.startsWith(markerName) && tagName.charAt(markerName.length()) == ':') {
- // return marker.isGlobal() || getOffset() >= marker.getMarker().getStart();
- // }
- //}
- //return false;
- return true;
- }
- /**
- * user method
- */
- public final void removeNestablePrefix(String name) {
- if (fNestablePrefixes != null) {
- Iterator nestables = fNestablePrefixes.iterator();
- while (nestables.hasNext()) {
- if (((TagMarker) nestables.next()).getTagName().equalsIgnoreCase(name))
- nestables.remove();
- }
- }
- }
- /**
- * user method
- */
- public final void removeBlockMarker(BlockMarker marker) {
- fBlockMarkers.remove(marker);
- }
- /**
- * user method
- */
- public final void removeBlockMarker(String tagname) {
- if (fBlockMarkers != null) {
- Iterator blocks = fBlockMarkers.iterator();
- while (blocks.hasNext()) {
- if (((BlockMarker) blocks.next()).getTagName().equals(tagname))
- blocks.remove();
- }
- }
- }
- /* user method */
- private final void assembleEmbeddedTagSequence(String startType, String endTagName) {
- assembleEmbeddedContainer(startType, null, endTagName);
- }
- /* user method */
- private final void assembleEmbeddedContainer(String startType, String[] endTypes) {
- assembleEmbeddedContainer(startType, endTypes, null);
- }
- /* user method */
- private final void assembleEmbeddedContainer(String startType, String endType) {
- assembleEmbeddedContainer(startType, new String[]{endType}, null);
- }
- /**
- * user method
- *
- * Assembles an embedded container beginning with the given startType as
- * the first ContextRegion within it and of the type fEmbeddedHint. The
- * endTypes[] array contains the context types that will cause a successful
- * exit. Use of the endTagName parameter alters this behavior to force an
- * exit on an XML_TAG_CLOSE after seeing an XML_TAG_NAME whose significant
- * text matches the endTagName String. All contents in between are
- * insignificant, and yes, this means comments are allowed inside.
- **/
- private final void assembleEmbeddedContainer(String startType, String[] endTypes, String endTagName) {
- // the context of the region being added to the embedded container
- internalContext = startType;
- // keep track of where this container began; to provide relative indeces for the regions
- int containerStart = yychar;
- boolean notFinished = true;
- // keep track of where we seem to be so that the endTagName can be checked
- boolean isInEndTag = false;
- boolean isInFirstTag = true;
- // create the embedded container and setup its "type"
- if (fEmbeddedContainer == null) {
- fEmbeddedContainer = new ContextRegionContainer();
- fEmbeddedContainer.setType(fEmbeddedHint);
- fEmbeddedContainer.setStart(containerStart);
- // TODO: parent region needs to be set .... but not sure where to get it from
- // fEmbeddedContainer.setParent(parentRegion);
- }
- containerStart = fEmbeddedContainer.getStart();
- while (notFinished) {
- // add the region to the container
- if (internalContext != null && internalContext != PROXY_CONTEXT) {
- ITextRegion newToken = fRegionFactory.createToken(internalContext, yychar - containerStart, yylength(), yylength());
- fEmbeddedContainer.getRegions().add(newToken);
- fEmbeddedContainer.setLength(fEmbeddedContainer.getLength() + yylength());
- fEmbeddedContainer.setTextLength(fEmbeddedContainer.getTextLength() + yylength());
- // DW, 4/16/2003 token regions no longer have parents
- //newToken.setParent(fEmbeddedContainer);
- }
- try {
- // longscan determines whether to attempt a blockTagScan within the embedded container
- boolean longscan = false;
- // save the tokenizer state in case of a block tag scan
- int previousState = yystate();
- String previousCurrentTagName = fCurrentTagName;
- int previousPostState = fEmbeddedPostState;
- String previousEmbeddedHint = fEmbeddedHint;
- // determine if a block tag scan is necessary
- if (internalContext == XML_TAG_NAME) {
- internalTagName = yytext();
- if(!isNestable(internalTagName)) {
- internalTagName = null;
- // snagged a tag name we shouldn't have
- fEmbeddedPostState = ST_ABORT_EMBEDDED;
- notFinished = false;
- }
- }
- else if (internalContext == XML_TAG_OPEN || internalContext == XML_END_TAG_OPEN) {
- internalTagName = null;
- }
- // do upkeep for endTagName usage; must be here since the next token could be the close
- if (internalContext == XML_END_TAG_OPEN) {
- isInEndTag = true;
- } else if (internalContext == XML_TAG_CLOSE) {
- isInFirstTag = isInEndTag = false;
- } else {
- ITextRegionList embeddedRegions = fEmbeddedContainer.getRegions();
- if (embeddedRegions.size() > 2 && (embeddedRegions.get(embeddedRegions.size()-1)).getType() == XML_TAG_CLOSE && (embeddedRegions.get(embeddedRegions.size() - 3)).getType() == XML_TAG_OPEN && internalTagName != null) {
- if (containsTagName(internalTagName)) {
- longscan = true;
- yybegin(ST_BLOCK_TAG_SCAN);
- }
- }
- }
- if (longscan)
- fCurrentTagName = internalTagName;
- // read the next region and context
- internalContext = primGetNextToken();
- if (longscan) {
- // Returning from a block tag scan requires restoring some state variables
- // as well as handling the block region and setting up for normal scanning
- // inside the embedded container
- ITextRegion newToken = fRegionFactory.createToken(internalContext, yychar - containerStart, yylength(), yylength());
- fEmbeddedContainer.getRegions().add(newToken);
- fEmbeddedContainer.setLength(fEmbeddedContainer.getLength() + yylength());
- fEmbeddedContainer.setTextLength(fEmbeddedContainer.getTextLength() + yylength());
- // DW, 4/16/2003 token regions no longer have parents
- // newToken.setParent(fEmbeddedContainer);
- longscan = false;
- fEmbeddedPostState = previousPostState;
- fEmbeddedHint = previousEmbeddedHint;
- fCurrentTagName = previousCurrentTagName;
- yybegin(previousState);
- internalContext = primGetNextToken();
- }
- } catch (IOException e) {
- // primGetNextToken() calls may throw an IOException
- // catch and do nothing since the isEOF check below
- // will properly exit if the input was too short
- } catch (Exception f) {
- // some other exception happened; never should
- Logger.logException(f);
- }
- boolean isEndingType = yystate() == ST_ABORT_EMBEDDED;
- if(!isEndingType) {
- // check for ending context
- if (endTagName == null) {
- for (int i = 0; i < endTypes.length; i++) {
- isEndingType = isEndingType || (internalContext == endTypes[i]);
- }
- }
- else {
- isEndingType = ((isInEndTag && internalContext == XML_TAG_CLOSE) || (isInFirstTag && internalContext == XML_EMPTY_TAG_CLOSE)) && internalTagName != null && internalTagName.equals(endTagName);
- }
- }
- ITextRegionList embeddedList = fEmbeddedContainer.getRegions();
- notFinished = notFinished && ((!isEndingType) && !isEOF() && (endTagName != null || internalContext != UNDEFINED) && !(internalContext == PROXY_CONTEXT && (embeddedList.get(embeddedList.size()-1)).getType() == UNDEFINED));
- }
- // finish adding the last context
- if (internalContext != null && internalContext != PROXY_CONTEXT) {
- ITextRegion newToken = fRegionFactory.createToken(internalContext, yychar - containerStart, yylength(), yylength());
- fEmbeddedContainer.getRegions().add(newToken);
- // DW, 4/16/2003 token regions no longer have parents
- //newToken.setParent(fEmbeddedContainer);
- fEmbeddedContainer.setLength(yychar - containerStart + yylength());
- fEmbeddedContainer.setTextLength(yychar - containerStart + yylength());
- }
- yybegin(fEmbeddedPostState);
- }
- /* user method */
- public final boolean isCaseSensitiveBlocking() {
- return fIsCaseSensitiveBlocking;
- }
- /* user method */
- public final void setCaseSensitiveBlocking(boolean newValue) {
- fIsCaseSensitiveBlocking = newValue;
- }
- /* user method */
- public boolean getBlockMarkerAllowsJSP() {
- return getBlockMarkerAllowsJSP(fCurrentTagName);
- }
- /* user method */
- public boolean getBlockMarkerAllowsJSP(String name) {
- Iterator iterator = fBlockMarkers.iterator();
- while(iterator.hasNext()) {
- BlockMarker marker = (BlockMarker)iterator.next();
- boolean casesensitive = marker.isCaseSensitive();
- if(casesensitive && marker.getTagName().equals(name))
- return marker.allowsJSP();
- else if(!casesensitive && marker.getTagName().equalsIgnoreCase(name))
- return marker.allowsJSP();
- }
- return true;
- }
- /* user method */
- public boolean getBlockMarkerCaseSensitivity() {
- return getBlockMarkerCaseSensitivity(fCurrentTagName);
- }
- public boolean getBlockMarkerCaseSensitivity(String name) {
- Iterator iterator = fBlockMarkers.iterator();
- while(iterator.hasNext()) {
- BlockMarker marker = (BlockMarker)iterator.next();
- boolean casesensitive = marker.isCaseSensitive();
- if(casesensitive && marker.getTagName().equals(name))
- return casesensitive;
- else if(!casesensitive && marker.getTagName().equalsIgnoreCase(name))
- return casesensitive;
- }
- return true;
- }
- /* user method */
- public String getBlockMarkerContext() {
- return getBlockMarkerContext(fCurrentTagName);
- }
- /* user method */
- public String getBlockMarkerContext(String name) {
- Iterator iterator = fBlockMarkers.iterator();
- while(iterator.hasNext()) {
- BlockMarker marker = (BlockMarker)iterator.next();
- if(marker.getTagName().equals(name))
- return marker.getContext();
- }
- return BLOCK_TEXT;
- }
- /* user method */
- public List getBlockMarkers() {
- return fBlockMarkers;
- }
- /* user method */
- public final int getOffset() {
- return fOffset + yychar;
- }
- private final boolean isBlockMarker() {
- return isBlockMarker(fCurrentTagName);
- }
- private final boolean isBlockMarker(String tagName) {
- if (!fIsBlockingEnabled)
- return false;
- return containsTagName(tagName);
- }
- /**
- * user method
- */
- public final void beginBlockTagScan(String newTagName) {
- beginBlockMarkerScan(newTagName, BLOCK_TEXT);
- }
- /**
- * user method
- *
- * Special tokenizer setup. Allows tokenization to be initiated at the
- * start of a text block within a "newTagName" tag.
- *
- * Example:
- * Tokenizer toker = new Tokenizer();
- * toker.setCaseSensitiveBlocking(false);
- * toker.reset(new java.io.StringReader("afiuhqwkejhtasihgalkwhtq</scripter></scr></script>asgdasga"));
- * toker.beginBlockMarkerScan("script", BLOCK_TEXT);
- * toker.getRegions();
- *
- * Returns:
- * BLOCK_TEXT: 0-40
- * XML_END_TAG_OPEN: 41-42
- * XML_TAG_NAME: 43-48
- * XML_TAG_CLOSE: 49-49
- * XML_CONTENT: 50-57
- *
- */
- public final void beginBlockMarkerScan(String newTagName, String blockcontext) {
- yybegin(ST_BLOCK_TAG_SCAN);
- fCurrentTagName = newTagName;
- }
-
-/**
- * Method doScan.
- *
- * Returns a context region for all of the text from the current position upto the end of input or
- * to right *before* the first occurence of searchString
- *
- * @param searchString - target string to search for ex.: "-->", "</tagname"
- * @param requireTailSeparator - whether the target must be immediately followed by whitespace or '>'
- * @param allowJSP - check for and allow for JSP markup <%%>
- * @param context - the context of the scanned region if non-zero length
- * @param exitState - the state to go to if the region was of non-zero length
- * @param abortState - the state to go to if the searchString was found immediately
- * @return String - the context found: the desired context on a non-zero length match, the abortContext on immediate success
- * @throws IOException
- */
-private final String doScan(String searchString, boolean requireTailSeparator, boolean allowJSP, boolean allowCDATA, String searchContext, int exitState, int immediateFallbackState) throws IOException {
- boolean stillSearching = true;
- // Disable further block (probably)
- fIsBlockingEnabled = false;
- int searchStringLength = searchString.length();
- int n = 0;
- char lastCheckChar;
- int i;
- boolean same = false;
- // Check for JSP starts ("<%") if the tag is global like SCRIPT or STYLE
- boolean checkJSPs = allowJSP && !fForbidJSP;
- boolean checkedForJSPsOnce = !checkJSPs;
- boolean checkedJSPsAtStartOnce = false;
-
- while (stillSearching) {
- n = 0;
- // Ensure that enough data from the input exists to compare against the search String.
- n = yy_advance();
- while(n != YYEOF && yy_currentPos < searchStringLength)
- n = yy_advance();
-// c = (char) n;
- // If the input was too short or we've exhausted the input, stop immediately.
- if (n == YYEOF && checkedForJSPsOnce) {
- stillSearching = false;
- }
- else {
- /**
- * Look for starting JSPs "<%"
- */
- checkedForJSPsOnce = true;
- // 1) yy_currentPos - searchStringLength : There's at least searchStringLength of input available; once that's read, check for JSPs
- // ---
- // Look for a JSP beginning at current-searchStringLength; if so, backup and switch scanner states to handle it.
- // Ensure that we've not encountered a complete block (<%%>) that was *shorter* than the closeTagString and
- // thus found twice at current-targetLength [since the first scan would have come out this far anyway].
- if(checkJSPs && yy_currentPos > searchStringLength && yy_currentPos - searchStringLength != fLastInternalBlockStart &&
- yy_buffer[yy_currentPos - searchStringLength] == '<' && yy_buffer[yy_currentPos - searchStringLength + 1] == '%') {
- fLastInternalBlockStart = yy_markedPos = yy_currentPos - searchStringLength;
- yy_currentPos = yy_markedPos + 1;
- int resumeState = yystate();
- yybegin(ST_BLOCK_TAG_INTERNAL_SCAN);
- if(yy_markedPos == yy_startRead) {
- String jspContext = primGetNextToken();
- yybegin(resumeState);
- return jspContext;
- }
- return searchContext;
- }
- // 2) yy_currentPos - jspstarter.length : There's not searchStringLength of input available; check for a JSP 2 spots back in what we could read
- // ---
- // Look for a JSP beginning at the current position; this case wouldn't be handled by the preceding section
- // since it relies upon *having* closeTagStringLength amount of input to work as designed. Must be sure we don't
- // spill over the end of the buffer while checking.
- else if(checkJSPs && yy_startRead != fLastInternalBlockStart && yy_currentPos > 0 && yy_currentPos < yy_buffer.length - 1 &&
- yy_buffer[yy_currentPos - 1] == '<' && yy_buffer[yy_currentPos] == '%') {
- fLastInternalBlockStart = yy_markedPos = yy_currentPos - 1;
- yy_currentPos = yy_markedPos + 1;
- int resumeState = yystate();
- yybegin(ST_BLOCK_TAG_INTERNAL_SCAN);
- if(yy_markedPos == yy_startRead) {
- String jspContext = primGetNextToken();
- yybegin(resumeState);
- return jspContext;
- }
- return searchContext;
- }
- // 3) yy_currentPos..(yy_currentPos+jspStartlength-1) : Check at the start of the block one time
- // ---
- // Look for a JSP beginning immediately in the block area; this case wouldn't be handled by the preceding section
- // since it relies upon yy_currentPos equaling exactly the previous end +1 to work as designed.
- else if(checkJSPs && !checkedJSPsAtStartOnce && yy_startRead != fLastInternalBlockStart && yy_startRead > 0 &&
- yy_startRead < yy_buffer.length - 1 && yy_buffer[yy_startRead] == '<' && yy_buffer[yy_startRead + 1] == '%') {
- checkedJSPsAtStartOnce = true;
- fLastInternalBlockStart = yy_markedPos = yy_startRead;
- yy_currentPos = yy_markedPos + 1;
- int resumeState = yystate();
- yybegin(ST_BLOCK_TAG_INTERNAL_SCAN);
- if(yy_markedPos == yy_startRead) {
- String jspContext = primGetNextToken();
- yybegin(resumeState);
- return jspContext;
- }
- return searchContext;
- }
-
-
- /**
- * Look for starting CDATA "<![CDATA["
- */
- // 1) yy_currentPos - searchStringLength: There's at least searchStringLength of input available; once that's read, check for CDATA
- // ---
- // Look for a CDATA beginning at current-searchStringLength; if so, backup and switch scanner states to handle it.
- // Ensure that we've not encountered a complete block (<[!CDATA[]]>) that was *shorter* than the closeTagString and
- // thus found twice at current-targetLength [since the first scan would have come out this far anyway].
-/* if(checkCDATA && yy_currentPos > searchStringLength && yy_currentPos + searchStringLength < yy_buffer.length && yy_currentPos - searchStringLength != fLastInternalBlockStart &&
- charsMatch(cdataStarter, yy_buffer, 0, yy_currentPos - searchStringLength)) {
- fLastInternalBlockStart = yy_markedPos = yy_currentPos - searchStringLength;
- yy_currentPos = yy_markedPos + 1;
- int resumeState = yystate();
- // go to a state where CDATA can be found
- if (fEmbeddedContainer == null) {
- fEmbeddedContainer = new ContextRegionContainer();
- fEmbeddedContainer.setType(searchContext);
- fEmbeddedContainer.setStart(yychar);
- }
- ITextRegion newToken = fRegionFactory.createToken(searchContext, yychar, yylength(), yylength());
- fEmbeddedContainer.getRegions().add(newToken);
- fEmbeddedContainer.setLength(fEmbeddedContainer.getLength() + yylength());
- fEmbeddedContainer.setTextLength(fEmbeddedContainer.getTextLength() + yylength());
- yybegin(YYINITIAL);
- String context = primGetNextToken();
- if(context.equals(XMLRegionContexts.XML_CDATA_OPEN)) {
- assembleEmbeddedContainer(XMLRegionContexts.XML_CDATA_OPEN, XMLRegionContexts.XML_CDATA_CLOSE);
- }
- yybegin(resumeState);
- return searchContext;
- }
-*//*
- // 2) yy_currentPos - cdataStarter.length: There's not searchStringLength of input available; check for a CDATA right here spots back in what we could read
- // ---
- // Look for a JSP beginning at the current position; this case wouldn't be handled by the preceding section
- // since it relies upon *having* closeTagStringLength amount of input to work as designed. Must be sure we don't
- // spill over the end of the buffer while checking.
- else if(checkCDATA && yy_startRead != fLastInternalBlockStart && yy_currentPos > 0 && yy_currentPos < yy_buffer.length - 1 &&
- yy_buffer[yy_currentPos - 1] == '<' && yy_buffer[yy_currentPos] == '%') {
- fLastInternalBlockStart = yy_markedPos = yy_currentPos - 1;
- yy_currentPos = yy_markedPos + 1;
- int resumeState = yystate();
- yybegin(ST_BLOCK_TAG_INTERNAL_SCAN);
- if(yy_markedPos == yy_startRead) {
- String jspContext = primGetNextToken();
- yybegin(resumeState);
- return jspContext;
- }
- return searchContext;
- }
- // 3) yy_currentPos : Check at the start of the block one time
- // ---
- // Look for a JSP beginning immediately in the block area; this case wouldn't be handled by the preceding section
- // since it relies upon yy_currentPos equaling exactly the previous end +1 to work as designed.
- else if(checkCDATA && !checkedForCDATAOnce && yy_startRead != fLastInternalBlockStart && yy_startRead > 0 &&
- yy_startRead < yy_buffer.length - 1 && yy_buffer[yy_startRead] == '<' && yy_buffer[yy_startRead + 1] == '%') {
- checkedForCDATAOnce = true;
- fLastInternalBlockStart = yy_markedPos = yy_startRead;
- yy_currentPos = yy_markedPos + 1;
- int resumeState = yystate();
- yybegin(ST_BLOCK_TAG_INTERNAL_SCAN);
- if(yy_markedPos == yy_startRead) {
- String jspContext = primGetNextToken();
- yybegin(resumeState);
- return jspContext;
- }
- return searchContext;
- }
-*/
- // Check the characters in the target versus the last targetLength characters read from the buffer
- // and see if it matches
- if (n == YYEOF) {
- stillSearching = false;
- }
- else {
- same = true;
- // safety check for array accesses
- if(yy_currentPos >= searchStringLength && yy_currentPos <= yy_buffer.length) {
- for(i = 0; i < searchStringLength; i++) {
- if(same && fIsCaseSensitiveBlocking)
- same = yy_buffer[i + yy_currentPos - searchStringLength] == searchString.charAt(i);
- else if(same && !fIsCaseSensitiveBlocking)
- same = Character.toLowerCase(yy_buffer[i + yy_currentPos - searchStringLength]) == Character.toLowerCase(searchString.charAt(i));
- }
- }
- // safety check failed; no match is possible right now
- else {
- same = false;
- }
- }
- if (same && requireTailSeparator && yy_currentPos < yy_buffer.length) {
- // Additional check for close tags to ensure that targetString="</script" doesn't match
- // "</scriptS"
- lastCheckChar = yy_buffer[yy_currentPos];
- // Succeed on "</script>" and "</script "
- if(lastCheckChar == '>' || Character.isWhitespace(lastCheckChar))
- stillSearching = false;
- }
- else {
- stillSearching = !same || (yy_currentPos < yy_startRead + searchStringLength);
- }
- }
- }
- if (n != YYEOF || same) {
- // We've stopped short of the end or definitely found a match
- yy_markedPos = yy_currentPos - searchStringLength;
- yy_currentPos = yy_markedPos + 1;
- // If the searchString occurs at the very beginning of what would have
- // been a Block, resume scanning normally immediately
- if (yy_markedPos == yy_startRead) {
- yybegin(immediateFallbackState);
- return primGetNextToken();
- }
- }
- else {
- // We ran through the rest of the input
- yy_markedPos = yy_currentPos;
- yy_currentPos++;
- }
- yybegin(exitState);
- // If the ending occurs at the very beginning of what would have
- // been a Block, resume scanning normally immediately
- if(yy_markedPos == yy_startRead)
- return primGetNextToken();
- return searchContext;
-}
-/**
- * user method
- * does a lookahead for the current tag name
- */
-private final String doBlockTagScan() throws IOException {
- fIsCaseSensitiveBlocking = getBlockMarkerCaseSensitivity();
- return doScan("</" + fCurrentTagName, true, getBlockMarkerAllowsJSP(), true, getBlockMarkerContext(fCurrentTagName), YYINITIAL, YYINITIAL);
-}
- /**
- * user method
- *
- * Converts the raw context String returned by the primGetNextToken()
- * method into a full ITextRegion by pulling in values for the
- * current offset within the scanning text.
- *
- * Returns null when EOF is encountered and attaches intermittently
- * discovered whitespace onto the end of useful regions.
- *
- * Note that this algorithm caches the token following the one being returned
- * so that whitespace can be collapsed.
- */
- public final ITextRegion getNextToken() throws IOException {
- fEmbeddedContainer = null;
- // load the starting non-whitespace token (assume that it is so)
- if (fShouldLoadBuffered) {
- if (fBufferedEmbeddedContainer != null) {
- ITextRegion container = fBufferedEmbeddedContainer;
- fBufferedEmbeddedContainer = null;
- fShouldLoadBuffered = false;
- return container;
- }
- context = fBufferedContext;
- start = fBufferedStart;
- textLength = length = fBufferedLength;
- fShouldLoadBuffered = false;
- } else {
- context = primGetNextToken();
- if (context == PROXY_CONTEXT) {
- return fEmbeddedContainer;
- } else if (context == XML_TAG_NAME || f_context == JSP_ROOT_TAG_NAME || f_context == JSP_DIRECTIVE_NAME) {
- if(containsTagName(yy_buffer, yy_startRead, yy_markedPos-yy_startRead))
- fCurrentTagName = yytext();
- else
- fCurrentTagName = null;
- } else if (context == XML_TAG_OPEN) {
- fIsBlockingEnabled = true;
- } else if (context == XML_END_TAG_OPEN) {
- fIsBlockingEnabled = false;
- }
- start = yychar;
- textLength = length = yylength();
- if (yy_atEOF) {
- fTokenCount++;
- return null;
- }
- }
- // store the next token
- f_context = primGetNextToken();
- if (f_context == PROXY_CONTEXT) {
- fBufferedEmbeddedContainer = fEmbeddedContainer;
- fShouldLoadBuffered = true;
- } else if (f_context == XML_TAG_NAME || f_context == JSP_ROOT_TAG_NAME || f_context == JSP_DIRECTIVE_NAME) {
- if(containsTagName(yy_buffer, yy_startRead, yy_markedPos-yy_startRead))
- fCurrentTagName = yytext();
- else
- fCurrentTagName = null;
- } else if (f_context == XML_TAG_OPEN) {
- fIsBlockingEnabled = true;
- } else if (f_context == XML_END_TAG_OPEN) {
- fIsBlockingEnabled = false;
- }
- fBufferedContext = f_context;
- fBufferedStart = yychar;
- fBufferedLength = yylength();
- fShouldLoadBuffered = true;
- if (fBufferedContext == WHITE_SPACE) {
- fShouldLoadBuffered = false;
- length += fBufferedLength;
- }
- if (context == null) {
- // EOF
- if (Debug.debugTokenizer) {
- System.out.println(getClass().getName() + " discovered " + fTokenCount + " tokens."); //$NON-NLS-2$//$NON-NLS-1$
- }
- return null;
- }
- fTokenCount++;
- return fRegionFactory.createToken(context, start, textLength, length, null, fCurrentTagName);
- }
- /* user method */
- public JSPTokenizer(){
- super();
- }
- /* user method */
- public JSPTokenizer(char[] charArray){
- this(new CharArrayReader(charArray));
- }
- /* user method */
- public void reset(char[] charArray) {
- reset(new CharArrayReader(charArray), 0);
- }
- /* user method */
- public void reset(char[] charArray, int newOffset) {
- reset(new CharArrayReader(charArray), newOffset);
- }
- /* user method */
- public void reset(java.io.InputStream in) {
- reset(new java.io.InputStreamReader(in), 0);
- }
- /* user method */
- public void reset(java.io.InputStream in, int newOffset) {
- reset(new java.io.InputStreamReader(in), newOffset);
- }
- /* user method */
- public void reset(java.io.Reader in) {
- reset(in, 0);
- }
- /**
- * user method *
- *
- * Reset internal counters and vars to "newly created" values, in the hopes
- * that resetting a pre-existing tokenizer is faster than creating a new one.
- *
- * This method contains code blocks that were essentially duplicated from the
- * <em>generated</em> output of this specification before this method was
- * added. Those code blocks were under the above copyright.
- */
- public void reset(java.io.Reader in, int newOffset) {
- if (Debug.debugTokenizer) {
- System.out.println("resetting tokenizer");//$NON-NLS-1$
- }
- fOffset = newOffset;
-
- /* the input device */
- yy_reader = in;
-
- /* the current state of the DFA */
- yy_state = 0;
-
- /* the current lexical state */
- yy_lexical_state = YYINITIAL;
-
- /* this buffer contains the current text to be matched and is
- the source of the yytext() string */
- java.util.Arrays.fill(yy_buffer, (char)0);
-
- /* the textposition at the last accepting state */
- yy_markedPos = 0;
-
- /* the textposition at the last state to be included in yytext */
- yy_pushbackPos = 0;
-
- /* the current text position in the buffer */
- yy_currentPos = 0;
-
- /* startRead marks the beginning of the yytext() string in the buffer */
- yy_startRead = 0;
-
- /**
- * endRead marks the last character in the buffer, that has been read
- * from input
- */
- yy_endRead = 0;
-
- /* number of newlines encountered up to the start of the matched text */
- yyline = 0;
-
- /* the number of characters up to the start of the matched text */
- yychar = 0;
-
- /* yy_atEOF == true <=> the scanner has returned a value for EOF */
- yy_atEOF = false;
-
- /* denotes if the user-EOF-code has already been executed */
- yy_eof_done = false;
-
-
- /* user vars: */
- fTokenCount = 0;
-
- fShouldLoadBuffered = false;
- fBufferedContext = null;
- fBufferedStart = 1;
- fBufferedLength = 0;
- fStateStack = new IntStack();
-
- fLastInternalBlockStart = -1;
-
- context = null;
- start = 0;
- textLength = 0;
- length = 0;
-
- fEmbeddedContainer = null;
-
- fELlevel = 0;
- }
- /**
- * user method
- *
- */
- public BlockTokenizer newInstance() {
- JSPTokenizer newInstance = new JSPTokenizer();
- // global tagmarkers can be shared; they have no state and
- // are never destroyed (e.g. 'release')
- for(int i = 0; i < fBlockMarkers.size(); i++) {
- BlockMarker blockMarker = (BlockMarker) fBlockMarkers.get(i);
- if(blockMarker.isGlobal())
- newInstance.addBlockMarker(blockMarker);
- }
- for(int i = 0; i < fNestablePrefixes.size(); i++) {
- TagMarker marker = (TagMarker) fNestablePrefixes.get(i);
- if(marker.isGlobal())
- newInstance.addNestablePrefix(marker);
- }
- return newInstance;
- }
- /* user method */
- private final String scanXMLCommentText() throws IOException {
- // Scan for '-->' and return the text up to that point as
- // XML_COMMENT_TEXT unless the string occurs IMMEDIATELY, in which
- // case change to the ST_XML_COMMENT_END state and return the next
- // context as usual.
- return doScan("-->", false, true, true, XML_COMMENT_TEXT, ST_XML_COMMENT_END, ST_XML_COMMENT_END);
- }
- /* user method */
- private final String scanJSPCommentText() throws IOException {
- // Scan for '--%>' and return the text up to that point as
- // JSP_COMMENT_TEXT unless the string occurs IMMEDIATELY, in which
- // case change to the ST_JSP_COMMENT_END state and return the next
- // context as usual.
- return doScan("--%>", false, false, true, JSP_COMMENT_TEXT, ST_JSP_COMMENT_END, ST_JSP_COMMENT_END);
- }
-
-
- /**
- * Creates a new scanner
- * There is also a java.io.InputStream version of this constructor.
- *
- * @param in the java.io.Reader to read input from.
- */
- public JSPTokenizer(java.io.Reader in) {
- this.yy_reader = in;
- }
-
- /**
- * Creates a new scanner.
- * There is also java.io.Reader version of this constructor.
- *
- * @param in the java.io.Inputstream to read input from.
- */
- public JSPTokenizer(java.io.InputStream in) {
- this(new java.io.InputStreamReader(in));
- }
-
- /**
- * Unpacks the compressed DFA transition table.
- *
- * @param packed the packed transition table
- * @return the unpacked transition table
- */
- private static int [] yy_unpack(String packed) {
- int [] trans = new int[29580];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 7346) {
- int count = packed.charAt(i++);
- int value = packed.charAt(i++);
- value--;
- do trans[j++] = value; while (--count > 0);
- }
- return trans;
- }
-
- /**
- * Unpacks the compressed character translation table.
- *
- * @param packed the packed character translation table
- * @return the unpacked character translation table
- */
- private static char [] yy_unpack_cmap(String packed) {
- char [] map = new char[0x10000];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 1376) {
- int count = packed.charAt(i++);
- char value = packed.charAt(i++);
- do map[j++] = value; while (--count > 0);
- }
- return map;
- }
-
-
- /**
- * Gets the next input character.
- *
- * @return the next character of the input stream, EOF if the
- * end of the stream is reached.
- * @exception IOException if any I/O-Error occurs
- */
- private int yy_advance() throws java.io.IOException {
-
- /* standard case */
- if (yy_currentPos < yy_endRead) return yy_buffer[yy_currentPos++];
-
- /* if the eof is reached, we don't need to work hard */
- if (yy_atEOF) return YYEOF;
-
- /* otherwise: need to refill the buffer */
-
- /* first: make room (if you can) */
- if (yy_startRead > 0) {
- System.arraycopy(yy_buffer, yy_startRead,
- yy_buffer, 0,
- yy_endRead-yy_startRead);
-
- /* translate stored positions */
- yy_endRead-= yy_startRead;
- yy_currentPos-= yy_startRead;
- yy_markedPos-= yy_startRead;
- yy_pushbackPos-= yy_startRead;
- yy_startRead = 0;
- }
-
- /* is the buffer big enough? */
- if (yy_currentPos >= yy_buffer.length) {
- /* if not: blow it up */
- char newBuffer[] = new char[yy_currentPos*2];
- System.arraycopy(yy_buffer, 0, newBuffer, 0, yy_buffer.length);
- yy_buffer = newBuffer;
- }
-
- /* finally: fill the buffer with new input */
- int numRead = yy_reader.read(yy_buffer, yy_endRead,
- yy_buffer.length-yy_endRead);
-
- if ( numRead == -1 ) return YYEOF;
-
- yy_endRead+= numRead;
-
- return yy_buffer[yy_currentPos++];
- }
-
-
- /**
- * Closes the input stream.
- */
- final public void yyclose() throws java.io.IOException {
- yy_atEOF = true; /* indicate end of file */
- yy_endRead = yy_startRead; /* invalidate buffer */
- yy_reader.close();
- }
-
-
- /**
- * Returns the current lexical state.
- */
- final public int yystate() {
- return yy_lexical_state;
- }
-
- /**
- * Enters a new lexical state
- *
- * @param newState the new lexical state
- */
- final public void yybegin(int newState) {
- yy_lexical_state = newState;
- }
-
-
- /**
- * Returns the text matched by the current regular expression.
- */
- final public String yytext() {
- return new String( yy_buffer, yy_startRead, yy_markedPos-yy_startRead );
- }
-
- /**
- * Returns the length of the matched text region.
- */
- final public int yylength() {
- return yy_markedPos-yy_startRead;
- }
-
-
- /**
- * Reports an error that occured while scanning - from the SED JFlex skeleton
- *
- * @param errorCode the code of the errormessage to display
- */
- private void yy_ScanError(int errorCode) {
- try {
- Logger.log(Logger.ERROR, YY_ERROR_MSG[errorCode]);
- }
- catch (ArrayIndexOutOfBoundsException e) {
- Logger.log(Logger.ERROR, YY_ERROR_MSG[YY_UNKNOWN_ERROR]);
- }
- // DO NOT EXIT the VM on an error
- // System.exit(1);
- }
-
-
- /**
- * Pushes the specified amount of characters back into the input stream.
- *
- * They will be read again by then next call of the scanning method
- *
- * @param number the number of characters to be read again.
- * This number must not be greater than yylength()!
- */
- void yypushback(int number) {
- if ( number > yylength() )
- yy_ScanError(YY_PUSHBACK_2BIG);
-
- yy_markedPos -= number;
- }
-
- /**
- * user method - skeleton.sed
- */
- protected final boolean containsTagName(char[] markerTagName, int offset, int tagnameLength) {
- for(int j = 0; j < fBlockMarkers.size(); j++) {
- BlockMarker marker = (BlockMarker)fBlockMarkers.get(j);
- if(marker.getTagName().length() == tagnameLength) {
- boolean matchesSoFar = true;
- for(int i = 0; i < tagnameLength && matchesSoFar; i++) {
- if(marker.isCaseSensitive()) {
- if(marker.getTagName().charAt(i) != markerTagName[i + offset])
- matchesSoFar = false;
- }
- else {
- if(Character.toLowerCase(marker.getTagName().charAt(i)) != Character.toLowerCase(markerTagName[i + offset]))
- matchesSoFar = false;
- }
- }
- if(matchesSoFar)
- return true;
- }
- }
- return false;
- }
-
- /**
- * user method - skeleton.sed
- *
- * Return ALL of the regions scannable within the remaining text
- * Note: for verification use
- */
- public final List getRegions() {
- List tokens = new ArrayList();
- ITextRegion region = null;
- try {
- region = getNextToken();
- while(region != null) {
- if (region != null) {
- tokens.add(region);
- }
- region = getNextToken();
- }
- }
- catch (StackOverflowError e) {
- Logger.logException(getClass().getName()+": input could not be tokenized correctly at position " + getOffset(), e);//$NON-NLS-1$
- throw e;
- }
- catch (Exception e) {
- // Since this is convenience method and NOT the recommended
- // way of getting tokens, many errors are simply hidden
- Logger.logException("Exception not handled retrieving regions: " + e.getLocalizedMessage(), e);//$NON-NLS-1$
- }
- return tokens;
- }
- /**
- * user method - skeleton.sed
- */
- private final void dump(String s) {
- if (Debug.debugTokenizer) {
- System.out.println(s + " (" + yychar + "-" + //$NON-NLS-2$//$NON-NLS-1$
- (yylength() + yychar) + "):\'" +//$NON-NLS-1$
- StringUtils.escape(yytext()) + "\'");//$NON-NLS-1$
- }
- }
- /* user method - skeleton.sed */
- public final boolean isEOF() {
- return yy_atEOF;
- }
-/* user method - skeleton.sed */
-protected final boolean containsTagName(String markerTagName) {
- Iterator blocks = fBlockMarkers.iterator();
- while(blocks.hasNext()) {
- BlockMarker marker = (BlockMarker)blocks.next();
- if(marker.isCaseSensitive()) {
- if(marker.getTagName().equals(markerTagName))
- return true;
- }
- else {
- if(marker.getTagName().equalsIgnoreCase(markerTagName))
- return true;
- }
- }
- return false;
-}
-
- /**
- * Contains user EOF-code, which will be executed exactly once,
- * when the end of file is reached
- */
- private void yy_do_eof() {
- if (!yy_eof_done) {
- yy_eof_done = true;
- // do nothing, this is the downstream parser's job
-
- }
- }
-
-
- /**
- * Resumes scanning until the next regular expression is matched,
- * the end of input is encountered or an I/O-Error occurs.
- *
- * @return the next token
- * @exception IOException if any I/O-Error occurs
- */
- public String primGetNextToken() throws java.io.IOException {
- int yy_input;
- int yy_action;
-
- yy_pushbackPos = -1;
- boolean yy_was_pushback;
-
- while (true) {
-
- yychar+= yylength();
-
- boolean yy_counted = false;
- for (yy_currentPos = yy_startRead; yy_currentPos < yy_markedPos;
- yy_currentPos++) {
- switch (yy_buffer[yy_currentPos]) {
- case '\r':
- yyline++;
- yy_counted = true;
- break;
- case '\n':
- if (yy_counted)
- yy_counted = false;
- else {
- yyline++;
- }
- break;
- default:
- yy_counted = false;
- }
- }
-
- if (yy_counted) {
- if ( yy_advance() == '\n' ) yyline--;
- if ( !yy_atEOF ) yy_currentPos--;
- }
-
- yy_action = -1;
-
- yy_currentPos = yy_startRead = yy_markedPos;
-
- yy_state = yy_lexical_state;
-
- yy_was_pushback = false;
-
- yy_forAction: {
- while (true) {
-
- yy_input = yy_advance();
-
- if ( yy_input == YYEOF ) break yy_forAction;
-
- int yy_next = yytrans[ yy_rowMap[yy_state] + yycmap[yy_input] ];
- if (yy_next == -1) break yy_forAction;
- yy_state = yy_next;
-
- int yy_attributes = YY_ATTRIBUTE[yy_state];
- if ( (yy_attributes & 2) > 0 )
- yy_pushbackPos = yy_currentPos;
-
- if ( (yy_attributes & 1) > 0 ) {
- yy_was_pushback = (yy_attributes & 4) > 0;
- yy_action = yy_state;
- yy_markedPos = yy_currentPos;
- if ( (yy_attributes & 8) > 0 ) break yy_forAction;
- }
-
- }
- }
-
- if (yy_was_pushback)
- yy_markedPos = yy_pushbackPos;
-
- switch (yy_action) {
-
- case 599:
- case 604:
- case 611:
- case 616:
- {
- if(Debug.debugTokenizer)
- dump("jsp directive tag name");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return JSP_DIRECTIVE_NAME;
- }
- case 632: break;
- case 563:
- case 565:
- case 566:
- case 567:
- case 568:
- case 569:
- case 570:
- {
- if(Debug.debugTokenizer)
- dump("\nCDATA start");//$NON-NLS-1$
- fStateStack.push(yystate());
- yybegin(ST_CDATA_TEXT);
- return XML_CDATA_OPEN;
- }
- case 633: break;
- case 555:
- {
- if(Debug.debugTokenizer)
- dump("jsp:root tag name");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return JSP_ROOT_TAG_NAME;
- }
- case 634: break;
- case 547:
- {
- if(Debug.debugTokenizer)
- dump("element");//$NON-NLS-1$
- yybegin(ST_XML_ELEMENT_DECLARATION);
- return XML_ELEMENT_DECLARATION;
- }
- case 635: break;
- case 546:
- {
- if(Debug.debugTokenizer)
- dump("attlist");//$NON-NLS-1$
- yybegin(ST_XML_ATTLIST_DECLARATION);
- return XML_ATTLIST_DECLARATION;
- }
- case 636: break;
- case 545:
- {
- if(Debug.debugTokenizer)
- dump("doctype");//$NON-NLS-1$
- yybegin(ST_XML_DOCTYPE_DECLARATION);
- return XML_DOCTYPE_DECLARATION;
- }
- case 637: break;
- case 531:
- {
- if(Debug.debugTokenizer)
- dump("doctype external id");//$NON-NLS-1$
- fEmbeddedHint = XML_DOCTYPE_EXTERNAL_ID_PUBREF;
- yybegin(ST_XML_DOCTYPE_ID_PUBLIC);
- return XML_DOCTYPE_EXTERNAL_ID_PUBLIC;
- }
- case 638: break;
- case 530:
- {
- if(Debug.debugTokenizer)
- dump("doctype external id");//$NON-NLS-1$
- fEmbeddedHint = XML_DOCTYPE_EXTERNAL_ID_SYSREF;
- yybegin(ST_XML_DOCTYPE_ID_SYSTEM);
- return XML_DOCTYPE_EXTERNAL_ID_SYSTEM;
- }
- case 639: break;
- case 524:
- {
- if(Debug.debugTokenizer)
- dump("DHTML processing instruction target");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_DHTML_ATTRIBUTE_NAME);
- return XML_TAG_NAME;
- }
- case 640: break;
- case 501:
- case 540:
- case 541:
- {
- return JSP_VBL_QUOTED_CONTENT;
- }
- case 641: break;
- case 491:
- case 536:
- case 537:
- {
- return JSP_EL_QUOTED_CONTENT;
- }
- case 642: break;
- case 483:
- {
- if(Debug.debugTokenizer)
- dump("\nJSP comment close");//$NON-NLS-1$
- yybegin(YYINITIAL);
- return JSP_COMMENT_CLOSE;
- }
- case 643: break;
- case 470:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- fStateStack.push(yystate());
- if(yylength() > 2)
- yypushback(yylength() -2);
- if(Debug.debugTokenizer)
- dump("VBL in attr value");//$NON-NLS-1$
- yybegin(ST_JSP_VBL);
- fELlevel++;
- assembleEmbeddedContainer(JSP_VBL_OPEN, new String[]{JSP_VBL_CLOSE});
- fStateStack.pop();
- yybegin(ST_XML_ATTRIBUTE_NAME);
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- return PROXY_CONTEXT;
- }
- case 644: break;
- case 469:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- fStateStack.push(yystate());
- if(yylength() > 2)
- yypushback(yylength() -2);
- if(Debug.debugTokenizer)
- dump("EL in attr value");//$NON-NLS-1$
- yybegin(ST_JSP_EL);
- fELlevel++;
- assembleEmbeddedContainer(JSP_EL_OPEN, new String[]{JSP_EL_CLOSE});
- fStateStack.pop();
- yybegin(ST_XML_ATTRIBUTE_NAME);
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- return PROXY_CONTEXT;
- }
- case 645: break;
- case 464:
- {
- if(Debug.debugTokenizer)
- dump("\nCharRef");//$NON-NLS-1$
- return XML_CHAR_REFERENCE;
- }
- case 646: break;
- case 461:
- {
- if(Debug.debugTokenizer)
- dump("\ncomment start");//$NON-NLS-1$
- fEmbeddedHint = XML_COMMENT_TEXT;
- fEmbeddedPostState = ST_XML_COMMENT;
- yybegin(ST_XML_COMMENT);
- return XML_COMMENT_OPEN;
- }
- case 647: break;
- case 460:
- case 478:
- case 481:
- case 484:
- case 485:
- case 487:
- case 489:
- case 492:
- case 494:
- case 495:
- case 497:
- case 499:
- case 502:
- {
- /* JSP comment begun (anywhere)
- * A consequence of the start anywhere possibility is that the
- * incoming state must be checked to see if it's erroneous
- * due to the order of precedence generated
- */
- // begin sanity checks
- if(yystate() == ST_JSP_CONTENT) {
- // at the beginning?!
- yypushback(3);
- return JSP_CONTENT;
- }
- else if(yystate() == ST_BLOCK_TAG_SCAN) {
- yypushback(4);
- return doBlockTagScan();
- }
- else if(yystate() == ST_XML_COMMENT) {
- yypushback(4);
- return scanXMLCommentText();
- }
- else if(yystate() == ST_JSP_COMMENT) {
- yypushback(4);
- return scanJSPCommentText();
- }
- else if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN) {
- yybegin(ST_JSP_COMMENT);
- assembleEmbeddedContainer(JSP_COMMENT_OPEN, JSP_COMMENT_CLOSE);
- if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN)
- yybegin(ST_BLOCK_TAG_SCAN);
- return PROXY_CONTEXT;
- }
- // finished sanity checks
- if(yystate()==YYINITIAL) {
- // the simple case, just a regular scriptlet out in content
- if(Debug.debugTokenizer)
- dump("\nJSP comment start");//$NON-NLS-1$
- yybegin(ST_JSP_COMMENT);
- return JSP_COMMENT_OPEN;
- }
- else {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- if(Debug.debugTokenizer)
- dump("JSP comment start");//$NON-NLS-1$
- if(yystate() == ST_XML_ATTRIBUTE_VALUE_DQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_DQUOTED;
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE_SQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_SQUOTED;
- else if(yystate() == ST_CDATA_TEXT) {
- fEmbeddedPostState = ST_CDATA_TEXT;
- fEmbeddedHint = XML_CDATA_TEXT;
- }
- yybegin(ST_JSP_COMMENT);
- // the comment container itself will act as comment text
- fEmbeddedHint = JSP_COMMENT_TEXT;
- assembleEmbeddedContainer(JSP_COMMENT_OPEN, JSP_COMMENT_CLOSE);
- if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN) {
- yybegin(ST_BLOCK_TAG_SCAN);
- return BLOCK_TEXT;
- }
- /*
- * required help for successive embedded regions; mark this one as a
- * comment so it will be otherwise ignored but preserved (which is why
- * we can't use white-space)
- */
- if(yystate() == ST_XML_TAG_NAME) {
- fEmbeddedHint = XML_TAG_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else if((yystate() == ST_XML_ATTRIBUTE_NAME || yystate() == ST_XML_EQUALS)) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- }
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- return PROXY_CONTEXT;
- }
- }
- case 648: break;
- case 382:
- {
- if(Debug.debugTokenizer)
- dump("XML processing instruction target");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_PI_ATTRIBUTE_NAME);
- return XML_TAG_NAME;
- }
- case 649: break;
- case 381:
- {
- if(Debug.debugTokenizer)
- dump("comment end");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_COMMENT_CLOSE;
- }
- case 650: break;
- case 380:
- {
- if(Debug.debugTokenizer)
- dump("CDATA end");//$NON-NLS-1$
- yybegin(fStateStack.pop());
- return XML_CDATA_CLOSE;
- }
- case 651: break;
- case 379:
- {
- yybegin(ST_JSP_VBL);
- if(yylength() > 2)
- yypushback(yylength() - 2);
- fELlevel++;
- fEmbeddedHint = XML_CONTENT;
- fEmbeddedPostState = YYINITIAL;
- assembleEmbeddedContainer(JSP_VBL_OPEN, JSP_VBL_CLOSE);
- fEmbeddedHint = XML_CONTENT;
- yybegin(YYINITIAL);
- return PROXY_CONTEXT;
- }
- case 652: break;
- case 378:
- {
- if(Debug.debugTokenizer)
- dump("\nPEReference");//$NON-NLS-1$
- return XML_PE_REFERENCE;
- }
- case 653: break;
- case 377:
- {
- yybegin(ST_JSP_EL);
- if(yylength() > 2)
- yypushback(yylength() - 2);
- fELlevel++;
- fEmbeddedHint = XML_CONTENT;
- fEmbeddedPostState = YYINITIAL;
- assembleEmbeddedContainer(JSP_EL_OPEN, JSP_EL_CLOSE);
- fEmbeddedHint = XML_CONTENT;
- yybegin(YYINITIAL);
- return PROXY_CONTEXT;
- }
- case 654: break;
- case 374:
- {
- if(Debug.debugTokenizer)
- dump("\nEntityRef");//$NON-NLS-1$
- return XML_ENTITY_REFERENCE;
- }
- case 655: break;
- case 368:
- case 406:
- case 413:
- case 419:
- case 423:
- case 427:
- case 431:
- case 436:
- case 441:
- case 444:
- case 448:
- case 452:
- case 457:
- {
- /* JSP expression begun (anywhere)
- * A consequence of the start anywhere possibility is that the
- * incoming state must be checked to see if it's erroneous
- * due to the order of precedence generated
- */
- // begin sanity checks
- if(yystate() == ST_JSP_CONTENT) {
- // at the beginning?!
- yypushback(2);
- return JSP_CONTENT;
- }
- else if(yystate() == ST_BLOCK_TAG_SCAN) {
- yypushback(3);
- return doBlockTagScan();
- }
- else if(yystate() == ST_XML_COMMENT) {
- yypushback(3);
- return scanXMLCommentText();
- }
- else if(yystate() == ST_JSP_COMMENT) {
- yypushback(3);
- return scanJSPCommentText();
- }
- // end sanity checks
- fStateStack.push(yystate());
- if(fStateStack.peek()==YYINITIAL) {
- // the simple case, just an expression out in content
- if(Debug.debugTokenizer)
- dump("\nJSP expression start");//$NON-NLS-1$
- yybegin(ST_JSP_CONTENT);
- return JSP_EXPRESSION_OPEN;
- }
- else {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- if(Debug.debugTokenizer)
- dump("JSP expression start");//$NON-NLS-1$
- if(yystate() == ST_XML_ATTRIBUTE_VALUE_DQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_DQUOTED;
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE_SQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_SQUOTED;
- else if(yystate() == ST_CDATA_TEXT) {
- fEmbeddedPostState = ST_CDATA_TEXT;
- fEmbeddedHint = XML_CDATA_TEXT;
- }
- yybegin(ST_JSP_CONTENT);
- assembleEmbeddedContainer(JSP_EXPRESSION_OPEN, JSP_CLOSE);
- if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN) {
- yybegin(ST_BLOCK_TAG_SCAN);
- return BLOCK_TEXT;
- }
- // required help for successive embedded regions
- if(yystate() == ST_XML_TAG_NAME) {
- fEmbeddedHint = XML_TAG_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else if((yystate() == ST_XML_ATTRIBUTE_NAME || yystate() == ST_XML_EQUALS)) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- }
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- return PROXY_CONTEXT;
- }
- }
- case 656: break;
- case 367:
- case 405:
- case 412:
- case 418:
- case 422:
- case 426:
- case 430:
- case 435:
- case 440:
- case 443:
- case 447:
- case 451:
- case 456:
- {
- /* JSP declaration begun (anywhere)
- * A consequence of the start anywhere possibility is that the
- * incoming state must be checked to see if it's erroneous
- * due to the order of precedence generated
- */
- // begin sanity checks
- if(yystate() == ST_JSP_CONTENT) {
- // at the beginning?!
- yypushback(2);
- return JSP_CONTENT;
- }
- else if(yystate() == ST_BLOCK_TAG_SCAN) {
- yypushback(3);
- return doBlockTagScan();
- }
- else if(yystate() == ST_XML_COMMENT) {
- yypushback(3);
- return scanXMLCommentText();
- }
- else if(yystate() == ST_JSP_COMMENT) {
- yypushback(3);
- return scanJSPCommentText();
- }
- // end sanity checks
- fStateStack.push(yystate());
- if(fStateStack.peek()==YYINITIAL) {
- // the simple case, just a declaration out in content
- if(Debug.debugTokenizer)
- dump("\nJSP declaration start");//$NON-NLS-1$
- yybegin(ST_JSP_CONTENT);
- return JSP_DECLARATION_OPEN;
- }
- else {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- if(Debug.debugTokenizer)
- dump("JSP declaration start");//$NON-NLS-1$
- if(yystate() == ST_XML_ATTRIBUTE_VALUE_DQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_DQUOTED;
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE_SQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_SQUOTED;
- else if(yystate() == ST_CDATA_TEXT) {
- fEmbeddedPostState = ST_CDATA_TEXT;
- fEmbeddedHint = XML_CDATA_TEXT;
- }
- yybegin(ST_JSP_CONTENT);
- assembleEmbeddedContainer(JSP_DECLARATION_OPEN, JSP_CLOSE);
- if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN) {
- yybegin(ST_BLOCK_TAG_SCAN);
- return BLOCK_TEXT;
- }
- // required help for successive embedded regions
- if(yystate() == ST_XML_TAG_NAME) {
- fEmbeddedHint = XML_TAG_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else if((yystate() == ST_XML_ATTRIBUTE_NAME || yystate() == ST_XML_EQUALS)) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- }
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- return PROXY_CONTEXT;
- }
- }
- case 657: break;
- case 366:
- {
- fStateStack.push(yystate());
- if(fStateStack.peek()==YYINITIAL) {
- if(Debug.debugTokenizer)
- dump("\nJSP directive start");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_NAME);
- return JSP_DIRECTIVE_OPEN;
- }
- else {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- if(Debug.debugTokenizer)
- dump("JSP directive start");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_NAME);
- assembleEmbeddedContainer(JSP_DIRECTIVE_OPEN, new String[]{JSP_DIRECTIVE_CLOSE, JSP_CLOSE});
- if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN) {
- yybegin(ST_BLOCK_TAG_SCAN);
- return BLOCK_TEXT;
- }
- return PROXY_CONTEXT;
- }
- }
- case 658: break;
- case 356:
- {
- yybegin(ST_JSP_VBL_DQUOTES_END);
- return JSP_VBL_QUOTED_CONTENT;
- }
- case 659: break;
- case 352:
- {
- yybegin(ST_JSP_VBL_SQUOTES_END);
- return JSP_VBL_QUOTED_CONTENT;
- }
- case 660: break;
- case 350:
- {
- fELlevel++;
- if(fELlevel == 1) {
- return JSP_VBL_OPEN;
- }
- }
- case 661: break;
- case 340:
- {
- yybegin(ST_JSP_EL_DQUOTES_END);
- return JSP_EL_QUOTED_CONTENT;
- }
- case 662: break;
- case 336:
- {
- yybegin(ST_JSP_EL_SQUOTES_END);
- return JSP_EL_QUOTED_CONTENT;
- }
- case 663: break;
- case 334:
- {
- //System.out.println(JSP_EL_CONTENT+ ":[" + yytext() + "]");
- return JSP_EL_CONTENT;
- }
- case 664: break;
- case 333:
- {
- fELlevel++;
- if(fELlevel == 1) {
- return JSP_EL_OPEN;
- }
- }
- case 665: break;
- case 330:
- {
- int enterState = yystate();
- yybegin(ST_JSP_DQUOTED_VBL);
- assembleEmbeddedContainer(JSP_VBL_OPEN, new String[]{JSP_VBL_CLOSE, XML_TAG_ATTRIBUTE_VALUE_DQUOTE});
- // abort early when an unescaped double quote is found in the VBL
- if(fEmbeddedContainer.getLastRegion().getType().equals(XML_TAG_ATTRIBUTE_VALUE_DQUOTE)) {
- yybegin(ST_ABORT_EMBEDDED);
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else {
- yybegin(enterState);
- }
- return PROXY_CONTEXT;
- }
- case 666: break;
- case 329:
- {
- int enterState = yystate();
- yybegin(ST_JSP_DQUOTED_EL);
- assembleEmbeddedContainer(JSP_EL_OPEN, new String[]{JSP_EL_CLOSE, XML_TAG_ATTRIBUTE_VALUE_DQUOTE});
- // abort early when an unescaped double quote is found in the EL
- if(fEmbeddedContainer.getLastRegion().getType().equals(XML_TAG_ATTRIBUTE_VALUE_DQUOTE)) {
- yybegin(ST_ABORT_EMBEDDED);
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else {
- yybegin(enterState);
- }
- return PROXY_CONTEXT;
- }
- case 667: break;
- case 327:
- {
- int enterState = yystate();
- yybegin(ST_JSP_SQUOTED_VBL);
- assembleEmbeddedContainer(JSP_VBL_OPEN, new String[]{JSP_VBL_CLOSE, XML_TAG_ATTRIBUTE_VALUE_SQUOTE});
- // abort early when an unescaped single quote is found in the VBL
- if(fEmbeddedContainer.getLastRegion().getType().equals(XML_TAG_ATTRIBUTE_VALUE_SQUOTE)) {
- yybegin(ST_ABORT_EMBEDDED);
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else {
- yybegin(enterState);
- }
- return PROXY_CONTEXT;
- }
- case 668: break;
- case 326:
- {
- int enterState = yystate();
- yybegin(ST_JSP_SQUOTED_EL);
- assembleEmbeddedContainer(JSP_EL_OPEN, new String[]{JSP_EL_CLOSE, XML_TAG_ATTRIBUTE_VALUE_SQUOTE});
- // abort early when an unescaped single quote is found in the EL
- if(fEmbeddedContainer.getLastRegion().getType().equals(XML_TAG_ATTRIBUTE_VALUE_SQUOTE)) {
- yybegin(ST_ABORT_EMBEDDED);
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else {
- yybegin(enterState);
- }
- return PROXY_CONTEXT;
- }
- case 669: break;
- case 325:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- int incomingState = yystate();
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- if(Debug.debugTokenizer)
- dump("JSP attribute value start - end tag");//$NON-NLS-1$
- yybegin(ST_XML_TAG_NAME);
- assembleEmbeddedContainer(XML_END_TAG_OPEN, new String[]{XML_TAG_CLOSE,XML_EMPTY_TAG_CLOSE});
- if(yystate() != ST_ABORT_EMBEDDED)
- yybegin(incomingState);
- return PROXY_CONTEXT;
- }
- case 670: break;
- case 284:
- case 296:
- case 302:
- {
- return XML_DOCTYPE_INTERNAL_SUBSET;
- }
- case 671: break;
- case 272:
- {
- String tagName = yytext().substring(1);
- // pushback to just after the opening bracket
- yypushback(yylength() - 1);
- /*
- * If this tag can not be nested or we're already searching for an
- * attribute name, equals, or value, return immediately.
- */
- if (!isNestable(tagName) || (!fStateStack.empty() && (fStateStack.peek() == ST_XML_ATTRIBUTE_NAME || fStateStack.peek() == ST_XML_EQUALS || fStateStack.peek() == ST_XML_ATTRIBUTE_VALUE))) {
- yybegin(ST_XML_TAG_NAME);
- return XML_TAG_OPEN;
- }
- if(Debug.debugTokenizer)
- dump("tag in place of attr value");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- fStateStack.push(yystate());
- // embedded container should be looking for the name (again) next
- yybegin(ST_XML_TAG_NAME);
- assembleEmbeddedTagSequence(XML_TAG_OPEN, tagName); // ?
- fStateStack.pop();
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return PROXY_CONTEXT;
- }
- case 672: break;
- case 270:
- {
- String tagName = yytext().substring(1);
- // pushback to just after the opening bracket
- yypushback(yylength() - 1);
- /*
- * If this tag can not be nested or we're already searching for an
- * attribute name, equals, or value, return immediately.
- */
- if (!isNestable(tagName) || (!fStateStack.empty() && (fStateStack.peek() == ST_XML_ATTRIBUTE_NAME || fStateStack.peek() == ST_XML_EQUALS || fStateStack.peek() == ST_XML_ATTRIBUTE_VALUE))) {
- yybegin(ST_XML_TAG_NAME);
- return XML_TAG_OPEN;
- }
- if(Debug.debugTokenizer)
- dump("tag in place of attr name");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- fStateStack.push(yystate());
- // embedded container should be looking for the name (again) next
- yybegin(ST_XML_TAG_NAME);
- assembleEmbeddedTagSequence(XML_TAG_OPEN, tagName); // ?
- fStateStack.pop();
- yybegin(ST_XML_EQUALS);
- return PROXY_CONTEXT;
- }
- case 673: break;
- case 268:
- {
- yybegin(YYINITIAL);
- fEmbeddedHint = UNDEFINED;
- if(Debug.debugTokenizer)
- dump("empty tag close");//$NON-NLS-1$
- return XML_EMPTY_TAG_CLOSE;
- }
- case 674: break;
- case 125:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_DQUOTED;
- yybegin(ST_XML_ATTRIBUTE_VALUE_DQUOTED);
- fStateStack.push(yystate());
- if(Debug.debugTokenizer)
- dump("JSP attribute value start - complex double quoted");//$NON-NLS-1$
- assembleEmbeddedContainer(XML_TAG_ATTRIBUTE_VALUE_DQUOTE, XML_TAG_ATTRIBUTE_VALUE_DQUOTE);
- fStateStack.pop();
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return PROXY_CONTEXT;
- }
- case 675: break;
- case 123:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- fStateStack.push(yystate());
- if(Debug.debugTokenizer)
- dump("JSP tag embedded name start - start tag");//$NON-NLS-1$
- yybegin(ST_XML_TAG_NAME);
- assembleEmbeddedContainer(XML_TAG_OPEN, new String[]{XML_TAG_CLOSE,XML_EMPTY_TAG_CLOSE});
- fStateStack.pop();
- yybegin(ST_XML_ATTRIBUTE_NAME);
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- return PROXY_CONTEXT;
- }
- case 676: break;
- case 122:
- case 127:
- case 128:
- case 274:
- case 278:
- case 279:
- case 387:
- case 390:
- case 468:
- {
- if(Debug.debugTokenizer)
- dump("attr value");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return XML_TAG_ATTRIBUTE_VALUE;
- }
- case 677: break;
- case 121:
- {
- if(Debug.debugTokenizer)
- dump("equals");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(ST_XML_ATTRIBUTE_VALUE);
- return XML_TAG_ATTRIBUTE_EQUALS;
- }
- case 678: break;
- case 120:
- {
- if(Debug.debugTokenizer)
- dump("attr name");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(ST_XML_EQUALS);
- return XML_TAG_ATTRIBUTE_NAME;
- }
- case 679: break;
- case 116:
- case 117:
- case 118:
- case 269:
- case 386:
- case 467:
- case 506:
- case 507:
- case 525:
- case 526:
- case 543:
- case 544:
- case 556:
- case 564:
- case 571:
- case 572:
- case 573:
- case 574:
- case 576:
- case 582:
- case 583:
- case 584:
- case 585:
- case 586:
- case 592:
- case 593:
- case 594:
- case 595:
- case 596:
- case 602:
- case 603:
- case 605:
- case 606:
- case 612:
- case 613:
- case 614:
- case 615:
- case 621:
- case 622:
- case 623:
- case 624:
- case 627:
- case 628:
- case 630:
- {
- if(Debug.debugTokenizer)
- dump("tag name");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return XML_TAG_NAME;
- }
- case 680: break;
- case 114:
- {
- if(Debug.debugTokenizer)
- dump("tag close");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- if(isBlockMarker()) {
- fEmbeddedHint = getBlockMarkerContext();
- fEmbeddedPostState = ST_BLOCK_TAG_SCAN;
- yybegin(ST_BLOCK_TAG_SCAN);
- }
- else
- yybegin(YYINITIAL);
- return XML_TAG_CLOSE;
- }
- case 681: break;
- case 107:
- case 111:
- case 264:
- {
- if(Debug.debugTokenizer)
- dump("attr value");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_ATTRIBUTE_NAME);
- return XML_TAG_ATTRIBUTE_VALUE;
- }
- case 682: break;
- case 106:
- {
- if(Debug.debugTokenizer)
- dump("equals");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_ATTRIBUTE_VALUE);
- return XML_TAG_ATTRIBUTE_EQUALS;
- }
- case 683: break;
- case 105:
- {
- if(Debug.debugTokenizer)
- dump("attr name");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_EQUALS);
- return XML_TAG_ATTRIBUTE_NAME;
- }
- case 684: break;
- case 102:
- {
- if(Debug.debugTokenizer)
- dump("JSP directive name");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_NAME_WHITESPACE);
- return JSP_DIRECTIVE_NAME;
- }
- case 685: break;
- case 98:
- case 99:
- case 100:
- {
- if(Debug.debugTokenizer)
- dump("JSP code content");//$NON-NLS-1$
- return doScan("%>", false, false, false, JSP_CONTENT, ST_JSP_CONTENT, ST_JSP_CONTENT);
- }
- case 686: break;
- case 94:
- case 96:
- case 97:
- case 254:
- case 255:
- case 258:
- {
- if(Debug.debugTokenizer)
- dump("DHTML processing instruction attribute value");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_DHTML_ATTRIBUTE_NAME);
- return XML_TAG_ATTRIBUTE_VALUE;
- }
- case 687: break;
- case 93:
- {
- if(Debug.debugTokenizer)
- dump("DHTML processing instruction '='");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(ST_DHTML_ATTRIBUTE_VALUE);
- return XML_TAG_ATTRIBUTE_EQUALS;
- }
- case 688: break;
- case 92:
- {
- if(Debug.debugTokenizer)
- dump("DHTML processing instruction attribute name");//$NON-NLS-1$
- yybegin(ST_DHTML_EQUALS);
- return XML_TAG_ATTRIBUTE_NAME;
- }
- case 689: break;
- case 90:
- {
- if(Debug.debugTokenizer)
- dump("DHTML processing instruction end");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_PI_CLOSE;
- }
- case 690: break;
- case 84:
- case 86:
- case 245:
- {
- if(Debug.debugTokenizer)
- dump("XML processing instruction attribute value");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_PI_ATTRIBUTE_NAME);
- return XML_TAG_ATTRIBUTE_VALUE;
- }
- case 691: break;
- case 83:
- {
- if(Debug.debugTokenizer)
- dump("XML processing instruction '='");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(ST_XML_PI_ATTRIBUTE_VALUE);
- return XML_TAG_ATTRIBUTE_EQUALS;
- }
- case 692: break;
- case 50:
- case 200:
- case 201:
- case 204:
- case 214:
- case 215:
- case 218:
- case 219:
- case 361:
- case 364:
- case 439:
- case 450:
- case 455:
- {
- return JSP_VBL_CONTENT;
- }
- case 693: break;
- case 43:
- case 179:
- case 180:
- case 183:
- case 193:
- case 194:
- case 197:
- case 198:
- case 331:
- case 345:
- case 348:
- case 416:
- case 417:
- case 429:
- case 434:
- {
- return JSP_EL_CONTENT;
- }
- case 694: break;
- case 35:
- case 159:
- case 160:
- case 322:
- case 411:
- case 414:
- case 482:
- case 514:
- case 533:
- case 549:
- case 558:
- {
- if(Debug.debugTokenizer)
- dump("attlist contentspec");//$NON-NLS-1$
- return XML_ATTLIST_DECL_CONTENT;
- }
- case 695: break;
- case 33:
- case 152:
- case 153:
- case 312:
- case 404:
- case 407:
- case 479:
- case 513:
- case 532:
- case 548:
- case 557:
- {
- if(Debug.debugTokenizer)
- dump("elementdecl contentspec");//$NON-NLS-1$
- return XML_ELEMENT_DECL_CONTENT;
- }
- case 696: break;
- case 22:
- case 112:
- {
- if(Debug.debugTokenizer)
- dump("inappropriate tag name");//$NON-NLS-1$
- if(!fStateStack.empty() && (fStateStack.peek()==ST_XML_ATTRIBUTE_VALUE_SQUOTED||fStateStack.peek()==ST_XML_ATTRIBUTE_VALUE_DQUOTED)) {
- yybegin(ST_ABORT_EMBEDDED);
- yypushback(yylength()-1);
- return XML_TAG_ATTRIBUTE_VALUE;
- }
- yybegin(YYINITIAL);
- return XML_CONTENT;
- }
- case 697: break;
- case 18:
- case 104:
- {
- if(Debug.debugTokenizer)
- dump("white space");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_ATTRIBUTE_NAME);
- return WHITE_SPACE;
- }
- case 698: break;
- case 5:
- case 8:
- case 9:
- case 10:
- case 12:
- case 13:
- case 14:
- case 15:
- case 17:
- case 19:
- case 20:
- case 21:
- case 23:
- case 24:
- case 25:
- case 26:
- case 27:
- case 28:
- case 29:
- case 30:
- case 31:
- case 32:
- case 34:
- case 40:
- case 41:
- case 73:
- case 170:
- case 175:
- {
- if(Debug.debugTokenizer)
- dump("white space");//$NON-NLS-1$
- return WHITE_SPACE;
- }
- case 699: break;
- case 0:
- case 57:
- case 60:
- case 62:
- case 226:
- case 228:
- case 229:
- case 231:
- case 233:
- case 371:
- case 372:
- case 373:
- case 463:
- {
- if(Debug.debugTokenizer)
- dump("\nXML content");//$NON-NLS-1$
- return XML_CONTENT;
- }
- case 700: break;
- case 58:
- case 101:
- case 113:
- case 119:
- case 129:
- {
- if(Debug.debugTokenizer)
- dump("\nstart tag open");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(ST_XML_TAG_NAME);
- return XML_TAG_OPEN;
- }
- case 701: break;
- case 59:
- case 61:
- case 65:
- case 66:
- case 67:
- case 71:
- case 72:
- case 81:
- case 85:
- case 87:
- case 88:
- case 89:
- case 91:
- case 95:
- case 103:
- case 108:
- case 109:
- case 110:
- case 115:
- case 124:
- case 131:
- case 132:
- case 133:
- case 134:
- case 136:
- case 137:
- case 139:
- case 140:
- case 141:
- case 144:
- case 145:
- case 146:
- case 149:
- case 150:
- case 151:
- case 156:
- case 157:
- case 158:
- case 164:
- case 167:
- case 172:
- case 173:
- case 177:
- case 178:
- case 185:
- case 186:
- case 188:
- case 189:
- case 195:
- case 199:
- case 206:
- case 207:
- case 209:
- case 210:
- case 216:
- case 220:
- {
- if (Debug.debugTokenizer)
- System.out.println("!!!unexpected!!!: \"" + yytext() + "\":" + //$NON-NLS-2$//$NON-NLS-1$
- yychar + "-" + (yychar + yylength()));//$NON-NLS-1$
- return UNDEFINED;
- }
- case 702: break;
- case 63:
- case 64:
- {
- if(Debug.debugTokenizer)
- dump("CDATA text");//$NON-NLS-1$
- fEmbeddedPostState = ST_CDATA_TEXT;
- fEmbeddedHint = XML_CDATA_TEXT;
- String returnedContext = doScan("]]>", false, true, true, XML_CDATA_TEXT, ST_CDATA_END, ST_CDATA_END);//$NON-NLS-1$
- if(returnedContext == XML_CDATA_TEXT)
- yybegin(ST_CDATA_END);
- return returnedContext;
- }
- case 703: break;
- case 68:
- case 187:
- case 190:
- case 208:
- case 211:
- {
- if(Debug.debugTokenizer)
- dump("LINE FEED");//$NON-NLS-1$
- return WHITE_SPACE;
- }
- case 704: break;
- case 69:
- case 70:
- {
- if(Debug.debugTokenizer)
- dump("comment content");//$NON-NLS-1$
- return scanXMLCommentText();
- }
- case 705: break;
- case 74:
- case 75:
- case 76:
- case 239:
- case 240:
- case 383:
- case 466:
- case 505:
- {
- if(Debug.debugTokenizer)
- dump("processing instruction target");//$NON-NLS-1$
- fEmbeddedHint = XML_CONTENT;
- yybegin(ST_PI_WS);
- return XML_TAG_NAME;
- }
- case 706: break;
- case 77:
- {
- yybegin(ST_PI_CONTENT);
- return WHITE_SPACE;
- }
- case 707: break;
- case 78:
- case 79:
- case 80:
- {
- // block scan until close is found
- return doScan("?>", false, false, false, XML_PI_CONTENT, ST_XML_PI_TAG_CLOSE, ST_XML_PI_TAG_CLOSE);
- }
- case 708: break;
- case 82:
- {
- if(Debug.debugTokenizer)
- dump("XML processing instruction attribute name");//$NON-NLS-1$
- yybegin(ST_XML_PI_EQUALS);
- return XML_TAG_ATTRIBUTE_NAME;
- }
- case 709: break;
- case 126:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_SQUOTED;
- yybegin(ST_XML_ATTRIBUTE_VALUE_SQUOTED);
- fStateStack.push(yystate());
- if(Debug.debugTokenizer)
- dump("JSP attribute value start - complex single quoted");//$NON-NLS-1$
- assembleEmbeddedContainer(XML_TAG_ATTRIBUTE_VALUE_SQUOTE, XML_TAG_ATTRIBUTE_VALUE_SQUOTE);
- fStateStack.pop();
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return PROXY_CONTEXT;
- }
- case 710: break;
- case 130:
- {
- if(Debug.debugTokenizer)
- dump("declaration end");//$NON-NLS-1$
- if (Debug.debugTokenizer) {
- if(fStateStack.peek()!=YYINITIAL)
- System.out.println("end embedded region");//$NON-NLS-1$
- }
- yybegin(fStateStack.pop());
- return XML_DECLARATION_CLOSE;
- }
- case 711: break;
- case 135:
- {
- if(Debug.debugTokenizer)
- dump("doctype type");//$NON-NLS-1$
- yybegin(ST_XML_DOCTYPE_EXTERNAL_ID);
- return XML_DOCTYPE_NAME;
- }
- case 712: break;
- case 138:
- case 142:
- case 289:
- case 293:
- case 399:
- {
- if(Debug.debugTokenizer)
- dump("doctype public reference");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- fEmbeddedPostState = YYINITIAL;
- yybegin(ST_XML_DOCTYPE_ID_SYSTEM);
- return XML_DOCTYPE_EXTERNAL_ID_PUBREF;
- }
- case 713: break;
- case 143:
- case 147:
- case 299:
- {
- if(Debug.debugTokenizer)
- dump("doctype system reference");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- fEmbeddedPostState = YYINITIAL;
- yybegin(ST_XML_DECLARATION_CLOSE);
- return XML_DOCTYPE_EXTERNAL_ID_SYSREF;
- }
- case 714: break;
- case 148:
- case 305:
- case 309:
- case 402:
- {
- if(Debug.debugTokenizer)
- dump("elementdecl name");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- fEmbeddedPostState = YYINITIAL;
- yybegin(ST_XML_ELEMENT_DECLARATION_CONTENT);
- return XML_ELEMENT_DECL_NAME;
- }
- case 715: break;
- case 154:
- {
- if(Debug.debugTokenizer)
- dump("elementdecl close");//$NON-NLS-1$
- if (Debug.debugTokenizer) {
- if(fStateStack.peek()!=YYINITIAL)
- System.out.println("end embedded region");//$NON-NLS-1$
- }
- yybegin(fStateStack.pop());
- return XML_DECLARATION_CLOSE;
- }
- case 716: break;
- case 155:
- case 315:
- case 319:
- case 409:
- {
- if(Debug.debugTokenizer)
- dump("attlist name");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- fEmbeddedPostState = YYINITIAL;
- yybegin(ST_XML_ATTLIST_DECLARATION_CONTENT);
- return XML_ATTLIST_DECL_NAME;
- }
- case 717: break;
- case 161:
- {
- if(Debug.debugTokenizer)
- dump("attlist close");//$NON-NLS-1$
- if (Debug.debugTokenizer) {
- if(fStateStack.peek()!=YYINITIAL)
- System.out.println("end embedded region");//$NON-NLS-1$
- }
- yybegin(fStateStack.pop());
- return XML_DECLARATION_CLOSE;
- }
- case 718: break;
- case 165:
- case 166:
- {
- if(Debug.debugTokenizer)
- dump("\nJSP comment text");//$NON-NLS-1$
- return scanJSPCommentText();
- }
- case 719: break;
- case 168:
- case 174:
- {
- return XML_TAG_ATTRIBUTE_VALUE;
- }
- case 720: break;
- case 169:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- int incomingState = yystate();
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- if(Debug.debugTokenizer)
- dump("tag inside of JSP attribute value start");//$NON-NLS-1$
- yybegin(ST_XML_TAG_NAME);
- assembleEmbeddedContainer(XML_TAG_OPEN, new String[]{XML_TAG_CLOSE,XML_EMPTY_TAG_CLOSE});
- if(yystate() != ST_ABORT_EMBEDDED)
- yybegin(incomingState);
- return PROXY_CONTEXT;
- }
- case 721: break;
- case 171:
- {
- return XML_TAG_ATTRIBUTE_VALUE_SQUOTE;
- }
- case 722: break;
- case 176:
- {
- return XML_TAG_ATTRIBUTE_VALUE_DQUOTE;
- }
- case 723: break;
- case 181:
- {
- yybegin(ST_JSP_EL_DQUOTES);
- return JSP_EL_DQUOTE;
- }
- case 724: break;
- case 182:
- {
- yybegin(ST_JSP_EL_SQUOTES);
- return JSP_EL_SQUOTE;
- }
- case 725: break;
- case 184:
- {
- fELlevel--;
- if(fELlevel == 0) {
- yybegin(YYINITIAL);
- return JSP_EL_CLOSE;
- }
- return JSP_EL_CONTENT;
- }
- case 726: break;
- case 191:
- {
- yybegin(ST_JSP_EL);
- return JSP_EL_SQUOTE;
- }
- case 727: break;
- case 192:
- {
- yybegin(ST_JSP_EL);
- return JSP_EL_DQUOTE;
- }
- case 728: break;
- case 196:
- {
- return JSP_EL_CLOSE;
- }
- case 729: break;
- case 202:
- {
- yybegin(ST_JSP_VBL_DQUOTES);
- return JSP_VBL_DQUOTE;
- }
- case 730: break;
- case 203:
- {
- yybegin(ST_JSP_VBL_SQUOTES);
- return JSP_VBL_SQUOTE;
- }
- case 731: break;
- case 205:
- {
- fELlevel--;
- if(fELlevel == 0) {
- yybegin(YYINITIAL);
- return JSP_VBL_CLOSE;
- }
- return JSP_VBL_CONTENT;
- }
- case 732: break;
- case 212:
- {
- yybegin(ST_JSP_VBL);
- return JSP_VBL_SQUOTE;
- }
- case 733: break;
- case 213:
- {
- yybegin(ST_JSP_VBL);
- return JSP_VBL_DQUOTE;
- }
- case 734: break;
- case 217:
- {
- return JSP_VBL_CLOSE;
- }
- case 735: break;
- case 221:
- {
- if(Debug.debugTokenizer)
- dump("\nend tag open");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(ST_XML_TAG_NAME);
- return XML_END_TAG_OPEN;
- }
- case 736: break;
- case 222:
- {
- if(Debug.debugTokenizer)
- dump("\nprocessing instruction start");//$NON-NLS-1$
- yybegin(ST_PI);
- return XML_PI_OPEN;
- }
- case 737: break;
- case 223:
- case 234:
- case 311:
- case 321:
- case 332:
- case 337:
- case 341:
- case 344:
- case 347:
- case 349:
- case 353:
- case 357:
- case 360:
- case 363:
- {
- /* JSP scriptlet begun (anywhere)
- * A consequence of the start anywhere possibility is that the
- * incoming state must be checked to see if it's erroneous
- * due to the order of precedence generated
- */
- // begin sanity checks
- if(yystate() == ST_JSP_CONTENT) {
- // at the beginning?!
- yypushback(1);
- return JSP_CONTENT;
- }
- else if(yystate() == ST_BLOCK_TAG_SCAN) {
- yypushback(2);
- return doBlockTagScan();
- }
- else if(yystate() == ST_XML_COMMENT) {
- yypushback(2);
- return scanXMLCommentText();
- }
- else if(yystate() == ST_JSP_COMMENT) {
- yypushback(2);
- return scanJSPCommentText();
- }
- // finished sanity checks
- fStateStack.push(yystate());
- if(fStateStack.peek()==YYINITIAL) {
- // the simple case, just a regular scriptlet out in content
- if(Debug.debugTokenizer)
- dump("\nJSP scriptlet start");//$NON-NLS-1$
- yybegin(ST_JSP_CONTENT);
- return JSP_SCRIPTLET_OPEN;
- }
- else {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint);//$NON-NLS-1$
- }
- if(Debug.debugTokenizer)
- dump("JSP scriptlet start");//$NON-NLS-1$
- if(yystate() == ST_XML_ATTRIBUTE_VALUE_DQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_DQUOTED;
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE_SQUOTED)
- fEmbeddedPostState = ST_XML_ATTRIBUTE_VALUE_SQUOTED;
- else if(yystate() == ST_CDATA_TEXT) {
- fEmbeddedPostState = ST_CDATA_TEXT;
- fEmbeddedHint = XML_CDATA_TEXT;
- }
- yybegin(ST_JSP_CONTENT);
- assembleEmbeddedContainer(JSP_SCRIPTLET_OPEN, JSP_CLOSE);
- if(yystate() == ST_BLOCK_TAG_INTERNAL_SCAN) {
- yybegin(ST_BLOCK_TAG_SCAN);
- return BLOCK_TEXT;
- }
- // required help for successive embedded regions
- if(yystate() == ST_XML_TAG_NAME) {
- fEmbeddedHint = XML_TAG_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else if((yystate() == ST_XML_ATTRIBUTE_NAME || yystate() == ST_XML_EQUALS)) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- }
- else if(yystate() == ST_XML_ATTRIBUTE_VALUE) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- return PROXY_CONTEXT;
- }
- }
- case 738: break;
- case 224:
- {
- fStateStack.push(yystate());
- if(Debug.debugTokenizer)
- dump("\ndeclaration start");//$NON-NLS-1$
- yybegin(ST_XML_DECLARATION);
- return XML_DECLARATION_OPEN;
- }
- case 739: break;
- case 238:
- {
- if(Debug.debugTokenizer)
- dump("processing instruction end");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_PI_CLOSE;
- }
- case 740: break;
- case 241:
- {
- // ended with nothing inside
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_PI_CLOSE;
- }
- case 741: break;
- case 242:
- {
- if(Debug.debugTokenizer)
- dump("XML processing instruction end");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_PI_CLOSE;
- }
- case 742: break;
- case 259:
- {
- if(Debug.debugTokenizer)
- dump("JSP end");//$NON-NLS-1$
- if (Debug.debugTokenizer) {
- if(fStateStack.peek()!=YYINITIAL)
- System.out.println("end embedded region");//$NON-NLS-1$
- }
- yybegin(fStateStack.pop());
- return JSP_CLOSE;
- }
- case 743: break;
- case 261:
- {
- if(Debug.debugTokenizer)
- dump("JSP end");//$NON-NLS-1$
- if (Debug.debugTokenizer) {
- if(fStateStack.peek()!=YYINITIAL)
- System.out.println("end embedded region");//$NON-NLS-1$
- }
- yybegin(fStateStack.pop());
- return JSP_DIRECTIVE_CLOSE;
- }
- case 744: break;
- case 162:
- case 163:
- {
- return doBlockTagScan();
- }
- case 745: break;
- default:
- if (yy_input == YYEOF && yy_startRead == yy_currentPos) {
- yy_atEOF = true;
- yy_do_eof();
- return null;
- }
- else {
- yy_ScanError(YY_NO_MATCH);
- }
- }
- }
- }
-
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceInitializer.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceInitializer.java
deleted file mode 100644
index a0f009e660..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceInitializer.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.wst.sse.core.internal.encoding.CommonCharsetNames;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-
-/**
- * Sets default values for JSP Core preferences
- */
-public class JSPCorePreferenceInitializer extends AbstractPreferenceInitializer {
-
- public void initializeDefaultPreferences() {
- IEclipsePreferences node = new DefaultScope().getNode(JSPCorePlugin.getDefault().getBundle().getSymbolicName());
-
- // compiler/validation preferences
- node.putBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);
-
- // code generation preferences
- node.put(CommonEncodingPreferenceNames.INPUT_CODESET, ""); //$NON-NLS-1$
- String defaultEnc = "ISO-8859-1";//$NON-NLS-1$
- String systemEnc = System.getProperty("file.encoding"); //$NON-NLS-1$
- if (systemEnc != null) {
- defaultEnc = CommonCharsetNames.getPreferredDefaultIanaName(systemEnc, "ISO-8859-1");//$NON-NLS-1$
- }
- node.put(CommonEncodingPreferenceNames.OUTPUT_CODESET, defaultEnc);
- node.put(CommonEncodingPreferenceNames.END_OF_LINE_CODE, ""); //$NON-NLS-1$
-
- // this could be made smarter by actually looking up the content
- // type's valid extensions
- node.put(JSPCorePreferenceNames.DEFAULT_EXTENSION, "jsp"); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceNames.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceNames.java
deleted file mode 100644
index 04a44068e3..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceNames.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.preferences;
-
-/**
- * Common preference keys used by JSP core
- */
-public class JSPCorePreferenceNames {
- private JSPCorePreferenceNames() {
- // empty private constructor so users cannot instantiate class
- }
-
- /**
- * The default extension to use when none is specified in the New JSP File
- * Wizard.
- * <p>
- * Value is of type <code>String</code>.
- * </p>
- */
- public static final String DEFAULT_EXTENSION = "defaultExtension"; //$NON-NLS-1$
-
- /**
- * Indicates if JSP fragments should be compiled/validated. JSP fragments
- * will be validated when true.
- * <p>
- * Value is of type <code>Boolean</code>.
- * </p>
- */
- public static final String VALIDATE_FRAGMENTS = "validateFragments";//$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP11Namespace.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP11Namespace.java
deleted file mode 100644
index 0c179a7c26..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP11Namespace.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.provisional;
-
-
-/**
- * JSP 1.1 Namespace
- */
-public interface JSP11Namespace {
-
- public static interface ElementName {
- // Element names
- public static final String SCRIPTLET = "jsp:scriptlet"; //$NON-NLS-1$
- public static final String EXPRESSION = "jsp:expression"; //$NON-NLS-1$
- public static final String DECLARATION = "jsp:declaration"; //$NON-NLS-1$
- public static final String DIRECTIVE_PAGE = "jsp:directive.page"; //$NON-NLS-1$
- public static final String DIRECTIVE_INCLUDE = "jsp:directive.include"; //$NON-NLS-1$
- public static final String DIRECTIVE_TAGLIB = "jsp:directive.taglib"; //$NON-NLS-1$
- public static final String USEBEAN = "jsp:useBean"; //$NON-NLS-1$
- public static final String SETPROPERTY = "jsp:setProperty"; //$NON-NLS-1$
- public static final String GETPROPERTY = "jsp:getProperty"; //$NON-NLS-1$
- public static final String INCLUDE = "jsp:include"; //$NON-NLS-1$
- public static final String FORWARD = "jsp:forward"; //$NON-NLS-1$
- public static final String PLUGIN = "jsp:plugin"; //$NON-NLS-1$
- public static final String PARAMS = "jsp:params"; //$NON-NLS-1$
- public static final String FALLBACK = "jsp:fallback"; //$NON-NLS-1$
- public static final String PARAM = "jsp:param"; //$NON-NLS-1$
- public static final String ROOT = "jsp:root"; //$NON-NLS-1$
- public static final String TEXT = "jsp:text"; //$NON-NLS-1$
- }
-
- public static final String JSP11_URI = ""; //$NON-NLS-1$
- public static final String JSP_TAG_PREFIX = "jsp"; //$NON-NLS-1$
- // attribute names
- // directive.page
- public static final String ATTR_NAME_LANGUAGE = "language"; //$NON-NLS-1$
- public static final String ATTR_NAME_EXTENDS = "extends"; //$NON-NLS-1$
- public static final String ATTR_NAME_CONTENT_TYPE = "contentType"; //$NON-NLS-1$
- public static final String ATTR_NAME_IMPORT = "import"; //$NON-NLS-1$
- public static final String ATTR_NAME_SESSION = "session"; //$NON-NLS-1$
- public static final String ATTR_NAME_BUFFER = "buffer"; //$NON-NLS-1$
- public static final String ATTR_NAME_AUTOFLUSH = "autoFlush"; //$NON-NLS-1$
- public static final String ATTR_NAME_IS_THREAD_SAFE = "isThreadSafe"; //$NON-NLS-1$
- public static final String ATTR_NAME_INFO = "info"; //$NON-NLS-1$
- public static final String ATTR_NAME_ERROR_PAGE = "errorPage"; //$NON-NLS-1$
- public static final String ATTR_NAME_IS_ERROR_PAGE = "isErrorPage"; //$NON-NLS-1$
- public static final String ATTR_NAME_PAGE_ENCODING = "pageEncoding"; //$NON-NLS-1$
- // directive.include
- public static final String ATTR_NAME_FILE = "file"; //$NON-NLS-1$
- // directive.taglib
- public static final String ATTR_NAME_URI = "uri"; //$NON-NLS-1$
- public static final String ATTR_NAME_PREFIX = "prefix"; //$NON-NLS-1$
- // useBean
- public static final String ATTR_NAME_ID = "id"; //$NON-NLS-1$
- public static final String ATTR_NAME_SCOPE = "scope"; //$NON-NLS-1$
- public static final String ATTR_NAME_CLASS = "class"; //$NON-NLS-1$
- public static final String ATTR_NAME_BEAN_NAME = "beanName"; //$NON-NLS-1$
- public static final String ATTR_NAME_TYPE = "type"; //$NON-NLS-1$
- // setProperty
- public static final String ATTR_NAME_NAME = "name"; //$NON-NLS-1$
- public static final String ATTR_NAME_PROPERTY = "property"; //$NON-NLS-1$
- public static final String ATTR_NAME_VALUE = "value"; //$NON-NLS-1$
- public static final String ATTR_NAME_PARAM = "param"; //$NON-NLS-1$
- // include
- public static final String ATTR_NAME_PAGE = "page"; //$NON-NLS-1$
- public static final String ATTR_NAME_FLUSH = "flush"; //$NON-NLS-1$
- // plugin
- public static final String ATTR_NAME_CODE = "code"; //$NON-NLS-1$
- public static final String ATTR_NAME_CODEBASE = "codebase"; //$NON-NLS-1$
- public static final String ATTR_NAME_ALIGN = "align"; //$NON-NLS-1$
- public static final String ATTR_NAME_ARCHIVE = "archive"; //$NON-NLS-1$
- public static final String ATTR_NAME_HEIGHT = "height"; //$NON-NLS-1$
- public static final String ATTR_NAME_HSPACE = "hspace"; //$NON-NLS-1$
- public static final String ATTR_NAME_JREVERSION = "jreversion"; //$NON-NLS-1$
- public static final String ATTR_NAME_VSPACE = "vspace"; //$NON-NLS-1$
- public static final String ATTR_NAME_WIDTH = "width"; //$NON-NLS-1$
- public static final String ATTR_NAME_NSPLUGINURL = "nspluginurl"; //$NON-NLS-1$
- public static final String ATTR_NAME_IEPLUGINURL = "iepluginurl"; //$NON-NLS-1$
- // root
- public static final String ATTR_NAME_XMLNS_JSP = "xmlns:jsp"; //$NON-NLS-1$
- public static final String ATTR_NAME_VERSION = "version"; //$NON-NLS-1$
- // attribute values
- public static final String ATTR_VALUE_TRUE = "true"; //$NON-NLS-1$
- public static final String ATTR_VALUE_FALSE = "false"; //$NON-NLS-1$
- public static final String ATTR_VALUE_JAVA = "java"; //$NON-NLS-1$
- public static final String ATTR_VALUE_CT_DEFAULT = "text/html; charset=ISO-8859-1";//D195366 //$NON-NLS-1$
- public static final String ATTR_VALUE_BUFSIZ_DEFAULT = "8kb"; //$NON-NLS-1$
- public static final String ATTR_VALUE_PAGE = "page"; //$NON-NLS-1$
- public static final String ATTR_VALUE_SESSION = "session"; //$NON-NLS-1$
- public static final String ATTR_VALUE_REQUEST = "request"; //$NON-NLS-1$
- public static final String ATTR_VALUE_APPLICATION = "application"; //$NON-NLS-1$
- public static final String ATTR_VALUE_BEAN = "bean"; //$NON-NLS-1$
- public static final String ATTR_VALUE_APPLET = "applet"; //$NON-NLS-1$
- public static final String ATTR_VALUE_TOP = "top"; //$NON-NLS-1$
- public static final String ATTR_VALUE_MIDDLE = "middle"; //$NON-NLS-1$
- public static final String ATTR_VALUE_BOTTOM = "bottom"; //$NON-NLS-1$
- public static final String ATTR_VALUE_LEFT = "left"; //$NON-NLS-1$
- public static final String ATTR_VALUE_RIGHT = "right"; //$NON-NLS-1$
- public static final String ATTR_VALUE_JVER11 = "1.1"; //$NON-NLS-1$
- public static final String ATTR_VALUE_XMLNS_JSP = "http://java.sun.com/JSP/Page"; //$NON-NLS-1$
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP12Namespace.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP12Namespace.java
deleted file mode 100644
index c24b244704..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP12Namespace.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.provisional;
-
-/**
- * Names for JSP 1.2 spec.
- * Currently, it is just the same as JSP11Namespace in org.eclipse.jst.jsp.core.
- */
-public interface JSP12Namespace extends JSP11Namespace {
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP20Namespace.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP20Namespace.java
deleted file mode 100644
index 5852c43c91..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP20Namespace.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.provisional;
-
-/**
- * New names for JSP 2.0 spec.
- */
-
-public interface JSP20Namespace extends JSP12Namespace {
- /**
- * New elements for JSP 2.0 spec.
- */
- public static interface ElementName extends JSP12Namespace.ElementName {
- String DIRECTIVE_TAG = "jsp:directive.tag"; //$NON-NLS-1$
- String DIRECTIVE_ATTRIBUTE = "jsp:directive.attribute"; //$NON-NLS-1$
- String DIRECTIVE_VARIABLE = "jsp:directive.variable"; //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/contenttype/ContentTypeIdForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/contenttype/ContentTypeIdForJSP.java
deleted file mode 100644
index f78615f170..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/contenttype/ContentTypeIdForJSP.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.provisional.contenttype;
-
-/**
- * This class, with its one field, is a convience to provide compile-time
- * safety when refering to a contentType ID. The value of the contenttype id
- * field must match what is specified in plugin.xml file.
- */
-
-public class ContentTypeIdForJSP {
- /**
- * The value of the contenttype id field must match what is specified in
- * plugin.xml file. Note: this value is intentially set with default
- * protected method so it will not be inlined.
- */
- public final static String ContentTypeID_JSP = getConstantString();
- /**
- * The value of the contenttype id field must match what is specified in
- * plugin.xml file. Note: this value is intentially set with default
- * protected method so it will not be inlined.
- */
- public final static String ContentTypeID_JSPFRAGMENT = getFragmentConstantString();
-
- /**
- * Don't allow instantiation.
- */
- private ContentTypeIdForJSP() {
- super();
- }
-
- static String getConstantString() {
- return "org.eclipse.jst.jsp.core.jspsource"; //$NON-NLS-1$
- }
-
- static String getFragmentConstantString() {
- return "org.eclipse.jst.jsp.core.jspfragmentsource"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/contenttype/IContentDescriptionForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/contenttype/IContentDescriptionForJSP.java
deleted file mode 100644
index 4eb89e3903..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/contenttype/IContentDescriptionForJSP.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.provisional.contenttype;
-
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.wst.sse.core.internal.encoding.ICodedResourcePlugin;
-
-
-public interface IContentDescriptionForJSP {
- /**
- * Extra properties as part of ContentDescription, if the content is JSP.
- */
- public final static QualifiedName CONTENT_TYPE_ATTRIBUTE = new QualifiedName(ICodedResourcePlugin.ID, "contentTypeAttribute"); //$NON-NLS-1$
- public final static QualifiedName LANGUAGE_ATTRIBUTE = new QualifiedName(ICodedResourcePlugin.ID, "languageAttribute"); //$NON-NLS-1$
- public final static QualifiedName CONTENT_FAMILY_ATTRIBUTE = new QualifiedName(ICodedResourcePlugin.ID, "contentFamilyAttribute"); //$NON-NLS-1$;
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/text/IJSPPartitionTypes.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/text/IJSPPartitionTypes.java
deleted file mode 100644
index 179e3a5a4e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/text/IJSPPartitionTypes.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.provisional.text;
-
-
-/**
- * This interface is not intended to be implemented.
- * It defines the partition types for JSP.
- * Clients should reference the partition type Strings defined here directly.
- *
- * @deprecated use org.eclipse.jst.jsp.core.internal.provisional.text.IJSPPartitions
- */
-public interface IJSPPartitionTypes {
-
- String JSP_DEFAULT = "org.eclipse.jst.jsp.DEFAULT_JSP"; //$NON-NLS-1$
- String JSP_COMMENT = "org.eclipse.jst.jsp.JSP_COMMENT"; //$NON-NLS-1$
-
- String JSP_SCRIPT_PREFIX = "org.eclipse.jst.jsp.SCRIPT."; //$NON-NLS-1$
- String JSP_CONTENT_DELIMITER = JSP_SCRIPT_PREFIX + "DELIMITER"; //$NON-NLS-1$
- String JSP_CONTENT_JAVA = JSP_SCRIPT_PREFIX + "JAVA"; //$NON-NLS-1$
- String JSP_CONTENT_JAVASCRIPT = JSP_SCRIPT_PREFIX + "JAVASCRIPT"; //$NON-NLS-1$
- String JSP_DEFAULT_EL = JSP_SCRIPT_PREFIX + "JSP_EL"; //$NON-NLS-1$
- String JSP_DEFAULT_EL2 = JSP_SCRIPT_PREFIX + "JSP_EL2"; //$NON-NLS-1$
-
- String JSP_DIRECTIVE = "org.eclipse.jst.jsp.JSP_DIRECTIVE"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/regions/DOMJSPRegionContexts.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/regions/DOMJSPRegionContexts.java
deleted file mode 100644
index f0aa201fa2..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/regions/DOMJSPRegionContexts.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.regions;
-
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-
-/**
- *
- */
-
-public interface DOMJSPRegionContexts extends DOMRegionContext {
- public static final String JSP_CLOSE = "JSP_CLOSE"; //$NON-NLS-1$
- public static final String JSP_COMMENT_CLOSE = "JSP_COMMENT_CLOSE"; //$NON-NLS-1$
-
- public static final String JSP_COMMENT_OPEN = "JSP_COMMENT_OPEN"; //$NON-NLS-1$
- public static final String JSP_COMMENT_TEXT = "JSP_COMMENT_TEXT"; //$NON-NLS-1$
-
- public static final String JSP_CONTENT = "JSP_CONTENT"; //$NON-NLS-1$
- public static final String JSP_DECLARATION_OPEN = "JSP_DECLARATION_OPEN"; //$NON-NLS-1$
- public static final String JSP_DIRECTIVE_CLOSE = "JSP_DIRECTIVE_CLOSE"; //$NON-NLS-1$
- public static final String JSP_DIRECTIVE_NAME = "JSP_DIRECTIVE_NAME"; //$NON-NLS-1$
-
- public static final String JSP_DIRECTIVE_OPEN = "JSP_DIRECTIVE_OPEN"; //$NON-NLS-1$
- public static final String JSP_EL_CLOSE = "JSP_EL_CLOSE"; //$NON-NLS-1$
- public static final String JSP_EL_CONTENT = "JSP_EL_CONTENT"; //$NON-NLS-1$
- public static final String JSP_EL_DQUOTE = "JSP_EL_DQUOTE"; //$NON-NLS-1$
-
- public static final String JSP_EL_OPEN = "JSP_EL_OPEN"; //$NON-NLS-1$
- public static final String JSP_EL_QUOTED_CONTENT = "JSP_EL_QUOTED_CONTENT"; //$NON-NLS-1$
- public static final String JSP_EL_SQUOTE = "JSP_EL_SQUOTE"; //$NON-NLS-1$
- public static final String JSP_EXPRESSION_OPEN = "JSP_EXPRESSION_OPEN"; //$NON-NLS-1$
-
- public static final String JSP_ROOT_TAG_NAME = "JSP_ROOT_TAG_NAME"; //$NON-NLS-1$
-
- public static final String JSP_SCRIPTLET_OPEN = "JSP_SCRIPTLET_OPEN"; //$NON-NLS-1$
- public static final String JSP_VBL_CLOSE = "JSP_VBL_CLOSE"; //$NON-NLS-1$
- public static final String JSP_VBL_CONTENT = "JSP_VBL_CONTENT"; //$NON-NLS-1$
- public static final String JSP_VBL_DQUOTE = "JSP_VBL_DQUOTE"; //$NON-NLS-1$
- public static final String JSP_VBL_OPEN = "JSP_VBL_OPEN"; //$NON-NLS-1$
- public static final String JSP_VBL_QUOTED_CONTENT = "JSP_VBL_QUOTED_CONTENT"; //$NON-NLS-1$
- public static final String JSP_VBL_SQUOTE = "JSP_VBL_SQUOTE"; //$NON-NLS-1$
- public static final String XML_TAG_ATTRIBUTE_VALUE_DQUOTE = "XML_TAG_ATTRIBUTE_VALUE_DQUOTE"; //$NON-NLS-1$
-
- public static final String XML_TAG_ATTRIBUTE_VALUE_SQUOTE = "XML_TAG_ATTRIBUTE_VALUE_SQUOTE"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibClassLoader.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibClassLoader.java
deleted file mode 100644
index 9823b3c7ed..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibClassLoader.java
+++ /dev/null
@@ -1,363 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.taglib;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jst.jsp.core.internal.Logger;
-
-
-
-/**
- * Custom classloader which allows you to add source directories (folders
- * containing .class files) and jars to the classpath.
- *
- * @author pavery
- */
-public class TaglibClassLoader extends ClassLoader {
-
- // for debugging
- private static final boolean DEBUG;
- static {
- String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/taglibclassloader"); //$NON-NLS-1$
- DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- private List jarsList = new ArrayList();
- private List dirsList = new ArrayList();
- private List usedJars = new ArrayList();
- private List usedDirs = new ArrayList();
-
- private Map failedClasses = new HashMap(); // CL: added to optimize
- // failed loading
-
- // private List loadedClassFilenames = new ArrayList();
-
- public TaglibClassLoader(ClassLoader parentLoader) {
- super(parentLoader);
- }
-
- /**
- * Adds a new jar to classpath.
- *
- * @param filename -
- * full path to the jar file
- */
- public void addJar(String filename) {
- if (DEBUG)
- System.out.println("trying to add: [" + filename + "] to classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- // don't add the same entry twice, or search times will get even worse
- if (!jarsList.contains(filename)) {
- jarsList.add(filename);
- failedClasses = new HashMap();
- if (DEBUG)
- System.out.println(" + [" + filename + "] added to classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Removes a jar from the classpath.
- *
- * @param filename -
- * full path to the jar file
- */
- public void removeJar(String filename) {
- jarsList.remove(filename);
- failedClasses = new HashMap();
- if (DEBUG)
- System.out.println("removed: [" + filename + "] from classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public void addDirectory(String dirPath) {
- if (!dirsList.contains(dirPath)) {
- dirsList.add(dirPath);
- failedClasses = new HashMap();
- if (DEBUG)
- System.out.println("added: [" + dirPath + "] to classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Removes a directory from the classpath.
- *
- * @param dirPath -
- * full path of the directory
- */
- public void removeDirectory(String dirPath) {
- dirsList.remove(dirPath);
- failedClasses = new HashMap();
- if (DEBUG)
- System.out.println("removed: [" + dirPath + "] from classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Returns the list of JARs on this loader's classpath that contain
- * classes that have been loaded.
- *
- * @return List - the list of JARs
- */
- public List getJarsInUse() {
- return usedJars;
- }
-
- /**
- * Returns a list of directories on this loader's classpath that contain
- * classes that have been loaded.
- *
- * @return List - the list of directories (fully-qualified filename
- * Strings)
- */
- public List getDirectoriesInUse() {
- return usedDirs;
- }
-
- Map getFailures() {
- return failedClasses;
- }
-
- /**
- * Returns a list of filenames for loose classes that have been loaded out
- * of directories.
- *
- * @return List - the list of class filenames
- */
- // public List getClassFilenamesFromDirectories() {
- // return loadedClassFilenames;
- // }
- /**
- * Searches for the given class name on the defined classpath -
- * directories are checked before JARs.
- *
- * @param className -
- * the name of the class to find
- * @return Class - the loaded class
- * @throws ClassNotFoundException
- */
- protected synchronized Class findClass(String className) throws ClassNotFoundException {
- Class oldClass = findLoadedClass(className);
- if (oldClass != null) {
- if (DEBUG)
- System.out.println(">> TaglibClassLoader " + this + " returning existing class: " + className); //$NON-NLS-1$ //$NON-NLS-2$
- return oldClass;
- }
- if (failedClasses.containsKey(className)) {
- if (DEBUG)
- System.out.println(">> TaglibClassLoader " + this + " known missing class: " + className); //$NON-NLS-1$ //$NON-NLS-2$
- throw new ClassNotFoundException();
- }
-
- if (DEBUG)
- System.out.println(">> TaglibClassLoader " + this + " finding class: " + className); //$NON-NLS-1$ //$NON-NLS-2$
-
- Class newClass = null;
- JarFile jarfile = null;
- JarEntry entry = null;
-
- // get the correct name of the actual .class file to search for
- String fileName = calculateClassFilename(className);
- InputStream stream = null;
- try {
- // first try searching the classpath directories
- Iterator dirs = dirsList.iterator();
- File f;
- String dirName;
- String fileToFind = ""; //$NON-NLS-1$
- while (dirs.hasNext()) {
- dirName = (String) dirs.next();
- fileToFind = dirName + "/" + fileName; //$NON-NLS-1$
-
- f = new File(fileToFind);
- if (f.exists()) {
- stream = new FileInputStream(f);
- usedDirs.add(dirName);
- // loadedClassFilenames.add(fileToFind);
- if (DEBUG)
- System.out.println(">> added file from dir: " + dirName + "/" + fileName); //$NON-NLS-1$ //$NON-NLS-2$
- break;
-
- }
- }
-
- if (stream != null) {
- // found a class from a directory
- ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
- byte[] buffer = new byte[2048];
- while (stream.available() > 0) {
- int amountRead = stream.read(buffer);
- if(amountRead > 0) {
- byteStream.write(buffer, 0, amountRead);
- }
- }
-
- byte[] byteArray = byteStream.toByteArray();
- try {
- if (DEBUG)
- System.out.println(">> defining newClass:" + className); //$NON-NLS-1$
- newClass = defineClass(className, byteArray, 0, byteArray.length);
- resolveClass(newClass);
- }
- catch (Throwable t) {
- Logger.logException("Error loading TEI class " + className, t);
-
- // j9 can give ClassCircularityError
- // parent should already have the class then
- // try parent loader
- try {
- Class c = getParent().loadClass(className);
- if (DEBUG)
- System.out.println(">> loaded: " + className + " with: " + getParent()); //$NON-NLS-1$ //$NON-NLS-2$
- return c;
- }
- catch (ClassNotFoundException cnf) {
- if (DEBUG)
- cnf.printStackTrace();
- }
- }
- stream.close();
- }
-
- if (stream == null) {
- // still haven't found the class, so now try searching the
- // jars
- // search each of the jars until we find an entry matching the
- // classname
- Iterator jars = jarsList.iterator();
- String jarName;
- while (jars.hasNext()) {
- jarName = (String) jars.next();
-
- // make sure the file exists or "new JarFile()" will throw
- // an exception
- f = new File(jarName);
- if (!f.exists()) {
- continue;
- }
- try {
- jarfile = new JarFile(jarName);
- }
- catch (IOException e) {
- if (DEBUG)
- Logger.logException("bad jar file", e); //$NON-NLS-1$
- }
- if (jarfile == null) {
- continue;
- }
-
- entry = jarfile.getJarEntry(fileName);
-
- if (DEBUG)
- System.out.println("looking for filename: " + fileName + " in: " + jarfile.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- if (entry != null) {
- if (DEBUG)
- System.out.println("found the entry: " + entry + " for filename: " + fileName); //$NON-NLS-1$ //$NON-NLS-2$
- // found the class
- if (!usedJars.contains(jarName)) {
- // add the jar to the list of in-use jars
- usedJars.add(jarName);
- }
- break;
- }
- jarfile.close();
- }
-
- if (entry != null) {
- // we've found an entry for the desired class
- stream = jarfile.getInputStream(entry);
- ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
- long byteLength = entry.getSize();
- long totalBytesRead = 0;
- int bytesRead;
- byte[] byteBuffer = new byte[10000];
- while (totalBytesRead < byteLength) {
- bytesRead = stream.read(byteBuffer);
- if (bytesRead == -1) {
- break;
- }
- totalBytesRead = totalBytesRead + bytesRead;
- byteStream.write(byteBuffer, 0, bytesRead);
- }
-
- byte[] byteArray = byteStream.toByteArray();
- try {
- if (DEBUG)
- System.out.println(">> defining newClass:" + className); //$NON-NLS-1$
- // define the class from the byte array
- newClass = defineClass(className, byteArray, 0, byteArray.length);
- resolveClass(newClass);
- }
- catch (Throwable t) {
- Logger.logException("Error loading TEI class " + className, t);
- // j9 can give ClassCircularityError
- // parent should already have the class then
-
- // try parent
- try {
- Class c = getParent().loadClass(className);
- if (DEBUG)
- System.out.println(">> loaded: " + className + " with: " + getParent()); //$NON-NLS-1$ //$NON-NLS-2$
- return c;
- }
- catch (ClassNotFoundException cnf) {
- if (DEBUG)
- cnf.printStackTrace();
- failedClasses.put(className, cnf);
- }
- }
- stream.close();
- jarfile.close();
- }
- }
- }
- catch (Throwable t) {
- failedClasses.put(className, t);
- return null;
- }
- finally {
- try {
- if (stream != null) {
- stream.close();
- }
- if (jarfile != null) {
- jarfile.close();
- }
- }
- catch (IOException ioe) {
- // ioe.printStackTrace();
- // just trying to close down anyway - ignore
- }
- }
-
- if (newClass != null) {
- if (DEBUG)
- System.out.println(">> loaded: " + newClass + " with: " + this); //$NON-NLS-1$ //$NON-NLS-2$
- return newClass;
- }
-
-// failedClasses.add(className);
- throw new ClassNotFoundException();
- }
-
- /**
- * Replaces '.' in the classname with '/' and appends '.class' if needed.
- *
- * @return String - the properly-formed class name
- */
- private String calculateClassFilename(String name) {
- StringBuffer buffer = new StringBuffer(name.replace('.', '/'));
- if (!name.endsWith(".class")) { //$NON-NLS-1$
- buffer.append(".class"); //$NON-NLS-1$
- }
- return buffer.toString();
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java
deleted file mode 100644
index 7d30706adf..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java
+++ /dev/null
@@ -1,603 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.taglib;
-
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import javax.servlet.jsp.tagext.TagAttributeInfo;
-import javax.servlet.jsp.tagext.TagData;
-import javax.servlet.jsp.tagext.TagExtraInfo;
-import javax.servlet.jsp.tagext.TagInfo;
-import javax.servlet.jsp.tagext.TagLibraryInfo;
-import javax.servlet.jsp.tagext.VariableInfo;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.IClasspathContainer;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TaglibTracker;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDAttributeDeclaration;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDVariable;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMNodeWrapper;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-/**
- * This class helps find TaglibVariables in a JSP file.
- *
- * @author pavery
- */
-public class TaglibHelper {
-
- // for debugging
- private static final boolean DEBUG;
- static {
- String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/taglibvars"); //$NON-NLS-1$
- DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- private IProject fProject = null;
- private TaglibClassLoader fLoader = null;
-
- private Set fProjectEntries = null;
- private Set fContainerEntries = null;
-
- public TaglibHelper(IProject project) {
- setProject(project);
- fProjectEntries = new HashSet();
- fContainerEntries = new HashSet();
- }
-
- /**
- * @param tagToAdd
- * is the name of the tag whose variables we want
- * @param structuredDoc
- * is the IStructuredDocument where the tag is found
- * @param customTag
- * is the IStructuredDocumentRegion opening tag for the custom
- * tag
- */
- public TaglibVariable[] getTaglibVariables(String tagToAdd, IStructuredDocument structuredDoc, IStructuredDocumentRegion customTag) {
- List results = new ArrayList();
- ModelQuery mq = getModelQuery(structuredDoc);
- if (mq != null) {
- TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(structuredDoc);
-
- // TaglibSupport support = ((TaglibModelQuery)
- // mq).getTaglibSupport();
- if (mgr == null)
- return new TaglibVariable[0];
-
- List trackers = mgr.getCMDocumentTrackers(-1);
- Iterator taglibs = trackers.iterator();
-
- // TaglibSupport support = ((TaglibModelQuery)
- // mq).getTaglibSupport();
- // if (support == null)
- // return new TaglibVariable[0];
- //
- // Iterator taglibs =
- // support.getCMDocuments(customTag.getStartOffset()).iterator();
- CMDocument doc = null;
- CMNamedNodeMap elements = null;
- while (taglibs.hasNext()) {
- doc = (CMDocument) taglibs.next();
- CMNode node = null;
- if ((elements = doc.getElements()) != null && (node = elements.getNamedItem(tagToAdd)) != null && node.getNodeType() == CMNode.ELEMENT_DECLARATION) {
-
- if (node instanceof CMNodeWrapper) {
- node = ((CMNodeWrapper) node).getOriginNode();
- }
-
- // 1.2+ taglib style
- addVariables(results, node, customTag);
-
- // for 1.1 need more info from taglib tracker
- if (doc instanceof TaglibTracker) {
- String uri = ((TaglibTracker) doc).getURI();
- String prefix = ((TaglibTracker) doc).getPrefix();
- // only for 1.1 taglibs
- addTEIVariables(customTag, results, (TLDElementDeclaration) node, prefix, uri);
- }
- }
- }
- }
-
- return (TaglibVariable[]) results.toArray(new TaglibVariable[results.size()]);
- }
-
- /**
- * Adds 1.2 style TaglibVariables to the results list.
- *
- * @param results
- * list where the <code>TaglibVariable</code> s are added
- * @param node
- */
- private void addVariables(List results, CMNode node, IStructuredDocumentRegion customTag) {
-
- List list = ((TLDElementDeclaration) node).getVariables();
- Iterator it = list.iterator();
- while (it.hasNext()) {
- TLDVariable var = (TLDVariable) it.next();
- String varName = var.getNameGiven();
- if (varName == null) {
- String attrName = var.getNameFromAttribute();
- /*
- * Iterate through the document region to find the
- * corresponding attribute name, and then use its value
- */
- ITextRegionList regions = customTag.getRegions();
- boolean attrNameFound = false;
- for (int i = 2; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (DOMRegionContext.XML_TAG_ATTRIBUTE_NAME.equals(region.getType())) {
- attrNameFound = attrName.equals(customTag.getText(region));
- }
- if (attrNameFound && DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE.equals(region.getType())) {
- varName = StringUtils.strip(customTag.getText(region));
- }
- }
- }
- if (varName != null) {
- String varClass = "java.lang.String"; //$NON-NLS-1$ // the default class...
- if (var.getVariableClass() != null) {
- varClass = var.getVariableClass();
- }
- results.add(new TaglibVariable(varClass, varName, var.getScope()));
- }
- }
- }
-
- /**
- * Adds 1.1 style TaglibVariables (defined in a TagExtraInfo class) to the
- * results list.
- *
- * @param customTag
- * @param results
- * list where the <code>TaglibVariable</code> s are added
- * @param decl
- * TLDElementDeclaration for the custom tag
- * @param prefix
- * custom tag prefix
- * @param uri
- * URI where the tld can be found
- */
- private void addTEIVariables(IStructuredDocumentRegion customTag, List results, TLDElementDeclaration decl, String prefix, String uri) {
-
- String teiClassname = decl.getTeiclass();
- if (teiClassname == null || teiClassname.length() == 0)
- return;
-
- TaglibClassLoader loader = getClassloader();
-
- Class teiClass = null;
- try {
- teiClass = Class.forName(teiClassname, true, loader);
- if (teiClass != null) {
- Object teiObject = teiClass.newInstance();
- if (TagExtraInfo.class.isInstance(teiObject)) {
- TagExtraInfo tei = (TagExtraInfo) teiObject;
- Hashtable tagDataTable = extractTagData(customTag);
- TagInfo info = getTagInfo(decl, tei, prefix, uri);
- if (info != null) {
- tei.setTagInfo(info);
-
- // add to results
- TagData td = new TagData(tagDataTable);
- if (tei.isValid(td)) {
- VariableInfo[] vInfos = tei.getVariableInfo(td);
- if (vInfos != null) {
- for (int i = 0; i < vInfos.length; i++) {
- results.add(new TaglibVariable(vInfos[i].getClassName(), vInfos[i].getVarName(), vInfos[i].getScope()));
- }
- }
- }
- }
- }
- }
- }
- catch (ClassNotFoundException e) {
- // TEI class wasn't on classpath
- if (DEBUG)
- logException(teiClassname, e);
- }
- catch (InstantiationException e) {
- if (DEBUG)
- logException(teiClassname, e);
- }
- catch (IllegalAccessException e) {
- if (DEBUG)
- logException(teiClassname, e);
- }
- catch (ClassCastException e) {
- // TEI class wasn't really a subclass of TagExtraInfo
- if (DEBUG)
- logException(teiClassname, e);
- }
- catch (Exception e) {
- // this is 3rd party code, need to catch all exceptions
- if (DEBUG)
- logException(teiClassname, e);
- }
- catch (Error e) {
- // this is 3rd party code, need to catch all errors
- if (DEBUG)
- logException(teiClassname, e);
- }
- finally {
- // Thread.currentThread().setContextClassLoader(oldLoader);
- }
- }
-
- /**
- * @param decl
- * @return the TagInfo for the TLDELementDeclaration if the declaration is
- * valid, otherwise null
- */
- private TagInfo getTagInfo(TLDElementDeclaration decl, TagExtraInfo tei, String prefix, String uri) {
-
- TagLibraryInfo libInfo = new TagLibraryInfo(prefix, uri) { /*
- * dummy
- * impl
- */
- };
-
- CMNamedNodeMap attrs = decl.getAttributes();
- TagAttributeInfo[] attrInfos = new TagAttributeInfo[attrs.getLength()];
- TLDAttributeDeclaration attr = null;
- String type = ""; //$NON-NLS-1$
-
- // get tag attribute infos
- for (int i = 0; i < attrs.getLength(); i++) {
- attr = (TLDAttributeDeclaration) attrs.item(i);
- type = attr.getType();
- // default value for type is String
- if (attr.getType() == null || attr.getType().equals("")) //$NON-NLS-1$
- type = "java.lang.String"; //$NON-NLS-1$
- attrInfos[i] = new TagAttributeInfo(attr.getAttrName(), attr.isRequired(), type, false);
- }
-
- String tagName = decl.getNodeName();
- String tagClass = decl.getTagclass();
- String bodyContent = decl.getBodycontent();
- if (tagName != null && tagClass != null && bodyContent != null)
- return new TagInfo(tagName, tagClass, bodyContent, decl.getInfo(), libInfo, tei, attrInfos);
- return null;
-
- }
-
- /**
- * @param e
- */
- private void logException(String teiClassname, Throwable e) {
- String message = "teiClassname: ["; //$NON-NLS-1$
- if (teiClassname != null)
- message += teiClassname;
- message += "]"; //$NON-NLS-1$
- Logger.logException(message, e);
- }
-
- /**
- * Returns all attribute -> value pairs for the tag in a Hashtable.
- *
- * @param customTag
- * @return
- */
- private Hashtable extractTagData(IStructuredDocumentRegion customTag) {
-
- Hashtable tagDataTable = new Hashtable();
- ITextRegionList regions = customTag.getRegions();
- ITextRegion r = null;
- String attrName = ""; //$NON-NLS-1$
- String attrValue = ""; //$NON-NLS-1$
- for (int i = 0; i < regions.size(); i++) {
- r = regions.get(i);
- // check if attr name
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- attrName = customTag.getText(r);
- // check equals is next region
- if (regions.size() > ++i) {
- r = regions.get(i);
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS && regions.size() > ++i) {
- // get attr value
- r = regions.get(i);
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- r = regions.get(i);
- // attributes in our document have quotes, so we
- // need to strip them
- attrValue = StringUtils.stripQuotes(customTag.getText(r));
- tagDataTable.put(attrName, attrValue);
- }
- }
- }
- }
- }
- return tagDataTable;
- }
-
- private TaglibClassLoader getClassloader() {
-
- if (fLoader == null) {
- fLoader = new TaglibClassLoader(this.getClass().getClassLoader());
- fProjectEntries.clear();
- fContainerEntries.clear();
- addClasspathEntriesForProject(getProject(), fLoader);
- }
- return fLoader;
- }
-
- /**
- * @param loader
- */
- private void addClasspathEntriesForProject(IProject p, TaglibClassLoader loader) {
-
- // avoid infinite recursion and closed project
- if (!p.isAccessible() || fProjectEntries.contains(p.getFullPath().toString()))
- return;
- fProjectEntries.add(p.getFullPath().toString());
-
- // add things on classpath that we are interested in
- if (p != null) {
- try {
- if (p.hasNature(JavaCore.NATURE_ID)) {
-
- IJavaProject project = JavaCore.create(p);
-
- try {
- IClasspathEntry[] entries = project.getRawClasspath();
- addDefaultDirEntry(loader, project);
- addClasspathEntries(loader, project, entries);
- }
- catch (JavaModelException e) {
- Logger.logException(e);
- }
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- }
-
- private void addClasspathEntries(TaglibClassLoader loader, IJavaProject project, IClasspathEntry[] entries) throws JavaModelException {
- IClasspathEntry entry;
- for (int i = 0; i < entries.length; i++) {
-
- entry = entries[i];
- if (DEBUG)
- System.out.println("current entry is: " + entry); //$NON-NLS-1$
-
- switch (entry.getEntryKind()) {
- case IClasspathEntry.CPE_SOURCE :
- addSourceEntry(loader, entry);
- break;
- case IClasspathEntry.CPE_LIBRARY :
- addLibraryEntry(loader, project, entry.getPath());
- break;
- case IClasspathEntry.CPE_PROJECT :
- addProjectEntry(loader, entry);
- break;
- case IClasspathEntry.CPE_VARIABLE :
- addVariableEntry(loader, project, entry);
- break;
- case IClasspathEntry.CPE_CONTAINER :
- addContainerEntry(loader, project, entry);
- break;
- }
- }
- }
-
- /**
- * @param loader
- * @param entry
- */
- private void addVariableEntry(TaglibClassLoader loader, IJavaProject project, IClasspathEntry entry) {
- if (DEBUG)
- System.out.println(" -> adding variable entry: [" + entry + "]"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // variable should either be a project or a library entry
-
- IPath variablePath = entry.getPath();
- // String variableName = entry.getPath().toString();
- variablePath = JavaCore.getResolvedVariablePath(variablePath);
-
- // RATLC01076854
- // variable paths may not exist
- // in that case null will be returned
- if (variablePath != null) {
- if (variablePath.segments().length == 1) {
- IProject varProj = ResourcesPlugin.getWorkspace().getRoot().getProject(variablePath.toString());
- if (varProj != null && varProj.isAccessible()) {
- addClasspathEntriesForProject(varProj, loader);
- return;
- }
- }
- addLibraryEntry(loader, project, variablePath);
- }
- }
-
- /**
- * @param loader
- * @param project
- * @param entry
- * @throws JavaModelException
- */
- private void addContainerEntry(TaglibClassLoader loader, IJavaProject project, IClasspathEntry entry) throws JavaModelException {
-
- IClasspathContainer container = JavaCore.getClasspathContainer(entry.getPath(), project);
- if (container != null) {
- // avoid infinite recursion
- if (!fContainerEntries.contains(container.getPath().toString())) {
- fContainerEntries.add(container.getPath().toString());
-
- IClasspathEntry[] cpes = container.getClasspathEntries();
- // recursive call here
- addClasspathEntries(loader, project, cpes);
- }
- }
- }
-
- /**
- * @param loader
- * @param entry
- */
- private void addProjectEntry(TaglibClassLoader loader, IClasspathEntry entry) {
- if (DEBUG)
- System.out.println(" -> project entry: [" + entry + "]"); //$NON-NLS-1$ //$NON-NLS-2$
-
- IPath path = entry.getPath();
- IProject referenceProj = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
- if (referenceProj != null && referenceProj.isAccessible()) {
- addClasspathEntriesForProject(referenceProj, loader);
- }
- }
-
- /**
- * @param loader
- * @param project
- * @param projectLocation
- * @throws JavaModelException
- */
- private void addDefaultDirEntry(TaglibClassLoader loader, IJavaProject project) throws JavaModelException {
- // add default bin directory for the project
- IPath outputPath = project.getOutputLocation();
- String outputLocation = null;
- if (!outputPath.toFile().exists()) {
- if (outputPath.segmentCount() > 1) {
- // separate source and output folders
- IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(outputPath);
- if (folder.isAccessible() && folder.getLocation() != null) {
- outputLocation = folder.getLocation().toString();
- }
- }
- else {
- // project as output folder (default for <=3.2)
- IProject iproject = ResourcesPlugin.getWorkspace().getRoot().getProject(outputPath.segment(0));
- if (iproject.getLocation() != null) {
- outputLocation = iproject.getLocation().toString();
- }
- }
- }
- else {
- outputLocation = outputPath.toString();
- }
- loader.addDirectory(outputLocation);
- }
-
- /**
- * @param loader
- * @param entry
- */
- private void addLibraryEntry(TaglibClassLoader loader, IJavaProject project, IPath libPath) {
- String jarPathString = libPath.toString();
- File file = new File(libPath.toOSString());
-
- // if not absolute path, it's workspace relative
- if (!file.exists() && libPath.segmentCount() > 1) {
- /*
- * unlikely, the UI prevents adding folder variables to the
- * classpath
- */
- IFile jarFile = ResourcesPlugin.getWorkspace().getRoot().getFile(libPath);
- if(jarFile.isAccessible() && jarFile.getLocation() != null) {
- jarPathString = jarFile.getLocation().toString();
- }
- }
-
- if (jarPathString != null) {
- if (jarPathString.endsWith(".jar")) { //$NON-NLS-1$
- loader.addJar(jarPathString);
- }
- else if (file.isDirectory()) {
- // it's actually a folder containing binaries
- loader.addDirectory(jarPathString);
- }
- }
- }
-
- /**
- * @param loader
- * @param entry
- */
- private void addSourceEntry(TaglibClassLoader loader, IClasspathEntry entry) {
- // add bin directory for specific entry if it has
- // one
- IPath outputLocation = entry.getOutputLocation();
- if(outputLocation != null && outputLocation.segmentCount() > 1) {
- IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(outputLocation);
- if (folder != null && folder.isAccessible()) {
- outputLocation = folder.getLocation();
- loader.addDirectory(outputLocation.toString());
- }
- }
- else {
- IPath location = getProject().getLocation();
- if(location != null) {
- loader.addDirectory(location.toString());
- }
- }
- }
-
- /**
- * @return Returns the fModelQuery.
- */
- public ModelQuery getModelQuery(IDocument doc) {
- IStructuredModel model = null;
- ModelQuery mq = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForRead(doc);
- mq = ModelQueryUtil.getModelQuery(model);
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- return mq;
- }
-
-
- /**
- * @return Returns the fFile.
- */
- public IProject getProject() {
-
- return fProject;
- }
-
- /**
- * @param file
- * The fFile to set.
- */
- public void setProject(IProject p) {
- fProject = p;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperCache.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperCache.java
deleted file mode 100644
index f4f95cd4ee..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperCache.java
+++ /dev/null
@@ -1,155 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.taglib;
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jst.jsp.core.internal.Logger;
-
-/**
- * A simple cache for TaglibHelpers to avoid excessive creation of TaglibClassLoaders
- * @author pavery
- */
-class TaglibHelperCache {
-
- private static final boolean DEBUG;
- static {
- String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/taglibvars"); //$NON-NLS-1$
- DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- /**
- * An entry for the cache (projectPath string & TaglibHelper)
- */
- class Entry {
- private TaglibHelper fHelper;
- private String fProjectPath;
-
- public Entry(String projectPath, TaglibHelper helper) {
- setProjectPath(projectPath);
- setHelper(helper);
- }
- public TaglibHelper getHelper() {
- return fHelper;
- }
- public void setHelper(TaglibHelper helper) {
- fHelper = helper;
- }
- public String getProjectPath() {
- return fProjectPath;
- }
- public void setProjectPath(String projectPath) {
- fProjectPath = projectPath;
- }
- public String toString() {
- return "Taglib Helper Entry [" + getProjectPath() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- private List fHelpers;
- // max size for the cache
- private int MAX_SIZE;
-
- /**
- * Not intended to be large since underlying implmementation uses
- * a List.
- */
- public TaglibHelperCache(int size) {
- MAX_SIZE = size;
- fHelpers = Collections.synchronizedList(new ArrayList(MAX_SIZE));
- }
- /**
- *
- * @param projectPath
- * @param f
- * @param mq
- * @return
- */
- public final synchronized TaglibHelper getHelper(IProject project) {
- TaglibHelper helper = null;
- Entry entry = null;
- String projectPath = project.getFullPath().toString();
- int size = fHelpers.size();
- // fist check for existing
- for (int i=0; i<size; i++) {
- entry = (Entry)fHelpers.get(i);
- if(entry.getProjectPath().equals(projectPath)) {
- // exists
- helper = entry.getHelper();
- // only move to front if it's not the first entry
- if(i>0) {
- fHelpers.remove(entry);
- fHelpers.add(1, entry);
- if(DEBUG) {
- Logger.log(Logger.INFO, "(->) TaglibHelperCache moved: " + entry + " to the front of the list"); //$NON-NLS-1$ //$NON-NLS-2$
- printCacheContents();
- }
- }
- break;
- }
- }
- // didn't exist
- if(helper == null) {
- helper = createNewHelper(projectPath, project);
- }
- return helper;
- }
-
- /**
- * @param projectPath
- * @param f
- * @param mq
- * @return
- */
- private TaglibHelper createNewHelper(String projectPath, IProject project) {
-
- TaglibHelper helper;
- // create
- helper = new TaglibHelper(project);
- Entry newEntry = new Entry(projectPath, helper);
- fHelpers.add(0, newEntry);
- if(DEBUG) {
- Logger.log(Logger.INFO, "(+) TaglibHelperCache added: " + newEntry); //$NON-NLS-1$
- printCacheContents();
- }
- if(fHelpers.size() > MAX_SIZE) {
- // one too many, remove last
- Object removed = fHelpers.remove(fHelpers.size()-1);
- if(DEBUG) {
- Logger.log(Logger.INFO, "(-) TaglibHelperCache removed: " + removed); //$NON-NLS-1$
- printCacheContents();
- }
- }
- return helper;
- }
-
- public final synchronized void removeHelper(String projectPath) {
- Entry entry = null;
- Iterator it = fHelpers.iterator();
- while(it.hasNext()) {
- entry = (Entry)it.next();
- if(entry.getProjectPath().equals(projectPath)) {
- fHelpers.remove(entry);
- if(DEBUG) {
- Logger.log(Logger.INFO, "(-) TaglibHelperCache removed: " + entry); //$NON-NLS-1$
- printCacheContents();
- }
- break;
- }
- }
- }
-
- private void printCacheContents() {
- StringBuffer debugString = new StringBuffer();
- debugString.append("\n-----------------------------------------------------------"); //$NON-NLS-1$
- debugString.append("\ncache contents:"); //$NON-NLS-1$
- for (int i=0; i<fHelpers.size(); i++)
- debugString.append("\n -" + i + "- " + fHelpers.get(i)); //$NON-NLS-1$ //$NON-NLS-2$
- debugString.append("\n-----------------------------------------------------------"); //$NON-NLS-1$
- Logger.log(Logger.INFO, debugString.toString());
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java
deleted file mode 100644
index acd3ecc357..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.taglib;
-
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.IElementChangedListener;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaElementDelta;
-
-/**
- * Manages creation and caching (ordered MRU) of TaglibHelpers.
- * Removes helpers when their classpath changes (so they are rebuilt).
- * There is one helper per project (with a specific classpath entry).
- *
- * @author pavery
- */
-public class TaglibHelperManager implements IElementChangedListener {
-
-
- private static TaglibHelperManager instance = null;
- // using a cache of just 3 loaders
- private TaglibHelperCache fCache = new TaglibHelperCache(3);
-
- private TaglibHelperManager() {
- // use instance
- }
- public static synchronized TaglibHelperManager getInstance() {
- if(instance == null)
- instance = new TaglibHelperManager();
- return instance;
- }
-
- public TaglibHelper getTaglibHelper(IFile f) {
- IProject p = f.getProject();
- return getHelperFromCache(p);
- }
-
- /**
- * @param projectPath
- */
- private TaglibHelper getHelperFromCache(IProject project) {
- return fCache.getHelper(project);
- }
-
- /**
- * Update classpath for appropriate loader.
- * @see org.eclipse.jdt.core.IElementChangedListener#elementChanged(org.eclipse.jdt.core.ElementChangedEvent)
- */
- public void elementChanged(ElementChangedEvent event) {
-
- // handle classpath changes
- IJavaElementDelta delta = event.getDelta();
- if(delta.getElement().getElementType() == IJavaElement.JAVA_MODEL) {
- IJavaElementDelta[] changed = delta.getChangedChildren();
- for (int i = 0; i < changed.length; i++) {
- if((changed[i].getFlags() & IJavaElementDelta.F_CLASSPATH_CHANGED) != 0) {
- IJavaElement proj = changed[i].getElement();
- handleClasspathChange(changed, i, proj);
- }
- }
- }
- }
-
- /**
- * @param changed
- * @param i
- * @param proj
- */
- private void handleClasspathChange(IJavaElementDelta[] changed, int i, IJavaElement proj) {
-
- if(proj.getElementType() == IJavaElement.JAVA_PROJECT) {
- String projectPath = proj.getPath().toString().replace('\\', '/');
- fCache.removeHelper(projectPath);
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibVariable.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibVariable.java
deleted file mode 100644
index b43d6dd618..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibVariable.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.taglib;
-
-import javax.servlet.jsp.tagext.VariableInfo;
-
-
-/**
- * Contains info about a TaglibVariable: classname, variablename.
- * @author pavery
- */
-public class TaglibVariable {
-
- private String fVarClass = null;
- private String fVarName = null;
- private int fScope;
- private final String ENDL = "\n"; //$NON-NLS-1$
-
- private final static String AT_END = "AT_END";
- private final static String AT_BEGIN = "AT_BEGIN";
- private final static String NESTED = "NESTED";
- /**
- *
- */
- public TaglibVariable(String varClass, String varName, int scope) {
- setVarClass(varClass);
- setVarName(varName);
- setScope(scope);
- }
-
- public TaglibVariable(String varClass, String varName, String scope) {
- setVarClass(varClass);
- setVarName(varName);
- setScope(scope);
- }
- /**
- * @return Returns the fVarClass.
- */
- public final String getVarClass() {
- return fVarClass;
- }
- /**
- * @param varClass The fVarClass to set.
- */
- public final void setVarClass(String varClass) {
- fVarClass = varClass;
- }
- /**
- * @return Returns the fVarName.
- */
- public final String getVarName() {
- return fVarName;
- }
- /**
- * @param varName The fVarName to set.
- */
- public final void setVarName(String varName) {
- fVarName = varName;
- }
-
- /**
- * Convenience method.
- * @return
- */
- public final String getDeclarationString() {
- return getVarClass() + " " + getVarName() + " = null;" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$
- }
- public int getScope() {
- return fScope;
- }
- public void setScope(int scope) {
- fScope = scope;
- }
- public void setScope(String scopeString) {
- int scope = VariableInfo.AT_BEGIN;
-
- String trimmedScope = scopeString.trim();
- if (NESTED.equals(trimmedScope)) {
- scope = VariableInfo.NESTED;
- }
- else if (AT_BEGIN.equals(trimmedScope)) {
- scope = VariableInfo.AT_BEGIN;
- }
- else if (AT_END.equals(trimmedScope)) {
- scope = VariableInfo.AT_END;
- }
-
- fScope = scope;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/tasks/JSPFileTaskScanner.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/tasks/JSPFileTaskScanner.java
deleted file mode 100644
index 2cab51eaa8..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/tasks/JSPFileTaskScanner.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.tasks;
-
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.xml.core.internal.tasks.XMLFileTaskScanner;
-
-public class JSPFileTaskScanner extends XMLFileTaskScanner {
- protected boolean isCommentRegion(IStructuredDocumentRegion region, ITextRegion textRegion) {
- return super.isCommentRegion(region, textRegion) || textRegion.getType().equals(DOMJSPRegionContexts.JSP_COMMENT_TEXT);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/text/StructuredTextPartitionerForJSP.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/text/StructuredTextPartitionerForJSP.java
deleted file mode 100644
index 6df9c9f368..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/text/StructuredTextPartitionerForJSP.java
+++ /dev/null
@@ -1,409 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.text;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jst.jsp.core.internal.encoding.JSPDocumentHeadContentDetector;
-import org.eclipse.jst.jsp.core.internal.parser.JSPSourceParser;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.text.IJSPPartitions;
-import org.eclipse.wst.html.core.internal.text.StructuredTextPartitionerForHTML;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-import org.eclipse.wst.sse.core.internal.ltk.parser.TagMarker;
-import org.eclipse.wst.sse.core.internal.parser.ForeignRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredTextPartitioner;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.core.internal.text.rules.StructuredTextPartitionerForXML;
-
-public class StructuredTextPartitionerForJSP extends StructuredTextPartitioner {
- // for compatibility with v5.1.0, we'll reuse ST_JSP_DIRECTIVE for action
- // tags
- private final static boolean fEnableJSPActionPartitions = true;
- // list of valid JSP 1.2 tag and action names
- private static List fJSPActionTagNames = null;
- private static final String HTML_MIME_TYPE = "text/html"; //$NON-NLS-1$
- private static final String XHTML_MIME_TYPE = "text/xhtml"; //$NON-NLS-1$
- private static final String XML_MIME_TYPE = "text/xml"; //$NON-NLS-1$
- private static final String VND_WAP_WML = "text/vnd.wap.wml"; //$NON-NLS-1$
-
- private final static String[] fConfiguredContentTypes = new String[]{IJSPPartitions.JSP_DEFAULT, IJSPPartitions.JSP_DEFAULT_EL, IJSPPartitions.JSP_DEFAULT_EL2, IJSPPartitions.JSP_DIRECTIVE, IJSPPartitions.JSP_CONTENT_DELIMITER, IJSPPartitions.JSP_CONTENT_JAVA, IJSPPartitions.JSP_CONTENT_JAVASCRIPT, IJSPPartitions.JSP_COMMENT};
-
- /**
- * @return
- */
- public static String[] getConfiguredContentTypes() {
- return fConfiguredContentTypes;
- }
-
- private IStructuredTextPartitioner fEmbeddedPartitioner = null;
- /*
- * Save last taglib prefix that was checked (see isAction()) for better
- * performance
- */
- private String fLastCheckedPrefix = null;
-
- /**
- * Assume language=java by default ... client, such as
- * PageDirectiveAdapter, must set language of document partitioner,
- * if/when it changes.
- */
- private String fLanguage = "java"; //$NON-NLS-1$
-
- /**
- * Constructor for JSPDocumentPartioner.
- */
- public StructuredTextPartitionerForJSP() {
- super();
- if (fJSPActionTagNames == null) {
- fJSPActionTagNames = new ArrayList(); // uses .equals() for
- // contains()
- fJSPActionTagNames.add(JSP12Namespace.ElementName.DECLARATION);
- // fJSPActionTagNames.add(JSP12Namespace.ElementName.DIRECTIVE_INCLUDE);
- // fJSPActionTagNames.add(JSP12Namespace.ElementName.DIRECTIVE_PAGE);
- // fJSPActionTagNames.add(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.EXPRESSION);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.FALLBACK);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.FORWARD);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.GETPROPERTY);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.INCLUDE);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.PARAM);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.PARAMS);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.PLUGIN);
- // fJSPActionTagNames.add(JSP12Namespace.ElementName.ROOT);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.SCRIPTLET);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.SETPROPERTY);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.TEXT);
- fJSPActionTagNames.add(JSP12Namespace.ElementName.USEBEAN);
- }
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitioner#connect(org.eclipse.jface.text.IDocument)
- */
- public void connect(IDocument document) {
- super.connect(document);
- fSupportedTypes = null;
- }
-
- private IStructuredTextPartitioner createStructuredTextPartitioner(IStructuredDocument structuredDocument) {
- IStructuredTextPartitioner result = null;
- // this same detector should underly content describer, to have consistent results
- JSPDocumentHeadContentDetector jspHeadContentDetector = new JSPDocumentHeadContentDetector();
- jspHeadContentDetector.set(structuredDocument);
- String contentType = null;
- try {
- contentType = jspHeadContentDetector.getContentType();
- // if XHTML or WML, that trumps what is in the page directive
- if (jspHeadContentDetector.isXHTML() || jspHeadContentDetector.isWML()) {
- contentType = "text/html";
- }
- }
- catch (IOException e) {
- // impossible in this context, since working with document stream
- throw new Error(e);
- }
- // null or empty, treat as "default"
- if (contentType == null || contentType.length() == 0) {
- contentType = "text/html"; //$NON-NLS-1$
- }
- // we currently only have two ... eventually should
- // make or tie-in to existing registry.
- if (contentType.equalsIgnoreCase(HTML_MIME_TYPE) || contentType.equalsIgnoreCase(VND_WAP_WML)) {
- result = new StructuredTextPartitionerForHTML();
- result.connect(structuredDocument);
- }
- else if (contentType.equalsIgnoreCase(XHTML_MIME_TYPE)) {
- result = new StructuredTextPartitionerForHTML();
- result.connect(structuredDocument);
- }
- else if (contentType.equalsIgnoreCase(XML_MIME_TYPE) || contentType.endsWith("+xml")) { //$NON-NLS-1$
- result = new StructuredTextPartitionerForXML();
- result.connect(structuredDocument);
- }
- else {
- result = new StructuredTextPartitioner();
- result.connect(structuredDocument);
- }
- return result;
-
- }
-
- /**
- * @see org.eclipse.jface.text.IDocumentPartitioner#disconnect()
- */
- public void disconnect() {
- if (fEmbeddedPartitioner != null) {
- fEmbeddedPartitioner.disconnect();
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=4909
- /**
- * force recreation when reconnected
- */
- fEmbeddedPartitioner = null;
- }
- // super.disconnect should come at end, since it (may) set
- // structuredDocument to null
- super.disconnect();
- }
-
- public String getDefaultPartitionType() {
- return getEmbeddedPartitioner().getDefaultPartitionType();
- }
-
- /**
- * Returns the embeddedPartitioner.
- *
- * @return IStructuredTextPartitioner
- */
- public IStructuredTextPartitioner getEmbeddedPartitioner() {
- if (fEmbeddedPartitioner == null) {
- fEmbeddedPartitioner = createStructuredTextPartitioner(fStructuredDocument);
- fEmbeddedPartitioner.connect(fStructuredDocument);
- }
-
- return fEmbeddedPartitioner;
- }
-
- /**
- * Returns the language.
- *
- * @return String
- */
- public String getLanguage() {
- return fLanguage;
- }
-
- private List getLocalLegalContentTypes() {
- List types = new ArrayList();
- Object[] configuredTypes = getConfiguredContentTypes();
- for (int i = 0; i < configuredTypes.length; i++)
- types.add(configuredTypes[i]);
- return types;
- }
-
- private String getParentName(IStructuredDocumentRegion sdRegion) {
- String result = "UNKNOWN"; //$NON-NLS-1$
- while (sdRegion != null && isValidJspActionRegionType(sdRegion.getType()))
- sdRegion = sdRegion.getPrevious();
-
- if (sdRegion != null) {
- ITextRegionList regions = sdRegion.getRegions();
- // only find parent names from a start tag
- if (regions.size() > 1) {
- ITextRegion r = regions.get(1);
- if (regions.get(0).getType().equals(DOMRegionContext.XML_TAG_OPEN) && r.getType().equals(DOMRegionContext.XML_TAG_NAME)) {
- result = sdRegion.getText(r);
- }
- }
- }
- return result;
- }
-
- protected String getPartitionType(ForeignRegion region, int offset) {
- return getEmbeddedPartitioner().getPartitionType(region, offset);
- }
-
-
- public String getPartitionType(ITextRegion region, int offset) {
- String result = null;
- final String region_type = region.getType();
- if (region_type == DOMJSPRegionContexts.JSP_CONTENT) {
- result = getPartitionTypeForDocumentLanguage();
- }
- else if (region_type == DOMJSPRegionContexts.JSP_COMMENT_TEXT || region_type == DOMJSPRegionContexts.JSP_COMMENT_OPEN || region_type == DOMJSPRegionContexts.JSP_COMMENT_CLOSE)
- result = IJSPPartitions.JSP_COMMENT;
- else if (region_type == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME || region_type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN || region_type == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE)
- result = IJSPPartitions.JSP_DIRECTIVE;
- else if (region_type == DOMJSPRegionContexts.JSP_CLOSE || region_type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || region_type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || region_type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN)
- result = IJSPPartitions.JSP_CONTENT_DELIMITER;
- else if (region_type == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME)
- result = IJSPPartitions.JSP_DEFAULT;
- else if (region_type == DOMJSPRegionContexts.JSP_EL_OPEN || region_type == DOMJSPRegionContexts.JSP_EL_CONTENT || region_type == DOMJSPRegionContexts.JSP_EL_CLOSE || region_type == DOMJSPRegionContexts.JSP_EL_DQUOTE || region_type == DOMJSPRegionContexts.JSP_EL_SQUOTE || region_type == DOMJSPRegionContexts.JSP_EL_QUOTED_CONTENT)
- result = IJSPPartitions.JSP_DEFAULT_EL;
- else if (region_type == DOMJSPRegionContexts.JSP_VBL_OPEN || region_type == DOMJSPRegionContexts.JSP_VBL_CONTENT || region_type == DOMJSPRegionContexts.JSP_VBL_CLOSE || region_type == DOMJSPRegionContexts.JSP_VBL_DQUOTE || region_type == DOMJSPRegionContexts.JSP_VBL_SQUOTE || region_type == DOMJSPRegionContexts.JSP_VBL_QUOTED_CONTENT)
- result = IJSPPartitions.JSP_DEFAULT_EL2;
- else if (region_type == DOMRegionContext.XML_CDATA_TEXT) {
- // BUG131463: possibly between <jsp:scriptlet>, <jsp:expression>,
- // <jsp:declaration>
- IStructuredDocumentRegion sdRegion = this.fStructuredDocument.getRegionAtCharacterOffset(offset);
- if (isJspJavaActionName(getParentName(sdRegion)))
- result = getPartitionTypeForDocumentLanguage();
- else
- result = getEmbeddedPartitioner().getPartitionType(region, offset);
- }
- else if (region_type == DOMRegionContext.XML_CONTENT) {
- // possibly between <jsp:scriptlet>, <jsp:expression>,
- // <jsp:declaration>
- IStructuredDocumentRegion sdRegion = this.fStructuredDocument.getRegionAtCharacterOffset(offset);
- if (isJspJavaActionName(getParentName(sdRegion)))
- result = getPartitionTypeForDocumentLanguage();
- else
- result = getDefaultPartitionType();
- }
- else {
- result = getEmbeddedPartitioner().getPartitionType(region, offset);
- }
- return result;
- }
-
- public String getPartitionTypeBetween(IStructuredDocumentRegion previousNode, IStructuredDocumentRegion nextNode) {
- return getEmbeddedPartitioner().getPartitionTypeBetween(previousNode, nextNode);
- }
-
- private String getPartitionTypeForDocumentLanguage() {
- String result;
- if (fLanguage == null || fLanguage.equalsIgnoreCase("java")) { //$NON-NLS-1$
- result = IJSPPartitions.JSP_CONTENT_JAVA;
- }
- else if (fLanguage.equalsIgnoreCase("javascript")) { //$NON-NLS-1$
- result = IJSPPartitions.JSP_CONTENT_JAVASCRIPT;
- }
- else {
- result = IJSPPartitions.JSP_SCRIPT_PREFIX + getLanguage().toUpperCase(Locale.ENGLISH);
- }
- return result;
- }
-
- protected void initLegalContentTypes() {
- List combinedTypes = getLocalLegalContentTypes();
- if (getEmbeddedPartitioner() != null) {
- String[] moreTypes = getEmbeddedPartitioner().getLegalContentTypes();
- for (int i = 0; i < moreTypes.length; i++)
- combinedTypes.add(moreTypes[i]);
- }
- fSupportedTypes = new String[0];
- combinedTypes.toArray(fSupportedTypes);
- }
-
- /**
- * @param sdRegion
- * @param offset
- * @return
- */
- private boolean isAction(IStructuredDocumentRegion sdRegion, int offset) {
- if (!sdRegion.getType().equals(DOMRegionContext.XML_TAG_NAME))
- return false;
- /*
- * shouldn't get a tag name region type unless a tag name region
- * exists at [1]
- */
- ITextRegion tagNameRegion = sdRegion.getRegions().get(1);
- String tagName = sdRegion.getText(tagNameRegion);
-
- RegionParser parser = fStructuredDocument.getParser();
- if (parser instanceof JSPSourceParser) {
- if (tagName.equals(fLastCheckedPrefix))
- return true;
- List fCustomActionPrefixes = ((JSPSourceParser) parser).getNestablePrefixes();
- for (int i = 0; i < fCustomActionPrefixes.size(); i++)
- if (tagName.startsWith(((TagMarker) fCustomActionPrefixes.get(i)).getTagName())) {
- fLastCheckedPrefix = tagName;
- return true;
- }
- }
- return false;
- }
-
- protected boolean isDocumentRegionBasedPartition(IStructuredDocumentRegion sdRegion, ITextRegion containedChildRegion, int offset) {
- String documentRegionContext = sdRegion.getType();
- if (containedChildRegion != null) {
- if (documentRegionContext.equals(DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) || documentRegionContext.equals(DOMJSPRegionContexts.JSP_ROOT_TAG_NAME)) {
- setInternalPartition(offset, containedChildRegion.getLength(), IJSPPartitions.JSP_DIRECTIVE);
- return true;
- }
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=113346
- if (fEnableJSPActionPartitions && isAction(sdRegion, offset) && !(containedChildRegion instanceof ITextRegionContainer)) {
- // if (fEnableJSPActionPartitions && isAction(sdRegion,
- // offset)) {
- setInternalPartition(offset, containedChildRegion.getLength(), IJSPPartitions.JSP_DIRECTIVE);
- return true;
- }
- }
- return super.isDocumentRegionBasedPartition(sdRegion, containedChildRegion, offset);
- }
-
- /**
- * @param possibleJspJavaAction
- * @return
- */
- private boolean isJspJavaActionName(String possibleJspJavaAction) {
- return possibleJspJavaAction.equals(JSP11Namespace.ElementName.SCRIPTLET) || possibleJspJavaAction.equals(JSP11Namespace.ElementName.EXPRESSION) || possibleJspJavaAction.equals(JSP11Namespace.ElementName.DECLARATION);
- }
-
- private boolean isValidJspActionRegionType(String type) {
- // true for anything that can be within <jsp:scriptlet>,
- // <jsp:expression>, <jsp:declaration>
- return type == DOMRegionContext.XML_CONTENT || type == DOMRegionContext.BLOCK_TEXT || type == DOMRegionContext.XML_CDATA_OPEN || type == DOMRegionContext.XML_CDATA_TEXT || type == DOMRegionContext.XML_CDATA_CLOSE;
- }
-
- public IDocumentPartitioner newInstance() {
- StructuredTextPartitionerForJSP instance = new StructuredTextPartitionerForJSP();
- instance.setEmbeddedPartitioner(createStructuredTextPartitioner(fStructuredDocument));
- instance.setLanguage(fLanguage);
- return instance;
- }
-
- /**
- * Sets the embeddedPartitioner.
- *
- * @param embeddedPartitioner
- * The embeddedPartitioner to set
- */
- public void setEmbeddedPartitioner(IStructuredTextPartitioner embeddedPartitioner) {
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=4909
- /**
- * manage connected state of embedded partitioner
- */
- if (fEmbeddedPartitioner != null && fStructuredDocument != null) {
- fEmbeddedPartitioner.disconnect();
- }
-
- this.fEmbeddedPartitioner = embeddedPartitioner;
-
- if (fEmbeddedPartitioner != null && fStructuredDocument != null) {
- fEmbeddedPartitioner.connect(fStructuredDocument);
- }
- }
-
- protected void setInternalPartition(int offset, int length, String type) {
- // TODO: need to carry this single instance idea further to be
- // complete,
- // but hopefully this will be less garbage than before (especially for
- // HTML, XML,
- // naturally!)
- internalReusedTempInstance = getEmbeddedPartitioner().createPartition(offset, length, type);
-
- }
-
- /**
- * Sets the language.
- *
- * @param language
- * The language to set
- */
- public void setLanguage(String language) {
- this.fLanguage = language;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/CommonXML.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/CommonXML.java
deleted file mode 100644
index 221c2446ae..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/CommonXML.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.util;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.TransformerFactoryConfigurationError;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.w3c.dom.Document;
-
-public class CommonXML {
-
- public synchronized static DocumentBuilder getDocumentBuilder() {
- DocumentBuilder result = null;
- try {
- result = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- }
- catch (ParserConfigurationException e) {
- Logger.logException(e);
- }
- return result;
- }
-
- public synchronized static DocumentBuilder getDocumentBuilder(boolean validating) {
- DocumentBuilder result = null;
- try {
- DocumentBuilderFactory instance = DocumentBuilderFactory.newInstance();
- instance.setValidating(validating);
- instance.setExpandEntityReferences(false);
- instance.setCoalescing(true);
- result = instance.newDocumentBuilder();
- }
- catch (ParserConfigurationException e) {
- Logger.logException(e);
- }
- return result;
- }
-
- public static void serialize(Document document, OutputStream ostream) throws IOException {
- Source domSource = new DOMSource(document);
- try {
- Transformer serializer = TransformerFactory.newInstance().newTransformer();
- try {
- serializer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- serializer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); //$NON-NLS-1$ //$NON-NLS-2$
- serializer.setOutputProperty(OutputKeys.ENCODING, "UTF-16"); //$NON-NLS-1$
- }
- catch (IllegalArgumentException e) {
- // unsupported properties
- }
- serializer.transform(domSource, new StreamResult(ostream));
- }
- catch (TransformerConfigurationException e) {
- throw new IOException(e.getMessage());
- }
- catch (TransformerFactoryConfigurationError e) {
- throw new IOException(e.getMessage());
- }
- catch (TransformerException e) {
- throw new IOException(e.getMessage());
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/DocumentProvider.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/DocumentProvider.java
deleted file mode 100644
index 52384c48fd..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/DocumentProvider.java
+++ /dev/null
@@ -1,472 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.util;
-
-
-
-import java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.net.URLConnection;
-import com.ibm.icu.util.StringTokenizer;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.wst.sse.core.internal.util.JarUtilities;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.DOMImplementation;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * An XML Creator/Reader/Writer that 1) Ignores any DocumentType Nodes found
- * within the document (as well as any entities) 2) Ignores any
- * errors/exceptions from Xerces when loading a document 3) Can load Documents
- * from within a .JAR file (***read-only***)
- */
-
-public class DocumentProvider {
- private Document document = null;
- private ErrorHandler errorHandler = null;
- private String fBaseReference;
- private String fileName = null;
- private boolean fValidating = false;
- private InputStream inputStream = null;
- private String jarFileName = null;
- private EntityResolver resolver = null;
-
- private Node rootElement = null;
- private String rootElementName = null;
-
- public DocumentProvider() {
- super();
- }
-
- private String _getFileName() {
- if (inputStream != null)
- return null;
- else if (isJAR()) {
- return getJarFileName();
- }
- return getFileName();
- }
-
- private Document _getParsedDocumentDOM2() {
- Document result = null;
-
- InputStream is = null;
- try {
- DocumentBuilder builder = getDocumentBuilder();
- // DOMParser parser = new DOMParser();
- // parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error",
- // false);//$NON-NLS-1$
- // parser.setFeature("http://apache.org/xml/features/nonvalidating/load-dtd-grammar",
- // false);//$NON-NLS-1$
- // parser.setErrorHandler(getNullErrorHandler());
- // parser.setEntityResolver(getNullEntityResolver());
- // is = getInputStream();
- builder.setEntityResolver(getEntityResolver());
- builder.setErrorHandler(getNullErrorHandler());
- is = getInputStream();
- if (is != null)
- result = builder.parse(is, getBaseReference());
- }
- catch (SAXException e) {
- result = null;
- // parsing exception, notify the user?
- Logger.log(Logger.WARNING, "SAXException while reading descriptor " + _getFileName() + " " + e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (FileNotFoundException e) {
- // NOT an "exceptional case"; do not Log
- }
- catch (IOException e) {
- Logger.log(Logger.WARNING, "IOException while reading descriptor " + _getFileName() + " " + e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- finally {
- if (is != null) {
- try {
- is.close();
- }
- catch (Exception e) {
- // what can be done?
- }
- }
- }
- return result;
- }
-
- /**
- * @return
- */
- public String getBaseReference() {
- return fBaseReference;
- }
-
- /**
- *
- * @return Document
- */
- public Document getDocument() {
- return getDocument(true);
- }
-
- public Document getDocument(boolean createEmptyOnFailure) {
- if (document == null)
- load(createEmptyOnFailure);
- return document;
- }
-
- private DocumentBuilder getDocumentBuilder() {
- return CommonXML.getDocumentBuilder(isValidating());
- }
-
- private DOMImplementation getDomImplementation() {
- DocumentBuilder builder = null;
- try {
- builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- }
- catch (ParserConfigurationException e1) {
- Logger.logException(e1);
- }
- catch (FactoryConfigurationError e1) {
- Logger.logException(e1);
- }
- DOMImplementation impl = builder.getDOMImplementation();
- return impl;
- }
-
- /*************************************************************************
- * Takes a single string of the form "a/b/c" and ensures that that
- * structure exists below the head element, down through 'c', and returns
- * a <em>single</em> element 'c'. For multiple elements (such as
- * multiple &lt;macro&gt; elements contained within a single
- * &lt;macros&gt; element, full DOM access is required for searching and
- * child element manipulation.
- ************************************************************************/
- public Element getElement(String name) {
- Element result = null;
- if (document == null)
- load(false);
- if (document != null) {
- result = (Element) getNode(getRootElement(), name);
- }
- return result;
- }
-
- /**
- * Returns an EntityResolver that won't try to load and resolve ANY
- * entities
- */
- private EntityResolver getEntityResolver() {
- if (resolver == null) {
- resolver = new EntityResolver() {
- public InputSource resolveEntity(String publicID, String systemID) throws SAXException, IOException {
- InputSource result = null;
- if (isValidating()) {
- try {
- URL spec = new URL("file://" + getBaseReference()); //$NON-NLS-1$
- URL url = new URL(spec, systemID);
- if (url.getProtocol().startsWith("file:")) { //$NON-NLS-1$
- URLConnection connection = url.openConnection();
- result = new InputSource(systemID != null ? systemID : "/_" + toString()); //$NON-NLS-1$
- result.setPublicId(publicID);
- result.setByteStream(connection.getInputStream());
- }
- }
- catch (Exception e) {
- result = null;
- }
- }
-
- if (result == null) {
- result = new InputSource(new ByteArrayInputStream(new byte[0]));
- result.setPublicId(publicID);
- result.setSystemId(systemID != null ? systemID : "/_" + getClass().getName()); //$NON-NLS-1$
- }
- return result;
- }
- };
- }
- return resolver;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getFileName() {
- return fileName;
- }
-
- /**
- * Returns and input stream to use as the source of the Document 1) from
- * an InputStream set on this instance 2) from a JAR file with the given
- * entry name 3) from a normal file
- *
- * @return InputStream
- */
- public InputStream getInputStream() throws FileNotFoundException {
- if (inputStream != null)
- return inputStream;
- else if (isJAR()) {
- return JarUtilities.getInputStream(getJarFileName(), getFileName());
- }
- else {
- return new BufferedInputStream(new FileInputStream(getFileName()));
- }
- }
-
- /**
- *
- * @return java.lang.String
- */
- public String getJarFileName() {
- return jarFileName;
- }
-
- private Node getNamedChild(Node parent, String childName) {
- if (parent == null) {
- return null;
- }
- NodeList childList = parent.getChildNodes();
- for (int i = 0; i < childList.getLength(); i++) {
- if (childList.item(i).getNodeName().equals(childName))
- return childList.item(i);
- }
- return null;
- }
-
- private Document getNewDocument() {
- Document result = null;
- try {
- result = getDomImplementation().createDocument("http://www.w3.org/XML/1998/namespace", getRootElementName(), null); //$NON-NLS-1$
- NodeList children = result.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- result.removeChild(children.item(i));
- }
- // we're going through this effort to avoid a NS element
- Element settings = result.createElementNS("http://www.w3.org/XML/1998/namespace", getRootElementName()); //$NON-NLS-1$
- result.appendChild(settings);
- return result;
- }
- catch (DOMException e) {
- Logger.logException(e);
- }
- return null;
- }
-
- /*************************************************************************
- * Takes a single string of the form "a/b/c" and ensures that that
- * structure exists below the head element, down through 'c', and returns
- * the element 'c'.
- ************************************************************************/
- private Node getNode(Node node, String name) {
- StringTokenizer tokenizer = new StringTokenizer(name, "/"); //$NON-NLS-1$
- String token = null;
- while (tokenizer.hasMoreTokens()) {
- token = tokenizer.nextToken();
- if (getNamedChild(node, token) == null)
- node.appendChild(document.createElement(token));
- node = getNamedChild(node, token);
- }
- return node;
- }
-
- /**
- * Returns an ErrorHandler that will not stop the parser on reported
- * errors
- */
- private ErrorHandler getNullErrorHandler() {
- if (errorHandler == null) {
- errorHandler = new ErrorHandler() {
- public void error(SAXParseException exception) throws SAXException {
- Logger.log(Logger.WARNING, "SAXParseException with " + getJarFileName() + "/" + getFileName() + " (error) while reading descriptor: " + exception.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- public void fatalError(SAXParseException exception) throws SAXException {
- Logger.log(Logger.WARNING, "SAXParseException with " + getJarFileName() + "/" + getFileName() + " (fatalError) while reading descriptor: " + exception.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- public void warning(SAXParseException exception) throws SAXException {
- Logger.log(Logger.WARNING, "SAXParseException with " + getJarFileName() + "/" + getFileName() + " (warning) while reading descriptor: " + exception.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- };
- }
- return errorHandler;
- }
-
- private Document getParsedDocument() {
- Document result = null;
- if (inputStream == null) {
- File existenceTester = null;
- if (isJAR())
- existenceTester = new File(getJarFileName());
- else
- existenceTester = new File(getFileName());
- if (!existenceTester.exists())
- return null;
- }
-
- result = _getParsedDocumentDOM2();
-
- return result;
-
- }
-
- /**
- * Returns the root Element of the current document
- *
- * @return org.w3c.dom.Element
- */
- public Node getRootElement() {
- return getRootElement(getDocument());
- }
-
- /**
- * Returns the/a root Element for the current document
- *
- * @return org.w3c.dom.Element
- */
- private Node getRootElement(Document doc) {
- if (doc == null)
- return null;
- if (doc.getDocumentElement() != null)
- return doc.getDocumentElement();
- try {
- Element newRootElement = doc.createElement(getRootElementName());
- doc.appendChild(newRootElement);
- return newRootElement;
- }
- catch (DOMException e) {
- Logger.logException(e);
- }
- return null;
- }
-
- /**
- *
- * @return java.lang.String
- */
- public java.lang.String getRootElementName() {
- return rootElementName;
- }
-
- private boolean isJAR() {
- return getJarFileName() != null;
- }
-
- /**
- * @return
- */
- public boolean isValidating() {
- return fValidating;
- }
-
- void load(boolean createEmptyOnFailure) {
- // rootElementName and fileName are expected to be defined at this
- // point
- document = getParsedDocument();
- if (document != null) {
- if (rootElementName != null)
- rootElement = getRootElement(document);
- else
- rootElement = document.getDocumentElement();
- }
-
- if (document == null || rootElement == null) {
- if (createEmptyOnFailure) {
- document = getNewDocument();
- if (document != null) {
- NodeList children = document.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i).getNodeType() == Node.ELEMENT_NODE && children.item(i).getNodeName().equals(getRootElementName()))
- rootElement = children.item(i);
- }
- if (rootElement == null) {
- for (int i = 0; i < children.getLength(); i++) {
- if (children.item(i).getNodeType() == Node.ELEMENT_NODE) {
- rootElement = children.item(i);
- break;
- }
- }
- }
- }
- }
- }
- }
-
- /**
- * @param string
- */
- public void setBaseReference(String string) {
- fBaseReference = string;
- }
-
- /**
- *
- * @param newFileName
- * java.lang.String
- */
- public void setFileName(java.lang.String newFileName) {
- fileName = newFileName;
- }
-
- /**
- * Sets the inputStream for which to provide a Document.
- *
- * @param inputStream
- * The inputStream to set
- */
- public void setInputStream(InputStream iStream) {
- this.inputStream = iStream;
- }
-
- /**
- *
- * @param newJarFileName
- * java.lang.String
- */
- public void setJarFileName(java.lang.String newJarFileName) {
- jarFileName = newJarFileName;
- }
-
- /**
- *
- * @param newRootElementName
- * java.lang.String
- */
- public void setRootElementName(java.lang.String newRootElementName) {
- rootElementName = newRootElementName;
- }
-
- /**
- * @param b
- */
- public void setValidating(boolean b) {
- fValidating = b;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPActionValidator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPActionValidator.java
deleted file mode 100644
index 5f9e0c78e0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPActionValidator.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.validation;
-
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TaglibTracker;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.html.core.internal.HTMLCoreMessages;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.validation.internal.core.ValidationException;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
-import org.eclipse.wst.validation.internal.provisional.core.IValidator;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMNamedNodeMap;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.w3c.dom.Attr;
-import org.w3c.dom.NamedNodeMap;
-
-/**
- * Checks for: - missing required attributes & undefined attributes in jsp
- * action tags such as jsp directives and jsp custom tags
- */
-public class JSPActionValidator extends JSPValidator {
- private int fSeverityMissingRequiredAttribute = IMessage.HIGH_SEVERITY;
- private int fSeverityUnknownAttribute = IMessage.NORMAL_SEVERITY;
- private IValidator fMessageOriginator;
- private HashSet fTaglibPrefixes = new HashSet();
-
- public JSPActionValidator() {
- this.fMessageOriginator = this;
- }
-
- public JSPActionValidator(IValidator validator) {
- this.fMessageOriginator = validator;
- }
-
- private void checkRequiredAttributes(IDOMElement element, CMNamedNodeMap attrMap, IReporter reporter, IFile file, IStructuredDocument document, IStructuredDocumentRegion documentRegion) {
- Iterator it = attrMap.iterator();
- CMAttributeDeclaration attr = null;
- while (it.hasNext()) {
- attr = (CMAttributeDeclaration) it.next();
- if (attr.getUsage() == CMAttributeDeclaration.REQUIRED) {
- Attr a = element.getAttributeNode(attr.getAttrName());
- if (a == null) {
- String msgText = NLS.bind(HTMLCoreMessages.Undefined_attribute_name___ERROR_, attr.getAttrName());
- LocalizedMessage message = new LocalizedMessage(fSeverityMissingRequiredAttribute, msgText, file);
- int start = element.getStartOffset();
- int length = element.getStartEndOffset() - start;
- int lineNo = document.getLineOfOffset(start);
- message.setLineNo(lineNo);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- }
- }
-
- private boolean checkUnknownAttributes(IDOMElement element, CMNamedNodeMap cmAttrs, IReporter reporter, IFile file, IStructuredDocument document, IStructuredDocumentRegion documentRegion) {
- boolean foundjspattribute = false;
-
- NamedNodeMap attrs = element.getAttributes();
- for (int i = 0; i < attrs.getLength(); i++) {
- Attr a = (Attr) attrs.item(i);
- CMAttributeDeclaration adec = (CMAttributeDeclaration) cmAttrs.getNamedItem(a.getName());
- if (adec == null) {
- // No attr declaration was found. That is, the attr name is
- // undefined.
- // but not regard it as undefined name if it includes JSP
- if (!hasJSPRegion(((IDOMNode) a).getNameRegion())) {
- String msgText = NLS.bind(HTMLCoreMessages.Undefined_attribute_name___ERROR_, a.getName());
- LocalizedMessage message = new LocalizedMessage(fSeverityUnknownAttribute, msgText, file);
- int start = ((IDOMAttr) a).getNameRegionStartOffset();
- int length = ((IDOMAttr) a).getNameRegionEndOffset() - start;
- int lineNo = document.getLineOfOffset(start);
- message.setLineNo(lineNo);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- else {
- foundjspattribute = true;
- }
- }
- }
- return foundjspattribute;
- }
-
- public void cleanup(IReporter reporter) {
- super.cleanup(reporter);
- fTaglibPrefixes.clear();
- }
-
- private String getStartTagName(IStructuredDocumentRegion sdr) {
- String name = new String();
- ITextRegionList subRegions = sdr.getRegions();
- if (subRegions.size() > 2) {
- ITextRegion subRegion = subRegions.get(0);
- if (subRegion.getType() == DOMRegionContext.XML_TAG_OPEN) {
- subRegion = subRegions.get(1);
- if (subRegion.getType() == DOMRegionContext.XML_TAG_NAME) {
- name = sdr.getText(subRegion);
- }
- }
- }
- return name;
- }
-
- private HashSet getTaglibPrefixes(IStructuredDocument document) {
- if (fTaglibPrefixes.isEmpty()) {
- // add all reserved prefixes
- fTaglibPrefixes.add("jsp"); //$NON-NLS-1$
- fTaglibPrefixes.add("jspx"); //$NON-NLS-1$
- fTaglibPrefixes.add("java"); //$NON-NLS-1$
- fTaglibPrefixes.add("javax"); //$NON-NLS-1$
- fTaglibPrefixes.add("servlet"); //$NON-NLS-1$
- fTaglibPrefixes.add("sun"); //$NON-NLS-1$
- fTaglibPrefixes.add("sunw"); //$NON-NLS-1$
-
- // add all taglib prefixes
- TLDCMDocumentManager manager = TaglibController.getTLDCMDocumentManager(document);
- List trackers = manager.getTaglibTrackers();
- for (Iterator it = trackers.iterator(); it.hasNext();) {
- TaglibTracker tracker = (TaglibTracker) it.next();
- String prefix = tracker.getPrefix();
- fTaglibPrefixes.add(prefix);
- }
- }
- return fTaglibPrefixes;
- }
-
- private boolean hasJSPRegion(ITextRegion container) {
- if (!(container instanceof ITextRegionContainer))
- return false;
- ITextRegionList regions = ((ITextRegionContainer) container).getRegions();
- if (regions == null)
- return false;
- Iterator e = regions.iterator();
- while (e.hasNext()) {
- ITextRegion region = (ITextRegion) e.next();
- if (region == null)
- continue;
- String regionType = region.getType();
- if (regionType == DOMRegionContext.XML_TAG_OPEN || (isNestedTagName(regionType)))
- return true;
- }
- return false;
- }
-
- private boolean isNestedTagName(String regionType) {
- boolean result = regionType.equals(DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) || regionType.equals(DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) || regionType.equals(DOMJSPRegionContexts.JSP_DECLARATION_OPEN) || regionType.equals(DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN);
- return result;
- }
-
- void performValidation(IFile f, IReporter reporter, IStructuredModel model) {
- fTaglibPrefixes.clear();
- int length = model.getStructuredDocument().getLength();
- performValidation(f, reporter, model, new Region(0, length));
- }
-
- protected void performValidation(IFile f, IReporter reporter, IStructuredModel model, IRegion validateRegion) {
- IStructuredDocument sDoc = model.getStructuredDocument();
-
- // iterate all document regions
- IStructuredDocumentRegion region = sDoc.getRegionAtCharacterOffset(validateRegion.getOffset());
- while (region != null && !reporter.isCancelled() && (region.getStartOffset() <= (validateRegion.getOffset() + validateRegion.getLength()))) {
- if (region.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- // only checking directives
- processDirective(reporter, f, model, region);
- fTaglibPrefixes.clear();
- }
- else if (region.getType() == DOMRegionContext.XML_TAG_NAME) {
- // and jsp tags
- String tagName = getStartTagName(region);
- int colonPosition = tagName.indexOf(':');
- if (colonPosition > -1) {
- // get tag's prefix and check if it's really a jsp action
- // tag
- String prefix = tagName.substring(0, colonPosition);
- if (getTaglibPrefixes(sDoc).contains(prefix))
- processDirective(reporter, f, model, region);
- }
- }
- region = region.getNext();
- }
- }
-
- private void processDirective(IReporter reporter, IFile file, IStructuredModel model, IStructuredDocumentRegion documentRegion) {
- IndexedRegion ir = model.getIndexedRegion(documentRegion.getStartOffset());
- if (ir instanceof IDOMElement) {
- IDOMElement element = (IDOMElement) ir;
- ModelQuery query = ModelQueryUtil.getModelQuery(model);
- if (query != null) {
- CMElementDeclaration cmElement = query.getCMElementDeclaration(element);
- if (cmElement != null) {
- CMNamedNodeMap cmAttributes = cmElement.getAttributes();
-
- boolean foundjspattribute = checkUnknownAttributes(element, cmAttributes, reporter, file, model.getStructuredDocument(), documentRegion);
- // required attributes could be hidden in jsp regions in
- // tags, so if jsp regions were detected, do not check for
- // missing required attributes
- if (!foundjspattribute)
- checkRequiredAttributes(element, cmAttributes, reporter, file, model.getStructuredDocument(), documentRegion);
- }
- }
- }
- }
-
- public void validate(IValidationContext helper, IReporter reporter) throws ValidationException {
- reporter.removeAllMessages(this);
- super.validate(helper, reporter);
- }
-
- protected void validateFile(IFile f, IReporter reporter) {
- if (DEBUG) {
- Logger.log(Logger.INFO, getClass().getName() + " validating: " + f); //$NON-NLS-1$
- }
-
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getModelForRead(f);
- if (sModel != null && !reporter.isCancelled()) {
- performValidation(f, reporter, sModel);
- }
- }
- catch (Exception e) {
- Logger.logException(e);
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPBatchValidator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPBatchValidator.java
deleted file mode 100644
index f6e7a24d05..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPBatchValidator.java
+++ /dev/null
@@ -1,507 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.validation;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Locale;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceProxy;
-import org.eclipse.core.resources.IResourceProxyVisitor;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.core.runtime.jobs.ISchedulingRule;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.contentproperties.JSPFContentProperties;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.validation.internal.ConfigurationManager;
-import org.eclipse.wst.validation.internal.ProjectConfiguration;
-import org.eclipse.wst.validation.internal.ValidationRegistryReader;
-import org.eclipse.wst.validation.internal.core.Message;
-import org.eclipse.wst.validation.internal.core.ValidationException;
-import org.eclipse.wst.validation.internal.operations.IWorkbenchContext;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
-import org.eclipse.wst.validation.internal.provisional.core.IValidatorJob;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-/**
- * Performs some common JSP validation tasks
- */
-public final class JSPBatchValidator implements IValidatorJob, IExecutableExtension {
- class JSPFileVisitor implements IResourceProxyVisitor {
-
- private List fFiles = new ArrayList();
- private IContentType[] fContentTypes = null;
- private IReporter fReporter = null;
-
- public JSPFileVisitor(IReporter reporter) {
- fReporter = reporter;
- }
-
- final IFile[] getFiles() {
- return (IFile[]) fFiles.toArray(new IFile[fFiles.size()]);
- }
-
- /**
- * Gets list of content types this visitor is interested in
- *
- * @return All JSP-related content types
- */
- private IContentType[] getValidContentTypes() {
- if (fContentTypes == null) {
- // currently "hard-coded" to be jsp & jspf
- fContentTypes = new IContentType[]{Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP), Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSPFRAGMENT)};
- if (fAdditionalContentTypesIDs != null) {
- List allTypes = new ArrayList(Arrays.asList(fContentTypes));
- for (int i = 0; i < fAdditionalContentTypesIDs.length; i++) {
- IContentType type = Platform.getContentTypeManager().getContentType(fAdditionalContentTypesIDs[i]);
- if (type != null) {
- allTypes.add(type);
- }
- }
- fContentTypes = (IContentType[]) allTypes.toArray(new IContentType[allTypes.size()]);
- }
- }
- return fContentTypes;
- }
-
- /**
- * Checks if fileName is some type of JSP (including JSP fragments)
- *
- * @param fileName
- * @return true if filename indicates some type of JSP, false
- * otherwise
- */
- private boolean isJSPType(String fileName) {
- boolean valid = false;
-
- IContentType[] types = getValidContentTypes();
- int i = 0;
- while (i < types.length && !valid) {
- valid = types[i].isAssociatedWith(fileName);
- ++i;
- }
- return valid;
- }
-
- public boolean visit(IResourceProxy proxy) throws CoreException {
-
- // check validation
- if (fReporter.isCancelled())
- return false;
-
- if (proxy.getType() == IResource.FILE) {
-
- if (isJSPType(proxy.getName())) {
- IFile file = (IFile) proxy.requestResource();
- if (file.exists()) {
-
- if (DEBUG)
- System.out.println("(+) JSPValidator adding file: " + file.getName()); //$NON-NLS-1$
- fFiles.add(file);
-
- // don't search deeper for files
- return false;
- }
- }
- }
- return true;
- }
- }
-
-
- class LocalizedMessage extends Message {
-
- private String _message = null;
-
- public LocalizedMessage(int severity, String messageText) {
- this(severity, messageText, null);
- }
-
- public LocalizedMessage(int severity, String messageText, IResource targetObject) {
- this(severity, messageText, (Object) targetObject);
- }
-
- public LocalizedMessage(int severity, String messageText, Object targetObject) {
- super(null, severity, null);
- setLocalizedMessage(messageText);
- setTargetObject(targetObject);
- }
-
- private String getLocalizedText() {
- return _message;
- }
-
- public String getText() {
- return getLocalizedText();
- }
-
- public String getText(ClassLoader cl) {
- return getLocalizedText();
- }
-
- public String getText(Locale l) {
- return getLocalizedText();
- }
-
- public String getText(Locale l, ClassLoader cl) {
- return getLocalizedText();
- }
-
- public void setLocalizedMessage(String message) {
- _message = message;
- }
- }
-
- private static final String PLUGIN_ID_JSP_CORE = "org.eclipse.jst.jsp.core"; //$NON-NLS-1$
-
- // for debugging
- static final boolean DEBUG = Boolean.valueOf(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspvalidator")).booleanValue(); //$NON-NLS-1$
-
- private IContentType fJSPFContentType = null;
-
- private JSPDirectiveValidator directiveValidator = new JSPDirectiveValidator(this);
- private JSPELValidator elValidator = new JSPELValidator(this);
- private JSPJavaValidator jspJavaValidator = new JSPJavaValidator(this);
- private JSPActionValidator fJSPActionValidator = new JSPActionValidator(this);
-
- String fAdditionalContentTypesIDs[] = null;
-
- public void cleanup(IReporter reporter) {
- directiveValidator.cleanup(reporter);
- elValidator.cleanup(reporter);
- jspJavaValidator.cleanup(reporter);
- fJSPActionValidator.cleanup(reporter);
- }
-
- void doValidate(IValidationContext helper, IReporter reporter) throws ValidationException {
- String[] uris = helper.getURIs();
- if (uris.length > 0) {
- IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
- IFile currentFile = null;
- for (int i = 0; i < uris.length && !reporter.isCancelled(); i++) {
- currentFile = wsRoot.getFile(new Path(uris[i]));
- if (currentFile != null && currentFile.exists()) {
- if (shouldValidate(currentFile) && fragmentCheck(currentFile)) {
- Message message = new LocalizedMessage(IMessage.LOW_SEVERITY, NLS.bind(JSPCoreMessages.MESSAGE_JSP_VALIDATING_MESSAGE_UI_, new String[]{currentFile.getFullPath().toString()}));
- reporter.displaySubtask(this, message);
- validateFile(currentFile, reporter);
- }
- if (DEBUG)
- System.out.println("validating: [" + uris[i] + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- else {
-
- // if uris[] length 0 -> validate() gets called for each project
- if (helper instanceof IWorkbenchContext) {
- IProject project = ((IWorkbenchContext) helper).getProject();
- JSPFileVisitor visitor = new JSPFileVisitor(reporter);
- try {
- // collect all jsp files for the project
- project.accept(visitor, IResource.DEPTH_INFINITE);
- }
- catch (CoreException e) {
- if (DEBUG)
- e.printStackTrace();
- }
- IFile[] files = visitor.getFiles();
- for (int i = 0; i < files.length && !reporter.isCancelled(); i++) {
- if (shouldValidate(files[i]) && fragmentCheck(files[i])) {
-
- IMessage message = new LocalizedMessage(IMessage.LOW_SEVERITY, NLS.bind(JSPCoreMessages.MESSAGE_JSP_VALIDATING_MESSAGE_UI_, new String[]{files[i].getFullPath().toString()}));
- reporter.displaySubtask(this, message);
-
- validateFile(files[i], reporter);
- }
- if (DEBUG)
- System.out.println("validating: [" + files[i] + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- }
-
- /**
- * Checks if file is a jsp fragment or not. If so, check if the fragment
- * should be validated or not.
- *
- * @param file
- * Assumes shouldValidate was already called on file so it
- * should not be null and does exist
- * @return false if file is a fragment and it should not be validated,
- * true otherwise
- */
- private boolean fragmentCheck(IFile file) {
- boolean shouldValidate = true;
- // quick check to see if this is possibly a jsp fragment
- if (getJSPFContentType().isAssociatedWith(file.getName())) {
- // get preference for validate jsp fragments
- boolean shouldValidateFragments = Boolean.valueOf(JSPFContentProperties.getProperty(JSPFContentProperties.VALIDATE_FRAGMENTS, file, true)).booleanValue();
- /*
- * if jsp fragments should not be validated, check if file is
- * really jsp fragment
- */
- if (!shouldValidateFragments) {
- boolean isFragment = isFragment(file);
- shouldValidate = !isFragment;
- }
- }
- return shouldValidate;
- }
-
-
- /**
- * Returns JSP fragment content type
- *
- * @return jspf content type
- */
- private IContentType getJSPFContentType() {
- if (fJSPFContentType == null) {
- fJSPFContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSPFRAGMENT);
- }
- return fJSPFContentType;
- }
-
- public ISchedulingRule getSchedulingRule(IValidationContext helper) {
- if (helper instanceof IWorkbenchContext) {
- /*
- * Use a single build rule when running batch validation.
- */
- return ResourcesPlugin.getWorkspace().getRuleFactory().buildRule();
- }
- /*
- * For other kinds of validation, use no specific rule
- */
- return null;
- }
-
- /**
- * Checks if validator is enabled according in Validation preferences
- *
- * @param vmd
- * @return
- */
- static boolean isBatchValidatorPreferenceEnabled(IFile file) {
- if (file == null) {
- return true;
- }
-
- boolean enabled = true;
- ProjectConfiguration configuration = getProjectConfiguration(file);
- if (configuration != null) {
- org.eclipse.wst.validation.internal.ValidatorMetaData metadata = ValidationRegistryReader.getReader().getValidatorMetaData(JSPBatchValidator.class.getName());
- if (configuration != null && metadata != null) {
- if (!configuration.isBuildEnabled(metadata) && !configuration.isManualEnabled(metadata))
- enabled = false;
- }
- }
- return enabled;
- }
-
- /**
- * Gets current validation project configuration based on current project
- * (which is based on current document)
- *
- * @return ProjectConfiguration
- */
- static private ProjectConfiguration getProjectConfiguration(IFile file) {
- ProjectConfiguration projectConfiguration = null;
- if (file != null) {
- IProject project = file.getProject();
- if (project != null) {
- try {
- projectConfiguration = ConfigurationManager.getManager().getProjectConfiguration(project);
- }
- catch (InvocationTargetException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- }
-
- return projectConfiguration;
- }
-
- /**
- * Determines if file is jsp fragment or not (does a deep, indepth check,
- * looking into contents of file)
- *
- * @param file
- * assumes file is not null and exists
- * @return true if file is jsp fragment, false otherwise
- */
- private boolean isFragment(IFile file) {
- boolean isFragment = false;
- InputStream is = null;
- try {
- IContentDescription contentDescription = file.getContentDescription();
- // it can be null
- if (contentDescription == null) {
- is = file.getContents();
- contentDescription = Platform.getContentTypeManager().getDescriptionFor(is, file.getName(), new QualifiedName[]{IContentDescription.CHARSET});
- }
- if (contentDescription != null) {
- String fileCtId = contentDescription.getContentType().getId();
- isFragment = (fileCtId != null && ContentTypeIdForJSP.ContentTypeID_JSPFRAGMENT.equals(fileCtId));
- }
- }
- catch (IOException e) {
- // ignore, assume it's invalid JSP
- }
- catch (CoreException e) {
- // ignore, assume it's invalid JSP
- }
- finally {
- /*
- * must close input stream in case others need it
- * (IFile.getContents() requirement as well)
- */
- if (is != null)
- try {
- is.close();
- }
- catch (Exception e) {
- // not sure how to recover at this point
- }
- }
- return isFragment;
- }
-
- private void performValidation(IFile f, IReporter reporter, IStructuredModel model) {
- if (!reporter.isCancelled())
- directiveValidator.performValidation(f, reporter, model.getStructuredDocument());
- if (!reporter.isCancelled())
- elValidator.performValidation(f, reporter, model.getStructuredDocument());
- if (!reporter.isCancelled())
- jspJavaValidator.performValidation(f, reporter, model);
- if (!reporter.isCancelled())
- fJSPActionValidator.performValidation(f, reporter, model);
- }
-
- /**
- * @see org.eclipse.core.runtime.IExecutableExtension#setInitializationData(org.eclipse.core.runtime.IConfigurationElement,
- * java.lang.String, java.lang.Object)
- */
- public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException {
- fAdditionalContentTypesIDs = new String[0];
- if (data != null) {
- if (data instanceof String && data.toString().length() > 0) {
- fAdditionalContentTypesIDs = StringUtils.unpack(data.toString());
- }
- }
- }
-
- private boolean shouldValidate(IFile file) {
- IResource resource = file;
- do {
- if (resource.isDerived() || resource.isTeamPrivateMember() || !resource.isAccessible() || resource.getName().charAt(0) == '.') {
- return false;
- }
- resource = resource.getParent();
- }
- while ((resource.getType() & IResource.PROJECT) == 0);
- return true;
- }
-
- public void validate(IValidationContext helper, IReporter reporter) throws ValidationException {
- doValidate(helper, reporter);
- }
-
- /**
- * Validate one file. It's assumed that the file has JSP content type.
- *
- * @param f
- * @param reporter
- */
- void validateFile(IFile f, IReporter reporter) {
- IStructuredModel model = null;
- try {
- // get jsp model, get translation
- model = StructuredModelManager.getModelManager().getModelForRead(f);
- if (!reporter.isCancelled() && model != null) {
- if (model instanceof IDOMModel) {
- reporter.removeAllMessages(this, f);
- performValidation(f, reporter, model);
- }
- }
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- }
-
- public IStatus validateInJob(final IValidationContext helper, final IReporter reporter) throws ValidationException {
- IStatus status = Status.OK_STATUS;
- Job currentJob = Platform.getJobManager().currentJob();
- ISchedulingRule rule = null;
- if (currentJob != null) {
- rule = currentJob.getRule();
- }
- IWorkspaceRunnable validationRunnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- try {
- doValidate(helper, reporter);
- }
- catch (ValidationException e) {
- throw new CoreException(new Status(IStatus.ERROR, PLUGIN_ID_JSP_CORE, 0, PLUGIN_ID_JSP_CORE, e));
- }
-
- }
- };
- try {
- JavaCore.run(validationRunnable, rule, new NullProgressMonitor());
- }
- catch (CoreException e) {
- if (e.getCause() instanceof ValidationException) {
- throw (ValidationException) e.getCause();
- }
- throw new ValidationException(new LocalizedMessage(IMessage.ERROR_AND_WARNING, e.getMessage()), e);
- }
- return status;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPDirectiveValidator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPDirectiveValidator.java
deleted file mode 100644
index f4283b36e1..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPDirectiveValidator.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.validation;
-
-import java.io.IOException;
-import java.util.HashMap;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.sse.ui.internal.reconcile.validator.ISourceValidator;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
-import org.eclipse.wst.validation.internal.provisional.core.IValidator;
-
-/**
- * Checks for: - duplicate taglib prefix values - reserved taglib prefix
- * values
- *
- */
-public class JSPDirectiveValidator extends JSPValidator implements ISourceValidator {
- private static final boolean DEBUG = Boolean.valueOf(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspvalidator")).booleanValue(); //$NON-NLS-1$
-
- private HashMap fReservedPrefixes = new HashMap();
- private HashMap fDuplicatePrefixes = new HashMap();
- private IDocument fDocument;
-
- private IValidator fMessageOriginator;
- private IFile fFile;
- private boolean fEnableSourceValidation = true;
-
- public JSPDirectiveValidator(){
- fReservedPrefixes.put("jsp", ""); //$NON-NLS-1$ //$NON-NLS-2$
- fReservedPrefixes.put("jspx", ""); //$NON-NLS-1$ //$NON-NLS-2$
- fReservedPrefixes.put("java", ""); //$NON-NLS-1$ //$NON-NLS-2$
- fReservedPrefixes.put("javax", ""); //$NON-NLS-1$ //$NON-NLS-2$
- fReservedPrefixes.put("servlet", ""); //$NON-NLS-1$ //$NON-NLS-2$
- fReservedPrefixes.put("sun", ""); //$NON-NLS-1$ //$NON-NLS-2$
- fReservedPrefixes.put("sunw", ""); //$NON-NLS-1$ //$NON-NLS-2$
-
- this.fMessageOriginator = this;
- }
-
-
- public JSPDirectiveValidator(IValidator validator){
- fReservedPrefixes.put("jsp", ""); //$NON-NLS-1$ //$NON-NLS-2$
- fReservedPrefixes.put("jspx", ""); //$NON-NLS-1$ //$NON-NLS-2$
- fReservedPrefixes.put("java", ""); //$NON-NLS-1$ //$NON-NLS-2$
- fReservedPrefixes.put("javax", ""); //$NON-NLS-1$ //$NON-NLS-2$
- fReservedPrefixes.put("servlet", ""); //$NON-NLS-1$ //$NON-NLS-2$
- fReservedPrefixes.put("sun", ""); //$NON-NLS-1$ //$NON-NLS-2$
- fReservedPrefixes.put("sunw", ""); //$NON-NLS-1$ //$NON-NLS-2$
- this.fMessageOriginator = validator;
- }
- /**
- * batch validation call
- */
- protected void validateFile(IFile f, IReporter reporter) {
- // for batch validation
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getModelForRead(f);
- if (sModel != null) {
- /* remove old messages (compatibility requirement) */
- reporter.removeAllMessages(fMessageOriginator, f);
- performValidation(f, reporter, sModel.getStructuredDocument());
- }
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- }
-
-
- protected void performValidation(IFile f, IReporter reporter, IStructuredDocument sDoc) {
- /*
- * when validating an entire file need to clear dupes or else you're
- * comparing between files
- */
- fDuplicatePrefixes.clear();
-
- // need to set this for partial validate call to work
- fDocument = sDoc;
- // iterate all document regions
- IStructuredDocumentRegion region = sDoc
- .getFirstStructuredDocumentRegion();
- while (region != null && !reporter.isCancelled()) {
- // only checking directives
- if (region.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- validateDirective(reporter, f, sDoc, region);
- }
- region = region.getNext();
- }
- fDuplicatePrefixes.clear();
- fDocument = null;
- }
-
- public void connect(IDocument document) {
- fDuplicatePrefixes.clear();
- fDocument = document;
-
- IStructuredModel model = null;
- IFile file = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- if (model != null) {
- String baseLocation = model.getBaseLocation();
- // The baseLocation may be a path on disk or relative to the
- // workspace root. Don't translate on-disk paths to
- // in-workspace resources.
- IPath basePath = new Path(baseLocation);
- if (basePath.segmentCount() > 1) {
- file = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath);
- /*
- * If the IFile doesn't exist, make sure it's not
- * returned
- */
- if (!file.exists())
- file = null;
- }
- }
- }
- finally {
- if (model != null) {
- model.releaseFromRead();
- }
- }
- fFile = file;
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=199175
- fEnableSourceValidation = (fFile != null && fDocument instanceof IStructuredDocument && JSPBatchValidator.isBatchValidatorPreferenceEnabled(fFile) && shouldReallyValidate(fFile));
- if(DEBUG) {
- Logger.log(Logger.INFO, getClass().getName() + " enablement for source validation: " + fEnableSourceValidation); //$NON-NLS-1$
- }
- }
-
- public void disconnect(IDocument document) {
- fDuplicatePrefixes.clear();
- fDocument = null;
- fFile = null;
- }
-
- /**
- * for as you type validation (partial document)
- */
- public void validate(IRegion dirtyRegion, IValidationContext helper, IReporter reporter) {
- if(fEnableSourceValidation) {
- if(DEBUG) {
- Logger.log(Logger.INFO, getClass().getName() + " revalidating " + dirtyRegion); //$NON-NLS-1$
- }
- validate(dirtyRegion, helper, reporter, fFile);
- }
- }
-
- private void validate(IRegion dirtyRegion, IValidationContext helper, IReporter reporter, IFile file) {
- // check for restricted and duplicate prefixes
- IStructuredDocument sDoc = (IStructuredDocument) fDocument;
- IStructuredDocumentRegion[] regions = sDoc.getStructuredDocumentRegions(dirtyRegion.getOffset(), dirtyRegion.getLength());
- for (int i = 0; i < regions.length; i++) {
- // only checking directives
- if (regions[i].getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- validateDirective(reporter, file, sDoc, regions[i]);
- }
- }
- }
-
- private void validateDirective(IReporter reporter, IFile file, IStructuredDocument sDoc, IStructuredDocumentRegion sdRegion) {
- // we only care about taglib directive
- if (getDirectiveName(sdRegion).equals("taglib")) { //$NON-NLS-1$
- ITextRegion valueRegion = getAttributeValueRegion(sdRegion, JSP11Namespace.ATTR_NAME_PREFIX);
- if (valueRegion == null)
- return;
-
- String taglibPrefix = sdRegion.getText(valueRegion);
- int start = sdRegion.getStartOffset(valueRegion);
- // length before stripquotes
- int length = valueRegion.getTextLength();
- taglibPrefix = StringUtils.stripQuotes(taglibPrefix);
-
- LocalizedMessage message = null;
-
- // check for errors
- // use file if available (for markers)
- if (isReservedPrefix(taglibPrefix)) {
- int sev = IMessage.HIGH_SEVERITY;
- String msgText = JSPCoreMessages.JSPDirectiveValidator_0 + taglibPrefix + "'"; //$NON-NLS-2$ //$NON-NLS-1$
- message = (file == null ? new LocalizedMessage(sev, msgText) : new LocalizedMessage(sev, msgText, file));
- }
- else if (isDuplicatePrefix(sdRegion, taglibPrefix)) {
- int sev = IMessage.NORMAL_SEVERITY;
- String msgText = JSPCoreMessages.JSPDirectiveValidator_2 + taglibPrefix + "'"; //$NON-NLS-2$ //$NON-NLS-1$
- message = (file == null ? new LocalizedMessage(sev, msgText) : new LocalizedMessage(sev, msgText, file));
- }
-
- // if there's a message, there was an error found
- if (message != null) {
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- }
-
- private boolean isDuplicatePrefix(IStructuredDocumentRegion region, String taglibPrefix) {
- boolean dupe = false;
- Object o = fDuplicatePrefixes.get(taglibPrefix);
- if (o == null) {
- // prefix doesn't exist, not a dupe
- fDuplicatePrefixes.put(taglibPrefix, region);
- }
- else if (o instanceof IStructuredDocumentRegion) {
- if (((IStructuredDocumentRegion) o).isDeleted()) {
- // region was deleted, replace w/ new region
- // not a dupe
- fDuplicatePrefixes.put(taglibPrefix, region);
- }
- else if (region != o) {
- // region exists and it's not this one
- // it's a dupe
- dupe = true;
- }
- }
- return dupe;
-
- }
-
- public void cleanup(IReporter reporter) {
- super.cleanup(reporter);
- fDuplicatePrefixes.clear();
- }
-
- private boolean isReservedPrefix(String name) {
- return fReservedPrefixes.get(name) != null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPELValidator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPELValidator.java
deleted file mode 100644
index b35b0bba20..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPELValidator.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2007 BEA Systems and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * BEA Systems - initial implementation
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.validation;
-
-import java.util.Iterator;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.java.jspel.JSPELParser;
-import org.eclipse.jst.jsp.core.internal.java.jspel.ParseException;
-import org.eclipse.jst.jsp.core.internal.java.jspel.Token;
-import org.eclipse.jst.jsp.core.internal.java.jspel.TokenMgrError;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
-import org.eclipse.wst.sse.ui.internal.reconcile.validator.ISourceValidator;
-import org.eclipse.wst.validation.internal.core.Message;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
-import org.eclipse.wst.validation.internal.provisional.core.IValidator;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-public class JSPELValidator extends JSPValidator implements ISourceValidator {
- private static final boolean DEBUG = Boolean.valueOf(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspvalidator")).booleanValue(); //$NON-NLS-1$
-
- private IValidator fMessageOriginator;
- private IDocument fDocument;
- private IFile fFile;
- private boolean fEnableSourceValidation = false;
-
- public JSPELValidator(){
- this.fMessageOriginator = this;
- }
- public JSPELValidator(IValidator validator){
- this.fMessageOriginator = validator;
- }
-
-
- public void connect(IDocument document) {
- fDocument = document;
-
- IStructuredModel model = null;
- IFile file = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- if (model != null) {
- String baseLocation = model.getBaseLocation();
- // The baseLocation may be a path on disk or relative to the
- // workspace root. Don't translate on-disk paths to
- // in-workspace resources.
- IPath basePath = new Path(baseLocation);
- if (basePath.segmentCount() > 1) {
- file = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath);
- /*
- * If the IFile doesn't exist, make sure it's not
- * returned
- */
- if (!file.exists())
- file = null;
- }
- }
- }
- finally {
- if (model != null) {
- model.releaseFromRead();
- }
- }
- fFile = file;
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=199175
- fEnableSourceValidation = (fDocument instanceof IStructuredDocument && JSPBatchValidator.isBatchValidatorPreferenceEnabled(fFile) && shouldReallyValidate(fFile));
- if(DEBUG) {
- Logger.log(Logger.INFO, getClass().getName() + " enablement for source validation: " + fEnableSourceValidation); //$NON-NLS-1$
- }
- }
-
- public void disconnect(IDocument document) {
- fDocument = null;
- fFile = null;
- }
-
- public void validate(IRegion dirtyRegion, IValidationContext helper, IReporter reporter) {
- if(fEnableSourceValidation) {
- if(DEBUG) {
- Logger.log(Logger.INFO, getClass().getName() + " revalidating"); //$NON-NLS-1$
- }
- performValidation(fFile, reporter, (IStructuredDocument) fDocument);
- }
- }
-
- protected void validateFile(IFile file, IReporter reporter) {
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getModelForRead(file);
- if (!reporter.isCancelled()) {
- reporter.removeAllMessages(fMessageOriginator, file);
- performValidation(file, reporter, model.getStructuredDocument());
- }
- }
- catch (Exception e) {
- }
- finally {
- if (null != model)
- model.releaseFromRead();
- }
- }
-
- protected void performValidation(IFile file, IReporter reporter, IStructuredDocument structuredDoc) {
- IStructuredDocumentRegion curNode = structuredDoc.getFirstStructuredDocumentRegion();
- while (null != curNode && !reporter.isCancelled()) {
- if (curNode.getType() != DOMRegionContext.XML_COMMENT_TEXT && curNode.getType() != DOMRegionContext.XML_CDATA_TEXT && curNode.getType() != DOMRegionContext.UNDEFINED) {
- validateRegionContainer(curNode, reporter, file);
- }
- curNode = curNode.getNext();
- }
- }
-
- protected void validateRegionContainer(ITextRegionCollection container, IReporter reporter, IFile file) {
- ITextRegionCollection containerRegion = container;
- Iterator regions = containerRegion.getRegions().iterator();
- ITextRegion region = null;
- while (regions.hasNext() && !reporter.isCancelled()) {
- region = (ITextRegion) regions.next();
- String type = region.getType();
- if (type != null && region instanceof ITextRegionCollection) {
- ITextRegionCollection parentRegion = ((ITextRegionCollection) region);
- Iterator childRegions = parentRegion.getRegions().iterator();
- while (childRegions.hasNext() && !reporter.isCancelled()) {
- ITextRegion childRegion = (ITextRegion) childRegions.next();
- if (childRegion.getType() == DOMJSPRegionContexts.JSP_EL_CONTENT)
- validateXMLNode(parentRegion, childRegion, reporter, file);