Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsil/actions/AddBusinessToFavoritesAction.java')
-rw-r--r--bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsil/actions/AddBusinessToFavoritesAction.java94
1 files changed, 0 insertions, 94 deletions
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsil/actions/AddBusinessToFavoritesAction.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsil/actions/AddBusinessToFavoritesAction.java
deleted file mode 100644
index 589481a5c..000000000
--- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsil/actions/AddBusinessToFavoritesAction.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.wst.ws.internal.explorer.platform.wsil.actions;
-
-import org.eclipse.wst.ws.internal.explorer.platform.constants.*;
-import org.eclipse.wst.ws.internal.explorer.platform.engine.transformer.ITransformer;
-import org.eclipse.wst.ws.internal.explorer.platform.favorites.constants.FavoritesModelConstants;
-import org.eclipse.wst.ws.internal.explorer.platform.perspective.*;
-import org.eclipse.wst.ws.internal.explorer.platform.wsil.constants.*;
-import org.eclipse.wst.ws.internal.explorer.platform.wsil.datamodel.*;
-import org.eclipse.wst.ws.internal.explorer.platform.wsil.perspective.WSILPerspective;
-import org.eclipse.wst.ws.internal.explorer.platform.wsil.transformer.WSILViewSelectionTransformer;
-
-import java.util.Hashtable;
-
-public class AddBusinessToFavoritesAction extends AddToFavoritesAction
-{
- public AddBusinessToFavoritesAction(Controller controller)
- {
- super(controller);
- }
-
- public boolean favoriteExists()
- {
- int nodeID = Integer.parseInt((String) propertyTable_.get(ActionInputs.NODEID));
- int viewID = Integer.parseInt((String) propertyTable_.get(ActionInputs.VIEWID));
- Node selectedNode = nodeManager_.getNode(nodeID);
- WsilElement selectedElement = (WsilElement) selectedNode.getTreeElement();
- Object obj = selectedElement.getAllUDDILinks().getElementWithViewId(viewID).getObject();
- WsilUddiBusinessElement wsilUddiBusinessElement = (WsilUddiBusinessElement) obj;
- String businessName = wsilUddiBusinessElement.getName();
- String inquiryAPI = wsilUddiBusinessElement.getUDDILinkInquiryAPI();
- String businessKey = wsilUddiBusinessElement.getUDDILinkBusinessKey();
- if (businessName == null)
- businessName = businessKey;
- Hashtable table = new Hashtable();
- table.put(FavoritesModelConstants.PROP_UDDI_BUSINESS_NAME, businessName);
- table.put(FavoritesModelConstants.PROP_UDDI_BUSINESS_INQUIRY_API, inquiryAPI);
- table.put(FavoritesModelConstants.PROP_UDDI_BUSINESS_KEY, businessKey);
- return favoriteExists(table, FavoritesModelConstants.REL_UDDI_BUSINESS_FOLDER_NODE);
- }
-
- public ITransformer[] getTransformers()
- {
- ITransformer[] parentTransformers = super.getTransformers();
- ITransformer[] transformers = new ITransformer[parentTransformers.length+1];
- System.arraycopy(parentTransformers, 0, transformers, 0, parentTransformers.length);
- transformers[transformers.length-1] = new WSILViewSelectionTransformer(controller_, WsilModelConstants.LIST_MANAGER_UDDI_LINKS, ActionInputs.VIEWID, WSILViewSelectionTransformer.UDDI_BUSINESS);
- return transformers;
- }
-
- public boolean executeSingleLinkAction()
- {
- int nodeID = Integer.parseInt((String) propertyTable_.get(ActionInputs.NODEID));
- int viewID = Integer.parseInt((String) propertyTable_.get(ActionInputs.VIEWID));
- WSILPerspective wsilPerspective = controller_.getWSILPerspective();
- Node selectedNode = nodeManager_.getNode(nodeID);
- WsilElement selectedElement = (WsilElement) selectedNode.getTreeElement();
- Object obj = selectedElement.getAllUDDILinks().getElementWithViewId(viewID).getObject();
- WsilUddiBusinessElement wsilUddiBusinessElement = (WsilUddiBusinessElement) obj;
- String businessName = wsilUddiBusinessElement.getName();
- String inquiryAPI = wsilUddiBusinessElement.getUDDILinkInquiryAPI();
- String businessKey = wsilUddiBusinessElement.getUDDILinkBusinessKey();
- if (businessName == null)
- businessName = businessKey;
- Hashtable table = new Hashtable();
- table.put(FavoritesModelConstants.PROP_UDDI_BUSINESS_NAME, businessName);
- table.put(FavoritesModelConstants.PROP_UDDI_BUSINESS_INQUIRY_API, inquiryAPI);
- table.put(FavoritesModelConstants.PROP_UDDI_BUSINESS_KEY, businessKey);
- if (isMultipleLinkAction() && favoriteExists(table, FavoritesModelConstants.REL_UDDI_BUSINESS_FOLDER_NODE))
- {
- wsilPerspective.getMessageQueue().addMessage(wsilPerspective.getMessage("MSG_ERROR_FAVORITES_ALREADY_EXISTS", businessName));
- return false;
- }
- if (addToFavorites(table, FavoritesModelConstants.REL_UDDI_BUSINESS_FOLDER_NODE))
- {
- wsilPerspective.getMessageQueue().addMessage(wsilPerspective.getMessage("MSG_INFO_ADD_TO_FAVORITES_SUCCESSFUL", businessName));
- return true;
- }
- else
- {
- wsilPerspective.getMessageQueue().addMessage(wsilPerspective.getMessage("MSG_ERROR_ADD_TO_FAVORITES", businessName));
- return false;
- }
- }
-}

Back to the top

erImpl.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.java53
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/TAGCMDocumentFactory.java51
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/TaglibController.java373
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMAttributeDeclarationImpl.java287
-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.java1160
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentImpl.java455
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMElementDeclarationImpl.java590
-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.java1107
-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.java116
-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.java38
-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.java133
-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.java57
-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/DeploymentDescriptorPropertyCache.java958
-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.java116
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java3924
-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.java541
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/Messages.java15
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/messages.properties1
-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.java61
-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.java711
-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.java112
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/AttrImplForJSP.java49
-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.java66
-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.java44
-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.java311
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/ArrayMap.java103
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/CompilationUnitHelper.java56
-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/IJSPProblem.java38
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/IJSPTranslation.java90
-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.java98
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPProblemRequestor.java91
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java643
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java269
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java70
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationExtension.java495
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationUtil.java125
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java3610
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslatorPersister.java279
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/StackMap.java158
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslationAdapter.java24
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslationAdapterFactory.java55
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslator.java38
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java550
-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.java56
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java737
-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.java135
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj676
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt282
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java1496
-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.java849
-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.java132
-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.java199
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java481
-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.java143
-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/JSPIndexManager.java156
-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.java254
-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.java125
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchSupport.java595
-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.java647
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/ModelHandlerForJSP.java113
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/ModelHandlerForTag.java38
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/TagModelLoader.java42
-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.java27
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryCMProvider.java87
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryExtension.java203
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryImpl.java163
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/ModelQueryAdapterFactoryForJSP.java217
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/ModelQueryAdapterFactoryForTag.java36
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TagModelQuery.java155
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TagModelQueryCMProvider.java90
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TaglibModelQueryExtension.java65
-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.java379
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPSourceParser.java427
-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.java4079
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceInitializer.java80
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceNames.java84
-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.java18
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP21Namespace.java14
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/contenttype/ContentTypeIdForJSP.java61
-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.java34
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/regions/DOMJSPRegionContexts.java63
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/BuildPathClassLoader.java234
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/CustomTag.java74
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibClassLoader.java91
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java1025
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperCache.java183
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java104
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibVariable.java167
-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.java475
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/CommonXML.java107
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/DocumentProvider.java480
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupport.java253
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupportDelegate.java227
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FileContentCache.java234
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/ZeroStructuredDocumentRegion.java290
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/FragmentValidationTools.java57
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/HTMLValidationReporter.java108
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPActionValidator.java488
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPBatchValidator.java535
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPContentValidator.java277
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPDirectiveValidator.java787
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPELValidator.java222
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPJavaValidator.java445
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPValidator.java420
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/LocalizedMessage.java61
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/TLDValidator.java292
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/ELProblem.java103
-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.java42
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITLDRecord.java42
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITagDirRecord.java29
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibDescriptor.java56
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibIndexDelta.java82
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibIndexListener.java27
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibRecord.java77
-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.java49
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java2656
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java1027
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndexDelta.java148
-rw-r--r--bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/text/IJSPPartitions.java34
-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.java2030
-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/.classpath34
-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/.project34
-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.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.jdt.core.prefs79
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.jdt.ui.prefs4
-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.prefs16
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF67
-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/elcl16/javaassist_co.gifbin344 -> 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.pngbin3973 -> 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.properties122
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/plugin.xml1457
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/schema/classPatternProvider.exsd106
-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.java369
-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.java198
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPlugin.java99
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties178
-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/actions/JSPNodeActionManager.java47
-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.java220
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSPJava.java110
-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/ClassPatternRegistry.java127
-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.java239
-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.java263
-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.java47
-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.java309
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposal.java145
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposalComputer.java243
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistHelper.java71
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java1149
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java306
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELCompletionProcessor.java24
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELCompletionProposalComputer.java156
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELContentAssistProcessor.java152
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELProposalCollector.java93
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPImportCompletionProposalComputer.java78
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaCompletionProposalComputer.java553
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java306
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPMethodCompletionProposal.java235
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyCompletionProposalComputer.java249
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java32
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPProposalCollector.java310
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPStructuredContentAssistProcessor.java142
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTaglibCompletionProposalComputer.java433
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTaglibDirectiveContentAssistProcessor.java31
-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/JSPTemplatesCompletionProposalComputer.java151
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanCompletionProposalComputer.java126
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java31
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaParameterListValidator.java228
-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/LibraryTagsCompletionProposalComputer.java531
-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.java115
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/JSPFContentSettingsPropertyPage.java189
-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/contentproperties/ui/TagContentSettingsPropertyPage.java68
-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.java49
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPSourceEditingTextTools.java61
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/format/FormattingStrategyJSPJava.java118
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/handlers/JSPFindOccurrencesHandler.java36
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/ExternalFileHyperlink.java72
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlink.java68
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlinkDetector.java264
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TLDFileHyperlink.java126
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java441
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarHyperlink.java113
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarUriHyperlink.java74
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileHyperlink.java178
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileRegionHyperlink.java218
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/WorkspaceFileHyperlink.java83
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLJavaHyperlinkDetector.java291
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java274
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPFieldRenameParticipant.java56
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPFieldRenameRequestor.java44
-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.java73
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameParticipant.java63
-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/JSPMoveParticipant.java253
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameChange.java74
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameParticipant.java57
-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/JSPRenameChange.java300
-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/JSPRenameParticipant.java245
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameUndoChange.java73
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveChange.java72
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveParticipant.java61
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveRequestor.java69
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameChange.java74
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameParticipant.java60
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameRequestor.java69
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/MoveElementHandler.java76
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/RenameElementHandler.java85
-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.java37
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesProcessor.java124
-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.java104
-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.java107
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPCompletionProposalCategoriesConfiguration.java78
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceInitializer.java117
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceNames.java187
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/AbstractPropertyPreferencePage.java299
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPColorPage.java170
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPContentAssistPreferencePage.java182
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPFilesPreferencePage.java112
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPSourcePreferencePage.java80
-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/JSPSyntaxColoringPage.java877
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPTemplatePreferencePage.java165
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPTypingPreferencePage.java108
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPValidationPreferencePage.java285
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/registry/AdapterFactoryProviderForJSP.java73
-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.java227
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/DoubleQuotedStringRule.java82
-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.java109
-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.java324
-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.java283
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPInformationProvider.java45
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java145
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocInformationProvider.java46
-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.java71
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/XMLJavadocHoverProcessor.java137
-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.java52
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/TemplateContextTypeJSP.java158
-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/JavaCharacterPairInserter.java158
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaCodeReader.java246
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaHeuristicScanner.java956
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaPairMatcher.java223
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/Symbols.java54
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/HTMLValidationReporter.java106
-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/validation/JSPContentSourceValidator.java393
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/LocalizedMessage.java61
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/views/contentoutline/TLDContentOutlineConfiguration.java349
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPFileWizardPage.java280
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPTemplatesWizardPage.java522
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPWizard.java164
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagFileWizardPage.java256
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagTemplatesWizardPage.java521
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagWizard.java146
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/views/contentoutline/JSPContentOutlineConfiguration.java63
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/views/contentoutline/JSPImportDirectiveFilter.java40
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.properties64
-rw-r--r--bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.xml48
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/.cvsignore1
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/.project22
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/.settings/org.eclipse.core.resources.prefs4
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/.settings/org.eclipse.pde.prefs15
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/META-INF/MANIFEST.MF7
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/about.html96
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/about_files/CDDLv1.0.txt119
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/about_files/LICENSE.txt119
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/build.properties11
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_1_2.dtd292
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_1_3.dtd506
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_1_4.xsd267
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_5.xsd304
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_6.xsd311
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_1_2.dtd197
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_1_3.dtd312
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_1_4.xsd315
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_5.xsd336
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_6.xsd394
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/beans_1_0.xsd180
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/connector_1_0.dtd557
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/connector_1_5.xsd1036
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/connector_1_6.xsd1261
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_1_1.dtd894
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_2_0.dtd1671
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_2_1.xsd2208
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_3_0.xsd2706
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_3_1.xsd3247
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/facelet-taglib_1_0.dtd36
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_1_4.xsd1608
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_jaxrpc_mapping_1_1.xsd886
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_web_services_1_1.xsd491
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_web_services_client_1_1.xsd345
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_5.xsd2096
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_6.xsd2422
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_1_2.xsd747
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_1_3.xsd572
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_client_1_2.xsd578
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_client_1_3.xsd737
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/jsp_2_0.xsd308
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/jsp_2_1.xsd343
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/jsp_2_2.xsd389
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/orm_1_0.xsd1562
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/orm_2_0.xsd1940
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/persistence_1_0.xsd307
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/persistence_2_0.xsd357
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_2.dtd639
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_3.dtd1063
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_4.xsd1234
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_2_5.xsd1271
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-app_3_0.xsd272
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-common_3_0.xsd1575
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facelettaglibrary_2_0.xsd515
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesconfig_1_0.dtd874
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesconfig_1_1.dtd895
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesconfig_1_2.xsd2071
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesconfig_2_0.xsd2698
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-facesuicomponent_2_0.xsd223
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-fragment_3_0.xsd272
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_1_1.dtd265
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_1_2.dtd468
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_2_0.xsd1010
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-jsptaglibrary_2_1.xsd1144
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/web-partialresponse_2_0.xsd263
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/plugin.properties3
-rw-r--r--bundles/org.eclipse.jst.standard.schemas/plugin.xml245
-rw-r--r--bundles/org.eclipse.wst.css.core/.classpath13
-rw-r--r--bundles/org.eclipse.wst.css.core/.cvsignore8
-rw-r--r--bundles/org.eclipse.wst.css.core/.options2
-rw-r--r--bundles/org.eclipse.wst.css.core/.project34
-rw-r--r--bundles/org.eclipse.wst.css.core/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.css.core/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.css.core/.settings/org.eclipse.jdt.core.prefs81
-rw-r--r--bundles/org.eclipse.wst.css.core/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--bundles/org.eclipse.wst.css.core/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.css.core/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.css.core/META-INF/MANIFEST.MF45
-rw-r--r--bundles/org.eclipse.wst.css.core/about.html34
-rw-r--r--bundles/org.eclipse.wst.css.core/build.properties23
-rw-r--r--bundles/org.eclipse.wst.css.core/cssprofile/css-profile.dtd143
-rw-r--r--bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css1.xml838
-rw-r--r--bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css2.xml2292
-rw-r--r--bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-css3.xml2566
-rw-r--r--bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-mobile1_0.xml158
-rw-r--r--bundles/org.eclipse.wst.css.core/cssprofile/cssprofile-wap.xml630
-rw-r--r--bundles/org.eclipse.wst.css.core/cssprofile/cssprofile.properties36
-rw-r--r--bundles/org.eclipse.wst.css.core/cssprofile/description.txt15
-rw-r--r--bundles/org.eclipse.wst.css.core/plugin.properties20
-rw-r--r--bundles/org.eclipse.wst.css.core/plugin.xml96
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCoreMessages.java31
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePlugin.java62
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/CSSCorePluginResources.properties14
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/IProductConstants.java16
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/Logger.java156
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CSSCleanupStrategy.java106
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CSSCleanupStrategyImpl.java212
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/cleanup/CleanupProcessorCSS.java101
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IMediaGroupID.java34
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/IValID.java285
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMContainer.java164
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFontProperty.java198
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMFunction.java89
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNode.java1521
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMNumber.java219
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMProperty.java440
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMString.java85
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMSubProperty.java122
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMURange.java81
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentmodel/PropCMUtil.java48
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentproperties/CSSContentProperties.java194
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contentproperties/CSSContentPropertiesManager.java239
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/ByteReader.java109
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSHeadTokenizer.java1440
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSHeadTokenizerConstants.java19
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/CSSResourceEncodingDetector.java367
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/ContentDescriberForCSS.java200
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/EncodingGuesser.java173
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/HeadParserToken.java44
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/contenttype/IntStack.java114
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/AbstractCSSNodeList.java63
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSAttrImpl.java133
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSCharsetRuleImpl.java79
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDeclarationItemParser.java1075
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSDocumentImpl.java163
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSFontFaceRuleImpl.java67
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSImportRuleImpl.java227
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSMediaRuleImpl.java230
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelCreationContext.java155
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelDeletionContext.java266
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelImpl.java627
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelNodeFeeder.java126
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelParser.java1317
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdateContext.java416
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUpdater.java518
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSModelUtil.java291
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNamedNodeMapImpl.java48
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeImpl.java470
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSNodeListImpl.java27
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPageRuleImpl.java98
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveContainer.java39
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSPrimitiveValueImpl.java362
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRegionContainer.java202
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleDeclContainer.java56
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleImpl.java80
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSRuleListImpl.java45
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelector.java420
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorCombinator.java76
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorItem.java42
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorListImpl.java207
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSelectorParser.java335
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSSimpleSelector.java281
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStructuredDocumentRegionContainer.java229
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclItemImpl.java272
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationFactoryContext.java69
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleDeclarationImpl.java272
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleRuleImpl.java98
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSStyleSheetImpl.java654
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CSSUnknownRuleImpl.java70
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/CounterImpl.java124
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/DOMCSSImpl.java49
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/MediaListImpl.java155
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RGBColorImpl.java104
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/RectImpl.java118
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/document/StyleSheetListImpl.java44
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentCharsetDetector.java126
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/encoding/CSSDocumentLoader.java91
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/ICSSStyleListener.java32
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/event/ICSSStyleNotifier.java40
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/eventimpl/CSSEmbededStyleNotifyAdapter.java60
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/eventimpl/CSSStyleEventDeliverer.java155
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/eventimpl/CSSStyleNotifyAdapter.java174
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/format/FormatProcessorCSS.java130
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AbstractCSSSourceFormatter.java1021
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrChangeContext.java29
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/AttrFormatter.java168
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSFormatUtil.java165
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatter.java48
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceFormatterFactory.java81
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CSSSourceGenerator.java61
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CharsetRuleFormatter.java184
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CompoundRegion.java58
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/CounterFormatter.java319
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DeclContainerFormatter.java129
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/DefaultCSSSourceFormatter.java108
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FontFaceRuleFormatter.java97
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FormatRegion.java71
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/FunctionFormatter.java184
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/ImportRuleFormatter.java339
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaListFormatter.java211
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/MediaRuleFormatter.java357
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PageRuleFormatter.java194
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/PrimitiveValueFormatter.java273
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RGBFormatter.java44
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/RectFormatter.java44
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclItemFormatter.java421
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleDeclarationFormatter.java325
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleRuleFormatter.java166
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/StyleSheetFormatter.java264
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/formatter/UnknownRuleFormatter.java86
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCategory.java16
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMCharsetRule.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMContainer.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMDescriptor.java20
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFontFaceRule.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMFunction.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMImportRule.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMKeyword.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMMediaRule.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNode.java51
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMNumber.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMPageRule.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMProperty.java22
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMSelector.java29
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMString.java17
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleRule.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMStyleSheet.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMMUnit.java18
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSMetaModel.java37
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfile.java31
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/CSSProfileRegistry.java106
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSFunctionID.java22
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSKeywordID.java261
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMMTypeCollector.java62
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMediaGroupID.java29
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMetaModelFinder.java59
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMetaModelTraverser.java92
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSMetaModelUtil.java120
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSNumberID.java23
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSProfileFinder.java104
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSPropertyID.java137
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSStringID.java22
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodel/util/CSSUnitID.java34
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMCategoryImpl.java75
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMCharsetRuleImpl.java45
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMContainerImpl.java63
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMDescriptorImpl.java75
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMFontFaceRuleImpl.java45
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMFunctionImpl.java96
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMImportRuleImpl.java44
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMKeywordImpl.java75
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMMediaRuleImpl.java41
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMNodeImpl.java148
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMNumberImpl.java52
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPageRuleImpl.java50
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPropertyImpl.java76
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPseudoClassImpl.java33
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMPseudoElementImpl.java42
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMSelectorExpressionImpl.java49
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMSelectorImpl.java81
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMStringImpl.java86
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMStyleRuleImpl.java50
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMStyleSheetImpl.java50
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMMUnitImpl.java108
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSMetaModelImpl.java95
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSProfileImpl.java263
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/CSSProfileTest.java73
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/MetaModelErrors.java30
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/NodePool.java171
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ProfileHandler.java302
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ProfileKeywords.java58
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ProfileLoader.java72
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/RegistryReader.java113
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/ValueCollector.java50
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/metamodelimpl/XMLReaderUtil.java38
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/modelhandler/CSSModelLoader.java54
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/modelhandler/ModelHandlerForCSS.java56
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSRegionUtil.java51
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSSourceParser.java255
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSStructuredDocumentRegionFactory.java27
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/CSSTokenizer.java1943
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/ICSSTokenizer.java37
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parser/regions/CSSTextRegionFactory.java35
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parserz/CSSRegionContexts.java80
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parserz/CSSTextParser.java101
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/parserz/CSSTextToken.java23
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceInitializer.java73
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/preferences/CSSCorePreferenceNames.java146
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/ICSSModelAdapter.java24
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IModelProvideAdapter.java35
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleDeclarationAdapter.java25
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleSelectorAdapter.java33
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleSheetAdapter.java41
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/adapters/IStyleSheetListAdapter.java41
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/contenttype/ContentTypeIdForCSS.java30
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSAccess.java26
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSAttr.java40
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSCharsetRule.java23
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSDocument.java94
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSImportRule.java34
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSMediaRule.java22
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSModel.java46
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSNamedNodeMap.java26
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSNode.java68
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSNodeList.java26
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSPageRule.java22
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSPrimitiveValue.java46
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSRuleContainer.java60
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelector.java62
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelectorCombinator.java29
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelectorItem.java32
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSelectorList.java62
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSSimpleSelector.java77
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleDeclItem.java73
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleDeclaration.java24
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleRule.java22
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSStyleSheet.java56
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSValue.java26
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICSSValueList.java35
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/ICounter.java49
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/IDOMImplementationCSS.java23
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/document/IDocumentStyle.java62
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/preferences/CSSPreferenceHelper.java229
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/provisional/text/ICSSPartitionTypes.java25
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/tasks/CSSFileTaskScanner.java36
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentReParser.java418
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/CSSStructuredDocumentRegionFactory.java39
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/StructuredDocumentWalker.java169
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/text/StructuredTextPartitionerForCSS.java60
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/AbstractCssTraverser.java181
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSClassTraverser.java114
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSLinkConverter.java188
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSPathService.java77
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSSelectorListFactory.java35
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSStyleDeclarationFactory.java61
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/CSSUtil.java335
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/ImportRuleCollector.java71
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/ImportedCollector.java61
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/RegionIterator.java140
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/SelectionCollector.java76
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/SelectorValidator.java97
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/SelectorsCollector.java101
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/URLHelper.java210
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/URLModelProviderCSS.java387
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BackgroundPositionXSubStyleAdapter.java142
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BackgroundPositionYSubStyleAdapter.java150
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BackgroundShorthandAdapter.java179
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderBottomShorthandAdapter.java140
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderColorShorthandAdapter.java158
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderLeftShorthandAdapter.java140
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderRightShorthandAdapter.java140
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderShorthandAdapter.java140
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderStyleShorthandAdapter.java130
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderTopShorthandAdapter.java140
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/BorderWidthShorthandAdapter.java130
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/CSSPropertyContext.java2997
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipBottomSubStyleAdapter.java53
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipLeftSubStyleAdapter.java53
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipRightSubStyleAdapter.java53
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipSubStyleAdapter.java132
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ClipTopSubStyleAdapter.java53
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/FontShorthandAdapter.java240
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ICSS2Properties.java127
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/IShorthandAdapter.java31
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ISubPropertyAdapter.java29
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ListStyleShorthandAdapter.java110
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/MarginShorthandAdapter.java129
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/PaddingShorthandAdapter.java129
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/internal/util/declaration/ValueData.java45
-rw-r--r--bundles/org.eclipse.wst.css.core/src/org/eclipse/wst/css/core/text/ICSSPartitions.java25
-rw-r--r--bundles/org.eclipse.wst.css.ui/.classpath34
-rw-r--r--bundles/org.eclipse.wst.css.ui/.cvsignore8
-rw-r--r--bundles/org.eclipse.wst.css.ui/.options1
-rw-r--r--bundles/org.eclipse.wst.css.ui/.project34
-rw-r--r--bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.jdt.core.prefs79
-rw-r--r--bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.css.ui/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.css.ui/META-INF/MANIFEST.MF53
-rw-r--r--bundles/org.eclipse.wst.css.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.css.ui/build.properties23
-rw-r--r--bundles/org.eclipse.wst.css.ui/csscolors/extended-color-mapping.xml150
-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/dtool16/newcss_wiz.gifbin231 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/etool16/newcss_wiz.gifbin356 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/aural_props.gifbin229 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/boxmodel_props.gifbin348 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/charset_rule.gifbin365 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/class_selector.gifbin338 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/colback_props.gifbin610 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/content_props.gifbin366 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyname.gifbin612 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_function.gifbin164 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_identifier.gifbin314 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/css_propertyvalue_unit.gifbin218 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/font_props.gifbin120 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/fontface_rule.gifbin347 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/id_selector.gifbin374 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_rule.gifbin363 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/link_selector.gifbin339 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/media_rule.gifbin592 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/other_props.gifbin600 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/page_rule.gifbin586 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/pagedmedia_props.gifbin597 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/pseudo.gifbin588 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/sort.gifbin162 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/style_rule.gifbin371 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/stylesheet.gifbin579 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/table_props.gifbin599 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/tag-template.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/tag_selector.gifbin346 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/text_props.gifbin601 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/ui_props.gifbin608 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/unknown_rule.gifbin365 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/obj16/visual_props.gifbin609 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/icons/full/wizban/newcssfile_wiz.pngbin4260 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.css.ui/plugin.properties85
-rw-r--r--bundles/org.eclipse.wst.css.ui/plugin.xml710
-rw-r--r--bundles/org.eclipse.wst.css.ui/schema/proposalInfo.exsd107
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/StructuredTextViewerConfigurationCSS.java183
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/ActionContributorCSS.java121
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIMessages.java141
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPlugin.java99
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/CSSUIPluginResources.properties130
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/Logger.java156
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/autoedit/StructuredAutoEditStrategyCSS.java611
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSCACandidate.java113
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSCompletionProposalComputer.java258
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSContentAssistContext.java467
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSContentAssistProcessor.java339
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalArranger.java202
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGenerator.java232
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForAtmarkRule.java294
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForDeclarationName.java169
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForDeclarationValue.java372
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForHTMLTag.java159
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSProposalGeneratorForPseudoSelector.java164
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSStructuredContentAssistProcessor.java41
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSTemplateCompletionProcessor.java72
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CSSTemplatesCompletionProposalComputer.java107
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/CompletionProposal.java188
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/HTML40Namespace.java890
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/IProposalInfo.java25
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentassist/ProposalInfoFactory.java66
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentoutline/CSSNodeAdapter.java641
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentoutline/JFaceNodeAdapterFactoryCSS.java37
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentoutline/RefreshStructureJob.java355
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentproperties/ContentSettingsRegistry.java40
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentproperties/ui/CSSContentSettingsPropertyPage.java106
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/contentproperties/ui/CSSWebContentSettingsPropertyPage.java156
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/edit/ui/CleanupActionCSSDelegate.java134
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/edit/ui/CleanupDialogCSS.java399
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/CSSEditorPluginImages.java54
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/CSSSelectionConverterFactory.java153
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/editor/IHelpContextIds.java49
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/CleanupDocumentHandler.java120
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/StructuredSelectEnclosingHandler.java54
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/StructuredSelectNextHandler.java65
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/handlers/StructuredSelectPreviousHandler.java60
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/hyperlink/CSSHyperlinkDetector.java244
-rwxr-xr-xbundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/hyperlink/WorkspaceFileHyperlink.java108
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/image/CSSImageHelper.java183
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/image/CSSImageType.java235
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/CSSCompletionProposalCategoriesConfiguration.java82
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/CSSUIPreferenceInitializer.java100
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/CSSUIPreferenceNames.java87
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSColorPage.java221
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSContentAssistPreferencePage.java158
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSFilesPreferencePage.java67
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSourcePreferencePage.java321
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSSyntaxColoringPage.java922
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/preferences/ui/CSSTemplatePreferencePage.java165
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/CSSFoldingStrategy.java88
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/projection/CSSRuleFoldingPosition.java61
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSPropertySource.java356
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/properties/CSSTextPropertyDescriptor.java112
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/registry/AdapterFactoryProviderCSS.java49
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructuredSelectEnclosingCSSActionDelegate.java64
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructuredSelectNextCSSActionDelegate.java81
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/selection/StructuredSelectPreviousCSSActionDelegate.java76
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/IStyleConstantsCSS.java40
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/LineStyleProviderForCSS.java228
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/style/LineStyleProviderForEmbeddedCSS.java135
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/templates/EncodingTemplateVariableResolverCSS.java38
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/templates/TemplateContextTypeCSS.java34
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/templates/TemplateContextTypeIdsCSS.java20
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/text/CSSCharacterPairInserter.java93
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/text/CSSDocumentRegionEdgeMatcher.java94
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/text/hover/CSSColorHover.java248
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/text/hover/CSSColorNames.java121
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/FacetModuleCoreSupport.java67
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/FacetModuleCoreSupportDelegate.java84
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSFileWizardPage.java252
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSTemplatesWizardPage.java521
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/internal/wizard/NewCSSWizard.java145
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSContentOutlineConfiguration.java127
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSContentSelectionProvider.java47
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/CSSQuickOutlineConfiguration.java41
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeContentProviderCSS.java176
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/JFaceNodeLabelProviderCSS.java115
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/contentoutline/SortAction.java55
-rw-r--r--bundles/org.eclipse.wst.css.ui/src/org/eclipse/wst/css/ui/views/properties/CSSPropertySheetConfiguration.java193
-rw-r--r--bundles/org.eclipse.wst.css.ui/templates/cssdefault-templates.properties12
-rw-r--r--bundles/org.eclipse.wst.css.ui/templates/cssdefault-templates.xml16
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.classpath11
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.cvsignore8
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.project34
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.core.prefs79
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.dtd.core/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.dtd.core/META-INF/MANIFEST.MF42
-rw-r--r--bundles/org.eclipse.wst.dtd.core/about.html34
-rw-r--r--bundles/org.eclipse.wst.dtd.core/build.properties27
-rw-r--r--bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMDocumentFactoryDTD.java44
-rw-r--r--bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/CMNodeImpl.java36
-rw-r--r--bundles/org.eclipse.wst.dtd.core/contentmodel/org/eclipse/wst/dtd/core/internal/contentmodel/DTDImpl.java782
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAnyContent.java26
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDAttribute.java240
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicType.java66
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDBasicTypeKind.java332
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDConstants.java21
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDContent.java63
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDDefaultKind.java194
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElement.java126
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementContent.java112
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDElementReferenceContent.java59
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEmptyContent.java26
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntity.java220
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityContent.java65
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEntityReferenceContent.java64
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumGroupKind.java139
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDEnumerationType.java101
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDErrorMessage.java49
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExtender.java19
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDExternalEntity.java151
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFactory.java186
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDFile.java157
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupContent.java88
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDGroupKind.java139
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDInternalEntity.java57
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDLexicalInfo.java99
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDNotation.java140
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDObject.java21
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDOccurrenceType.java193
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPCDataContent.java25
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDPackage.java2392
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDParameterEntityReference.java61
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDRepeatableContent.java65
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDResource.java45
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDSourceOffset.java45
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/DTDType.java31
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/XMLSchemaDefinedType.java471
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAnyContentImpl.java181
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDAttributeImpl.java980
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDBasicTypeImpl.java427
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDContentImpl.java189
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementContentImpl.java377
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementImpl.java654
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDElementReferenceContentImpl.java242
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEmptyContentImpl.java172
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityContentImpl.java193
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityImpl.java1198
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEntityReferenceContentImpl.java323
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDEnumerationTypeImpl.java362
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDExternalEntityImpl.java400
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFactoryImpl.java448
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDFileImpl.java821
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDGroupContentImpl.java292
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDIdHelper.java88
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDInternalEntityImpl.java239
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDNotationImpl.java904
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPCDataContentImpl.java171
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDPackageImpl.java1215
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDParameterEntityReferenceImpl.java610
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/impl/DTDRepeatableContentImpl.java265
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDAdapterFactory.java440
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDMetrics.java125
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDModelBuilder.java1844
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDObjectFinder.java173
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPathnameUtil.java352
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDPrinter.java525
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceFactoryImpl.java79
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDResourceImpl.java166
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDSwitch.java489
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUniqueNameHelper.java174
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDUtil.java1217
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/DTDVisitor.java315
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/org/eclipse/wst/dtd/core/internal/emf/util/ExternalDTDModel.java85
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/rose/DTD.cat3812
-rw-r--r--bundles/org.eclipse.wst.dtd.core/emfmodel/rose/dtdmodel.mdl7526
-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/DTDFile.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/any.gifbin136 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/attribute_list.gifbin366 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/comment.gifbin196 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/element_ref.gifbin585 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/emptycontent.gifbin156 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity.gifbin124 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/entity_reference.gifbin316 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_el.gifbin366 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_ent.gifbin339 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_not.gifbin341 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/fldr_unrec.gifbin382 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_attlist_obj.gifbin369 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/folder_comments_obj.gifbin358 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/genhtmform_wiz.gifbin3357 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/notation.gifbin177 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/one.gifbin141 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onechoice.gifbin145 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormore.gifbin145 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormorechoice.gifbin139 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/oneormoresequence.gifbin147 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/onesequence.gifbin91 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optional.gifbin149 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalchoice.gifbin140 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/optionalsequence.gifbin149 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/txtext.gifbin349 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/unrecognized_content.gifbin356 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormore.gifbin140 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormorechoice.gifbin135 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/icons/full/obj16/zeroormoresequence.gifbin146 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.core/plugin.properties21
-rw-r--r--bundles/org.eclipse.wst.dtd.core/plugin.xml141
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/AttNode.java95
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/Attlist.java146
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/BaseNode.java66
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMBasicNode.java42
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMGroupNode.java62
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNode.java30
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMNodeType.java30
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMReferenceNode.java38
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/CMRepeatableNode.java34
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTD.java89
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDParser.java768
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDSaxArtifactVisitor.java64
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DTDScanner.java1128
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/DeclNode.java103
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ElementDecl.java33
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityDecl.java242
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/EntityPool.java72
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ErrorMessage.java114
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/ExternalID.java154
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/NotationDecl.java77
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/StringParser.java485
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/TString.java350
-rw-r--r--bundles/org.eclipse.wst.dtd.core/saxparser/org/eclipse/wst/dtd/core/internal/saxparser/XMLCharacterProperties.java448
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationMessages.java30
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidationResources.properties16
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/DTDValidator.java489
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/ElementRefLocation.java86
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/DTDValidator.java50
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src-validation/org/eclipse/wst/dtd/core/internal/validation/eclipse/Validator.java38
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Attribute.java375
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeEnumList.java71
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/AttributeList.java117
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMBasicNode.java164
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMGroupNode.java428
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMNode.java135
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/CMRepeatableNode.java79
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Comment.java74
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCoreMessages.java91
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePlugin.java33
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDCorePluginResources.properties123
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDFile.java687
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDNode.java329
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/DTDResource.java56
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Element.java204
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Entity.java332
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ExternalNode.java250
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Logger.java143
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NamedTopLevelNode.java135
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/NodeList.java108
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Notation.java28
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/ParameterEntityReference.java111
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/TopLevelNode.java84
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/Unrecognized.java38
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/content/ContentDescriberForDTD.java206
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java273
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/AbstractResourceEncodingDetector.java261
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/ByteReader.java109
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentCharsetDetector.java61
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/DTDDocumentLoader.java74
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/encoding/NullMemento.java36
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/IDTDFileListener.java24
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/event/NodesEvent.java32
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/DTDModelLoader.java47
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/modelhandler/ModelHandlerForDTD.java46
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionFactory.java28
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionParser.java271
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/parser/DTDRegionTypes.java76
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceInitializer.java35
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/preferences/DTDCorePreferenceNames.java32
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/contenttype/ContentTypeIdForDTD.java47
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/document/DTDModel.java27
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/provisional/text/IDTDPartitionTypes.java24
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tasks/DTDFileTaskScanner.java28
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentReParser.java41
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/DTDStructuredDocumentRegionFactory.java33
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/RegionIterator.java84
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/text/StructuredTextPartitionerForDTD.java50
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/DTDTokenizer.java1090
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Token.java61
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Yytoken.java89
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtd.flex327
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/dtdskeleton317
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDBatchNodeDelete.java57
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDExternalReferenceRemover.java134
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDModelUpdater.java135
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDNotationReferenceRemover.java93
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDReferenceUpdater.java196
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDUniqueNameHelper.java95
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/DTDVisitor.java108
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/util/LabelValuePair.java30
-rw-r--r--bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/text/IDTDPartitions.java24
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.classpath12
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.cvsignore8
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.options1
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.project34
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.jdt.core.prefs79
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/META-INF/MANIFEST.MF40
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/build.properties26
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/DTDFile.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/browsebutton.gifbin825 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Attribute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_Element.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_ElementToConModel.gifbin336 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/ctool16/ADD_GroupToConModel.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Attribute.gifbin164 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_Element.gifbin225 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_ElementToConModel.gifbin320 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/ADD_GroupToConModel.gifbin114 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/dtool16/newdtd_wiz.gifbin234 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Attribute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_Element.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_ElementToConModel.gifbin336 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/ADD_GroupToConModel.gifbin205 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/generate_xml.gifbin604 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/etool16/newdtd_wiz.gifbin360 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Comment.gifbin196 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity.gifbin124 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Entity_Reference.gifbin318 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/ADD_Notation.gifbin177 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/DTDFile.gifbin351 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/any.gifbin136 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/attribute.gifbin167 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/attribute_list.gifbin366 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/comment.gifbin196 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/element.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/element_ref.gifbin585 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/emptycontent.gifbin156 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/entity.gifbin124 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/entity_reference.gifbin316 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_el.gifbin366 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_ent.gifbin339 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_not.gifbin341 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/fldr_unrec.gifbin382 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/folder_attlist_obj.gifbin369 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/folder_comments_obj.gifbin358 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/genhtmform_wiz.gifbin3357 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/newdtd_wiz.gifbin3294 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/notation.gifbin177 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/one.gifbin141 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/onechoice.gifbin145 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/oneormore.gifbin145 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/oneormorechoice.gifbin139 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/oneormoresequence.gifbin147 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/onesequence.gifbin91 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/optional.gifbin149 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/optionalchoice.gifbin140 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/optionalsequence.gifbin149 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/organize_dtd_logically.gifbin347 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/sort.gifbin162 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/txtext.gifbin349 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/unrecognized_content.gifbin356 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/validate.gifbin358 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/zeroormore.gifbin140 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/zeroormorechoice.gifbin135 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/obj16/zeroormoresequence.gifbin146 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/icons/full/wizban/newdtdfile_wiz.pngbin4194 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.dtd.ui/plugin.properties63
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/plugin.xml508
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDEditor.java105
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDPropertiesMessages.java101
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDPropertiesMessages.properties70
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/DTDTabbedPropertySheetPage.java49
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/AbstractSection.java334
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/AttributeDefaultSection.java152
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/CommentSection.java76
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelGroupSection.java95
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelNameFilter.java21
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelNameSection.java110
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelTypeFilter.java26
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/ContentModelTypeSection.java123
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDSectionLabelProvider.java141
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDSelectIncludeFileWizard.java79
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DTDTypeMapper.java24
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/DocumentSection.java101
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/EmptySection.java50
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/EntityTypeSection.java141
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/EntityValueSection.java185
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/NameSection.java96
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/NewEntitySection.java376
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/NotationSection.java131
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/OccurrenceFilter.java26
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/OccurrenceSection.java105
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src-properties/org/eclipse/wst/dtd/ui/internal/properties/section/TypeSection.java92
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/StructuredTextViewerConfigurationDTD.java70
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIMessages.java82
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPlugin.java124
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/DTDUIPluginResources.properties91
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/Logger.java143
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DTDDragAndDropManager.java46
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DragAttributeCommand.java61
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DragContentModelCommand.java113
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/dnd/DragTopLevelNodesCommand.java64
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/ActionContributorDTD.java77
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImageHelper.java157
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/DTDEditorPluginImages.java44
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/editor/IHelpContextIds.java43
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDColorPage.java171
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDEditorPreferencePage.java76
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDFilesPreferencePage.java150
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDSyntaxColoringPage.java877
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDTemplatePreferencePage.java167
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceInitializer.java79
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/preferences/DTDUIPreferenceNames.java39
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/projection/DTDFoldingStrategy.java70
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/registry/AdapterFactoryProviderForDTD.java53
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/style/IStyleConstantsDTD.java41
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/style/LineStyleProviderForDTD.java133
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/style/LineStyleProviderForDTDSubSet.java159
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/templates/TemplateContextTypeDTD.java36
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/templates/TemplateContextTypeIdsDTD.java17
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/text/DTDDocumentRegionEdgeMatcher.java28
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeAction.java56
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddAttributeListAction.java44
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddCommentAction.java32
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementAction.java33
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddElementToContentModelAction.java52
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddEntityAction.java35
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddGroupToContentModelAction.java39
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddNotationAction.java34
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/AddParameterEntityReferenceAction.java49
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/BaseAction.java67
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/DeleteAction.java70
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/contentoutline/actions/ReplaceEmptyContentModelWithGroupAction.java44
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/properties/DTDPropertySourceAdapter.java130
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/views/properties/DTDPropertySourceAdapterFactory.java42
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDTemplatesWizardPage.java513
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/internal/wizard/NewDTDWizard.java304
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineComparator.java37
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContentOutlineConfiguration.java287
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDContextMenuHelper.java268
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDLabelProvider.java98
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/DTDTreeContentProvider.java396
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/OrderAction.java57
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/src/org/eclipse/wst/dtd/ui/views/contentoutline/SortAction.java57
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/templates/dtddefault-templates.properties13
-rw-r--r--bundles/org.eclipse.wst.dtd.ui/templates/dtddefault-templates.xml16
-rw-r--r--bundles/org.eclipse.wst.html.core/.classpath12
-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/.project34
-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.prefs79
-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.MF42
-rw-r--r--bundles/org.eclipse.wst.html.core/about.html34
-rw-r--r--bundles/org.eclipse.wst.html.core/build.properties22
-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.properties17
-rw-r--r--bundles/org.eclipse.wst.html.core/plugin.xml237
-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.java67
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePlugin.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/HTMLCorePluginResources.properties47
-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.java91
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/ElementNodeCleanupHandler.java763
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/cleanup/HTMLCleanupHandlerFactory.java104
-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.java37
-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.java1695
-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.java230
-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/CtdDatalist.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdDetails.java50
-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/CtdFigure.java93
-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/CtdHeadingContainer.java55
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdHtml.java382
-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/CtdMediaElement.java58
-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.java72
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/CtdRuby.java94
-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.java889
-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/H5CMDocImpl.java84
-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/HTML5AttributeCollection.java1348
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTML5ElementCollection.java577
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HTMLAttrDeclImpl.java134
-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.java71
-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.java112
-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.java377
-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.java83
-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.java50
-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.java83
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedCANVAS.java51
-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/HedCOMMAND.java94
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedDATALIST.java47
-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/HedDETAILS.java38
-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.java60
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFIGCAPTION.java37
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedFIGURE.java48
-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.java89
-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/HedHEADER.java70
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedHGROUP.java50
-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.java77
-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.java55
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedIMG.java61
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedINPUT.java61
-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/HedKEYGEN.java38
-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.java61
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedLINK.java48
-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.java87
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMETA.java45
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMETER.java74
-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/HedMath.java58
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedMediaElement.java95
-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.java59
-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/HedOUTPUT.java39
-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.java45
-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/HedPROGRESS.java65
-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/HedRP.java59
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedRT.java60
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedRUBY.java47
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSCRIPT.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSELECT.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSOURCE.java86
-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.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSUMMARY.java32
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedSVG.java57
-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/HedSectioning.java36
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTABLE.java63
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTEXTAREA.java62
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/HedTIME.java67
-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/HedVIDEO.java65
-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/JCM20DocImpl.java26
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JCM21DocImpl.java20
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JCMDocImpl.java77
-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/JSP20ElementCollection.java495
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP20Namespace.java97
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP21ElementCollection.java39
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/JSP21Namespace.java17
-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.java900
-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/Tag20ElementCollection.java697
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/Tag21ElementCollection.java40
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/TagCM21DocImpl.java23
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contentmodel/TagCMDocImpl.java23
-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.java178
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/contenttype/HTMLHeadTokenizer.java3193
-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.java219
-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.java114
-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.java93
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/document/ElementStyleImpl.java69
-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.java266
-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.java20
-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.java172
-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.java365
-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.java94
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format/HTMLElementFormatter.java394
-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.java859
-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/HTMLFormattingUtil.java90
-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.java235
-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.java418
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/htmlcss/HTMLStyleSelectorAdapter.java140
-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.java273
-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.java455
-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.java451
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelhandler/EmbeddedHTML.java170
-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.java116
-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.java124
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/HTMLModelQueryImpl.java159
-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.java247
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/modelquery/XHTMLAssociationProvider.java209
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceInitializer.java133
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/preferences/HTMLCorePreferenceNames.java291
-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/HTML50Namespace.java180
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/provisional/HTMLCMProperties.java121
-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.java31
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/text/StructuredTextPartitionerForHTML.java318
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/AbstractErrorInfo.java49
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/CMUtil.java212
-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/ErrorInfoImpl.java128
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/ErrorState.java48
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/FMUtil.java120
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/HTMLAttributeValidator.java331
-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.java247
-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.java74
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/MessageFactory.java395
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/ModuleCoreSupport.java198
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/ModuleCoreSupportDelegate.java165
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validate/NamespaceValidator.java134
-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.java445
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validation/HTMLValidationReporter.java151
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validation/HTMLValidationResult.java64
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validation/HTMLValidator.java405
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validation/LocalizedMessage.java65
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validation/TaskListHelper.java44
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/validation/TaskListUtility.java436
-rw-r--r--bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/text/IHTMLPartitions.java36
-rw-r--r--bundles/org.eclipse.wst.html.ui/.classpath12
-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/.project34
-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.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.jdt.core.prefs79
-rw-r--r--bundles/org.eclipse.wst.html.ui/.settings/org.eclipse.jdt.ui.prefs4
-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.prefs16
-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.properties22
-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.pngbin3833 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.html.ui/plugin.properties84
-rw-r--r--bundles/org.eclipse.wst.html.ui/plugin.xml725
-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/HTMLSourceValidator.java213
-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/org/eclipse/wst/html/ui/StructuredTextViewerConfigurationHTML.java281
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/HTMLUIMessages.java212
-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.properties183
-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.java373
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/CustomTemplateProposal.java45
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLContentAssistProcessor.java511
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLMinimalContentModelGenerator.java136
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLStructuredContentAssistProcessor.java107
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTagsCompletionProposalComputer.java339
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplateCompletionProcessor.java161
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/contentassist/HTMLTemplatesCompletionProposalComputer.java146
-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.java115
-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.java76
-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.java412
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/correction/CorrectionAssistantProviderHTML.java54
-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.java333
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/edit/ui/CleanupDocumentHandler.java137
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/editor/HTMLEditorPluginImageHelper.java148
-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/handlers/HTMLFindOccurrencesHandler.java154
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/hyperlink/AnchorHyperlinkDetector.java525
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLCompletionProposalCategoriesConfiguration.java81
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceInitializer.java130
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/HTMLUIPreferenceNames.java178
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/EmptyFilePreferencePage.java100
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLColorPage.java127
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLContentAssistPreferencePage.java275
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLFilesPreferencePage.java114
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSourcePreferencePage.java518
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLSyntaxColoringPage.java895
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLTemplatePreferencePage.java157
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLTypingPreferencePage.java130
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/preferences/ui/HTMLValidationPreferencePage.java333
-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.java80
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/taginfo/HTMLInformationProvider.java65
-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/CharacterPairInserter.java118
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/text/HTMLDocumentRegionEdgeMatcher.java26
-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/FacetModuleCoreSupport.java84
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/FacetModuleCoreSupportDelegate.java107
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLFileWizardPage.java248
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLTemplatesWizardPage.java521
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/internal/wizard/NewHTMLWizard.java145
-rw-r--r--bundles/org.eclipse.wst.html.ui/src/org/eclipse/wst/html/ui/views/contentoutline/HTMLContentOutlineConfiguration.java48
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.properties54
-rw-r--r--bundles/org.eclipse.wst.html.ui/templates/htmldefault-templates.xml48
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/.classpath7
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/.options12
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/.project33
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/.settings/.api_filters30
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/.settings/org.eclipse.jdt.core.prefs96
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/.settings/org.eclipse.jdt.ui.prefs51
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/META-INF/MANIFEST.MF34
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/about.html28
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/build.properties20
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/component.xml25
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/plugin.properties23
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/plugin.xml137
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/schema/javascriptPreProcessor.exsd104
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/IncrementalBuilder.java47
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/JSPCorePluginResources.properties26
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/JSWebResourceEventManager.java257
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/JsCoreMessages.java48
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/JsCorePlugin.java220
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/Logger.java155
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/PathUtils.java146
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/modelhandler/IWebDocumentChangeListener.java29
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/modelhandler/IWebResourceChangedListener.java25
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/modelhandler/Messages.java41
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/modelhandler/WebResourceChangeHandler.java211
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/modelhandler/messages.properties11
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/ConvertJob.java86
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/FacetedProjectListener.java47
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsNatureInstaller.java58
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsNatureUninstaller.java60
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/JsWebNature.java288
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/Messages.java42
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/ModuleCoreSupport.java198
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/ModuleCoreSupportDelegate.java165
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/ModuleSourcePathProvider.java60
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/WebProjectJsGlobalScopeContainerInitializer.java237
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/project/messages.properties19
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/provisional/contenttype/ContentTypeIdForEmbededJs.java35
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/provisional/contenttype/IContentDescriptionForJSP.java29
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/validation/JsValidator.java411
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/internal/validation/Util.java57
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/CompilationUnitHelper.java71
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/DocumentChangeListenerToTextEdit.java77
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/HTML40Namespace.java679
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/IJsTranslation.java167
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/IJsTranslator.java100
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsDataTypes.java47
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsNameManglerUtil.java135
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsProblemRequestor.java86
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslation.java593
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslationAdapter.java173
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslationAdapterFactory.java89
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/JsTranslator.java848
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/Messages.java46
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/NodeHelper.java245
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/Util.java54
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/WebRootFinder.java57
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/messages.properties15
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/IndexWorkspaceJob.java168
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/JSDTSearchDocumentDelegate.java84
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/JsIndexManager.java772
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/JsPathIndexer.java119
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/JsSearchDocument.java261
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/JsSearchParticipant.java117
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/JsSearchScope.java124
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/JsSearchSupport.java594
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/javascript/search/NullSearchDocument.java49
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.core/src/org/eclipse/wst/jsdt/web/core/text/IJsPartitions.java26
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/.classpath7
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/.cvsignore4
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/.project33
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/META-INF/MANIFEST.MF25
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/about.html28
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/build.properties17
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/plugin.properties14
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/plugin.xml74
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/src/org/eclipse/wst/jsdt/web/support/jsp/Activator.java70
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.support.jsp/src/org/eclipse/wst/jsdt/web/support/jsp/JSDTStructuredTextViewerConfigurationJSP.java76
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/.classpath7
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/.project33
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/.settings/org.eclipse.jdt.core.prefs96
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/.settings/org.eclipse.jdt.ui.prefs51
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/.settings/org.eclipse.pde.prefs28
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/META-INF/MANIFEST.MF54
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/about.html28
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/build.properties17
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/icons/eye_icon.gifbin1037 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/icons/full/elcl16/javaassist_co.gifbin344 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/plugin.properties73
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/plugin.xml791
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/Messages.java46
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/SetupProjectsWizzard.java219
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/StructuredTextViewerConfigurationJSDT.java57
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/WebProjectJsGlobalScopeUIInitializer.java38
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/AddJavaDocStubAction.java100
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/AddJavaDocStubOperation.java110
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/FindReferencesAction.java60
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/FindReferencesInWorkingSetAction.java61
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/JsElementActionProxy.java77
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/Messages.java45
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/OpenCallHierarchyAction.java50
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/OpenTypeHierarchy.java43
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/ShowHistoryAction.java94
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/ShowInNavigatorAction.java94
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/ShowInScriptExplorerAction.java120
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/SimpleJSDTActionProxy.java199
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/SourceActionsAction.java61
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/StandardEditorActionsAction.java233
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/actions/messages.properties28
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/contentassist/JSDTAutoActivationDelegate.java88
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/IActionConstantsJs.java25
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/IActionDefinitionIdsJs.java28
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/JSPUIPluginResources.properties87
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/JsUIMessages.java110
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/JsUIPlugin.java115
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/Logger.java156
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/autoedit/AutoEditStrategyForJs.java84
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/autoedit/AutoEditStrategyForTabs.java187
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/JSDTCompletionProposal.java116
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/JSDTContentAssistant.java165
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/JSDTContentAssistantProcessor.java244
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/JSDTContetAssistInvocationContext.java83
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/JSDTHtmlCompletionProcessor.java105
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/JSDTProposalCollector.java148
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/JSDTTemplateAssistProcessor.java65
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/Messages.java42
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/contentassist/messages.properties14
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/derived/SingleCharReader.java70
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/editor/ActionContributorJSP.java81
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/editor/IHelpContextIds.java45
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/format/FormattingStrategyJSDT.java339
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/hyperlink/ExternalFileEditorInput.java174
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/hyperlink/ExternalFileHyperlink.java79
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/hyperlink/JSDTHyperlink.java81
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/hyperlink/JSDTHyperlinkDetector.java263
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/hyperlink/WorkspaceFileHyperlink.java87
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/hyperlink/XMLHyperlinkDetector.java502
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java347
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPJavaSelectionProvider.java64
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPMethodRenameChange.java74
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPMethodRenameParticipant.java104
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPMethodRenameRequestor.java54
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPMoveElementActionDelegate.java121
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPPackageRenameChange.java74
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPPackageRenameParticipant.java84
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPPackageRenameRequestor.java47
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPRenameElementActionDelegate.java112
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPTypeMoveChange.java72
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPTypeMoveParticipant.java94
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPTypeMoveRequestor.java70
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPTypeRenameChange.java74
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPTypeRenameParticipant.java95
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/refactoring/JSPTypeRenameRequestor.java73
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/search/BasicJsSearchRequestor.java148
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/search/JsFindOccurrencesActionDelegate.java47
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/search/JsFindOccurrencesProcessor.java89
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/search/JsOccurrencesSearchResult.java35
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/search/JsSearchQuery.java121
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/search/JsSearchRequestor.java81
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/search/JsSingleFileSearchRequestor.java38
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/search/ui/JsMatchPresentation.java52
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/java/search/ui/JsQueryParticipant.java90
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/registry/AdapterFactoryProviderForJSDT.java70
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/style/IStyleConstantsJs.java22
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/style/java/IStyleConstantsJSDT.java27
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/style/java/JSDTCodeScanner.java216
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/style/java/JavaWordDetector.java35
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/style/java/LineStyleProviderForJSDT.java387
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/taginfo/HTMLPrinter.java203
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/taginfo/JSDTHoverProcessor.java167
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/taginfo/JsWordFinder.java71
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/text/JsCharacterPairInserter.java293
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/text/JsCodeReader.java225
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/text/JsDocumentRegionEdgeMatcher.java34
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/internal/text/JsPairMatcher.java185
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/messages.properties11
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/rino.jpgbin525 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/contentoutline/IJavaWebNode.java34
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/contentoutline/JFaceNodeAdapterFactoryForJSDT.java55
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/contentoutline/JFaceNodeAdapterForJs.java395
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/contentoutline/JsJfaceNode.java280
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/contentoutline/Messages.java46
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/contentoutline/messages.properties11
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/provisional/contentoutline/JFaceNodeAdapterForJs.java183
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/provisional/contentoutline/JsContentOutlineConfig.java64
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/provisional/contentoutline/JsLabelProvider.java49
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/provisional/contentoutline/JsMenuListener.java160
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/provisional/contentoutline/JsWebElementProvider.java25
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/views/provisional/contentoutline/XMLLabelProvider.java115
-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/web1.GIFbin2407 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.jsdt.web.ui/src/org/eclipse/wst/jsdt/web/ui/web1.JPGbin1028 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.sse.core/.classpath14
-rw-r--r--bundles/org.eclipse.wst.sse.core/.cvsignore9
-rw-r--r--bundles/org.eclipse.wst.sse.core/.options19
-rw-r--r--bundles/org.eclipse.wst.sse.core/.project34
-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.core.runtime.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.prefs4
-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.prefs16
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.jFlex279
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/CSSHeadTokenizer/CSSHeadTokenizer.java1441
-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.jFlex313
-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/HTMLHeadTokenizer/skeleton268
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/HTMLHeadTokenizer/skeleton.readme6
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XML10Names/XML10Names.jFlex98
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/HeadParsers/XML10Names/XML10Names.java595
-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.jflex522
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/CSSTokenizer/devel/flex.cmd6
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/README9
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/JSPTokenizer.java3838
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/JSPTokenizer.jflex2859
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/XMLTokenizer.java1937
-rw-r--r--bundles/org.eclipse.wst.sse.core/DevTimeSupport/SedModel/HTMLTokenizer/devel/XMLTokenizer.jflex1332
-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/DevTimeSupport/devTimeSupportInfo.txt15
-rw-r--r--bundles/org.eclipse.wst.sse.core/META-INF/MANIFEST.MF54
-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.properties34
-rw-r--r--bundles/org.eclipse.wst.sse.core/config/charset.properties100
-rw-r--r--bundles/org.eclipse.wst.sse.core/config/defaultIANA.properties26
-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.xml59
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/adaptOnCreateFactory.exsd93
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/commentElementHandler.exsd112
-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.exsd108
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/modelHandler.exsd114
-rw-r--r--bundles/org.eclipse.wst.sse.core/schema/taskscanner.exsd104
-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.java690
-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.java259
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CodedReaderCreator.java542
-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.java290
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-encoding/org/eclipse/wst/sse/core/internal/encoding/CommonEncodingPreferenceNames.java81
-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.java247
-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.java36
-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.java84
-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.java179
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/StructuredFileTaskScanner.java329
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/TaskScanningJob.java251
-rw-r--r--bundles/org.eclipse.wst.sse.core/src-tasktags/org/eclipse/wst/sse/core/internal/tasks/TaskScanningScheduler.java141
-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.java467
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/StructuredModelManager.java82
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/indexing/AbstractIndexManager.java1990
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/FileBufferModelManager.java838
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/IExecutionDelegate.java27
-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.java219
-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.java50
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePlugin.java107
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/SSECorePluginResources.properties32
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/cleanup/AbstractStructuredCleanupProcessor.java464
-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.java82
-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.java524
-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.java80
-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.java47
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/ltk/parser/BlockMarker.java103
-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.java545
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/model/AbstractStructuredModel.java1517
-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.java2165
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/model/PrefUtil.java146
-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.java311
-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.java81
-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/propertytester/StructuredFilePropertyTester.java85
-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.java554
-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.java419
-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.java73
-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.java84
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/exceptions/ResourceAlreadyExists.java44
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/provisional/exceptions/ResourceInUse.java43
-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.java24
-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.java2979
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/text/BasicStructuredDocumentRegion.java622
-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.java409
-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.java249
-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.java1700
-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.java236
-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.java655
-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.java650
-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/AbstractMemoryListener.java205
-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.java208
-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.java394
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/PathHelper.java152
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/ProjectResolver.java259
-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.java54
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/util/Sorter.java79
-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.java140
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/validate/ErrorInfo.java26
-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.java70
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/validate/ValidationReporter.java28
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/internal/validate/ValidatorGroupListener.java83
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/text/IStructuredPartitions.java24
-rw-r--r--bundles/org.eclipse.wst.sse.core/src/org/eclipse/wst/sse/core/utils/StringUtils.java751
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.classpath14
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.cvsignore8
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.options73
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.project33
-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.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.sse.ui/.settings/org.eclipse.jdt.core.prefs91
-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.prefs25
-rw-r--r--bundles/org.eclipse.wst.sse.ui/META-INF/MANIFEST.MF70
-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/filter_ps.gifbin219 -> 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.properties122
-rw-r--r--bundles/org.eclipse.wst.sse.ui/plugin.xml877
-rw-r--r--bundles/org.eclipse.wst.sse.ui/reexport-info.txt4
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/characterPairing.exsd131
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/commentingStrategy.exsd260
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/completionProposal.exsd292
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/completionProposalCategoriesConfiguration.exsd126
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/editorconfiguration.exsd341
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/org.eclipse.wst.sse.ui.breakpoint.exsd148
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/org.eclipse.wst.sse.ui.sourcevalidation.exsd191
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/outlineFilters.exsd136
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/quickFixProcessor.exsd135
-rw-r--r--bundles/org.eclipse.wst.sse.ui/schema/semanticHighlighting.exsd125
-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.java158
-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.java25
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-extensions/org/eclipse/wst/sse/ui/internal/provisional/extensions/breakpoint/IBreakpointProvider.java63
-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.java377
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/MainTab.java453
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src-tasktags/org/eclipse/wst/sse/ui/internal/preferences/ui/PropertyPreferencePage.java305
-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.java157
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/EncodingSupport.java139
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/FoldingActionGroup.java184
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/IContentSelectionProvider.java13
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/ISemanticHighlighting.java86
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/ISemanticHighlightingExtension.java39
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/ISemanticHighlightingExtension2.java27
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredSourceViewerDecorationSupport.java46
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextEditor.java3698
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextInvocationContext.java53
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextMultiPassContentFormatter.java123
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/StructuredTextViewerConfiguration.java719
-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/TextHoverInformationProvider.java43
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/AutoActivationDelegate.java24
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/CompletionProposalInvocationContext.java131
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/ICompletionProposalComputer.java72
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/contentassist/StructuredContentAssistProcessor.java943
-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.java280
-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.java213
-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.java378
-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/IStructuredTextEditorActionConstants.java21
-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.java180
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/PreferenceInitializer.java87
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ReadOnlyAwareDropTargetAdapter.java52
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIMessages.java475
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPlugin.java99
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/SSEUIPluginResources.properties450
-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.java764
-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.java129
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/StructuredResourceMarkerAnnotationModel.java118
-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.java81
-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.java971
-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.java667
-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.java400
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ActionDefinitionIds.java58
-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.java248
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/ResourceActionDelegate.java104
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/actions/StructuredTextEditorActionConstants.java48
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/comment/BlockCommentingStrategy.java138
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/comment/CommentingStrategy.java355
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/comment/CommentingStrategyRegistry.java351
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/comment/LineCommentingStrategy.java83
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalCategory.java374
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalComputerDescriptor.java648
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalComputerRegistry.java559
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposalContentTypeContext.java147
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompletionProposoalCatigoriesConfigurationRegistry.java175
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CompoundContentAssistProcessor.java570
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/ContentAssistUtils.java146
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/ContextInformationValidator.java90
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/CustomCompletionProposal.java334
-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/OptionalMessageDialog.java145
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentassist/StructuredContentAssistant.java124
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/ConfigurableContentOutlinePage.java762
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/contentoutline/IJFaceNodeAdapter.java57
-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/AnnotationQuery.java175
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/AnnotationQueryResult.java87
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/CompoundQuickAssistProcessor.java211
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/ContributedProcessorDescriptor.java39
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/CorrectionAssistantProvider.java34
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/IQuickAssistProcessor.java34
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/IQuickFixProcessor.java34
-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/QuickFixRegistry.java137
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/QuickFixRegistryReader.java93
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/SourceValidationQuickAssistProcessor.java118
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/correction/StructuredCorrectionProcessor.java161
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/debug/BreakpointRulerAction.java318
-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.java227
-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.java343
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/derived/HTMLTextPresenter.java205
-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.java80
-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/SelectionConvertor.java62
-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.java149
-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.java771
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/extension/IExtendedEditorActionProxyForDelayLoading.java25
-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/filter/OutlineCustomFiltersDialog.java417
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/filter/OutlineFilterDescriptor.java277
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/filter/OutlineFilterMessages.java38
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/filter/OutlineFilterMessages.properties24
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/filter/OutlineNamePatternFilter.java85
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/filter/StringMatcher.java384
-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/handlers/AbstractCommentHandler.java96
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/AbstractStructuredSelectHandler.java106
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/AddBlockCommentHandler.java80
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/CustomFilterHandler.java32
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FindOccurrencesHandler.java140
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/FormatHandler.java326
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/RemoveBlockCommentHandler.java84
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/StructuredSelectHistoryHandler.java51
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/handlers/ToggleLineCommentHandler.java287
-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.java81
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/openon/AbstractOpenOn.java271
-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.java156
-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.java282
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractPreferencePage.java296
-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/AbstractSyntaxColoringPage.java170
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/AbstractValidationSettingsPage.java421
-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.java230
-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/ScrolledPageContent.java49
-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.java461
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/preferences/ui/StyledTextColorPicker.java905
-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/AbstractStructuredCommentFoldingPosition.java130
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredFoldingPosition.java82
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/projection/AbstractStructuredFoldingStrategy.java522
-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.java207
-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.java69
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/propertytester/CustomFilterPropertyTester.java32
-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.java405
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/CompatibleHighlighter.java128
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/Highlighter.java904
-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.java59
-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/provisional/style/ReconcilerHighlighter.java157
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/provisional/style/StructuredPresentationReconciler.java934
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/quickoutline/QuickOutlineHandler.java42
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/quickoutline/QuickOutlinePopupDialog.java435
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/quickoutline/StringPatternFilter.java70
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/AbstractStructuredTextReconcilingStrategy.java543
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/DirtyRegionProcessor.java847
-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.java442
-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.java310
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/StructuredTextReconcilingStrategy.java75
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/reconcile/TemporaryAnnotation.java258
-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.java398
-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.java363
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/rules/PresentationCollector.java86
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/rules/StructuredDocumentDamagerRepairer.java56
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchLabelProvider.java154
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchMatchElement.java116
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/BasicSearchQuery.java207
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/FindOccurrencesActionDelegate.java168
-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.java83
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchQuery.java172
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchResult.java156
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/search/OccurrencesSearchViewPage.java127
-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/ISpellcheckDelegate.java32
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/SpellcheckStrategy.java415
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/spelling/SpellingQuickAssistProcessor.java52
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingManager.java771
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingPresenter.java1072
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingReconciler.java295
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/AbstractHoverProcessor.java44
-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.java184
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/DebugInfoHoverProcessor.java94
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/taginfo/ProblemAnnotationHoverProcessor.java52
-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.java159
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/text/SourceInfoProvider.java42
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/text/WordFinder.java53
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/ui/OffsetStatusLineContributionItem.java1235
-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/PixelConverter.java29
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/util/PlatformStatusLineUtil.java238
-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/SWTUtil.java156
-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/preferences/AbstractCompletionProposalCategoriesConfiguration.java392
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/CodeAssistCyclingConfigurationBlock.java891
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationReader.java82
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/preferences/ICompletionProposalCategoriesConfigurationWriter.java119
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/quickoutline/AbstractQuickOutlineConfiguration.java47
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/reconcile/ISourceReconcilingListener.java44
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/typing/AbstractCharacterPairInserter.java148
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/ContentOutlineConfiguration.java338
-rw-r--r--bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/views/contentoutline/ContentOutlineFilterProcessor.java318
-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.standard.schemas/.cvsignore2
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/.project22
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/.settings/org.eclipse.pde.prefs12
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/META-INF/MANIFEST.MF9
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/about.html136
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/about_files/copyright-software-19980720.htm82
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/about_files/copyright-software-19980720_files/base.css69
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/about_files/wsdl-schema-files-license.txt29
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/build.properties26
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/HTMLlat1.ent194
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/HTMLspecial.ent77
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/HTMLsymbol.ent241
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/frameset.dtd37
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/loose.dtd1093
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/strict.dtd870
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/wml11.dtd355
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/wml13.dtd4
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/xhtml-basic10-f.dtd3086
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/xhtml-lat1.ent196
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/xhtml-mobile10-flat.dtd3216
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/xhtml-special.ent79
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/xhtml-symbol.ent242
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/xhtml1-frameset.dtd1225
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/xhtml1-strict.dtd988
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/xhtml1-transitional.dtd1196
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/dtds/xhtml11-flat.dtd4513
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/plugin.properties20
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/plugin.xml222
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/xsd/http.xsd81
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/xsd/soap.xsd159
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/xsd/soapenc.xsd585
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/xsd/soapenv.xsd117
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/xsd/wsdl-mime.xsd70
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/xsd/wsdl.xsd322
-rw-r--r--bundles/org.eclipse.wst.standard.schemas/xsd/xmlcatalog11.xsd266
-rw-r--r--bundles/org.eclipse.wst.xml.core/.classpath43
-rw-r--r--bundles/org.eclipse.wst.xml.core/.cvsignore8
-rw-r--r--bundles/org.eclipse.wst.xml.core/.options6
-rw-r--r--bundles/org.eclipse.wst.xml.core/.project34
-rw-r--r--bundles/org.eclipse.wst.xml.core/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.xml.core/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.xml.core/.settings/org.eclipse.jdt.core.prefs79
-rw-r--r--bundles/org.eclipse.wst.xml.core/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--bundles/org.eclipse.wst.xml.core/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.xml.core/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.xml.core/DevTimeSupport/HeadParsers/XML10Names.jFlex100
-rw-r--r--bundles/org.eclipse.wst.xml.core/DevTimeSupport/HeadParsers/XMLHeadTokenizer.jFlex254
-rw-r--r--bundles/org.eclipse.wst.xml.core/DevTimeSupport/buildNames.xml32
-rw-r--r--bundles/org.eclipse.wst.xml.core/DevTimeSupport/buildParser.xml32
-rw-r--r--bundles/org.eclipse.wst.xml.core/META-INF/MANIFEST.MF327
-rw-r--r--bundles/org.eclipse.wst.xml.core/README.txt1
-rw-r--r--bundles/org.eclipse.wst.xml.core/about.html34
-rw-r--r--bundles/org.eclipse.wst.xml.core/build.properties33
-rw-r--r--bundles/org.eclipse.wst.xml.core/plugin.properties28
-rw-r--r--bundles/org.eclipse.wst.xml.core/plugin.xml209
-rw-r--r--bundles/org.eclipse.wst.xml.core/schema/annotationFiles.exsd113
-rw-r--r--bundles/org.eclipse.wst.xml.core/schema/catalogContributions.exsd283
-rw-r--r--bundles/org.eclipse.wst.xml.core/schema/documentFactories.exsd116
-rw-r--r--bundles/org.eclipse.wst.xml.core/schema/errorCustomizer.exsd123
-rw-r--r--bundles/org.eclipse.wst.xml.core/schema/externalSchemaLocations.exsd102
-rw-r--r--bundles/org.eclipse.wst.xml.core/schema/modelQueryExtensions.exsd102
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/Catalog.java795
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogContributorRegistryReader.java269
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogElement.java174
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogEntry.java73
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogEvent.java47
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogReader.java321
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogSet.java69
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/CatalogWriter.java367
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/DelegateCatalog.java68
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/NextCatalog.java59
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/OASISCatalogConstants.java96
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/RewriteEntry.java54
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/SuffixEntry.java54
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/TypedCatalogElement.java41
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/XMLCatalogURIResolverExtension.java102
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/ICatalog.java255
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/ICatalogElement.java97
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/ICatalogEntry.java71
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/ICatalogEvent.java54
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/ICatalogListener.java34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/IDelegateCatalog.java72
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/INextCatalog.java53
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/IRewriteEntry.java64
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-catalog/org/eclipse/wst/xml/core/internal/catalog/provisional/ISuffixEntry.java64
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/contentmodel/modelquery/IExternalSchemaLocationProvider.java34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMAnyElement.java24
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMAttributeDeclaration.java52
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMContent.java32
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMDataType.java79
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMDocument.java38
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMDocumentation.java22
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMElementDeclaration.java68
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMEntityDeclaration.java30
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMGroup.java39
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMNamedNodeMap.java41
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMNamespace.java30
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMNode.java61
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/CMNodeList.java31
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/ContentModelManager.java80
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/annotation/Annotation.java53
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/annotation/AnnotationMap.java101
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMAnyElementImpl.java51
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMAttributeDeclarationImpl.java123
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMContentImpl.java46
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMDataTypeImpl.java73
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMDocumentImpl.java88
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMElementDeclarationImpl.java121
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMEntityDeclarationImpl.java47
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMGroupImpl.java43
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMNamedNodeMapImpl.java100
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMNodeImpl.java46
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/basic/CMNodeListImpl.java77
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactory.java22
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryDescriptor.java44
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryRegistry.java53
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/factory/CMDocumentFactoryRegistryReader.java78
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationFileInfo.java44
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationFileParser.java207
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationFileRegistry.java52
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationFileRegistryReader.java77
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/AnnotationUtility.java44
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/annotation/ResourceBundleHelper.java57
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/modelqueryimpl/InferredGrammarFactory.java156
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/modelqueryimpl/ModelQueryExtensionDescriptor.java65
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/modelqueryimpl/ModelQueryExtensionManagerImpl.java125
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/modelqueryimpl/ModelQueryExtensionRegistry.java102
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/CMDataTypeValueHelper.java161
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/CMValidator.java1250
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/internal/util/DOMValidator.java424
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/CMDocumentManager.java141
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/CMDocumentManagerListener.java23
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/CMDocumentReference.java20
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/CMDocumentReferenceProvider.java27
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/IExternalSchemaLocationProvider.java34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/ModelQuery.java195
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/ModelQueryAction.java36
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/ModelQueryAssociationProvider.java35
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/ModelQueryCMProvider.java30
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/extension/ModelQueryExtension.java61
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelquery/extension/ModelQueryExtensionManager.java30
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/BaseAssociationProvider.java88
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentLoader.java278
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentManagerImpl.java318
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/CMDocumentReferenceImpl.java42
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/ExternalSchemaLocationProviderRegistry.java56
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/GlobalCMDocumentCache.java121
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/InferredGrammarBuildingCMDocumentLoader.java189
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/ModelQueryActionHelper.java574
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/ModelQueryImpl.java846
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/SimpleAssociationProvider.java49
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/modelqueryimpl/XMLAssociationProvider.java502
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMDescriptionBuilder.java140
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMDocumentCache.java203
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMDocumentCacheListener.java33
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/CMVisitor.java135
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/ContentBuilder.java171
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMContentBuilder.java53
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMContentBuilderImpl.java636
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMNamespaceHelper.java198
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMNamespaceInfoManager.java225
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMVisitor.java133
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/DOMWriter.java414
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/InferredGrammarFactory.java30
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/NamespaceAttributeVisitor.java110
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/NamespaceInfo.java83
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-contentmodel/org/eclipse/wst/xml/core/internal/contentmodel/util/NamespaceTable.java257
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSEAdapter.java494
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSERenderer.java656
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-emfModelSynch/org/eclipse/wst/xml/core/internal/emf2xml/EMF2DOMSSERendererFactory.java32
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/ComponentSearchContributor.java73
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/TargetNamespaceReferencePattern.java30
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLComponentDeclarationPattern.java34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLComponentReferencePattern.java37
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLComponentSearchPattern.java96
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLSearchParticipant.java387
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/XMLSearchPattern.java176
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/IXMLSearchConstants.java20
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/Messages.java73
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/XMLSearchDocument.java105
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/impl/messages.properties10
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/matching/PatternMatcher.java79
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/matching/SAXSearchElement.java78
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/matching/XMLSearchPatternMatcher.java205
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/quickscan/XMLQuickScan.java117
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-search/org/eclipse/wst/xml/core/internal/search/quickscan/XMLQuickScanContentHandler.java212
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/AnnotationMsg.java41
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/MarkupValidator.java929
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/ProblemIDsXML.java31
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/ValidatorHelper.java371
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLNestedValidatorContext.java55
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationConfiguration.java127
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationInfo.java199
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationMessages.java37
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidationReport.java44
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/XMLValidator.java930
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/AbstractNestedValidator.java550
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/Helper.java259
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/LazyURLInputStream.java161
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/NestedValidatorContext.java33
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationInfo.java287
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationMessage.java202
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/ValidationReport.java45
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/logging/CommandLineLogger.java32
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/logging/EclipseLogger.java34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/logging/ILogger.java35
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/core/logging/LoggerFactory.java102
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/eclipse/ErrorCustomizationPluginRegistryReader.java81
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/eclipse/Validator.java173
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/eclipse/XMLMessageInfoHelper.java119
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/eclipse/XMLValidator.java49
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ElementInformation.java72
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationManager.java110
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorCustomizationRegistry.java97
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/ErrorMessageCustomizerDelegate.java72
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/errorcustomization/IErrorMessageCustomizer.java34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src-validation/org/eclipse/wst/xml/core/internal/validation/xmlvalidation.properties34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/.cvsignore1
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/DebugAdapterFactory.java77
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/EveryNodeDebugAdapter.java284
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/IDebugAdapter.java19
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/Logger.java157
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCoreMessages.java63
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePlugin.java86
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/XMLCorePluginResources.properties47
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/CleanupProcessorXML.java128
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/ElementNodeCleanupHandler.java557
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/NodeCleanupHandler.java63
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/cleanup/XMLCleanupPreferencesImpl.java142
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/commentelement/CommentElementAdapter.java103
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/commentelement/CommentElementHandler.java107
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/commentelement/impl/BasicCommentElementHandler.java135
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/commentelement/impl/CommentElementConfiguration.java237
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/commentelement/impl/CommentElementRegistry.java84
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/commentelement/util/CommentElementFactory.java65
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/commentelement/util/TagScanner.java196
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/AbstractResourceEncodingDetector.java258
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/ByteReader.java108
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/ContentDescriberForXML.java264
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/EncodingParserConstants.java30
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/HeadParserToken.java44
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/IntStack.java114
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/NullMemento.java37
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLDeclDetector.java156
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLHeadTokenizer.java1451
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLHeadTokenizerConstants.java21
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/contenttype/XMLResourceEncodingDetector.java142
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/AttrImpl.java780
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CDATASectionImpl.java148
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CMNodeUtil.java42
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CharOperation.java91
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CharacterDataImpl.java356
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CharacterStringPool.java100
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/CommentImpl.java204
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DOMMessages.java43
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DOMMessages.properties17
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DOMModelImpl.java981
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentFragmentImpl.java81
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentImpl.java1208
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeAdapter.java51
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeAdapterImpl.java119
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/DocumentTypeImpl.java228
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ElementImpl.java1540
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/EntityImpl.java247
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/EntityReferenceImpl.java95
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/InvalidCharacterException.java67
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/JSPTag.java34
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ModelParserAdapter.java57
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeContainer.java534
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeImpl.java1171
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeIteratorImpl.java257
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NodeListImpl.java157
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/NotationImpl.java144
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ProcessingInstructionImpl.java233
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/RangeImpl.java630
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/ReadOnlyController.java343
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/SourceValidator.java388
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionChecker.java143
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionContainer.java435
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionManagementException.java33
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionProxy.java369
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/StructuredDocumentRegionUtil.java178
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TagAdapter.java35
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/TextImpl.java1192
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/UserData.java56
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLGeneratorImpl.java735
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelContext.java237
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelNotifier.java139
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelNotifierImpl.java496
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelParser.java2422
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/document/XMLModelUpdater.java1704
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/encoding/XMLDocumentCharsetDetector.java37
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/encoding/XMLDocumentLoader.java82
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/formatter/DefaultXMLPartitionFormatter.java1713
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/formatter/XMLFormatterFormatProcessor.java146
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/formatter/XMLFormattingConstraints.java94
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/formatter/XMLFormattingPreferences.java179
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelhandler/EmbeddedXML.java95
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelhandler/ModelHandlerForXML.java59
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelhandler/XMLModelLoader.java93
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryAdapterFactoryForEmbeddedXML.java50
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryAdapterFactoryForXML.java253
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/ModelQueryUtil.java64
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/XMLCatalogIdResolver.java102
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/XMLModelQueryAssociationProvider.java60
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/modelquery/XMLModelQueryImpl.java38
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/BlockStructuredDocumentRegion.java46
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/ContextRegionContainer.java327
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/IntStack.java112
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/RegionFactory.java49
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XML10Names.java595
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLSourceParser.java645
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLStructuredDocumentReParser.java124
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLStructuredRegionFactory.java42
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/XMLTokenizer.java1913
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/AttributeEqualsRegion.java92
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/AttributeNameRegion.java165
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/AttributeValueRegion.java162
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/EmptyTagCloseRegion.java90
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/EndTagOpenRegion.java101
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/GenericTemplateRegion.java102
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/RegionToStringUtil.java29
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/RegionUpdateRule.java209
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/TagCloseRegion.java89
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/TagNameRegion.java93
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/TagOpenRegion.java98
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/WhiteSpaceOnlyRegion.java188
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/XMLCDataTextRegion.java175
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/XMLContentRegion.java175
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/XMLHeadParserFactory.java25
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/XMLHeadParserRegion.java107
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/parser/regions/XMLParserRegionFactory.java103
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceInitializer.java82
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/preferences/XMLCorePreferenceNames.java298
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/propagate/PropagatingAdapterFactoryImpl.java113
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/propagate/PropagatingAdapterImpl.java144
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/IXMLCharEntity.java39
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/IXMLNamespace.java29
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/IXMLPreferenceNames.java55
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/NameValidator.java63
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/contentmodel/CMDocType.java53
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/contentmodel/CMDocumentTracker.java32
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/contentmodel/CMNodeWrapper.java21
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/contentmodel/ContentModelAdapter.java54
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/contentmodel/NullContentModel.java101
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/contenttype/ContentTypeIdForXML.java54
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMAttr.java128
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMDocument.java100
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMDocumentType.java43
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMElement.java196
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMEntity.java33
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMImplementation.java48
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMModel.java59
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMNode.java272
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/IDOMText.java120
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/document/ISourceGenerator.java201
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/format/CommentNodeFormatter.java101
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/format/DocumentNodeFormatter.java55
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/format/ElementNodeFormatter.java425
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/format/FormatProcessorXML.java115
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/format/NoMoveFormatter.java28
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/format/NodeFormatter.java753
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/format/StructuredFormatPreferencesXML.java81
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/format/TextNodeFormatter.java385
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/provisional/text/IXMLPartitions.java42
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/regions/DOMRegionContext.java69
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/ssemodelquery/ModelQueryAdapter.java31
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/ssemodelquery/ModelQueryAdapterImpl.java76
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/ssemodelquery/MovableModelQuery.java23
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/tasks/XMLFileTaskScanner.java28
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/text/XMLStructuredDocumentRegion.java36
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/text/rules/StructuredTextPartitionerForXML.java132
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/validate/AbstractPropagatingValidator.java66
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/validate/Propagator.java54
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/internal/validate/ValidationComponent.java54
-rw-r--r--bundles/org.eclipse.wst.xml.core/src/org/eclipse/wst/xml/core/text/IXMLPartitions.java42
-rw-r--r--bundles/org.eclipse.wst.xsd.core/.classpath41
-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.core.resources.prefs3
-rw-r--r--bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.core.prefs102
-rw-r--r--bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--bundles/org.eclipse.wst.xsd.core/.settings/org.eclipse.pde.prefs16
-rw-r--r--bundles/org.eclipse.wst.xsd.core/META-INF/MANIFEST.MF23
-rw-r--r--bundles/org.eclipse.wst.xsd.core/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsd.core/build.properties21
-rw-r--r--bundles/org.eclipse.wst.xsd.core/plugin.properties22
-rw-r--r--bundles/org.eclipse.wst.xsd.core/plugin.xml98
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-contentmodel/org/eclipse/wst/xsd/contentmodel/internal/CMDocumentFactoryXSD.java46
-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.java3230
-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.java203
-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.java71
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/XSDValidator.java250
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src-validation/org/eclipse/wst/xsd/core/internal/validation/eclipse/Validator.java115
-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.java120
-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/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.java36
-rw-r--r--bundles/org.eclipse.wst.xsd.core/src/org/eclipse/wst/xsd/core/internal/preferences/XSDCorePreferenceNames.java32
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.classpath21
-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.prefs79
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/.settings/org.eclipse.jdt.launching.prefs2
-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.prefs35
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/META-INF/MANIFEST.MF87
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/about.html34
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/build.properties27
-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/ctool16/NewXSD.gifbin364 -> 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/capturescreen.gifbin384 -> 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/capturescreen.gifbin613 -> 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/etool16/zoomminus.gifbin559 -> 0 bytes-rw-r--r--bundles/org.eclipse.wst.xsd.ui/icons/etool16/zoomplus.gifbin559 -> 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/error_tsk.gifbin353 -> 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/error_ovr.gifbin82 -> 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.properties850
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/plugin.xml695
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/ui/internal/adt/typeviz/TypeVizEditorMode.java53
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd-typeviz/org/eclipse/wst/xsd/ui/internal/adt/typeviz/design/figures/BoxFigure.java119
-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.java312
-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/MoveXSDAttributeAction.java248
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/actions/MoveXSDBaseAction.java28
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/actions/MoveXSDElementAction.java173
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/actions/XSDEditNamespacesAction.java292
-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/RedefineCategoryAdapter.java85
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAdapterFactory.java153
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAnyTypeDefinitionAdapter.java56
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeDeclarationAdapter.java111
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeGroupDefinitionAdapter.java285
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDAttributeUseAdapter.java101
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDBaseAdapter.java238
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDBaseAttributeAdapter.java236
-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.java566
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDElementDeclarationAdapter.java339
-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/XSDEnumerationFacetAdapter.java90
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDModelGroupAdapter.java260
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDModelGroupDefinitionAdapter.java340
-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/XSDRedefineAdapter.java295
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDSchemaAdapter.java537
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDSchemaDirectiveAdapter.java131
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDSimpleContentAdapter.java93
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDSimpleTypeDefinitionAdapter.java268
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDTypeDefinitionAdapter.java69
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDVisitor.java247
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDVisitorForFields.java188
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/adapters/XSDWildcardAdapter.java237
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/commands/BaseDragAndDropCommand.java441
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/commands/XSDAttributeDragAndDropCommand.java259
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/commands/XSDElementDragAndDropCommand.java311
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/AttributeGroupDefinitionEditPart.java128
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/CategoryEditPart.java248
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/ConnectableEditPart.java275
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/ModelGroupDefinitionReferenceEditPart.java148
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/ModelGroupEditPart.java230
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/ReferenceConnection.java67
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/SpaceFillerForFieldEditPart.java48
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/TargetConnectionSpacingFigureEditPart.java46
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/TopLevelComponentEditPart.java473
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDAttributesForAnnotationEditPart.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDBaseFieldEditPart.java164
-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.java74
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDModelGroupRouter.java378
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDSchemaEditPart.java334
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/XSDSimpleTypeEditPart.java239
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/model/SpaceFiller.java169
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editparts/model/TargetConnectionSpaceFiller.java46
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editpolicies/DragAndDropEditPolicy.java92
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editpolicies/GraphNodeDragTracker.java89
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/design/editpolicies/SelectionHandlesEditPolicyImpl.java110
-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.java189
-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.java121
-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.java195
-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/IOpenInNewEditor.java16
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/NewAttributeDialog.java93
-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.java212
-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/dialogs/XSDEditSchemaNS.java44
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/dialogs/XSDGraphViewerDialog.java416
-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.java1468
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/KeyboardDragImpl.java80
-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.java155
-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.java28
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDAttributeReferenceEditManager.java96
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDComplexTypeBaseTypeEditManager.java128
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDEditorCSHelpIds.java140
-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.java464
-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.java389
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDElementReferenceEditManager.java143
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDFileEditorInput.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDHyperlink.java134
-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.java269
-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.java75
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDTabbedPropertySheetPage.java156
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/XSDTypeReferenceEditManager.java227
-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.pngbin4283 -> 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.pngbin4272 -> 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.properties153
-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/XSDAttributeSearchListProvider.java64
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/search/XSDComponentDescriptionProvider.java195
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/search/XSDElementsSearchListProvider.java59
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/search/XSDSearchListDialogDelegate.java137
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/editor/search/XSDSearchListProvider.java285
-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.java468
-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.java214
-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/XSDEditorPreferencePage.java147
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/preferences/XSDPreferencePage.java267
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/preferences/XSDValidatorPreferencePage.java126
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/text/XSDModelAdapter.java240
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/text/XSDModelDelayedReconciler.java195
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/text/XSDModelQueryExtension.java197
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/text/XSDModelReconcileAdapter.java196
-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.java150
-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.java404
-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.java477
-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.java369
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt-xsd/org/eclipse/wst/xsd/ui/internal/validation/DelegatingSourceValidatorForXSD.java48
-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.java135
-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.java147
-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.java132
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/CaptureScreenAction.java263
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/DeleteAction.java117
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/DesignSelectAll.java75
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/actions/SetInputToGraphView.java74
-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/ADTFloatingToolbar.java79
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/BaseGraphicalViewerKeyHandler.java168
-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.java449
-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.java1488
-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.java268
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/directedit/AttributeReferenceDirectEditManager.java38
-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.java37
-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.java150
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/directedit/ReferenceDirectEditManager.java180
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/directedit/TypeReferenceDirectEditManager.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/ADTEditPartFactory.java102
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/ADTFloatingToolbarEditPart.java227
-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.java300
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/BaseFieldEditPart.java535
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/BaseTypeConnectingEditPart.java207
-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.java127
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/CompartmentEditPart.java217
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/ComplexTypeEditPart.java121
-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/IAutoDirectEdit.java20
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/IConnectionContainer.java16
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/IHolderEditPart.java16
-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.java165
-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/RootHolderEditPart.java62
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/SectionEditPart.java38
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/StructureEditPart.java249
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/TopLevelFieldEditPart.java135
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/editparts/TypeReferenceConnection.java105
-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.java60
-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.java24
-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/editparts/model/RootHolder.java28
-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.java52
-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.java28
-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/ComponentReferenceEditManager2.java19
-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/ADTExternalResourceVariant.java153
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/ADTFileStoreEditorInput.java60
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/ADTMultiPageEditor.java373
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/ADTReadOnlyFileEditorInput.java135
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/CommonMultiPageEditor.java942
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/CommonSelectionManager.java124
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/ContextMenuParticipant.java25
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/EditorMode.java37
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/EditorModeManager.java136
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/IADTEditorInput.java19
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/IEditorModeListener.java16
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/Messages.java54
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/ProductCustomizationProvider.java47
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/editor/messages.properties37
-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.java19
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/facade/IField.java35
-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.java24
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/outline/ADTContentOutlinePage.java339
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/outline/ADTContentOutlineProvider.java149
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/outline/ADTContentOutlineRefreshJob.java143
-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/ExtensibleContentOutlinePage.java147
-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.java42
-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.java80
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDAttributeDeclarationAction.java128
-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.java156
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDEnumerationFacetAction.java108
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDModelGroupAction.java97
-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/AddXSDRedefinableContentAction.java229
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDRedefinedAttributeGroupAction.java68
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDRedefinedComplexTypeAction.java69
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDRedefinedModelGroupAction.java68
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDRedefinedSimpleTypeAction.java70
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/AddXSDSchemaDirectiveAction.java92
-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.java74
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/OpenInNewEditor.java546
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/SetBaseTypeAction.java78
-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.java50
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/actions/XSDBaseAction.java81
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddDocumentationCommand.java131
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddEnumerationsCommand.java98
-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/AddRedefinedComponentCommand.java75
-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.java80
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDAttributeDeclarationCommand.java238
-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.java388
-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.java167
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/AddXSDModelGroupDefinitionCommand.java124
-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.java200
-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.java221
-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/RedefineAttributeGroupCommand.java36
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/RedefineComplexTypeCommand.java40
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/RedefineModelGroupCommand.java36
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/RedefineSimpleTypeCommand.java38
-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.java49
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/SetBaseTypeCommand.java98
-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.java50
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateAttributeReferenceAndManagerDirectivesCommand.java60
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateAttributeReferenceCommand.java38
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateAttributeValueCommand.java96
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateComplexTypeDerivationBy.java54
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateComponentReferenceAndManageDirectivesCommand.java150
-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.java59
-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.java64
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateMinOccursCommand.java91
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/commands/UpdateNameCommand.java112
-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.java62
-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.java172
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/AbstractExtensionsSection.java615
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/AbstractSection.java396
-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.java166
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/CommonDirectivesSection.java163
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/EnumerationsSection.java392
-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.java105
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/SchemaLocationSection.java147
-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.java727
-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.java250
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDAttributeDeclarationSection.java908
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDAttributeGroupDefinitionSection.java295
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDComplexTypeAdvancedSection.java257
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDComplexTypeSection.java410
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationAdvancedSection.java453
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDElementDeclarationSection.java647
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDEnumerationFacetSection.java129
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDFacetSection.java1021
-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.java264
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDModelGroupDefinitionSection.java360
-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/XSDSchemaAdvancedSection.java208
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDSchemaSection.java319
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDSimpleTypeAdvancedSection.java121
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/XSDSimpleTypeSection.java655
-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.java785
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/AddNewCategoryDialog.java370
-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.java211
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/DOMExtensionItem.java226
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/DOMExtensionItemEditManager.java50
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/DOMExtensionItemMenuListener.java127
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/DOMExtensionTreeContentProvider.java83
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/DOMExtensionTreeLabelProvider.java88
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/ExtensionDetailsContentProvider.java19
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/ExtensionDetailsViewer.java336
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/ExtensionItem.java31
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/ExtensionItemEditManager.java32
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/ExtensionItemFilter.java28
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/ExtensionsSchemasRegistry.java330
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/SelectFromCatalogDialog.java207
-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.java119
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/custom/DefaultListNodeEditorConfiguration.java27
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/custom/DialogNodeEditorConfiguration.java33
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/custom/ListNodeEditorConfiguration.java35
-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.java43
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/custom/NodeEditorProvider.java18
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/properties/sections/appinfo/custom/NodeFilter.java21
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/util/Messages.java140
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/util/XSDCommonUIUtils.java622
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/util/XSDDirectivesManager.java815
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/util/XSDDirectivesSchemaLocationUpdater.java169
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-common/org/eclipse/wst/xsd/ui/internal/common/util/messages.properties123
-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/IXSDRefactorConstants.java15
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/MakeAnonymousTypsGlobalEnablementTester.java65
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/MakeLocalElementGlobalEnablementTester.java47
-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/RefactorEnablementTester.java82
-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/RenameEnablementTester.java82
-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.java162
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/actions/MakeLocalElementGlobalAction.java80
-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.java160
-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.java60
-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/handlers/MakeAnonymousTypeGobalHandler.java138
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/handlers/MakeLocalElementGlobalHandler.java61
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/handlers/RefactoringHandler.java44
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/handlers/RenameHandler.java118
-rw-r--r--bundles/org.eclipse.wst.xsd.ui/src-refactor/org/eclipse/wst/xsd/ui/internal/refactor/messages.properties55
-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.java519
-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.java106
-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.java81
-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--bundles/org.eclipse.wtp.javascript.capabilities/.classpath6
-rw-r--r--bundles/org.eclipse.wtp.javascript.capabilities/.project22
-rw-r--r--bundles/org.eclipse.wtp.javascript.capabilities/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--bundles/org.eclipse.wtp.javascript.capabilities/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.wtp.javascript.capabilities/META-INF/MANIFEST.MF8
-rw-r--r--bundles/org.eclipse.wtp.javascript.capabilities/META-INF/eclipse.inf2
-rw-r--r--bundles/org.eclipse.wtp.javascript.capabilities/OSGI-INF/l10n/bundle.properties5
-rw-r--r--bundles/org.eclipse.wtp.javascript.capabilities/about.html34
-rw-r--r--bundles/org.eclipse.wtp.javascript.capabilities/build.properties6
-rw-r--r--bundles/org.eclipse.wtp.javascript.capabilities/plugin.xml17
-rw-r--r--bundles/org.eclipse.wtp.web.capabilities/.project22
-rw-r--r--bundles/org.eclipse.wtp.web.capabilities/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.wtp.web.capabilities/META-INF/MANIFEST.MF8
-rw-r--r--bundles/org.eclipse.wtp.web.capabilities/META-INF/eclipse.inf2
-rw-r--r--bundles/org.eclipse.wtp.web.capabilities/OSGI-INF/l10n/bundle.properties5
-rw-r--r--bundles/org.eclipse.wtp.web.capabilities/about.html34
-rw-r--r--bundles/org.eclipse.wtp.web.capabilities/build.properties5
-rw-r--r--bundles/org.eclipse.wtp.web.capabilities/plugin.xml52
-rw-r--r--bundles/org.eclipse.wtp.xml.capabilities/.project22
-rw-r--r--bundles/org.eclipse.wtp.xml.capabilities/.settings/org.eclipse.pde.core.prefs4
-rw-r--r--bundles/org.eclipse.wtp.xml.capabilities/META-INF/MANIFEST.MF8
-rw-r--r--bundles/org.eclipse.wtp.xml.capabilities/META-INF/eclipse.inf2
-rw-r--r--bundles/org.eclipse.wtp.xml.capabilities/OSGI-INF/l10n/bundle.properties5
-rw-r--r--bundles/org.eclipse.wtp.xml.capabilities/about.html34
-rw-r--r--bundles/org.eclipse.wtp.xml.capabilities/build.properties5
-rw-r--r--bundles/org.eclipse.wtp.xml.capabilities/plugin.xml55
-rw-r--r--development/org.eclipse.wst.sse.unittests/.classpath7
-rw-r--r--development/org.eclipse.wst.sse.unittests/.cvsignore4
-rw-r--r--development/org.eclipse.wst.sse.unittests/.project28
-rw-r--r--development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--development/org.eclipse.wst.sse.unittests/.settings/org.eclipse.pde.prefs15
-rw-r--r--development/org.eclipse.wst.sse.unittests/META-INF/MANIFEST.MF44
-rw-r--r--development/org.eclipse.wst.sse.unittests/SSE Master List Test Suite.launch45
-rw-r--r--development/org.eclipse.wst.sse.unittests/build.properties15
-rw-r--r--development/org.eclipse.wst.sse.unittests/icons/sourceEditor.gifbin353 -> 0 bytes-rw-r--r--development/org.eclipse.wst.sse.unittests/plugin.properties17
-rw-r--r--development/org.eclipse.wst.sse.unittests/plugin.xml21
-rw-r--r--development/org.eclipse.wst.sse.unittests/schema/additionalTests.exsd123
-rw-r--r--development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java125
-rw-r--r--development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/TestTurkish.java34
-rw-r--r--development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestString.java64
-rw-r--r--development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/TestStringUtils.java46
-rw-r--r--development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/minortools/VersionRemover.java105
-rw-r--r--development/org.eclipse.wst.sse.unittests/src/testStringXML.jpage10
-rw-r--r--development/org.eclipse.wst.sse.unittests/tet.jsp21
-rw-r--r--development/org.eclipse.wst.sse.unittests/turkishCase.jpage3
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/.cvsignore1
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/.project22
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/.settings/org.eclipse.pde.prefs15
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/EditorJspContexts.xml74
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/EditorJspContexts2.xml83
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/JspWizContexts.xml19
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/META-INF/MANIFEST.MF7
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/about.html34
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/build.properties13
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/plugin.properties7
-rw-r--r--docs/org.eclipse.jst.jsp.ui.infopop/plugin.xml27
-rw-r--r--docs/org.eclipse.wst.doc.user/.cvsignore2
-rw-r--r--docs/org.eclipse.wst.doc.user/.project22
-rw-r--r--docs/org.eclipse.wst.doc.user/META-INF/MANIFEST.MF8
-rw-r--r--docs/org.eclipse.wst.doc.user/about.html34
-rw-r--r--docs/org.eclipse.wst.doc.user/book.css203
-rw-r--r--docs/org.eclipse.wst.doc.user/build.properties13
-rw-r--r--docs/org.eclipse.wst.doc.user/common.css1197
-rw-r--r--docs/org.eclipse.wst.doc.user/commonltr.css1306
-rw-r--r--docs/org.eclipse.wst.doc.user/commonrtl.css113
-rw-r--r--docs/org.eclipse.wst.doc.user/images/SelectExistingServer.jpgbin43906 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/SelectNewServer.jpgbin43236 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/XMLCatalog-Figure1.jpgbin39687 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/XMLCatalog-Figure2.jpgbin14815 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/XMLCatalog-Figure3.jpgbin9277 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/XMLCatalog-Figure4.jpgbin21628 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/XMLCatalog-Figure5.jpgbin18294 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/image99L.jpgbin73786 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/imageEJ9.jpgbin50725 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/imageIAI.jpgbin53806 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/imageLKF.jpgbin72286 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/imageO78.jpgbin71949 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/imageU71.jpgbin47607 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/note.gifbin1014 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/selectRootElementDTD.pngbin14811 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/selectRootElementXSD.pngbin16425 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/wsdl.gifbin563 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/wsdl_main.gifbin158 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/wsdleditor-backbutton.jpgbin436 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/wsdleditor-binding.jpgbin22242 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/wsdleditor-complex-type.jpgbin6899 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/wsdleditor-finished-wsdl.jpgbin62972 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/wsdleditor-new-operation.jpgbin7490 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/wsdleditor-new-skeleton.jpgbin44414 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/wsdleditor-new-wizard.jpgbin25784 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/wsdleditor-setelement-dialog.jpgbin25350 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/wsdleditor-settype-dialog.jpgbin22932 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/wsdleditor-smart-rename1.jpgbin17781 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/xsdeditor-backbutton.jpgbin504 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/xsdeditor-figure1.jpgbin80337 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/xsdeditor-figure2.jpgbin25177 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/xsdeditor-figure3.jpgbin14100 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/xsdeditor-figure4.jpgbin4911 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/xsdeditor-figure5.jpgbin24458 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/xsdeditor-figure6.jpgbin15499 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/xsdeditor-figure7.jpgbin17880 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/xsdeditor-figure8.jpgbin12423 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/images/xsdeditor-figure9.jpgbin43743 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.doc.user/notices.html17
-rw-r--r--docs/org.eclipse.wst.doc.user/plugin.properties13
-rw-r--r--docs/org.eclipse.wst.doc.user/plugin.xml10
-rw-r--r--docs/org.eclipse.wst.doc.user/reference_toc.xml26
-rw-r--r--docs/org.eclipse.wst.doc.user/toc.xml49
-rw-r--r--docs/org.eclipse.wst.doc.user/topics/limitations.html57
-rw-r--r--docs/org.eclipse.wst.doc.user/topics/overview.html25
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/.cvsignore1
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/.project22
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/.settings/org.eclipse.pde.prefs15
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/EditorDtdContexts.xml80
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/EditorDtdContexts2.xml25
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/META-INF/MANIFEST.MF7
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/about.html34
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/build.properties7
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/plugin.properties13
-rw-r--r--docs/org.eclipse.wst.dtd.ui.infopop/plugin.xml25
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/.cvsignore3
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/.project22
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/.settings/org.eclipse.pde.prefs15
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/DTDEditormap_toc.ditamap32
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/DTDEditormap_toc.xml26
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/DTDreftable.ditamap23
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/DTDreftable.xml12
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/DocBuild.xml66
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/META-INF/MANIFEST.MF8
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/about.html34
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/build.properties14
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/dita.list12
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/ADD_Comment.gifbin196 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/ADD_Element.gifbin353 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/ADD_Entity.gifbin124 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/ADD_Entity_Reference.gifbin318 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/ADD_Notation.gifbin177 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/XSDChoice.gifbin145 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/XSDSequence.gifbin91 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/attribute.gifbin167 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/attribute_list.gifbin247 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/nDTDFile.gifbin135 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/nany.gifbin136 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/nempty.gifbin121 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/organize_dtd_logically.gifbin347 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/images/sort.gifbin162 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/index/_9.cfsbin14175 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/index/deletablebin4 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/index/indexed_contributions3
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/index/indexed_dependencies4
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/index/indexed_docs11
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/index/segmentsbin27 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/myplugin.xml24
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/org.eclipse.wst.dtdeditor.doc.user.maplist9
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/org.eclipse.wst.dtdeditor.doc.userindex.xml48
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/plugin.properties4
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/plugin.xml24
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/cdtdover.dita33
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/cdtdover.html61
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/cworkdtds.dita10
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/cworkdtds.html50
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/rdtdicons.dita88
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/rdtdicons.html146
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/rdtdkey.dita48
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/rdtdkey.html94
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/tcretdtd.dita45
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/tcretdtd.html87
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/tdtemplt.dita46
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/tdtemplt.html82
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/tedtsrcst.dita47
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/tedtsrcst.html82
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/timptdtd.dita33
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/timptdtd.html68
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/tvaldtd.dita44
-rw-r--r--docs/org.eclipse.wst.dtdeditor.doc.user/topics/tvaldtd.html66
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/.cvsignore1
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/.project22
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/.settings/org.eclipse.pde.prefs15
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/EditorHtmlContexts.xml95
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/EditorHtmlContexts2.xml23
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/HTMLWizContexts.xml21
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/META-INF/MANIFEST.MF7
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/about.html34
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/build.properties7
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/plugin.properties3
-rw-r--r--docs/org.eclipse.wst.html.ui.infopop/plugin.xml26
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/.cvsignore4
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/.project22
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/.settings/org.eclipse.pde.prefs15
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/DocBuild.xml64
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/META-INF/MANIFEST.MF8
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/about.html34
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/build.properties15
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/images/ncontass.gifbin19680 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.sse.doc.user/images/njscdast.gifbin19047 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.sse.doc.user/images/nlinux.gifbin174 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.sse.doc.user/images/nmacscrp.gifbin1112 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.sse.doc.user/images/nquest.gifbin873 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.sse.doc.user/images/nwin.gifbin221 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.sse.doc.user/index/_p.cfsbin39759 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.sse.doc.user/index/deletablebin4 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.sse.doc.user/index/indexed_contributions3
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/index/indexed_dependencies4
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/index/indexed_docs24
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/index/segmentsbin27 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.sse.doc.user/myplugin.xml30
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/org.eclipse.wst.sse.doc.user.maplist7
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/org.eclipse.wst.sse.doc.userindex.html242
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/org.eclipse.wst.sse.doc.userindex.xml165
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/plugin.properties3
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/plugin.xml30
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/sse_toc.ditamap57
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/sse_toc.xml35
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/cencoding.dita31
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/cencoding.html56
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/csrcedt001.dita57
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/csrcedt001.html89
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/csrcedt004.dita136
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/csrcedt004.html191
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/csrcedt006.dita115
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/csrcedt006.html148
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/cvalidate.dita48
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/cvalidate.html77
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tcontenttype.dita32
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tcontenttype.html58
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt000.dita52
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt000.html82
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt001.dita61
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt001.html91
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt005.dita70
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt005.html99
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt007.dita44
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt007.html72
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt010.dita51
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt010.html79
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt014.dita53
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt014.html96
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt015.dita81
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt015.html123
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt016.dita47
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt016.html70
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt022.dita56
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt022.html84
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt023.dita63
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt023.html96
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt024.dita74
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt024.html108
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt025.dita100
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt025.html153
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt026.dita44
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt026.html70
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt027.dita40
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt027.html63
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt028.dita71
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt028.html108
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt029.dita71
-rw-r--r--docs/org.eclipse.wst.sse.doc.user/topics/tsrcedt029.html108
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/.cvsignore1
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/.project22
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/.settings/org.eclipse.pde.prefs15
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/EditorContexts.xml85
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/EditorCssContexts2.xml30
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/META-INF/MANIFEST.MF7
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/about.html34
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/build.properties7
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/plugin.properties3
-rw-r--r--docs/org.eclipse.wst.sse.ui.infopop/plugin.xml22
-rw-r--r--docs/org.eclipse.wst.web.ui.infopop/.cvsignore1
-rw-r--r--docs/org.eclipse.wst.web.ui.infopop/.project11
-rw-r--r--docs/org.eclipse.wst.web.ui.infopop/META-INF/MANIFEST.MF8
-rw-r--r--docs/org.eclipse.wst.web.ui.infopop/StaticWebWizContexts.xml33
-rw-r--r--docs/org.eclipse.wst.web.ui.infopop/about.html34
-rw-r--r--docs/org.eclipse.wst.web.ui.infopop/build.properties7
-rw-r--r--docs/org.eclipse.wst.web.ui.infopop/plugin.properties13
-rw-r--r--docs/org.eclipse.wst.web.ui.infopop/plugin.xml24
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/.cvsignore3
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/.project22
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/DocBuild.xml66
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/META-INF/MANIFEST.MF8
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/about.html34
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/build.properties14
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/fixit.gifbin887 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/grptype.gifbin1032 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/menubutton.gifbin88 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nlinux.gifbin174 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nshowerr.gifbin167 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nwarning.gifbin152 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nwin.gifbin221 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nwlnkbrk.gifbin878 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nwlnkcss.gifbin924 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nwlnkgr-l.gifbin1017 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nwlnkgr.gifbin1017 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nwlnkind.gifbin927 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nwlnkmal.gifbin888 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nwlnknum.gifbin882 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nwlnkotr.gifbin883 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nwlnkque.gifbin871 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/nwlnktsk.gifbin895 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/skipit.gifbin874 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/images/viewlink.gifbin935 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/index/_10.cfsbin58078 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/index/deletablebin4 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/index/indexed_contributions3
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/index/indexed_dependencies4
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/index/indexed_docs34
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/index/segmentsbin28 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/myplugin.xml24
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/org.eclipse.wst.webtools.doc.user.maplist8
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/org.eclipse.wst.webtools.doc.userindex.xml219
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/plugin.properties13
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/plugin.xml24
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/relatedlinks.ditamap482
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/relatedlinks.xml5
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/ccstatic.dita63
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/ccstatic.html110
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/ccwebprj.dita140
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/ccwebprj.html186
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/ccwebvw.dita56
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/ccwebvw.html82
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/ccwtover.dita27
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/ccwtover.html55
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cpdjsps.dita46
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cpdjsps.html76
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwebartifact.dita16
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwebartifact.html39
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwebpagedesign.dita20
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwebpagedesign.html46
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwebprojects.dita28
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwebprojects.html62
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwebresources.dita23
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwebresources.html49
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwfiltbn.dita41
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwfiltbn.html84
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwlistbn.dita33
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwlistbn.html72
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwservbn.dita48
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwservbn.html86
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwtfeatures.dita40
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwtfeatures.html99
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwwarovr.dita31
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwwarovr.html66
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwwedtvw.dita52
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/cwwedtvw.html79
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tjchgxdt.dita38
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tjchgxdt.html60
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tjcrehtm.dita47
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tjcrehtm.html75
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tjcrejsp.dita42
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tjcrejsp.html81
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tjdetags.dita28
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tjdetags.html53
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tjprefs.dita62
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tjprefs.html102
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tservertarget.dita21
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tservertarget.html46
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tstylesheet.dita42
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/tstylesheet.html73
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twcreprj.dita59
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twcreprj.html108
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twcresta.dita43
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twcresta.html85
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twcrewar.dita33
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twcrewar.html61
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twcvsr.dita37
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twcvsr.html60
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twfltwiz.dita73
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twfltwiz.html123
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twimpwar.dita42
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twimpwar.html71
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twlstwiz.dita40
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twlstwiz.html93
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twpcnvrt.dita30
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twpcnvrt.html57
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twplib.dita34
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twplib.html56
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twprjset.dita124
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twprjset.html183
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twsrvwiz.dita51
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/topics/twsrvwiz.html93
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/webtools_toc.ditamap64
-rw-r--r--docs/org.eclipse.wst.webtools.doc.user/webtools_toc.xml49
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/.cvsignore1
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/.project22
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/.settings/org.eclipse.pde.prefs15
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/EditorXmlContexts.xml193
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/EditorXmlContexts2.xml23
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/META-INF/MANIFEST.MF7
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/TableTree.xml24
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/WSDLContexts.xml127
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/XMLWizardContexts.xml122
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/XSDContexts.xml50
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/about.html34
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/build.properties12
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/plugin.properties13
-rw-r--r--docs/org.eclipse.wst.xml.ui.infopop/plugin.xml26
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/.cvsignore5
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/.project22
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/.settings/org.eclipse.pde.prefs15
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/DocBuild.xml66
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/META-INF/MANIFEST.MF8
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/XMLBuildermap_toc.ditamap85
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/XMLBuildermap_toc.xml73
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/XMLBuilderrel.ditamap136
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/XMLBuilderrel.xml55
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/about.html34
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/build.properties15
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/images/cdatasection.gifbin359 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/images/collapse_all.gifbin155 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/images/comment_obj.gifbin196 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/images/doctype.gifbin594 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/images/expand_all.gifbin164 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/images/nattrib.gifbin167 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/images/nelem.gifbin159 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/images/nrstrval.gifbin155 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/images/proinst_obj.gifbin138 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/images/rldgrmr.gifbin368 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/images/suggestion.gifbin9962 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/index/_w.cfsbin56242 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/index/deletablebin4 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/index/indexed_contributions3
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/index/indexed_dependencies4
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/index/indexed_docs31
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/index/segmentsbin27 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/myplugin.xml32
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/org.eclipse.wst.xmleditor.doc.user.maplist8
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/org.eclipse.wst.xmleditor.doc.userindex.xml159
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/plugin.properties13
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/plugin.xml32
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/ccreatxm.dita19
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/ccreatxm.html41
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/cworkXML.html45
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/cworkxml.dita22
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/cwxmledt.dita55
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/cwxmledt.html115
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/cxmlcat.dita119
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/cxmlcat.html195
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/cxmlenc.dita134
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/cxmlenc.html273
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/cxmltool.dita38
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/cxmltool.html50
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/rextctn.dita25
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/rextctn.html50
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/rlimitations_slushXML.dita19
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/rlimitations_slushXML.html43
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/rxmlbicons.dita58
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/rxmlbicons.html99
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/rxmlcatkey.dita45
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/rxmlcatkey.html76
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/rxmltoolskey.dita131
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/rxmltoolskey.html220
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tcretxml.dita43
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tcretxml.html85
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tcrexdtd.dita61
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tcrexdtd.html109
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tcrexxsd.dita85
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tcrexxsd.html143
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tedtcnst.dita64
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tedtcnst.html115
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tedtdoc.dita46
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tedtdoc.html89
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tedtenc.dita40
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tedtenc.html64
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tedtgram.dita34
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tedtgram.html72
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tedtproc.dita33
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tedtproc.html63
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tedtsch.dita61
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tedtsch.html107
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tsugstrat.dita36
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/tsugstrat.html67
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/ttaghilt.dita47
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/ttaghilt.html80
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/twcdast.dita57
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/twcdast.html93
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/twmacro.dita60
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/twmacro.html96
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/twxvalid.dita47
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/twxvalid.html76
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/txedtdes.dita140
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/txedtdes.html215
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/txedtsrc.dita73
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/txedtsrc.html131
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/txedttag.dita47
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/txedttag.html90
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/txmlcat.dita181
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/txmlcat.html298
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/txprefs.dita63
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/txprefs.html95
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/txsityp.dita51
-rw-r--r--docs/org.eclipse.wst.xmleditor.doc.user/topics/txsityp.html82
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/.cvsignore4
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/.project22
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/.settings/org.eclipse.jdt.ui.prefs3
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/.settings/org.eclipse.pde.prefs15
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/DocBuild.xml66
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/META-INF/MANIFEST.MF7
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/XSDLeditorrel.ditamap158
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/XSDLeditorrel.xml68
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/XSDeditormap_toc.ditamap83
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/XSDeditormap_toc.xml68
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/about.html34
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/build.properties15
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/Browse.gifbin90 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/More.gifbin90 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDAll.gifbin116 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDAny.gifbin613 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDAnyAttribute.gifbin384 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDAttribute.gifbin167 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDAttributeGroup.gifbin215 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDAttributeGroupRef.gifbin327 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDAttributeRef.gifbin350 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDChoice.gifbin130 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDComplexType.gifbin345 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDElement.gifbin351 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDElementRef.gifbin585 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDGlobalAttribute.gifbin167 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDGlobalElement.gifbin351 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDGroup.gifbin327 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDGroupRef.gifbin331 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDImport.gifbin114 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDInclude.gifbin324 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDRedefine.gifbin373 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDSequence.gifbin120 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDSimpleEnum.gifbin105 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDSimplePattern.gifbin120 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/images/XSDSimpleType.gifbin149 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/index/_v.cfsbin55873 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/index/deletablebin4 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/index/indexed_contributions3
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/index/indexed_dependencies4
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/index/indexed_docs30
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/index/segmentsbin27 -> 0 bytes-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/myplugin.xml31
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/org.eclipse.wst.xsdeditor.doc.user.maplist9
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/org.eclipse.wst.xsdeditor.doc.userindex.html168
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/org.eclipse.wst.xsdeditor.doc.userindex.xml166
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/plugin.properties5
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/plugin.xml31
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/cworkXSD.dita29
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/cworkXSD.html58
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/cxmlsced.dita57
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/cxmlsced.html109
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/rlimitations_slushXSD.dita20
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/rlimitations_slushXSD.html43
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/rnmspc.dita200
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/rnmspc.html276
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/rrefintg.dita46
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/rrefintg.html88
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/rxsdicons.dita140
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/rxsdicons.html209
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddagrp.dita106
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddagrp.html153
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddanye.dita84
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddanye.html124
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddcmod.dita87
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddcmod.html139
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddcmxt.dita76
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddcmxt.html111
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddelm.dita74
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddelm.html120
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddelmr.dita58
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddelmr.html98
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddglba.dita55
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddglba.html89
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddglem.dita79
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddglem.html129
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddgrpr.dita40
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddgrpr.html70
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddgrup.dita42
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddgrup.html78
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddimpt.dita77
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddimpt.html130
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddincl.dita85
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddincl.html138
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddnot.dita51
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddnot.html52
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddrdfn.dita75
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddrdfn.html127
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddreg.dita58
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddreg.html99
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddsmpt.dita125
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/taddsmpt.html183
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tcxmlsch.dita33
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tcxmlsch.html69
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tdelscmp.dita32
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tdelscmp.html63
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tedtpref.dita46
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tedtpref.html73
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tedtschm.dita58
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tedtschm.html91
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/timpschm.dita52
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/timpschm.html102
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tnavsrc.dita41
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tnavsrc.html82
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/trefactrXSD.dita98
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/trefactrXSD.html168
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tvdtschm.dita63
-rw-r--r--docs/org.eclipse.wst.xsdeditor.doc.user/topics/tvdtschm.html94
-rw-r--r--features/org.eclipse.wst.web_core.feature.patch/.project17
-rw-r--r--features/org.eclipse.wst.web_core.feature.patch/build.properties1
-rw-r--r--features/org.eclipse.wst.web_core.feature.patch/buildnotes_org.eclipse.wst.xml_ui.feature.patch.html19
-rw-r--r--features/org.eclipse.wst.web_core.feature.patch/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_core.feature.patch/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.web_core.feature.patch/feature.properties156
-rw-r--r--features/org.eclipse.wst.web_core.feature.patch/feature.xml31
-rw-r--r--features/org.eclipse.wst.web_core.feature.patch/license.html93
-rw-r--r--features/org.eclipse.wst.web_core.feature/.cvsignore2
-rw-r--r--features/org.eclipse.wst.web_core.feature/.project17
-rw-r--r--features/org.eclipse.wst.web_core.feature/build.properties3
-rw-r--r--features/org.eclipse.wst.web_core.feature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_core.feature/feature.properties48
-rw-r--r--features/org.eclipse.wst.web_core.feature/feature.xml59
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateBundle/about.html27
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateBundle/about.ini31
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateBundle/about.mappings6
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateBundle/about.properties26
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateBundle/build.properties2
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateBundle/plugin.properties12
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateBundle/wtp_prod32.gifbin1752 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateBundle/wtp_prod32.pngbin2672 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateFeature/build.properties14
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateFeature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplateFeature/feature.properties48
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplatePlugin/about.html27
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplatePlugin/about.ini31
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplatePlugin/about.properties26
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplatePlugin/build.properties2
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplatePlugin/wtp_prod32.gifbin1752 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_core.feature/sourceTemplatePlugin/wtp_prod32.pngbin2672 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_sdk.feature/.cvsignore4
-rw-r--r--features/org.eclipse.wst.web_sdk.feature/.project17
-rw-r--r--features/org.eclipse.wst.web_sdk.feature/build.properties6
-rw-r--r--features/org.eclipse.wst.web_sdk.feature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_sdk.feature/feature.properties48
-rw-r--r--features/org.eclipse.wst.web_sdk.feature/feature.xml42
-rw-r--r--features/org.eclipse.wst.web_ui.feature.patch/.project17
-rw-r--r--features/org.eclipse.wst.web_ui.feature.patch/build.properties5
-rw-r--r--features/org.eclipse.wst.web_ui.feature.patch/buildnotes_org.eclipse.wst.web_ui.feature.patch.html22
-rw-r--r--features/org.eclipse.wst.web_ui.feature.patch/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_ui.feature.patch/epl-v10.html328
-rw-r--r--features/org.eclipse.wst.web_ui.feature.patch/feature.properties148
-rw-r--r--features/org.eclipse.wst.web_ui.feature.patch/feature.xml31
-rw-r--r--features/org.eclipse.wst.web_ui.feature.patch/license.html93
-rw-r--r--features/org.eclipse.wst.web_ui.feature/.cvsignore1
-rw-r--r--features/org.eclipse.wst.web_ui.feature/.project17
-rw-r--r--features/org.eclipse.wst.web_ui.feature/build.properties3
-rw-r--r--features/org.eclipse.wst.web_ui.feature/feature.properties48
-rw-r--r--features/org.eclipse.wst.web_ui.feature/feature.xml96
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateBundle/about.html27
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateBundle/about.ini31
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateBundle/about.mappings6
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateBundle/about.properties26
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateBundle/build.properties3
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateBundle/plugin.properties12
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateBundle/wtp_prod32.gifbin1752 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateBundle/wtp_prod32.pngbin2672 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateFeature/build.properties17
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateFeature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplateFeature/feature.properties49
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplatePlugin/about.html27
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplatePlugin/about.ini31
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplatePlugin/about.properties26
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplatePlugin/build.properties3
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplatePlugin/wtp_prod32.gifbin1752 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_ui.feature/sourceTemplatePlugin/wtp_prod32.pngbin2672 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_userdoc.feature/.cvsignore2
-rw-r--r--features/org.eclipse.wst.web_userdoc.feature/.project17
-rw-r--r--features/org.eclipse.wst.web_userdoc.feature/build.properties3
-rw-r--r--features/org.eclipse.wst.web_userdoc.feature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.web_userdoc.feature/feature.properties48
-rw-r--r--features/org.eclipse.wst.web_userdoc.feature/feature.xml36
-rw-r--r--features/org.eclipse.wst.xml_core.feature.patch/.project17
-rw-r--r--features/org.eclipse.wst.xml_core.feature.patch/description.txt4
-rw-r--r--features/org.eclipse.wst.xml_core.feature/.cvsignore3
-rw-r--r--features/org.eclipse.wst.xml_core.feature/.project17
-rw-r--r--features/org.eclipse.wst.xml_core.feature/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--features/org.eclipse.wst.xml_core.feature/build.properties4
-rw-r--r--features/org.eclipse.wst.xml_core.feature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_core.feature/feature.properties36
-rw-r--r--features/org.eclipse.wst.xml_core.feature/feature.xml85
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateBundle/about.html27
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateBundle/about.ini31
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateBundle/about.mappings6
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateBundle/about.properties26
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateBundle/build.properties2
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateBundle/plugin.properties12
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateBundle/wtp_prod32.gifbin1752 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateBundle/wtp_prod32.pngbin2672 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateFeature/build.properties14
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateFeature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplateFeature/feature.properties37
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplatePlugin/about.html27
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplatePlugin/about.ini31
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplatePlugin/about.properties26
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplatePlugin/build.properties2
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplatePlugin/wtp_prod32.gifbin1752 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_core.feature/sourceTemplatePlugin/wtp_prod32.pngbin2672 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_sdk.feature/.cvsignore4
-rw-r--r--features/org.eclipse.wst.xml_sdk.feature/.project17
-rw-r--r--features/org.eclipse.wst.xml_sdk.feature/build.properties4
-rw-r--r--features/org.eclipse.wst.xml_sdk.feature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_sdk.feature/feature.properties36
-rw-r--r--features/org.eclipse.wst.xml_sdk.feature/feature.xml34
-rw-r--r--features/org.eclipse.wst.xml_ui.feature.patch/.project17
-rw-r--r--features/org.eclipse.wst.xml_ui.feature.patch/build.properties1
-rw-r--r--features/org.eclipse.wst.xml_ui.feature.patch/feature.xml23
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/.cvsignore1
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/.project17
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/build.properties3
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_ui.feature/feature.properties39
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/feature.xml88
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateBundle/about.html27
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateBundle/about.ini31
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateBundle/about.mappings6
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateBundle/about.properties26
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateBundle/build.properties3
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateBundle/plugin.properties12
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateBundle/wtp_prod32.gifbin1752 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateBundle/wtp_prod32.pngbin2672 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateFeature/build.properties16
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateFeature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplateFeature/feature.properties37
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplatePlugin/about.html27
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplatePlugin/about.ini31
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplatePlugin/about.mappings6
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplatePlugin/about.properties26
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplatePlugin/build.properties3
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplatePlugin/plugin.properties12
-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplatePlugin/wtp_prod32.gifbin1752 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_ui.feature/sourceTemplatePlugin/wtp_prod32.pngbin2672 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_userdoc.feature/.cvsignore1
-rw-r--r--features/org.eclipse.wst.xml_userdoc.feature/.project17
-rw-r--r--features/org.eclipse.wst.xml_userdoc.feature/build.properties3
-rw-r--r--features/org.eclipse.wst.xml_userdoc.feature/eclipse_update_120.jpgbin21695 -> 0 bytes-rw-r--r--features/org.eclipse.wst.xml_userdoc.feature/feature.properties36
-rw-r--r--features/org.eclipse.wst.xml_userdoc.feature/feature.xml50
4465 files changed, 0 insertions, 658951 deletions
diff --git a/bundles/org.eclipse.jst.jsp.core/.classpath b/bundles/org.eclipse.jst.jsp.core/.classpath
deleted file mode 100644
index ca82c98039..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.classpath
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/wst/sse/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible" pattern="org/eclipse/wst/sse/core/**"/>
- <accessrule kind="accessible" pattern="org/eclipse/wst/xml/core/**"/>
- <accessrule kind="accessible" pattern="org/eclipse/wst/css/core/**"/>
- <accessrule kind="accessible" pattern="org/eclipse/wst/html/core/**"/>
- <accessrule kind="accessible" pattern="org/eclipse/wst/validation/**"/>
- </accessrules>
- </classpathentry>
- <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 89a2c969e5..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 \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/.project b/bundles/org.eclipse.jst.jsp.core/.project
deleted file mode 100644
index cd5c0da8e6..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.project
+++ /dev/null
@@ -1,34 +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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</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 911428bc0e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,79 +0,0 @@
-#Wed Mar 28 02:56:12 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=ignore
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=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=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=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.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 612d437d2a..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex
+++ /dev/null
@@ -1,597 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010 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
-%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;
- }
- }
- // [236008] - Should not try and consider the token a
- // comment unless a comment was started
- if (context == CSS_JSP_SCRIPTLET && nextTokenType == CSS_JSP_COMMENT){
- 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 9cfce8625d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/DevTimeSupport/HeadParsers/JSPHeadTokenizer.jFlex
+++ /dev/null
@@ -1,304 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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 java.util.Arrays;
-
-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 */
- 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, Exception {
- 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
-%scanerror java.lang.Exception
-
-
-UTF16BE = \xFE\xFF
-UTF16LE = \xFF\xFE
-UTF83ByteBOM = \xEF\xBB\xBF
-
-// SpaceChar = [\x20\x09]
-
-
-// [3] S ::= (0x20 | 0x9 | 0xD | 0xA)+
-S = [\x20\x09\x0D\x0A]
-
-//BeginAttributeeValue = {S}* \= {S}*
-
-LineTerminator = \r|\n
-
-
-Z = (\x00)?
-S_UTF = {Z}{S}{Z}
-BeginAttributeValueUTF = {S_UTF}* \= {S_UTF}*
-
-%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_UTF}* ({Z}<{Z}\?{Z}x{Z}m{Z}l{Z}){S_UTF}+ {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
- {Z}<{Z}\!{Z}D{Z}O{Z}C{Z}T{Z}Y{Z}P{Z}E{Z} {S_UTF}* {Z}h{Z}t{Z}m{Z}l{Z} {S_UTF}* {Z}P{Z}U{Z}B{Z}L{Z}I{Z}C{Z} .* {Z}\/{Z}\/{Z}D{Z}T{Z}D{Z}{S_UTF}{Z}X{Z}H{Z}T{Z}M{Z}L{Z} {isXHTML = true;}
- {Z}<{Z}h{Z}t{Z}m{Z}l{Z} {S_UTF}* {Z}x{Z}m{Z}l{Z}n{Z}s{Z} {S_UTF}* {Z}\={Z} {S_UTF}* (({Z}\"{Z}) | ({Z}\'{Z})) {Z}h{Z}t{Z}t{Z}p{Z}:{Z}\/{Z}\/{Z}w{Z}w{Z}w{Z}\.{Z}w{Z}3{Z}\.{Z}o{Z}r{Z}g{Z}\/{Z}1{Z}9{Z}9{Z}9{Z}\/{Z}x{Z}h{Z}t{Z}m{Z}l{Z} {isXHTML = true;}
- // another case that's part of the "HTML family" is WML 1.0 (WML 2.0 is part of XHTML)
- {Z}<{Z}\!{Z}D{Z}O{Z}C{Z}T{Z}Y{Z}P{Z}E{Z} {S_UTF}* {Z}w{Z}m{Z}l{Z} {S_UTF}* {Z}P{Z}U{Z}B{Z}L{Z}I{Z}C{Z} .* {Z}\/{Z}\/{Z}D{Z}T{Z}D {S}{Z}W{Z}M{Z}L{Z} {isWML = true;}
-
- {Z}<{Z}%{Z} {S_UTF}* {Z}@{Z} {S_UTF}* (({Z}p{Z}a{Z}g{Z}e{Z})|({Z}t{Z}a{Z}g{Z})) {S_UTF}+ {yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;}
- (({Z}<{Z}j{Z}s{Z}p{Z}:{Z}d{Z}i{Z}r{Z}e{Z}c{Z}t{Z}i{Z}v{Z}e{Z}\.{Z}p{Z}a{Z}g{Z}e{Z})|({Z}<{Z}j{Z}s{Z}p{Z}:{Z}d{Z}i{Z}r{Z}e{Z}c{Z}t{Z}i{Z}v{Z}e{Z}\.{Z}t{Z}a{Z}g{Z})) {S_UTF}+ {yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;}
-
-}
-
-<ST_XMLDecl>
-{
- ({Z}v{Z}e{Z}r{Z}s{Z}i{Z}o{Z}n{Z}) {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;}
- ({Z}e{Z}n{Z}c{Z}o{Z}d{Z}i{Z}n{Z}g{Z}) {BeginAttributeValueUTF} {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_UTF}* {Z}\?{Z}>{Z} {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.
- {Z}l{Z}a{Z}n{Z}g{Z}u{Z}a{Z}g{Z}e{Z} {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageLanguage;}
- {Z}c{Z}o{Z}n{Z}t{Z}e{Z}n{Z}t{Z}T{Z}y{Z}p{Z}e{Z} {BeginAttributeValueUTF} {pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageContentType;}
- {Z}p{Z}a{Z}g{Z}e{Z}E{Z}n{Z}c{Z}o{Z}d{Z}i{Z}n{Z}g{Z} {BeginAttributeValueUTF} {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.
- {Z}%{Z}>{Z} { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;}
- {Z}\/{Z}>{Z} { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;}
-}
-
-
-<QuotedAttributeValue>
-{
- {Z}\"{Z} { yybegin(DQ_STRING); string.setLength(0); }
- {Z}\'{Z} { yybegin(SQ_STRING); string.setLength(0); }
- // in this state, anything other than a space character can start an undelimited string
- {S_UTF}*. { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);}
-}
-
-
-<DQ_STRING>
-{
-
- {Z}\"{Z} { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue; }
- {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- {Z}\?{Z}>{Z} { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- [^\x00] { string.append( yytext() ); }
- {Z}%{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
-
-
-}
-
-<SQ_STRING>
-{
-
- {Z}\'{Z} { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;}
- {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- {Z}%{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- {Z}<{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- // Skip over the single-byte 0s
- [^\x00] { string.append( yytext() ); }
- {Z}%{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
-
-
-}
-
-<UnDelimitedString>
-{
-
-
- {S_UTF} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue; }
- {Z}{LineTerminator}{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- {Z}\?{Z}>{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;}
- {Z}<{Z} { yypushback(yylength());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
- {Z}\'{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;}
- {Z}\"{Z} { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;}
-
- [^\x00] { string.append( yytext() ); }
- {Z}%{Z}>{Z} { yypushback(yylength());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)
-.|\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 09b1434b22..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,64 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jst.jsp.core; singleton:=true
-Bundle-Version: 1.2.500.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.contentmodel;x-internal:=true,
- org.eclipse.jst.jsp.css.core.internal.contenttype;x-internal:=true,
- org.eclipse.jst.jsp.css.core.internal.document;x-internal:=true,
- org.eclipse.jst.jsp.css.core.internal.encoding;x-internal:=true,
- org.eclipse.jst.jsp.css.core.internal.modelhandler;x-friends:="org.eclipse.jst.jsp.ui",
- org.eclipse.jst.jsp.css.core.internal.parser;x-internal:=true,
- org.eclipse.jst.jsp.css.core.internal.parserz;x-internal:=true
-Import-Package: com.ibm.icu.text;version="3.8",
- com.ibm.icu.util;version="3.8",
- javax.servlet.jsp.tagext;version="[2.0.0,3.0.0)"
-Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.jobs;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.filebuffers;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.jdt.core;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.wst.common.uriresolver;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.500,1.2.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.500,1.2.0)",
- org.eclipse.wst.css.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.html.core;bundle-version="[1.1.400,1.2.0)",
- org.eclipse.wst.validation;bundle-version="[1.2.100,1.3.0)",
- org.eclipse.core.filesystem;bundle-version="1.3.0",
- org.eclipse.osgi.services;bundle-version="3.2.0",
- org.eclipse.wst.common.project.facet.core;bundle-version="[1.4.0,2.0.0)";resolution:=optional,
- org.eclipse.wst.common.modulecore;bundle-version="[1.1.300,2.0.0)";resolution:=optional
-Bundle-ActivationPolicy: lazy; exclude:="org.eclipse.jst.jsp.core.internal.contenttype,org.eclipse.jst.jsp.css.core.internal.contenttype,org.eclipse.jst.jsp.core.internal.provisional.contenttype"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
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 2199df3f05..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>June, 2008</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 09a522d5c6..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/build.properties
+++ /dev/null
@@ -1,21 +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
-###############################################################################
-bin.includes = plugin.xml,\
- .options,\
- plugin.properties,\
- META-INF/,\
- .,\
- about.html
-bin.excludes = @dot/**,\
- temp.folder/**
-src.includes = DevTimeSupport/,\
- schema/
-source.. = src/
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 9691e67a73..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/plugin.properties
+++ /dev/null
@@ -1,33 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2010 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 Web Tools Platform
-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_TagX_Content_Type_Extension_Element.name=XML JSP Tag Definition
-JSP_TLD_Content_Type_Extension_Element.name=Tag Library Descriptor
-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
-JSP_Content_Validator.name=JSP Content Validator
-TLDValidator.name=Tag Library Descriptor Validator
-Structured_JSP_Document_Setup_participant.name=Structured JSP Document Setup Participant
-_validationMarker.name=JSP Problem
-_taskMarker.name=JSP Task
-
-extension-point.name.0 = JSP EL Translator
-
-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 4002668ab5..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/plugin.xml
+++ /dev/null
@@ -1,377 +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>
- <modelHandler
- class="org.eclipse.jst.jsp.core.internal.modelhandler.ModelHandlerForTag"
- associatedContentTypeId="org.eclipse.jst.jsp.core.tagsource"
- id="org.eclipse.jst.jsp.core.internal.modelhandler.tag">
- </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:org.eclipse.jst.jsp.core.taskMarker"
- contentTypeIds="org.eclipse.jst.jsp.core.jspsource" />
- </extension>
- <extension
- id="taskMarker"
- name="%_taskMarker.name"
- point="org.eclipse.core.resources.markers">
- <super type="org.eclipse.core.resources.taskmarker"/>
- <persistent value="true"/>
- </extension>
- <extension
- id="validationMarker"
- name="%_validationMarker.name"
- point="org.eclipse.core.resources.markers">
- <super type="org.eclipse.wst.validation.problemmarker"/>
- <persistent value="true"/>
- </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.contenttype.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="org.eclipse.jst.jsp.core.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="org.eclipse.jst.jsp.core.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,tagf"
- priority="high"
- name="%JSP_Tag_Content_Type_Extension_Element.name"
- id="org.eclipse.jst.jsp.core.tagsource"
- base-type="org.eclipse.jst.jsp.core.jspsource"
- default-charset="ISO-8859-1"/>
- <!-- create content type for JSP 2.0 TagX file types -->
- <content-type
- file-extensions="tagx,tagxf"
- priority="high"
- name="%JSP_TagX_Content_Type_Extension_Element.name"
- id="org.eclipse.jst.jsp.core.tagxsource"
- base-type="org.eclipse.jst.jsp.core.tagsource"
- default-charset="ISO-8859-1"/>
- <!-- create content type for .tld files -->
- <content-type
- file-extensions="tld"
- priority="high"
- name="%JSP_TLD_Content_Type_Extension_Element.name"
- id="org.eclipse.jst.jsp.core.tldsource"
- base-type="org.eclipse.core.runtime.xml"
- default-charset="UTF-8">
- <!-- add the describer so it's properly detected when opened from within .jar files -->
- <describer class="org.eclipse.core.runtime.content.XMLRootElementContentDescriber">
- <parameter name="element" value="taglib"/>
- </describer>
- </content-type>
-
-
- <!--======================================================================================-->
- <!-- minimal content-type css jsp support -->
- <!--======================================================================================-->
- <content-type
- file-extensions="jsp"
- priority="high"
- name="%contentTypeCSSJSPName"
- id="org.eclipse.jst.jsp.core.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="org.eclipse.jst.jsp.core.cssjspfragmentsource"
- base-type="org.eclipse.jst.jsp.core.cssjspsource">
- <describer
- class="org.eclipse.jst.jsp.css.core.internal.contenttype.ContentDescriberForJSPedCSS" />
- </content-type>
- </extension>
-
- <!-- initialize jsp core preferences -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceInitializer" />
- </extension>
-
- <!--======================================================================================-->
- <!-- JSP batch validation -->
- <!--======================================================================================-->
- <extension id="JSPBatchValidator" name="%JSP_Syntax_Validator.name" point="org.eclipse.wst.validation.validatorV2">
- <validator
- build="true"
- class="org.eclipse.jst.jsp.core.internal.validation.JSPBatchValidator"
- manual="true"
- version="1"
- markerId="org.eclipse.jst.jsp.core.validationMarker"
- sourceid="org.eclipse.jst.jsp.jspelsourcevalidator, org.eclipse.jst.jsp.ui.internal.validation.jspactionvalidator, org.eclipse.jst.jsp.tldsourcevalidator, org.eclipse.jst.jsp.jspsourcevalidator">
- <include>
- <rules>
- <projectNature id="org.eclipse.jdt.core.javanature"/>
- </rules>
- </include>
- <include>
- <rules>
- <contentType id="org.eclipse.jst.jsp.core.jspsource"/>
- <!-- needed until bug 181443 is implemented -->
- <contentType id="org.eclipse.jst.jsp.core.jspfragmentsource"/>
- <contentType id="org.eclipse.jst.jsp.core.tagsource"/>
- <fileext
- caseSensitive="false"
- ext="jsp">
- </fileext>
- <fileext
- caseSensitive="false"
- ext="jspf">
- </fileext>
- <fileext
- caseSensitive="false"
- ext="jsf">
- </fileext>
- <fileext
- caseSensitive="false"
- ext="tag">
- </fileext>
- <fileext
- caseSensitive="false"
- ext="tagf">
- </fileext>
- <fileext
- caseSensitive="false"
- ext="jsv">
- </fileext>
- <fileext
- caseSensitive="false"
- ext="jtpl">
- </fileext>
- </rules>
- </include>
- <group id="org.eclipse.wst.sse.core.structuredModelGroup"/>
- </validator>
- </extension>
-
- <extension id="JSPContentValidator" name="%JSP_Content_Validator.name" point="org.eclipse.wst.validation.validatorV2">
- <validator
- build="true"
- class="org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator"
- manual="true"
- version="1"
- markerId="org.eclipse.jst.jsp.core.validationMarker"
- sourceid="org.eclipse.jst.jsp.ui.internal.validation.markupvalidator, org.eclipse.jst.jsp.ui.internal.validation.htmlsyntaxvalidator">
- <include>
- <rules>
- <contentType id="org.eclipse.jst.jsp.core.jspsource"/>
- <!-- needed until bug 181443 is implemented -->
- <contentType id="org.eclipse.jst.jsp.core.jspfragmentsource"/>
- <fileext
- caseSensitive="false"
- ext="jsp">
- </fileext>
- <fileext
- caseSensitive="false"
- ext="jspf">
- </fileext>
- <fileext
- caseSensitive="false"
- ext="jsf">
- </fileext>
- <fileext
- caseSensitive="false"
- ext="tag">
- </fileext>
- <fileext
- caseSensitive="false"
- ext="tagf">
- </fileext>
- <fileext
- caseSensitive="false"
- ext="jsv">
- </fileext>
- <fileext
- caseSensitive="false"
- ext="jtpl">
- </fileext>
- </rules>
- </include>
- <group id="org.eclipse.wst.sse.core.structuredModelGroup"/>
- </validator>
- </extension>
-
- <extension id="TLDValidator" name="%TLDValidator.name" point="org.eclipse.wst.validation.validatorV2">
- <validator
- build="true"
- class="org.eclipse.jst.jsp.core.internal.validation.TLDValidator"
- manual="true"
- version="1"
- sourceid="org.eclipse.jst.jsp.ui.internal.validation.jspactionvalidator, org.eclipse.jst.jsp.tldsourcevalidator"
- markerId="org.eclipse.jst.jsp.core.validationMarker">
- <include>
- <rules>
- <contentType id="org.eclipse.jst.jsp.core.tldsource"/>
- <contentType id="org.eclipse.jst.jsp.core.tagxsource"/>
- <fileext caseSensitive="false" ext="tld"/>
- <fileext caseSensitive="false" ext="tagx"/>
- </rules>
- </include>
- <group id="org.eclipse.wst.sse.core.structuredModelGroup"/>
- </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>
-
- <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>
- -->
- <extension point="org.eclipse.wst.xml.core.modelQueryExtensions">
- <modelQueryExtension
- class="org.eclipse.jst.jsp.core.internal.modelquery.JSPModelQueryExtension"
- contentType="org.eclipse.jst.jsp.core.jspsource,org.eclipse.jst.jsp.core.jspfragmentsource,org.eclipse.jst.jsp.core.tagsource">
- </modelQueryExtension>
- </extension>
- <extension point="org.eclipse.wst.xml.core.modelQueryExtensions">
- <modelQueryExtension
- class="org.eclipse.jst.jsp.core.internal.modelquery.TaglibModelQueryExtension"
- contentType="org.eclipse.jst.jsp.core.jspsource,org.eclipse.jst.jsp.core.jspfragmentsource,org.eclipse.jst.jsp.core.tagsource">
- </modelQueryExtension>
- </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 a5d8e17258..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, 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
- * 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 9ba72d43ef..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCoreMessages.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2011 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_1;
- public static String JSPDirectiveValidator_2;
- public static String JSPDirectiveValidator_3;
- public static String JSPDirectiveValidator_4;
- public static String JSPDirectiveValidator_5;
- public static String JSPDirectiveValidator_6;
- public static String JSPDirectiveValidator_7;
- public static String JSPDirectiveValidator_8;
- public static String JSPDirectiveValidator_9;
- public static String JSPDirectiveValidator_10;
- public static String JSPDirectiveValidator_11;
-
- public static String JSPDirectiveValidator_12;
- public static String JSPActionValidator_0;
-
- public static String JSPActionValidator_1;
- 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;
- public static String JSPBatchValidator_0;
- public static String TaglibHelper_0;
- public static String TaglibHelper_1;
- public static String TaglibHelper_2;
- public static String TaglibHelper_3;
- public static String JSPTranslator_0;
- public static String JSPTranslator_1;
- public static String JSPTranslator_2;
- public static String JSPTranslator_3;
- public static String JSPTranslator_4;
- public static String JSPTranslator_5;
- public static String JSPELTranslator_0;
- public static String TLDValidator_MissingValidator;
- public static String TLDValidator_MissingVariable;
- public static String TLDValidator_MissingListener;
- public static String Initializing;
- public static String Persisting_JSP_Translations;
-
- public static String JSPCorePlugin_Initializing_JSP_Tools;
- public static String JSPIndexManager;
-
- /**
- * @deprecated
- */
- public static String MESSAGE_JSP_VALIDATING_MESSAGE_UI_;
-
- 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 039626a27b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePlugin.java
+++ /dev/null
@@ -1,230 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.resources.IResourceChangeEvent;
-import org.eclipse.core.resources.IResourceChangeListener;
-import org.eclipse.core.resources.ISaveContext;
-import org.eclipse.core.resources.ISaveParticipant;
-import org.eclipse.core.resources.ISavedState;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.IWorkspaceRunnable;
-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.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-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.contenttype.DeploymentDescriptorPropertyCache;
-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 {
- /** singleton instance of the plugin */
- private static JSPCorePlugin plugin;
-
- /**
- * <p>Job used to finish tasks needed to start up the plugin but that did not have
- * to block the plugin start up process.</p>
- */
- private Job fPluginInitializerJob;
-
- /**
- * The constructor.
- */
- public JSPCorePlugin() {
- super();
- plugin = this;
- this.fPluginInitializerJob = new PluginInitializerJob();
- }
-
- /**
- * Returns the shared instance.
- */
- 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);
-
- /*
- * JSPIndexManager depends on TaglibController, so TaglibController
- * should be started first
- */
- TaglibIndex.startup();
- TaglibController.startup();
-
- // listen for classpath changes
- JavaCore.addElementChangedListener(TaglibHelperManager.getInstance());
-
- //schedule delayed initialization
- this.fPluginInitializerJob.schedule(2000);
-
- // listen for resource changes to update content properties keys
- JSPFContentPropertiesManager.startup();
-
- DeploymentDescriptorPropertyCache.start();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- DeploymentDescriptorPropertyCache.stop();
-
- // stop listening for resource changes to update content properties keys
- JSPFContentPropertiesManager.shutdown();
-
- //remove the plugin save participant
- ResourcesPlugin.getWorkspace().removeSaveParticipant(plugin.getBundle().getSymbolicName());
-
- // stop any indexing
- JSPIndexManager.getDefault().stop();
-
- // stop listening for classpath changes
- JavaCore.removeElementChangedListener(TaglibHelperManager.getInstance());
-
- // stop taglib controller
- TaglibController.shutdown();
- TaglibIndex.shutdown();
-
- super.stop(context);
- }
-
- /**
- * <p>A {@link Job} used to perform delayed initialization for the plugin</p>
- */
- private static class PluginInitializerJob extends Job {
- /**
- * <p>Default constructor to set up this {@link Job} as a
- * long running system {@link Job}</p>
- */
- protected PluginInitializerJob() {
- super(JSPCoreMessages.JSPCorePlugin_Initializing_JSP_Tools);
-
- this.setUser(false);
- this.setSystem(true);
- this.setPriority(Job.LONG);
- }
-
- /**
- * <p>Perform delayed initialization for the plugin</p>
- *
- * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
- */
- protected IStatus run(IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
- final IWorkspace workspace = ResourcesPlugin.getWorkspace();
- try {
- /*
- * Restore save state and process any events that happened before
- * plug-in loaded. Don't do it immediately since adding the save
- * participant requires a lock on the workspace to compute the
- * accumulated deltas, and if the tree is not already locked it
- * becomes a blocking call.
- */
- workspace.run(new IWorkspaceRunnable() {
- public void run(final IProgressMonitor worspaceMonitor) throws CoreException {
- ISavedState savedState = null;
-
- try {
- //add the save participant for this bundle
- savedState = ResourcesPlugin.getWorkspace().addSaveParticipant(
- JSPCorePlugin.plugin.getBundle().getSymbolicName(), new SaveParticipant());
- } catch (CoreException e) {
- Logger.logException("JSP Core Plugin failed at loading previously saved state." + //$NON-NLS-1$
- " All componenets dependent on this state will start as if first workspace load.", e); //$NON-NLS-1$
- }
-
- //if there is a saved state start up using that, else start up cold
- if(savedState != null) {
- try {
- Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
- } finally {
- savedState.processResourceChangeEvents(new IResourceChangeListener() {
- /**
- * @see org.eclipse.core.resources.IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
- */
- public void resourceChanged(IResourceChangeEvent event) {
- JSPIndexManager.getDefault().start(event.getDelta(), worspaceMonitor);
- }
- });
- }
- } else {
- JSPIndexManager.getDefault().start(null, worspaceMonitor);
- }
- }
- }, monitor);
- } catch(CoreException e) {
- status = e.getStatus();
- }
- return status;
- }
-
- }
-
- /**
- * Used so that all of the IResourceChangeEvents that occurred before
- * this plugin loaded can be processed.
- */
- private static class SaveParticipant implements ISaveParticipant {
- /**
- * <p>Default constructor</p>
- */
- protected SaveParticipant() {
- }
-
- /**
- * @see org.eclipse.core.resources.ISaveParticipant#doneSaving(org.eclipse.core.resources.ISaveContext)
- */
- public void doneSaving(ISaveContext context) {
- //ignore
- }
-
- /**
- * @see org.eclipse.core.resources.ISaveParticipant#prepareToSave(org.eclipse.core.resources.ISaveContext)
- */
- public void prepareToSave(ISaveContext context) throws CoreException {
- //ignore
- }
-
- /**
- * @see org.eclipse.core.resources.ISaveParticipant#rollback(org.eclipse.core.resources.ISaveContext)
- */
- public void rollback(ISaveContext context) {
- //ignore
- }
-
- /**
- * @see org.eclipse.core.resources.ISaveParticipant#saving(org.eclipse.core.resources.ISaveContext)
- */
- public void saving(ISaveContext context) throws CoreException {
- context.needDelta();
- }
- }
-}
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 ff3c80e963..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/JSPCorePluginResources.properties
+++ /dev/null
@@ -1,54 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2011 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 analyze 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={0} is a reserved prefix. Try another
-JSPDirectiveValidator_1=Can not find the tag library descriptor for "{0}"
-JSPDirectiveValidator_2=The prefix "{0} "is used more than once
-JSPDirectiveValidator_3=A {0} value is required in this directive
-JSPDirectiveValidator_4=Fragment "{0}" was not found at expected path {1}
-JSPDirectiveValidator_5=Missing required attribute "{0}"
-JSPDirectiveValidator_6=Undefined attribute name "{0}"
-JSPDirectiveValidator_7=A {0} or {1} value is required in this directive
-JSPDirectiveValidator_8=The superclass "{0}" was not found on the Java Build Path
-JSPDirectiveValidator_9=Can not find the tag library descriptor for "{0}". Try increasing the version of the Dynamic Web Module project facet, as this method of reference may not be supported by the current JSP version ({1}).
-JSPDirectiveValidator_10=Can not find the tag library descriptor for "{0}". Try using a newer grammar or declared version in the Web Deployment Descriptor.
-JSPDirectiveValidator_11=Can not find the tag directory "{0}"
-JSPDirectiveValidator_12=The attribute name "{0}" is used more than once
-JSPActionValidator_0=Tag ({0}) must be empty
-JSPActionValidator_1="{0}" does not support runtime expressions
-JSPBatchValidator_0=Gathering files in {0}
-TaglibHelper_0=The TagExtraInfo class for "{0}" ({1}) was not found on the Java Build Path
-TaglibHelper_1=The TagExtraInfo class for "{0}" ({1}) could not be instantiated
-TaglibHelper_2=A problem was encountered using TagExtraInfo class {1} for '{0}'
-TaglibHelper_3=The tag handler class for "{0}" ({1}) was not found on the Java Build Path
-JSPTranslator_0=Invalid identifier: "{0}"
-JSPTranslator_1=Undefined type: {0}
-JSPTranslator_2=Can not declare both "class" and "beanName" attributes
-JSPTranslator_3=Unknown type for identifier "{0}"
-JSPTranslator_4=Missing start tag for "{0}"
-JSPTranslator_5=Missing end tag for "{0}"
-JSPELTranslator_0=The function {0} is undefined
-TLDValidator_MissingValidator=The TagLibraryValidator subclass '{0}' was not found on the Java Build Path
-TLDValidator_MissingVariable=The variable class '{0}' was not found on the Java Build Path
-TLDValidator_MissingListener=The listener class '{0}' was not found on the Java Build Path
-Initializing=Processing JSP changes since last activation
-Persisting_JSP_Translations=Persisting JSP Translations
-
-JSPCorePlugin_Initializing_JSP_Tools=Initializing JSP Tools
-JSPIndexManager=JSP Index Manager \ No newline at end of file
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 02d02ae46c..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, 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;
-
-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 11707b72ab..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, 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.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;
- }
-}
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 b330f92494..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, 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.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);
- }
-}
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 69eeca3eba..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, 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.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;
- }
-}
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 ee8619eb5f..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, 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.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;
- }
-}
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 a8b7d21c9a..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, 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.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);
- }
-}
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 3ae1d2e761..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/JSPCMDocumentFactory.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.provisional.contentmodel.CMDocType;
-
-/**
- * CMDocument factory for JSP documents (which for now live in the HTML Core
- * plugin).
- */
-public final class JSPCMDocumentFactory {
-
- private JSPCMDocumentFactory() {
- super();
- }
-
- public static CMDocument getCMDocument() {
- return getCMDocument(CMDocType.JSP21_DOC_TYPE);
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMDocument
- * @param cmtype
- * java.lang.String
- */
- public static CMDocument getCMDocument(String cmtype) {
- if (cmtype == null)
- return getCMDocument();
- return HTMLCMDocumentFactory.getCMDocument(cmtype);
- }
-
- public static CMDocument getCMDocument(float jspVersion) {
- if (jspVersion >= 2.1f)
- return getCMDocument(CMDocType.JSP21_DOC_TYPE);
- else if (jspVersion >= 2)
- return getCMDocument(CMDocType.JSP20_DOC_TYPE);
- else if (jspVersion >= 1.2f)
- return getCMDocument(CMDocType.JSP12_DOC_TYPE);
- else if (jspVersion >= 1)
- return getCMDocument(CMDocType.JSP11_DOC_TYPE);
- return getCMDocument();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/TAGCMDocumentFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/TAGCMDocumentFactory.java
deleted file mode 100644
index 1a6fe4c739..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/TAGCMDocumentFactory.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.provisional.contentmodel.CMDocType;
-
-/**
- * CMDocument factory for TAG documents
- * plugin).
- */
-public final class TAGCMDocumentFactory {
-
- private TAGCMDocumentFactory() {
- super();
- }
-
- public static CMDocument getCMDocument() {
- return getCMDocument(CMDocType.TAG21_DOC_TYPE);
- }
-
- /**
- * @return org.eclipse.wst.xml.core.internal.contentmodel.CMDocument
- * @param cmtype
- * java.lang.String
- */
- public static CMDocument getCMDocument(String cmtype) {
- if (cmtype == null)
- return getCMDocument();
- return HTMLCMDocumentFactory.getCMDocument(cmtype);
- }
-
-
-
- public static CMDocument getCMDocument(float jspVersion) {
- if (jspVersion >= 2.1f)
- return getCMDocument(CMDocType.TAG21_DOC_TYPE);
- else
- return getCMDocument(CMDocType.TAG20_DOC_TYPE);
- }
-}
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 f7ffd2cb5f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/TaglibController.java
+++ /dev/null
@@ -1,373 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2010 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.IDocumentSetupParticipantExtension;
-import org.eclipse.core.filebuffers.IFileBuffer;
-import org.eclipse.core.filebuffers.IFileBufferListener;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.filebuffers.LocationKind;
-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.taglib.ITaglibIndexDelta;
-import org.eclipse.jst.jsp.core.taglib.ITaglibIndexListener;
-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;
-import org.eclipse.wst.xml.core.internal.parser.XMLSourceParser;
-
-/**
- * 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, IDocumentSetupParticipantExtension {
-
- class DocumentInfo implements ITaglibIndexListener {
- IStructuredDocument document;
- ITextFileBuffer textFileBuffer;
- IPath location;
- LocationKind locationKind;
- TLDCMDocumentManager tldDocumentManager;
-
- public void indexChanged(ITaglibIndexDelta delta) {
- int type = delta.getKind();
- if (type == ITaglibIndexDelta.CHANGED || type == ITaglibIndexDelta.REMOVED) {
- ITaglibIndexDelta[] deltas = delta.getAffectedChildren();
- boolean affected = false;
- for (int i = 0; i < deltas.length; i++) {
- Object key = TLDCMDocumentManager.getUniqueIdentifier(deltas[i].getTaglibRecord());
- if (tldDocumentManager.getDocuments().containsKey(key)) {
- affected = true;
- }
- }
- if (affected) {
- if (_debugCache) {
- System.out.println("TLDCMDocumentManager cleared its private CMDocument cache"); //$NON-NLS-1$
- }
- tldDocumentManager.getDocuments().clear();
- tldDocumentManager.getSourceParser().resetHandlers();
-
- if (document instanceof BasicStructuredDocument) {
- ((BasicStructuredDocument) document).reparse(this);
- }
- }
- }
- tldDocumentManager.indexChanged(delta);
- }
- }
-
- 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 = null;
- synchronized (_instance.fDocumentMap) {
- info = (DocumentInfo) _instance.fDocumentMap.get(document);
- }
- if (info != null) {
- // remember the buffer now
- info.textFileBuffer = (ITextFileBuffer) buffer;
- }
- else {
- info = new DocumentInfo();
- info.document = (IStructuredDocument) document;
- info.textFileBuffer = (ITextFileBuffer) buffer;
- info.location = buffer.getLocation();
- info.locationKind = LocationKind.NORMALIZE;
- info.tldDocumentManager = new TLDCMDocumentManager();
- info.tldDocumentManager.setSourceParser((XMLSourceParser) info.document.getParser());
- synchronized (_instance.fDocumentMap) {
- _instance.fDocumentMap.put(document, info);
- }
- if (document instanceof BasicStructuredDocument && document.getLength() > 0) {
- ((BasicStructuredDocument) document).reparse(this);
- }
- TaglibIndex.addTaglibIndexListener(info);
- }
- }
- }
-
- /*
- * (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) {
- Map.Entry[] entries = (Map.Entry[]) fDocumentMap.entrySet().toArray(new Map.Entry[fDocumentMap.size()]);
- for (int i = 0; i < entries.length; i++) {
- info = (DocumentInfo) entries[i].getValue();
- /**
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=222137
- *
- * Might be null if setup() has been called but
- * bufferCreated() has not, yet.
- */
- if (info != null && info.textFileBuffer != null && info.textFileBuffer.equals(buffer)) {
- fDocumentMap.remove(entries[i].getKey());
- 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 IPath getLocation(IDocument document) {
- synchronized (_instance.fDocumentMap) {
- DocumentInfo info = (DocumentInfo) _instance.fDocumentMap.get(document);
- if (info != null)
- return info.location;
- return null;
- }
- }
-
- /**
- * @param manager
- * @return
- */
- public static IPath getLocation(TLDCMDocumentManager manager) {
- // if _instance is null, we are already shutting donw
- if (_instance == null)
- return null;
-
- IPath location = null;
- synchronized (_instance.fDocumentMap) {
- Iterator docInfos = _instance.fDocumentMap.values().iterator();
- while (docInfos.hasNext() && location == null) {
- DocumentInfo info = (DocumentInfo) docInfos.next();
- if (info.tldDocumentManager.equals(manager))
- location = info.location;
- }
- }
- return location;
- }
-
- public static TLDCMDocumentManager getTLDCMDocumentManager(IDocument document) {
- // if _instance is null, we are already shutting down
- 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);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.filebuffers.IDocumentSetupParticipantExtension#setup(org.eclipse.jface.text.IDocument,
- * org.eclipse.core.runtime.IPath,
- * org.eclipse.core.filebuffers.LocationKind)
- */
- public void setup(IDocument document, IPath location, LocationKind locationKind) {
- // if we've already shutdown, just ignore
- if (isShutdown())
- return;
- // reference the shared instance's documents directly
- synchronized (_instance.fJSPdocuments) {
- _instance.fJSPdocuments.add(document);
- }
-
- DocumentInfo info = new DocumentInfo();
- info.document = (IStructuredDocument) document;
- info.textFileBuffer = null; // will be supplied later
- info.location = location;
- info.locationKind = locationKind;
- info.tldDocumentManager = new TLDCMDocumentManager();
- synchronized (_instance.fDocumentMap) {
- _instance.fDocumentMap.put(document, info);
- }
- info.tldDocumentManager.setSourceParser((XMLSourceParser) info.document.getParser());
- if (document instanceof BasicStructuredDocument && document.getLength() > 0) {
- ((BasicStructuredDocument) document).reparse(this);
- }
- TaglibIndex.addTaglibIndexListener(info);
- }
-}
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 f26a744ace..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMAttributeDeclarationImpl.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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 {
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=170556
- private static final 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;
- }
-
- public CMAttributeDeclarationImpl(CMDocument owner, String defaultRtexprvalue) {
- this(owner);
- rtexprvalue = defaultRtexprvalue;
- }
-
- /**
- * 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 described 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 != null) {
- if (newRequired.equalsIgnoreCase(JSP12TLDNames.TRUE) || newRequired.equalsIgnoreCase(JSP12TLDNames.YES))
- setRequired(true);
- else if (newRequired.equalsIgnoreCase(JSP12TLDNames.FALSE) || newRequired.equalsIgnoreCase(JSP12TLDNames.NO))
- 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();
- }
-}
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 1c325a3567..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, 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.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;
- }
-}
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 2d09e6a95d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentFactoryTLD.java
+++ /dev/null
@@ -1,1160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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.ByteArrayInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-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.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.jsp.core.internal.Logger;
-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.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.modelhandler.ModelHandlerForJSP;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP20Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.internal.util.DocumentProvider;
-import org.eclipse.jst.jsp.core.internal.util.FacetModuleCoreSupport;
-import org.eclipse.jst.jsp.core.taglib.IJarRecord;
-import org.eclipse.jst.jsp.core.taglib.ITLDRecord;
-import org.eclipse.jst.jsp.core.taglib.ITagDirRecord;
-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.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.JarUtilities;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-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.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * CMDocumentBuilder for Tag Library Descriptors and tag files
- *
- * Returns namespace-less CMDocuments for a tag library 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 CMDocumentImpl buildCMDocumentFromFolder(IPath path) {
- if (_debug) {
- System.out.println("tagdir loading for " + path); //$NON-NLS-1$
- }
- // EBNF is listed at 1.3.10
- CMDocumentImpl document = new CMDocumentImpl();
- document.setBaseLocation(path.toString());
- document.setTlibversion("1.0"); //$NON-NLS-1$
- IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(path);
- IResource[] tagfiles;
- try {
- tagfiles = folder.members();
- for (int i = 0; i < tagfiles.length; i++) {
- if (tagfiles[i].getType() == IResource.FILE) {
- if (tagfiles[i].getType() != IResource.FILE)
- continue;
- String extension = tagfiles[i].getFileExtension();
- if (extension != null && (extension.equals("tag") || extension.equals("tagx"))) {
- CMElementDeclaration ed = createElementDeclaration(document, (IFile) tagfiles[i]);
- if (ed != null) {
- document.fElements.setNamedItem(ed.getNodeName(), ed);
- }
- }
- }
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- return document;
- }
-
- /**
- * 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;
- if (fileName.endsWith(".jar")) { //$NON-NLS-1$
- result = buildCMDocumentFromJar(fileName);
- }
- else {
- File file = new File(fileName);
- try {
- if (file.isDirectory()) {
- result = buildCMDocumentFromDirectory(file);
- }
- else {
- result = buildCMDocumentFromFile(fileName);
- }
- }
- catch (SecurityException e) {
- result = null;
- }
- }
- return result;
- }
-
- private CMDocument buildCMDocumentFromDirectory(File file) {
- IFile[] foundFilesForLocation = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(new Path(file.getPath()));
- for (int i = 0; i < foundFilesForLocation.length; i++) {
- if (foundFilesForLocation[i].isAccessible() && foundFilesForLocation[i].getType() == IResource.FOLDER) {
- return buildCMDocumentFromFolder(foundFilesForLocation[i].getFullPath());
- }
- }
- return null;
- }
-
- protected CMElementDeclaration createElementDeclaration(CMDocumentImpl document, Element tagFileNode, String path) {
- CMElementDeclarationImpl ed = new CMElementDeclarationImpl(document);
- /*
- * Preload with information from the tag file--it can be overwritten
- * by the values from the TLD
- */
- final IFile reference = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(document.getBaseLocation()));
- IPath tagPath = null;
- if (reference != null && reference.isAccessible()) {
- if (!FacetModuleCoreSupport.isDynamicWebProject(reference.getProject())) {
- tagPath = getExportedTagPath(reference, path);
- }
- else {
- // Even if it's a DWP, it's possible that it might be exported like a Java project when not within WebContent root
- final IPath root = FacetModuleCoreSupport.getWebContentRootPath(reference.getProject());
- if (root != null) {
- // It's not in the WebContent root path
- if (root.matchingFirstSegments(reference.getFullPath()) != root.segmentCount()) {
- tagPath = getExportedTagPath(reference, path);
- }
- }
- }
- }
- if (tagPath == null) {
- tagPath = FacetModuleCoreSupport.resolve(new Path(document.getBaseLocation()), path);
- }
- if (tagPath.segmentCount() > 1) {
- IFile tagFile = ResourcesPlugin.getWorkspace().getRoot().getFile(tagPath);
- if (tagFile.isAccessible()) {
- ed.setPath(tagFile.getFullPath().toString());
- if (tagPath.getFileExtension().equals("tag")) {
- loadTagFile(ed, tagFile, true);
- }
- else if (tagPath.getFileExtension().equals("tagx")) {
- loadTagXFile(ed, tagFile, true);
- }
-
- if (tagFile.getLocation() != null && ed.getSmallIcon() != null) {
- ed.setSmallIconURL(URIHelper.normalize(ed.getSmallIcon(), "file:" + tagFile.getLocation().toString(), tagFile.getLocation().removeLastSegments(1).toString()));
- }
- }
- else if (isJarFile(document.getBaseLocation())) {
- String jarLocation = document.getBaseLocation();
- boolean tag = path.endsWith(".tag"); //$NON-NLS-1$
- InputStream contents = JarUtilities.getInputStream(jarLocation, path);
- if (tag) {
- loadTagFile(ed, tagFile, true, contents);
- }
- else {
- loadTagXFile(ed, tagFile, true, contents);
- }
- // set the location string properly for this tag (BUG 353615)
- ed.setLocationString("jar:file://" + document.getBaseLocation() + "!" + path); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- contents.close();
- }
- catch (IOException e) {
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- }
- }
-
- // 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));
- }
- 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();
- }
-
- return ed;
- }
-
- private IPath getExportedTagPath(IFile file, String path) {
- final IJavaProject javaProject = JavaCore.create(file.getProject());
- if (javaProject != null) {
- try {
- final IPackageFragmentRoot[] packageFragmentRoots = javaProject.getPackageFragmentRoots();
- for (int i = 0; i < packageFragmentRoots.length; i++) {
- if (!packageFragmentRoots[i].isArchive() && !packageFragmentRoots[i].isExternal()) {
- return packageFragmentRoots[i].getPath().append(new Path(path));
- }
- }
- }
- catch (JavaModelException e) {
- Logger.logException(e);
- }
- }
- return null;
- }
-
- private boolean isJarFile(String path) {
- if (path == null)
- return false;
- final int idx = path.lastIndexOf('.');
- return idx >= 0 && idx < (path.length() - 1) && path.substring(idx + 1).equalsIgnoreCase("jar"); //$NON-NLS-1$
- }
-
- 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);
- }
- else if (nodeName.equals(JSP20TLDNames.DYNAMIC_ATTRIBUTES) && child.hasChildNodes()) {
- ed.setDynamicAttributes(getContainedText(child));
- }
- }
- child = child.getNextSibling();
- }
- return ed;
- }
-
- private CMElementDeclaration createElementDeclaration(CMDocument document, IFile tagFile) {
- CMElementDeclarationImpl ed = new CMElementDeclarationImpl(document);
- // in tag files, the default body content is scriptless instead of JSP
- ed.setBodycontent(JSP20TLDNames.CONTENT_SCRIPTLESS);
- String shortFilename = tagFile.getName();
- String fileExtension = tagFile.getFileExtension();
- if (fileExtension != null && fileExtension.length() > 0) {
- shortFilename = shortFilename.substring(0, shortFilename.length() - fileExtension.length() - 1);
- }
- ed.setNodeName(shortFilename);
- ed.setPath(tagFile.getFullPath().toString());
- if ("tag".equals(fileExtension)) { //$NON-NLS-1$
- loadTagFile(ed, tagFile, true);
- }
- else if ("tagx".equals(fileExtension)) { //$NON-NLS-1$
- loadTagXFile(ed, tagFile, true);
- }
-
- if (tagFile.getLocation() != null && ed.getSmallIcon() != null) {
- ed.setSmallIconURL(URIHelper.normalize(ed.getSmallIcon(), "file:" + tagFile.getLocation().toString(), tagFile.getLocation().removeLastSegments(1).toString()));
- }
- 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 getValue(children.item(0));
- }
- 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(getValue(child));
- }
- child = child.getNextSibling();
- }
- return s.toString().trim();
- }
-
- private String getValue(Node n) {
- if (n == null)
- return ""; //$NON-NLS-1$
- String value = n.getNodeValue();
- if (value == null)
- return ""; //$NON-NLS-1$
- return value.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();
- if(nodeName.indexOf(':') > 0) {
- nodeName = nodeName.substring(nodeName.indexOf(':'));
- }
- // 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;
- Node path = tagFileElement.getFirstChild();
- while (path != null) {
- if (path.getNodeType() == Node.ELEMENT_NODE && (JSP20TLDNames.PATH.equals(path.getNodeName()) || JSP20TLDNames.PATH.equals(path.getLocalName()))) {
- String pathValue = getContainedText(path);
- if (pathValue != null && pathValue.length() > 0) {
- CMElementDeclarationImpl ed = (CMElementDeclarationImpl) createElementDeclaration(document, tagFileElement, pathValue);
- if (ed != null) {
- document.fElements.setNamedItem(ed.getNodeName(), ed);
- }
- }
- }
- path = path.getNextSibling();
- }
- }
- // 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) && child.hasChildNodes()) {
- 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;
- }
-
- void loadTagXFile(final CMElementDeclarationImpl ed, IFile tagxFile, boolean allowIncludes) {
- loadTagXFile(ed, tagxFile, allowIncludes, null);
- }
-
- void loadTagXFile(final CMElementDeclarationImpl ed, IFile tagxFile, boolean allowIncludes, InputStream inputStream) {
- if (allowIncludes) {
- ed.setPath(tagxFile.getFullPath().toString());
- ed.setTagSource(TLDElementDeclaration.SOURCE_TAG_FILE);
- }
- try {
- SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
- InputSource inputSource = new InputSource(tagxFile.getFullPath().toString());
- InputStream input = inputStream != null ? inputStream : tagxFile.getContents(false);
- inputSource.setByteStream(input);
- parser.parse(inputSource, new DefaultHandler() {
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
- InputSource inputSource2 = new InputSource(systemId);
- inputSource2.setByteStream(new ByteArrayInputStream(new byte[0]));
- return inputSource2;
- }
-
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- super.startElement(uri, localName, qName, attributes);
- if (qName.equals(JSP20Namespace.ElementName.DIRECTIVE_TAG)) {
- if (attributes.getIndex(JSP12TLDNames.DISPLAY_NAME) >= 0)
- ed.setDisplayName(attributes.getValue(JSP12TLDNames.DISPLAY_NAME));
- if (attributes.getIndex(JSP12TLDNames.BODY_CONTENT) >= 0)
- ed.setBodycontent(attributes.getValue(JSP12TLDNames.BODY_CONTENT));
- if (attributes.getIndex(JSP20TLDNames.DYNAMIC_ATTRIBUTES) >= 0)
- ed.setDynamicAttributes(attributes.getValue(JSP20TLDNames.DYNAMIC_ATTRIBUTES));
- if (attributes.getIndex(JSP12TLDNames.SMALL_ICON) >= 0)
- ed.setSmallIcon(attributes.getValue(JSP12TLDNames.SMALL_ICON));
- if (attributes.getIndex(JSP12TLDNames.LARGE_ICON) >= 0)
- ed.setLargeIcon(attributes.getValue(JSP12TLDNames.LARGE_ICON));
- if (attributes.getIndex(JSP12TLDNames.DESCRIPTION) >= 0)
- ed.setDescription(attributes.getValue(JSP12TLDNames.DESCRIPTION));
- if (attributes.getIndex(JSP20TLDNames.EXAMPLE) >= 0)
- ed.setExample(attributes.getValue(JSP20TLDNames.EXAMPLE));
- if (attributes.getIndex(JSP20TLDNames.SCRIPTING_LANGUAGE) >= 0)
- ed.setScriptingLanguage(attributes.getValue(JSP20TLDNames.SCRIPTING_LANGUAGE));
- if (attributes.getIndex(JSP20TLDNames.IMPORT) >= 0)
- ed.setImport(attributes.getValue(JSP20TLDNames.IMPORT));
- if (attributes.getIndex(JSP20TLDNames.PAGE_ENCODING) >= 0)
- ed.setPageEncoding(attributes.getValue(JSP20TLDNames.PAGE_ENCODING));
- if (attributes.getIndex(JSP20TLDNames.IS_EL_IGNORED) >= 0)
- ed.setIsELIgnored(attributes.getValue(JSP20TLDNames.IS_EL_IGNORED));
- }
- else if (qName.equals(JSP20Namespace.ElementName.DIRECTIVE_ATTRIBUTE)) {
- CMAttributeDeclarationImpl attribute = new CMAttributeDeclarationImpl(ed.getOwnerDocument(), JSP11Namespace.ATTR_VALUE_TRUE);
- String nameValue = attributes.getValue(JSP12TLDNames.NAME);
- attribute.setNodeName(nameValue);
- if (attributes.getIndex(JSP20TLDNames.FRAGMENT) >= 0)
- attribute.setFragment(Boolean.valueOf(attributes.getValue(JSP20TLDNames.FRAGMENT)).booleanValue());
- if (attributes.getIndex(JSP12TLDNames.RTEXPRVALUE) >= 0)
- attribute.setRtexprvalue(attributes.getValue(JSP12TLDNames.RTEXPRVALUE));
- if (attributes.getIndex(JSP20TLDNames.TYPE) >= 0)
- attribute.setType(attributes.getValue(JSP20TLDNames.TYPE));
- if (attributes.getIndex(JSP12TLDNames.DESCRIPTION) >= 0)
- attribute.setDescription(attributes.getValue(JSP12TLDNames.DESCRIPTION));
- if (attributes.getIndex(JSP12TLDNames.REQUIRED) >= 0)
- attribute.setRequiredString(attributes.getValue(JSP12TLDNames.REQUIRED));
- if (nameValue != null && nameValue.length() > 0) {
- ed.fAttributes.setNamedItem(nameValue, attribute);
- }
- }
- else if (qName.equals(JSP20Namespace.ElementName.DIRECTIVE_VARIABLE)) {
- TLDVariableImpl variable = new TLDVariableImpl();
- if (attributes.getIndex(JSP12TLDNames.VARIABLE_NAME_GIVEN) >= 0)
- variable.setNameGiven(attributes.getValue(JSP12TLDNames.VARIABLE_NAME_GIVEN));
- if (attributes.getIndex(JSP12TLDNames.VARIABLE_NAME_FROM_ATTRIBUTE) >= 0)
- variable.setNameFromAttribute(attributes.getValue(JSP12TLDNames.VARIABLE_NAME_FROM_ATTRIBUTE));
- if (attributes.getIndex(JSP20TLDNames.VARIABLE_ALIAS) >= 0)
- variable.setAlias(attributes.getValue(JSP20TLDNames.VARIABLE_ALIAS));
- if (attributes.getIndex(JSP12TLDNames.VARIABLE_CLASS) >= 0)
- variable.setVariableClass(attributes.getValue(JSP12TLDNames.VARIABLE_CLASS));
- if (attributes.getIndex(JSP12TLDNames.VARIABLE_DECLARE) >= 0)
- variable.setDeclareString(attributes.getValue(JSP12TLDNames.VARIABLE_DECLARE));
- if (attributes.getIndex(JSP11Namespace.ATTR_NAME_SCOPE) >= 0)
- variable.setScope(attributes.getValue(JSP11Namespace.ATTR_NAME_SCOPE));
- if (attributes.getIndex(JSP12TLDNames.DESCRIPTION) >= 0)
- variable.setDescription(attributes.getValue(JSP12TLDNames.DESCRIPTION));
- if (variable.getAlias() != null || variable.getNameFromAttribute() != null || variable.getNameGiven() != null) {
- ed.getVariables().add(variable);
- }
- }
- else if (qName.equals(JSP11Namespace.ElementName.DIRECTIVE_INCLUDE)) {
- IPath filePath = null;
- String text = attributes.getValue(JSP11Namespace.ATTR_NAME_FILE);
- if (text != null) {
- filePath = FacetModuleCoreSupport.resolve(new Path(((CMDocumentImpl) ed.getOwnerDocument()).getBaseLocation()), text);
- IFile includedFile = ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
- if (includedFile.isAccessible()) {
- loadTagXFile(ed, includedFile, false);
- }
- }
- }
- }
- });
- input.close();
- }
- catch (ParserConfigurationException e) {
- Logger.log(Logger.ERROR_DEBUG, e.getMessage(), e);
- }
- catch (SAXException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- catch (IOException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- catch (CoreException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- ed.setLocationString(tagxFile.getFullPath().toString());
- }
-
- private void loadTagFile(CMElementDeclarationImpl ed, IFile tagFile, boolean allowIncludes) {
- loadTagFile(ed, tagFile, allowIncludes, null);
- }
-
- private void loadTagFile(CMElementDeclarationImpl ed, IFile tagFile, boolean allowIncludes, InputStream inputStream) {
- try {
- if (allowIncludes) {
- ed.setPath(tagFile.getFullPath().toString());
- ed.setTagSource(TLDElementDeclaration.SOURCE_TAG_FILE);
- ed.setLocationString(tagFile.getFullPath().toString());
- }
- IStructuredDocument document = null;
- if(inputStream != null) {
- document = (IStructuredDocument)new ModelHandlerForJSP().getDocumentLoader().createNewStructuredDocument(tagFile.getName(), inputStream);
- }
- else if(tagFile.isAccessible()) {
- document = (IStructuredDocument) new ModelHandlerForJSP().getDocumentLoader().createNewStructuredDocument(tagFile);
- }
- if (document == null)
- return;
- IStructuredDocumentRegion documentRegion = document.getFirstStructuredDocumentRegion();
- while (documentRegion != null) {
- if (documentRegion.getType().equals(DOMJSPRegionContexts.JSP_DIRECTIVE_NAME)) {
- if (documentRegion.getNumberOfRegions() > 2) {
- ITextRegionList regions = documentRegion.getRegions();
- String directiveName = documentRegion.getText(regions.get(1));
- if (JSP12TLDNames.TAG.equals(directiveName)) {
- // 8.5.1
- String attrName = null;
- for (int i = 2; i < documentRegion.getNumberOfRegions(); i++) {
- ITextRegion region = regions.get(i);
- String text = documentRegion.getText(region);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- attrName = text;
- }
- // process value
- else if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- text = StringUtils.strip(text);
- if (JSP12TLDNames.DISPLAY_NAME.equals(attrName)) {
- ed.setDisplayName(text);
- }
- else if (JSP12TLDNames.BODY_CONTENT.equals(attrName)) {
- ed.setBodycontent(text);
- }
- else if (JSP20TLDNames.DYNAMIC_ATTRIBUTES.equals(attrName)) {
- ed.setDynamicAttributes(text);
- }
- else if (JSP12TLDNames.SMALL_ICON.equals(attrName)) {
- ed.setSmallIcon(text);
- }
- else if (JSP12TLDNames.LARGE_ICON.equals(attrName)) {
- ed.setLargeIcon(text);
- }
- else if (JSP12TLDNames.DESCRIPTION.equals(attrName)) {
- ed.setDescription(text);
- }
- else if (JSP20TLDNames.EXAMPLE.equals(attrName)) {
- ed.setExample(text);
- }
- else if (JSP20TLDNames.SCRIPTING_LANGUAGE.equals(attrName)) {
- ed.setScriptingLanguage(text);
- }
- else if (JSP20TLDNames.IMPORT.equals(attrName)) {
- ed.setImport(text);
- }
- else if (JSP20TLDNames.PAGE_ENCODING.equals(attrName)) {
- ed.setPageEncoding(text);
- }
- else if (JSP20TLDNames.IS_EL_IGNORED.equals(attrName)) {
- ed.setIsELIgnored(text);
- }
- }
- }
- }
- else if (JSP12TLDNames.ATTRIBUTE.equals(directiveName)) {
- CMAttributeDeclarationImpl attribute = new CMAttributeDeclarationImpl(ed.getOwnerDocument(), JSP11Namespace.ATTR_VALUE_TRUE);
- // 8.5.2
- String attrName = null;
- for (int i = 2; i < documentRegion.getNumberOfRegions(); i++) {
- ITextRegion region = regions.get(i);
- String text = documentRegion.getText(region);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- attrName = text;
- }
- // process value
- else if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE && attrName != null) {
- text = StringUtils.strip(text);
- if (JSP12TLDNames.NAME.equals(attrName)) {
- attribute.setNodeName(text);
- }
- else if (JSP20TLDNames.FRAGMENT.equals(attrName)) {
- attribute.setFragment(Boolean.valueOf(text).booleanValue());
- }
- else if (JSP12TLDNames.RTEXPRVALUE.equals(attrName)) {
- attribute.setRtexprvalue(text);
- }
- else if (JSP20TLDNames.TYPE.equals(attrName)) {
- attribute.setType(text);
- }
- else if (JSP12TLDNames.DESCRIPTION.equals(attrName)) {
- attribute.setDescription(text);
- }
- else if (JSP12TLDNames.REQUIRED.equals(attrName)) {
- attribute.setRequiredString(text);
- }
- }
- }
- if (attribute.getNodeName() != null) {
- ed.fAttributes.setNamedItem(attribute.getNodeName(), attribute);
- }
- }
- else if (JSP12TLDNames.VARIABLE.equals(directiveName)) {
- TLDVariableImpl variable = new TLDVariableImpl();
- String attrName = null;
- for (int i = 2; i < documentRegion.getNumberOfRegions(); i++) {
- ITextRegion region = regions.get(i);
- String text = documentRegion.getText(region);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- attrName = text;
- }
- // process value
- else if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE && attrName != null) {
- text = StringUtils.strip(text);
- if (JSP12TLDNames.VARIABLE_NAME_GIVEN.equals(attrName)) {
- variable.setNameGiven(text);
- }
- else if (JSP12TLDNames.VARIABLE_NAME_FROM_ATTRIBUTE.equals(attrName)) {
- variable.setNameFromAttribute(text);
- }
- else if (JSP20TLDNames.VARIABLE_ALIAS.equals(attrName)) {
- variable.setAlias(text);
- }
- else if (JSP12TLDNames.VARIABLE_CLASS.equals(attrName)) {
- variable.setVariableClass(text);
- }
- else if (JSP12TLDNames.VARIABLE_DECLARE.equals(attrName)) {
- variable.setDeclareString(text);
- }
- else if (JSP11Namespace.ATTR_NAME_SCOPE.equals(attrName)) {
- variable.setScope(text);
- }
- else if (JSP12TLDNames.DESCRIPTION.equals(attrName)) {
- variable.setDescription(text);
- }
- }
- }
- if (variable.getAlias() != null || variable.getNameFromAttribute() != null || variable.getNameGiven() != null) {
- ed.getVariables().add(variable);
- }
- }
- else if ("include".equals(directiveName) && allowIncludes) {
- String attrName = null;
- for (int i = 2; i < documentRegion.getNumberOfRegions(); i++) {
- ITextRegion region = regions.get(i);
- String text = documentRegion.getText(region);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- attrName = text;
- }
- // process value
- else if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE && attrName != null) {
- text = StringUtils.strip(text);
- if (JSP11Namespace.ATTR_NAME_FILE.equals(attrName)) {
- IPath filePath = FacetModuleCoreSupport.resolve(new Path(((CMDocumentImpl) ed.getOwnerDocument()).getBaseLocation()), text);
-
- IFile includedFile = ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
- if (includedFile.isAccessible()) {
- loadTagFile(ed, includedFile, false);
- }
- }
- }
- }
- }
- }
- }
-
- documentRegion = documentRegion.getNext();
- }
-
- }
- catch (IOException e) {
- // Logger.logException("problem parsing " + tagFile, e); // can be caused by a still-in-development file
- }
- catch (CoreException e) {
- // Logger.logException("problem parsing " + tagFile, e); // frequently out of sync
- }
- }
-
- /**
- * @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());
- document.setLocationString(record.getPath().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());
- document.setLocationString("jar:file:" + record.getLocation().toString() + "!/META-INF/taglib.tld");
- 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 (_debug && document != null && document.getElements().getLength() == 0) {
- System.out.println("failure parsing " + record.getLocation()); //$NON-NLS-1$
- }
- }
- break;
- case (ITaglibRecord.TAGDIR) : {
- ITagDirRecord record = (ITagDirRecord) reference;
- document = buildCMDocumentFromFolder(record.getPath());
- }
- break;
- case (ITaglibRecord.URL) : {
- IURLRecord record = (IURLRecord) reference;
- URL url = record.getURL();
- InputStream urlContents = JarUtilities.getInputStream(url);
- if (urlContents != null) {
- document = (CMDocumentImpl) buildCMDocument(record.getBaseLocation(), urlContents);
- String urlString = url.toString();
- document.setLocationString(urlString);
- if (document.getSmallIcon() != null) {
- String iconPath = URIHelper.normalize(((TLDDocument) document).getSmallIcon(), urlString, "/"); //$NON-NLS-1$
- document.setProperty(JSP12TLDNames.SMALL_ICON, iconPath);
- }
- if (document.getLargeIcon() != null) {
- String iconPath = URIHelper.normalize(((TLDDocument) document).getLargeIcon(), urlString, "/"); //$NON-NLS-1$
- document.setProperty(JSP12TLDNames.LARGE_ICON, iconPath);
- }
- }
- if (urlContents != null) {
- try {
- urlContents.close();
- }
- catch (IOException e) {
- }
- }
- }
- break;
- }
- return document;
- }
-}
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 936684b651..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMDocumentImpl.java
+++ /dev/null
@@ -1,455 +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.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;
-
- private String fLocationString;
-
- 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();
- }
-
- public String getLocationString() {
- return fLocationString;
- }
-
- public void setLocationString(String url) {
- fLocationString = url;
- }
-}
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 7984fba55d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/CMElementDeclarationImpl.java
+++ /dev/null
@@ -1,590 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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;
-
- 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;
-
- /**
- * since JSP 2.0
- */
- private String fExample;
- private String fImport;
- private String fScriptingLanguage;
- private String fDynamicAttributes;
- private String fIsELIgnored;
- private String fPageEncoding;
- private String fTagSource;
-
- private String fLocationString;
- private String smallIconURL;
-
- /**
- * 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 (getBodycontent().equals(JSP11TLDNames.CONTENT_EMPTY))
- return EMPTY;
- if (getBodycontent().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 ("tagInfo".equals(propertyName)) { //$NON-NLS-1$
- return getTagInfo(); // return tag info
- // bug88336 no need to restore markers
- // return StringUtils.restoreMarkers(getTagInfo()); // return tag
- // description
- }
- // Bug 155800
- else if ("name".equals(propertyName)) { //$NON-NLS-1$
- return getNodeName();
- }
- else if ("description".equals(propertyName)) { //$NON-NLS-1$
- return getDescription();
- // bug88336 no need to restore markers
- // return StringUtils.restoreMarkers(getDescription()); // return
- // tag description
- }
- else if (TLDDocument.CM_KIND.equals(propertyName)) {
- return TLDDocument.JSP_TLD;
- }
- else if (TLDElementDeclaration.TAG_SOURCE.equals(propertyName)) {
- return (fTagSource != null ? fTagSource :TLDElementDeclaration.SOURCE_JSP_TLD);
- }
- else if (JSP12TLDNames.SMALL_ICON.equals(propertyName) || JSP12TLDNames.LARGE_ICON.equals(propertyName)) {
- if (smallIconURL != null) {
- return smallIconURL;
- }
- return getOwnerDocument().getProperty(propertyName);
- }
- else if(TLDElementDeclaration.IS_LIBRARY_TAG.equals(propertyName)) {
- return Boolean.TRUE;
- }
- return null;
- }
-
- /**
- * Gets the smallIcon.
- *
- * @return Returns a String
- */
- public String getSmallIcon() {
- return smallIcon;
- }
-
- String getSmallIconURL() {
- return smallIconURL;
- }
-
- /**
- * 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;
- }
-
- void setSmallIconURL(String url) {
- smallIconURL = url;
- }
-
- /**
- *
- * @param newTagclass
- * java.lang.String
- */
- public void setTagclass(String newTagclass) {
- tagclass = newTagclass;
- }
-
- /**
- *
- * @param newTagclass
- * java.lang.String
- */
- public void setTagSource(String sourceKind) {
- fTagSource = sourceKind;
- }
-
- /**
- *
- * @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) || propertyName.equals(TLDElementDeclaration.TAG_SOURCE) || propertyName.equals(TLDElementDeclaration.IS_LIBRARY_TAG);//$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();
- }
-
- public String getImport() {
- return fImport;
- }
-
- public String getScriptingLanguage() {
- return fScriptingLanguage;
- }
-
- public String getDynamicAttributes() {
- return fDynamicAttributes;
- }
-
- public void setImport(String import1) {
- fImport = import1;
- }
-
- public void setScriptingLanguage(String scriptingLanguage) {
- fScriptingLanguage = scriptingLanguage;
- }
-
- public void setDynamicAttributes(String dynamicAttributes) {
- fDynamicAttributes = dynamicAttributes;
- }
-
- public String getIsELIgnored() {
- return fIsELIgnored;
- }
-
- public String getPageEncoding() {
- return fPageEncoding;
- }
-
- public void setIsELIgnored(String isELIgnored) {
- fIsELIgnored = isELIgnored;
- }
-
- public void setPageEncoding(String pageEncoding) {
- fPageEncoding = pageEncoding;
- }
-
- public String getLocationString() {
- if (fLocationString == null)
- return ((CMDocumentImpl) fOwnerDocument).getLocationString();
- return fLocationString;
- }
-
- public void setLocationString(String url) {
- fLocationString = url;
- }
-}
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 b8f378cff7..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, 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.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);
- }
-}
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 318c61744a..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, 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.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();
- }
-}
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 57ce5c1f86..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDCMDocumentManager.java
+++ /dev/null
@@ -1,1107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.lang.ref.Reference;
-import java.lang.ref.SoftReference;
-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.IFolder;
-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.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.contenttype.DeploymentDescriptorPropertyCache;
-import org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache.PropertyGroup;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.internal.util.FacetModuleCoreSupport;
-import org.eclipse.jst.jsp.core.internal.util.FileContentCache;
-import org.eclipse.jst.jsp.core.internal.util.ZeroStructuredDocumentRegion;
-import org.eclipse.jst.jsp.core.taglib.IJarRecord;
-import org.eclipse.jst.jsp.core.taglib.ITLDRecord;
-import org.eclipse.jst.jsp.core.taglib.ITagDirRecord;
-import org.eclipse.jst.jsp.core.taglib.ITaglibIndexDelta;
-import org.eclipse.jst.jsp.core.taglib.ITaglibIndexListener;
-import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
-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.JSPCapableParser;
-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.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.ITextRegionCollection;
-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.parser.XMLSourceParser;
-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 XMLSourceParser to enable/ignore the tags as blocks.
- */
- protected void addBlockTag(String tagnameNS, ITextRegionCollection 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) {
- enableTags(prefix, uri, anchorStructuredDocumentRegion);
- if (_debug) {
- System.out.println("TLDCMDocumentManager registered a tracker for " + uri + " with prefix " + prefix); //$NON-NLS-2$//$NON-NLS-1$
- }
- }
-
- private void enableTags(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);
- }
-
- /**
- * 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 anchorStructuredDocumentRegion) {
- enableTags(prefix, tagdir, anchorStructuredDocumentRegion);
- if (_debug) {
- System.out.println("TLDCMDocumentManager registered a tracker for directory" + tagdir + " with prefix " + prefix); //$NON-NLS-2$//$NON-NLS-1$
- }
- }
-
- protected void processRegionCollection(ITextRegionCollection regionCollection, IStructuredDocumentRegion anchorStructuredDocumentRegion, XMLSourceParser textSource) {
- /*
- * Would test > 1, but since we only care if there are 8 (<%@,
- * taglib, uri, =, where, prefix, =, what) [or 4 for include
- * directives]
- */
- if (regionCollection.getNumberOfRegions() > 4 && regionCollection.getRegions().get(1).getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- ITextRegion name = regionCollection.getRegions().get(1);
- boolean taglibDetected = false;
- boolean taglibDirectiveDetected = false;
- boolean includeDetected = false;
- boolean includeDirectiveDetected = false;
- int startOffset = regionCollection.getStartOffset(name);
- int textLength = name.getTextLength();
-
- taglibDetected = textSource.regionMatches(startOffset, textLength, JSP12TLDNames.TAGLIB);
- if (!taglibDetected)
- taglibDirectiveDetected = textSource.regionMatches(startOffset, textLength, JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
- if (!taglibDirectiveDetected)
- includeDetected = textSource.regionMatches(startOffset, textLength, JSP12TLDNames.INCLUDE);
- if (!includeDetected)
- includeDirectiveDetected = textSource.regionMatches(startOffset, textLength, JSP12Namespace.ElementName.DIRECTIVE_INCLUDE);
- if (taglibDetected || taglibDirectiveDetected) {
- processTaglib(regionCollection, anchorStructuredDocumentRegion, textSource);
- }
- else if (includeDetected || includeDirectiveDetected) {
- processInclude(regionCollection, anchorStructuredDocumentRegion, textSource);
- }
- }
- else if (regionCollection.getNumberOfRegions() > 1 && DOMRegionContext.XML_TAG_OPEN.equals(regionCollection.getFirstRegion().getType())) {
- processXMLStartTag(regionCollection, anchorStructuredDocumentRegion, textSource);
- }
- }
-
- public void nodeParsed(IStructuredDocumentRegion structuredDocumentRegion) {
- if (!preludesHandled) {
- handlePreludes();
- preludesHandled = true;
- }
- processRegionCollection(structuredDocumentRegion, structuredDocumentRegion, 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(ITextRegionCollection includeDirectiveCollection, IStructuredDocumentRegion anchorStructuredDocumentRegion, XMLSourceParser textSource) {
- ITextRegionList regions = includeDirectiveCollection.getRegions();
- String includedFile = null;
- boolean isFilename = false;
- try {
- for (int i = 2; includedFile == null && i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- if (textSource.regionMatches(includeDirectiveCollection.getStartOffset(region), region.getTextLength(), JSP12TLDNames.FILE)) {
- isFilename = true;
- }
- else {
- isFilename = false;
- }
- }
- else if (isFilename && region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- includedFile = textSource.getText(includeDirectiveCollection.getStartOffset(region), region.getTextLength());
- isFilename = false;
- }
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // nothing to be done
- includedFile = null;
- }
-
- if (fProcessIncludes && includedFile != null) {
- // strip any extraneous quotes and white space
- includedFile = StringUtils.strip(includedFile).trim();
- IPath filePath = null;
- /*
- * The resolution of the included fragment should use the file
- * containing the directive as the base reference, not always
- * the main JSP being invoked. Verified behavior with Apache
- * Tomcat 5.5.20.
- */
- IPath modelBaseLocation = TaglibController.getLocation(TLDCMDocumentManager.this);
- if(modelBaseLocation != null) {
- if (getIncludes().isEmpty())
- filePath = FacetModuleCoreSupport.resolve(modelBaseLocation, includedFile);
- else
- filePath = FacetModuleCoreSupport.resolve((IPath) getIncludes().peek(), includedFile);
- }
-
- // check for "loops"
- if (filePath != null && !getIncludes().contains(filePath) && !filePath.equals(modelBaseLocation)) {
- /*
- * 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);
-
- IncludeHelper includeHelper = new IncludeHelper(anchorStructuredDocumentRegion, getParser());
- includeHelper.parse(filePath);
- List references = includeHelper.taglibReferences;
- fTLDCMReferencesMap.put(filePath, references);
- if (getParser() instanceof JSPCapableParser) {
- for (int i = 0; references != null && i < references.size(); i++) {
- TLDCMDocumentReference reference = (TLDCMDocumentReference) references.get(i);
- ((JSPCapableParser) getParser()).addNestablePrefix(new TagMarker(reference.prefix + ":")); //$NON-NLS-1$
- }
- }
- /*
- * TODO: walk up the include hierarchy and add
- * these references to each of the parents?
- */
-
- 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, anchorStructuredDocumentRegion);
- if (getParser() instanceof JSPCapableParser) {
- ((JSPCapableParser) getParser()).addNestablePrefix(new TagMarker(reference.prefix + ":")); //$NON-NLS-1$
- }
- }
- }
- }
- else if (getIncludes().contains(filePath)) {
- if (Debug.debugTokenizer)
- System.out.println("LOOP IN @INCLUDES FOUND: " + filePath); //$NON-NLS-1$
- }
- }
- }
-
- protected void processXMLStartTag(ITextRegionCollection startTagRegionCollection, IStructuredDocumentRegion anchorStructuredDocumentRegion, XMLSourceParser textSource) {
- ITextRegionList regions = startTagRegionCollection.getRegions();
- String uri = null;
- String prefix = null;
- boolean isTaglibValue = false;
- // skip the first two, they're the open bracket and name
- for (int i = 2; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (region instanceof ITextRegionCollection) {
- // Handle nested directives
- processRegionCollection((ITextRegionCollection) region, anchorStructuredDocumentRegion, textSource);
- }
- else {
- // Handle xmlns:xxx=yyy
- int regionStartOffset = startTagRegionCollection.getStartOffset(region);
- int regionTextLength = region.getTextLength();
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- if (regionTextLength > XMLNS_LENGTH && textSource.regionMatches(regionStartOffset, XMLNS_LENGTH, XMLNS)) {
- prefix = textSource.getText(regionStartOffset + XMLNS_LENGTH, regionTextLength - XMLNS_LENGTH);
- if (!bannedPrefixes.contains(prefix))
- isTaglibValue = true;
- }
- else {
- prefix = null;
- isTaglibValue = false;
- }
- }
- else if (isTaglibValue && region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- if (prefix != null && prefix.length() > 0) {
- uri = textSource.getText(regionStartOffset, regionTextLength);
- uri = StringUtils.strip(uri);
- int uriLength = uri.length();
- if (uri != null && uriLength > 0) {
- if (uriLength > URN_TLD_LENGTH && uri.startsWith(URN_TLD)) {
- uri = uri.substring(URN_TLD_LENGTH);
- }
- else if (uriLength > URN_TAGDIR_LENGTH && uri.startsWith(URN_TAGDIR)) {
- uri = uri.substring(URN_TAGDIR_LENGTH);
- }
- enableTags(prefix, uri, anchorStructuredDocumentRegion);
- uri = null;
- prefix = null;
- }
- }
- }
- }
- }
- }
-
- /**
- * Pulls the URI and prefix from the given taglib directive
- * IStructuredDocumentRegion and makes sure the tags are known.
- */
- protected void processTaglib(ITextRegionCollection taglibDirectiveCollection, IStructuredDocumentRegion anchorStructuredDocumentRegion, XMLSourceParser textSource) {
- ITextRegionList regions = taglibDirectiveCollection.getRegions();
- String uri = null;
- String prefix = null;
- String tagdir = null;
- String attrName = null;
- try {
- for (int i = 2; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- // remember attribute name
- int startOffset = taglibDirectiveCollection.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 = StringUtils.strip(textSource.getText(startOffset, textLength));
- else if (JSP11TLDNames.URI.equals(attrName))
- uri = StringUtils.strip(textSource.getText(startOffset, textLength));
- else if (JSP20TLDNames.TAGDIR.equals(attrName))
- tagdir = StringUtils.strip(textSource.getText(startOffset, textLength));
- }
- }
- }
- catch (StringIndexOutOfBoundsException sioobExc) {
- // nothing to be done
- uri = null;
- prefix = null;
- }
- if (uri != null && prefix != null && uri.length() > 0 && prefix.length() > 0) {
- enableTaglibFromURI(prefix, StringUtils.strip(uri), anchorStructuredDocumentRegion);
- }
- else if (tagdir != null && prefix != null && tagdir.length() > 0 && prefix.length() > 0) {
- 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 XMLSourceParser, "can only listen to document with a XMLSourceParser"); //$NON-NLS-1$
- getSourceParser().removeStructuredDocumentRegionHandler(this);
- setSourceParser((XMLSourceParser) newDocument.getParser());
- getSourceParser().addStructuredDocumentRegionHandler(this);
- }
- }
-
- protected class IncludeHelper extends DirectiveStructuredDocumentRegionHandler {
- protected IStructuredDocumentRegion fAnchor = null;
- protected XMLSourceParser fLocalParser = null;
- protected XMLSourceParser fParentParser = null;
- List taglibReferences = null;
-
- public IncludeHelper(IStructuredDocumentRegion anchor, XMLSourceParser 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);
- }
-
- protected String getContents(IPath filePath) {
- return FileContentCache.getInstance().getContents(filePath);
- }
-
- public void nodeParsed(IStructuredDocumentRegion structuredDocumentRegion) {
- processRegionCollection(structuredDocumentRegion, fAnchor, fLocalParser);
- }
-
- /**
- * @param path -
- * the fullpath for the resource to be parsed
- */
- void parse(IPath path) {
- XMLSourceParser p = (XMLSourceParser) getParser().newInstance();
- fLocalParser = p;
- String s = getContents(path);
- // Should we consider preludes on this segment?
- fLocalParser.addStructuredDocumentRegionHandler(IncludeHelper.this);
- fLocalParser.reset(s);
- List blockTags = fParentParser.getBlockMarkers();
- 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()));
- }
- if (fParentParser instanceof JSPCapableParser && fLocalParser instanceof JSPCapableParser) {
- TagMarker[] knownPrefixes = (TagMarker[]) ((JSPCapableParser) fParentParser).getNestablePrefixes().toArray(new TagMarker[0]);
- for (int i = 0; i < knownPrefixes.length; i++) {
- ((JSPCapableParser) fLocalParser).addNestablePrefix(new TagMarker(knownPrefixes[i].getTagName(), null));
- }
- }
- // force parse
- fLocalParser.getDocumentRegions();
- fLocalParser = null;
- }
-
- public void resetNodes() {
- }
- }
-
- /**
- * An entry in the shared cache map
- */
- static class TLDCacheEntry {
- CMDocument document;
- long modificationStamp;
- int referenceCount;
- }
-
- 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;
- final String XMLNS = "xmlns:"; //$NON-NLS-1$
- final String URN_TAGDIR = "urn:jsptagdir:";
- final String URN_TLD = "urn:jsptld:";
-
- final int XMLNS_LENGTH = XMLNS.length();
- final int URN_TAGDIR_LENGTH = URN_TAGDIR.length();
- final int URN_TLD_LENGTH = URN_TLD.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) {
- if (reference == null)
- return null;
- 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) : {
- ITagDirRecord record = (ITagDirRecord) reference;
- identifier = record.getPath();
- }
- 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 XMLSourceParser fParser = null;
-
- private List fTaglibTrackers = null;
-
- Map fTLDCMReferencesMap = new HashMap();
- boolean fProcessIncludes = true;
- boolean preludesHandled = false;
-
- 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 SoftReference(entry));
- }
- }
- }
- }
- }
-
- /**
- * 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) {
- IPath currentParserPath = getCurrentParserPath();
- if (currentParserPath == null)
- return null;
-
- ITaglibRecord record = TaglibIndex.resolve(currentParserPath.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;
- Object cacheKey = getCacheKey(reference);
- if (cacheKey == null)
- return null;
-
- CMDocument doc = (CMDocument) getDocuments().get(cacheKey);
- if (doc == null) {
- long lastModified = getModificationStamp(reference);
- /*
- * 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);
- }
- if (entry != null && entry.modificationStamp != IResource.NULL_STAMP && entry.modificationStamp >= lastModified) {
- doc = entry.document;
- entry.referenceCount++;
- }
- else {
- getSharedDocumentCache().remove(cacheKey);
- }
- }
- else if (o instanceof Reference) {
- TLDCacheEntry entry = (TLDCacheEntry) ((Reference) o).get();
- if (entry != null) {
- if (entry.modificationStamp != IResource.NULL_STAMP && entry.modificationStamp >= lastModified) {
- doc = entry.document;
- entry.referenceCount = 1;
- getSharedDocumentCache().put(cacheKey, entry);
- }
- }
- else {
- getSharedDocumentCache().remove(cacheKey);
- }
- }
- }
- /* 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);
- }
- CMDocument document = loadTaglib(reference);
- if (document != null) {
- TLDCacheEntry entry = new TLDCacheEntry();
- doc = entry.document = document;
- entry.referenceCount = 1;
- entry.modificationStamp = lastModified;
- getSharedDocumentCache().put(cacheKey, entry);
- }
- }
- if (doc != null) {
- getDocuments().put(cacheKey, doc);
- }
- }
- return doc;
- }
-
- private long getModificationStamp(String reference) {
- IPath currentParserPath = getCurrentParserPath();
- if (currentParserPath == null) {
- return IResource.NULL_STAMP;
- }
-
- ITaglibRecord record = TaglibIndex.resolve(currentParserPath.toString(), reference, false);
- long modificationStamp = IResource.NULL_STAMP;
- if (record != null) {
- switch (record.getRecordType()) {
- case (ITaglibRecord.TLD) : {
- IFile tldfile = ResourcesPlugin.getWorkspace().getRoot().getFile(((ITLDRecord) record).getPath());
- if (tldfile.isAccessible()) {
- modificationStamp = tldfile.getModificationStamp();
- }
- }
- break;
- case (ITaglibRecord.JAR) : {
- File jarfile = new File(((IJarRecord) record).getLocation().toOSString());
- if (jarfile.exists()) {
- try {
- modificationStamp = jarfile.lastModified();
- }
- catch (SecurityException e) {
- modificationStamp = IResource.NULL_STAMP;
- }
- }
- }
- break;
- case (ITaglibRecord.TAGDIR) : {
- IFolder tagFolder = ResourcesPlugin.getWorkspace().getRoot().getFolder(((ITagDirRecord) record).getPath());
- if (tagFolder.isAccessible()) {
- IResource[] members;
- try {
- members = tagFolder.members();
- for (int i = 0; i < members.length; i++) {
- modificationStamp = Math.max(modificationStamp, members[i].getModificationStamp());
- }
- }
- catch (CoreException e) {
- modificationStamp = IResource.NULL_STAMP;
- }
- }
- }
- break;
- case (ITaglibRecord.URL) : {
- String loc = ((IURLRecord) record).getBaseLocation();
- if (loc != null && loc.endsWith(".jar")) { //$NON-NLS-1$
- File jarfile = new File(loc);
- if (jarfile.exists()) {
- try {
- modificationStamp = jarfile.lastModified();
- }
- catch (SecurityException e) {
- modificationStamp = IResource.NULL_STAMP;
- }
- }
- }
- }
- break;
- default :
- break;
- }
- }
- return modificationStamp;
- }
-
-
- /**
- * 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();
- Object[] alldocs = getTaglibTrackers().toArray();
- for (int i = 0; i < alldocs.length; i++) {
- TaglibTracker aTracker = (TaglibTracker) alldocs[i];
- if (aTracker.getStructuredDocumentRegion().getStartOffset() <= offset || offset < 0) {
- validDocs.add(aTracker);
- }
- }
- return validDocs;
- }
-
- public List getCMDocumentTrackers(String prefix, int offset) {
- List validDocs = new ArrayList();
- Object[] alldocs = getTaglibTrackers().toArray();
- for (int i = 0; i < alldocs.length; i++) {
- TaglibTracker aTracker = (TaglibTracker) alldocs[i];
- /**
- * '<' is used to support the immediate use of a custom tag in jspx files (instead of '<=')
- */
- 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();
- if (path == null || path.segmentCount() < 2)
- return path;
- 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.getLocation(this);
- }
-
- 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;
- }
-
- /**
- * Gets the includes.
- *
- * @return Returns a Stack
- */
- protected Stack getIncludes() {
- if (fIncludes == null)
- fIncludes = new Stack();
- return fIncludes;
- }
-
- XMLSourceParser getParser() {
- return fParser;
- }
-
- public XMLSourceParser getSourceParser() {
- return fParser;
- }
-
- public StructuredDocumentRegionHandler getStructuredDocumentRegionHandler() {
- return getDirectiveStructuredDocumentRegionHandler();
- }
-
- /**
- *
- * @return java.util.List
- */
- public List getTaglibTrackers() {
- if (fTaglibTrackers == null)
- fTaglibTrackers = new ArrayList();
- return fTaglibTrackers;
- }
-
- void handlePreludes() {
- IStructuredDocumentRegion anchor = new ZeroStructuredDocumentRegion(null, -1);
- fProcessIncludes = false;
-
- IPath currentPath = getCurrentParserPath();
- if (currentPath != null) {
- PropertyGroup[] propertyGroups = DeploymentDescriptorPropertyCache.getInstance().getPropertyGroups(currentPath);
- for(int k = 0; k < propertyGroups.length; k++) {
- IPath[] preludes = propertyGroups[k].getIncludePrelude();
- for (int i = 0; i < preludes.length; i++) {
- if (!getIncludes().contains(preludes[i]) && !preludes[i].equals(currentPath)) {
- getIncludes().push(preludes[i]);
- if (getParser() != null) {
- IncludeHelper includeHelper = new IncludeHelper(anchor, getParser());
- includeHelper.parse(preludes[i]);
- List references = includeHelper.taglibReferences;
- fTLDCMReferencesMap.put(preludes[i], references);
- if (getParser() instanceof JSPCapableParser) {
- for (int j = 0; j < references.size(); j++) {
- TLDCMDocumentReference reference = (TLDCMDocumentReference) references.get(j);
- ((JSPCapableParser) getParser()).addNestablePrefix(new TagMarker(reference.prefix + ":")); //$NON-NLS-1$
- }
- }
- }
- 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();
- }
- }
- }
- }
-
- fProcessIncludes = true;
- }
-
- /**
- * @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(ITaglibIndexDelta event) {
- synchronized (getSharedDocumentCache()) {
- Iterator values = getSharedDocumentCache().values().iterator();
- while (values.hasNext()) {
- Object o = values.next();
- if (o instanceof Reference) {
- values.remove();
- }
- }
- }
- }
-
- /**
- * Loads the taglib from the specified URI. It must point to a valid
- * taglib descriptor to work.
- */
- protected CMDocument loadTaglib(String uri) {
- CMDocument document = null;
- IPath currentPath = getCurrentParserPath();
- if (currentPath != null) {
- ITaglibRecord record = TaglibIndex.resolve(currentPath.toString(), uri, false);
- if (record != null) {
- document = getCMDocumentBuilder().createCMDocument(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);
- }
- }
- }
- }
- return document;
- }
-
- protected void resetTaglibTrackers() {
- if (_debug) {
- System.out.println("TLDCMDocumentManager cleared its taglib trackers\n"); //$NON-NLS-1$
- }
- preludesHandled = false;
- getTaglibTrackers().clear();
- }
-
- public void setSourceParser(XMLSourceParser parser) {
- if (fParser != null)
- fParser.removeStructuredDocumentRegionHandler(getStructuredDocumentRegionHandler());
- fParser = parser;
- if (fParser != null)
- fParser.addStructuredDocumentRegionHandler(getStructuredDocumentRegionHandler());
- }
-}
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 364711bb7e..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, 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.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;
- }
-}
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 c1cdfe6d1c..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, 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
- *******************************************************************************/
-/*
- * 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();
- }
-}
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 24ef99cb2a..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, 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
- *******************************************************************************/
-/*
- * 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();
- }
-}
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 446f743949..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, 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
- *******************************************************************************/
-/*
- * 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();
- }
-}
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 ff7b75ce84..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/TLDVariableImpl.java
+++ /dev/null
@@ -1,116 +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.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$
-
- private String fAlias;
-
- 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) {
- if (decl != null) {
- 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();
- }
-
- public String getAlias() {
- return fAlias;
- }
-
- public void setAlias(String alias) {
- fAlias = alias;
- }
-}
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 a8351aa300..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, 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.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();
- }
-}
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 c24959a796..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, 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.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$
-}
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 0ab3124d28..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, 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.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$
-}
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 b52ae61d9d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/JSP20TLDNames.java
+++ /dev/null
@@ -1,38 +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.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$
-
- String DYNAMIC_ATTRIBUTES = "dynamic-attributes"; //$NON-NLS-1$
- String SCRIPTING_LANGUAGE = "language"; //$NON-NLS-1$
- String IMPORT = "import"; //$NON-NLS-1$
- String IS_EL_IGNORED = "isELIgnored"; //$NON-NLS-1$
- String PAGE_ENCODING = "pageEncoding"; //$NON-NLS-1$
- String TYPE = "type"; //$NON-NLS-1$
- String VARIABLE_ALIAS = "alias"; //$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 3f57eeb316..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, 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.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();
-}
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 81351e5065..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, 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.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();
-}
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 dd34980094..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDElementDeclaration.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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 {
- /**
- * Property stating whether the {@link CMElementDeclaration}
- * is a library tag or not
- */
- String IS_LIBRARY_TAG = "isLibraryTag"; //$NON-NLS-1$
-
- String TAG_SOURCE = "Tag Definition Source"; //$NON-NLS-1$
- String SOURCE_JSP_TLD = "JSP Tag Library Descriptor"; //$NON-NLS-1$
- String SOURCE_TAG_FILE = "JSP Tag 2.0 File"; //$NON-NLS-1$
-
- /**
- * 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();
-
-
- /**
- * Indicates that the declared tag handler supports dynamic attributes. It
- * is not a guarantee that the class itself implements
- * javax.servlet.jsp.tagext.DynamicAttributes.
- *
- * @see JSP 2.0
- */
- String getDynamicAttributes();
-
- /**
- * 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();
-}
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 a43e963a5b..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, 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.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();
-}
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 fed09aabc6..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, 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.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();
-}
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 8d6f0e52d5..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, 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.contentmodel.tld.provisional;
-
-
-/**
- * Defines an optional event listener object to be instantiated and registered automatically
- * @see JSP 1.2
- */
-public interface TLDListener {
- String getListenerClass();
-}
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 09ee730515..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, 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.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();
-}
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 611382c4bc..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contentmodel/tld/provisional/TLDVariable.java
+++ /dev/null
@@ -1,57 +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.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();
-
- /**
- * A locally scoped attribute to hold the value of this variable
- */
- String getAlias();
-}
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 c91119ee6c..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, 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
- * 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/DeploymentDescriptorPropertyCache.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/DeploymentDescriptorPropertyCache.java
deleted file mode 100644
index 87b73c7cbe..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/DeploymentDescriptorPropertyCache.java
+++ /dev/null
@@ -1,958 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2011 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.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.StringReader;
-import java.lang.ref.Reference;
-import java.lang.ref.SoftReference;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-import javax.xml.parsers.DocumentBuilder;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-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.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.util.CommonXML;
-import org.eclipse.jst.jsp.core.internal.util.FacetModuleCoreSupport;
-import org.eclipse.jst.jsp.core.internal.util.FileContentCache;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-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;
-import org.w3c.dom.Document;
-import org.w3c.dom.DocumentType;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-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;
-
-/**
- * A cache for property group information stored in web.xml files. Information
- * is not persisted.
- */
-public final class DeploymentDescriptorPropertyCache {
- private static final PropertyGroup[] NO_PROPERTY_GROUPS = new PropertyGroup[0];
-
- static class DeploymentDescriptor {
- PropertyGroup[] groups;
- long modificationStamp;
- StringMatcher[] urlPatterns;
- Float version = new Float(defaultWebAppVersion);
- }
-
- /**
- * Representation of the JSP 2.0 property-group definitions from a servlet
- * deployment descriptor.
- */
- public static final class PropertyGroup {
- static PropertyGroup createFrom(IPath path, Node propertyGroupNode, int groupNumber) {
- PropertyGroup group = new PropertyGroup(path, groupNumber);
- Node propertyGroupID = propertyGroupNode.getAttributes().getNamedItem(ID);
- if (propertyGroupID != null) {
- group.setId(propertyGroupID.getNodeValue());
- }
- Node node = propertyGroupNode.getFirstChild();
- while (node != null) {
- if (node.getNodeType() == Node.ELEMENT_NODE) {
- String name = node.getLocalName();
- if (name == null) {
- name = node.getNodeName();
- }
- if (IS_XML.equals(name)) {
- group.setIsXML(getContainedText(node));
- }
- else if (EL_IGNORED.equals(name)) {
- group.setElignored(getContainedText(node));
- }
- else if (INCLUDE_CODA.equals(name)) {
- group.addCoda(getContainedText(node));
- }
- else if (INCLUDE_PRELUDE.equals(name)) {
- group.addPrelude(getContainedText(node));
- }
- else if (SCRIPTING_INVALID.equals(name)) {
- group.setScriptingInvalid(getContainedText(node));
- }
- else if (PAGE_ENCODING.equals(name)) {
- group.setPageEncoding(getContainedText(node));
- }
- else if (URL_PATTERN.equals(name)) {
- group.setUrlPattern(getContainedText(node));
- }
- }
-
- node = node.getNextSibling();
- }
-
- return group;
- }
-
- private boolean el_ignored;
-
- private String id;
-
- private IPath[] include_coda = new IPath[0];
-
- private IPath[] include_prelude = new IPath[0];
- private boolean is_xml;
- private StringMatcher matcher;
- private String page_encoding;
- private boolean scripting_invalid;
- String url_pattern;
- private IPath webxmlPath;
-
- int number;
-
- private PropertyGroup(IPath path, int number) {
- super();
- this.webxmlPath = path;
- this.number = number;
- }
-
- private void addCoda(String containedText) {
- if (containedText.length() > 0) {
- IPath[] codas = new IPath[include_coda.length + 1];
- System.arraycopy(include_coda, 0, codas, 0, include_coda.length);
- codas[include_coda.length] = webxmlPath.removeLastSegments(2).append(containedText);
- include_coda = codas;
- }
- }
-
- private void addPrelude(String containedText) {
- if (containedText.length() > 0) {
- IPath[] preludes = new IPath[include_prelude.length + 1];
- System.arraycopy(include_prelude, 0, preludes, 0, include_prelude.length);
- preludes[include_prelude.length] = webxmlPath.removeLastSegments(2).append(containedText);
- include_prelude = preludes;
- }
- }
-
- public String getId() {
- return id;
- }
-
- public IPath[] getIncludeCoda() {
- return include_coda;
- }
-
- public IPath[] getIncludePrelude() {
- return include_prelude;
- }
-
- public String getPageEncoding() {
- return page_encoding;
- }
-
- public String getUrlPattern() {
- return url_pattern;
- }
-
- public boolean isELignored() {
- return el_ignored;
- }
-
- public boolean isIsXML() {
- return is_xml;
- }
-
- public boolean isScriptingInvalid() {
- return scripting_invalid;
- }
-
- boolean matches(String pattern, boolean optimistic) {
- if (matcher == null)
- return optimistic;
- return matcher.match(pattern);
- }
-
- private void setElignored(String el_ignored) {
- this.el_ignored = Boolean.valueOf(el_ignored).booleanValue();
- }
-
- private void setId(String id) {
- this.id = id;
- }
-
- private void setIsXML(String is_xml) {
- this.is_xml = Boolean.valueOf(is_xml).booleanValue();
- }
-
- private void setPageEncoding(String page_encoding) {
- this.page_encoding = page_encoding;
- }
-
- private void setScriptingInvalid(String scripting_invalid) {
- this.scripting_invalid = Boolean.valueOf(scripting_invalid).booleanValue();
- }
-
- private void setUrlPattern(String url_pattern) {
- this.url_pattern = url_pattern;
- if (url_pattern != null && url_pattern.length() > 0) {
- this.matcher = new StringMatcher(url_pattern);
- }
- }
-
- public String toString() {
- return number + ":" + url_pattern; //$NON-NLS-1$
- }
- }
-
- static class ResourceChangeListener implements IResourceChangeListener {
- public void resourceChanged(IResourceChangeEvent event) {
- IResourceDelta delta = event.getDelta();
- if (event.getType() != IResourceChangeEvent.POST_CHANGE)
- return;
- if (delta.getKind() == IResourceDelta.CHANGED && (delta.getFlags() == IResourceDelta.ENCODING || delta.getFlags() == IResourceDelta.MARKERS))
- return;
-
- IResourceDeltaVisitor visitor = new IResourceDeltaVisitor() {
- public boolean visit(IResourceDelta delta) {
- IResource resource = delta.getResource();
- if (resource.getType() == IResource.FILE) {
- if (delta.getKind() == IResourceDelta.CHANGED && (delta.getFlags() == IResourceDelta.ENCODING || delta.getFlags() == IResourceDelta.MARKERS))
- return false;
-
- IPath path = resource.getFullPath();
- int segmentCount = path.segmentCount();
- if (segmentCount > 1 && path.lastSegment().equals(WEB_XML) && path.segment(segmentCount - 2).equals(WEB_INF)) {
- getInstance().deploymentDescriptorChanged(path);
- }
- }
- else if (resource.getType() == IResource.PROJECT) {
- String name = resource.getName();
- if (_debugResolutionCache) {
- System.out.println("Removing DeploymentDescriptorPropertyCache resolution cache for project " + name); //$NON-NLS-1$
- }
- synchronized (LOCK) {
- getInstance().resolvedMap.remove(name);
- }
- }
- return true;
- }
- };
- try {
- delta.accept(visitor);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- }
-
- private static class ResourceErrorHandler implements ErrorHandler {
- private boolean fDoLogExceptions = false;
- private IPath fPath;
-
- ResourceErrorHandler(boolean logExceptions) {
- super();
- fDoLogExceptions = logExceptions;
- }
-
- public void error(SAXParseException exception) throws SAXException {
- if (fDoLogExceptions)
- Logger.log(Logger.WARNING, "SAXParseException with " + fPath + " (error) while reading descriptor: " + exception.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- public void fatalError(SAXParseException exception) throws SAXException {
- if (fDoLogExceptions)
- Logger.log(Logger.WARNING, "SAXParseException with " + fPath + " (fatalError) while reading descriptor: " + exception.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- public void setPath(IPath path) {
- fPath = path;
- }
-
- public void warning(SAXParseException exception) throws SAXException {
- if (fDoLogExceptions)
- Logger.log(Logger.WARNING, "SAXParseException with " + fPath + " (warning) while reading descriptor: " + exception.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- /**
- * Copied from org.eclipse.core.internal.propertytester.StringMatcher, but
- * should be replaced with a more accurate implementation of the rules in
- * Servlet spec SRV.11.2 and RFC 2396
- */
- private static class StringMatcher {
- private static final char SINGLE_WILD_CARD = '\u0000';
-
- /**
- * Boundary value beyond which we don't need to search in the text
- */
- private int bound = 0;
-
- private boolean hasLeadingStar;
-
- private boolean hasTrailingStar;
-
- final String pattern;
-
- private final int patternLength;
-
- /**
- * The pattern split into segments separated by *
- */
- private String segments[];
-
- /**
- * StringMatcher constructor takes in a String object that is a simple
- * pattern which may contain '*' for 0 and many characters and '?' for
- * exactly one character.
- *
- * Literal '*' and '?' characters must be escaped in the pattern e.g.,
- * "\*" means literal "*", etc.
- *
- * Escaping any other character (including the escape character
- * itself), just results in that character in the pattern. e.g., "\a"
- * means "a" and "\\" means "\"
- *
- * If invoking the StringMatcher with string literals in Java, don't
- * forget escape characters are represented by "\\".
- *
- * @param pattern
- * the pattern to match text against
- */
- StringMatcher(String pattern) {
- if (pattern == null)
- throw new IllegalArgumentException();
- this.pattern = pattern;
- patternLength = pattern.length();
- parseWildCards();
- }
-
- /**
- * @param text
- * a simple regular expression that may only contain '?'(s)
- * @param start
- * the starting index in the text for search, inclusive
- * @param end
- * the stopping point of search, exclusive
- * @param p
- * a simple regular expression that may contain '?'
- * @return the starting index in the text of the pattern , or -1 if
- * not found
- */
- private int findPosition(String text, int start, int end, String p) {
- boolean hasWildCard = p.indexOf(SINGLE_WILD_CARD) >= 0;
- int plen = p.length();
- for (int i = start, max = end - plen; i <= max; ++i) {
- if (hasWildCard) {
- if (regExpRegionMatches(text, i, p, 0, plen))
- return i;
- }
- else {
- if (text.regionMatches(true, i, p, 0, plen))
- return i;
- }
- }
- return -1;
- }
-
- /**
- * Given the starting (inclusive) and the ending (exclusive) positions
- * in the <code>text</code>, determine if the given substring matches
- * with aPattern
- *
- * @return true if the specified portion of the text matches the
- * pattern
- * @param text
- * a String object that contains the substring to match
- */
- public boolean match(String text) {
- if (text == null)
- return false;
- final int end = text.length();
- final int segmentCount = segments.length;
- if (segmentCount == 0 && (hasLeadingStar || hasTrailingStar)) // pattern
- // contains
- // only
- // '*'(s)
- return true;
- if (end == 0)
- return patternLength == 0;
- if (patternLength == 0)
- return false;
- int currentTextPosition = 0;
- if ((end - bound) < 0)
- return false;
- int segmentIndex = 0;
- String current = segments[segmentIndex];
-
- /* process first segment */
- if (!hasLeadingStar) {
- int currentLength = current.length();
- if (!regExpRegionMatches(text, 0, current, 0, currentLength))
- return false;
- segmentIndex++;
- currentTextPosition = currentTextPosition + currentLength;
- }
- if ((segmentCount == 1) && (!hasLeadingStar) && (!hasTrailingStar)) {
- // only one segment to match, no wild cards specified
- return currentTextPosition == end;
- }
- /* process middle segments */
- while (segmentIndex < segmentCount) {
- current = segments[segmentIndex];
- int currentMatch = findPosition(text, currentTextPosition, end, current);
- if (currentMatch < 0)
- return false;
- currentTextPosition = currentMatch + current.length();
- segmentIndex++;
- }
-
- /* process final segment */
- if (!hasTrailingStar && currentTextPosition != end) {
- int currentLength = current.length();
- return regExpRegionMatches(text, end - currentLength, current, 0, currentLength);
- }
- return segmentIndex == segmentCount;
- }
-
- /**
- * Parses the pattern into segments separated by wildcard '*'
- * characters.
- */
- private void parseWildCards() {
- if (pattern.startsWith("*"))//$NON-NLS-1$
- hasLeadingStar = true;
- if (pattern.endsWith("*")) {//$NON-NLS-1$
- /* make sure it's not an escaped wildcard */
- if (patternLength > 1 && pattern.charAt(patternLength - 2) != '\\') {
- hasTrailingStar = true;
- }
- }
-
- ArrayList temp = new ArrayList();
-
- int pos = 0;
- StringBuffer buf = new StringBuffer();
- while (pos < patternLength) {
- char c = pattern.charAt(pos++);
- switch (c) {
- case '\\' :
- if (pos >= patternLength) {
- buf.append(c);
- }
- else {
- char next = pattern.charAt(pos++);
- /* if it's an escape sequence */
- if (next == '*' || next == '?' || next == '\\') {
- buf.append(next);
- }
- else {
- /*
- * not an escape sequence, just insert
- * literally
- */
- buf.append(c);
- buf.append(next);
- }
- }
- break;
- case '*' :
- if (buf.length() > 0) {
- /* new segment */
- temp.add(buf.toString());
- bound += buf.length();
- buf.setLength(0);
- }
- break;
- case '?' :
- /*
- * append special character representing single match
- * wildcard
- */
- buf.append(SINGLE_WILD_CARD);
- break;
- default :
- buf.append(c);
- }
- }
-
- /* add last buffer to segment list */
- if (buf.length() > 0) {
- temp.add(buf.toString());
- bound += buf.length();
- }
- segments = (String[]) temp.toArray(new String[temp.size()]);
- }
-
- /**
- *
- * @return boolean
- * @param text
- * a String to match
- * @param tStart
- * the starting index of match, inclusive
- * @param p
- * a simple regular expression that may contain '?'
- * @param pStart
- * The start position in the pattern
- * @param plen
- * The length of the pattern
- */
- private boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) {
- while (plen-- > 0) {
- char tchar = text.charAt(tStart++);
- char pchar = p.charAt(pStart++);
-
- // process wild cards, skipping single wild cards
- if (pchar == SINGLE_WILD_CARD)
- continue;
- if (pchar == tchar)
- continue;
- if (Character.toUpperCase(tchar) == Character.toUpperCase(pchar))
- continue;
- // comparing after converting to upper case doesn't handle all
- // cases;
- // also compare after converting to lower case
- if (Character.toLowerCase(tchar) == Character.toLowerCase(pchar))
- continue;
- return false;
- }
- return true;
- }
-
- public String toString() {
- return "StringMatcher: " + pattern; //$NON-NLS-1$
- }
- }
-
- private static final DeploymentDescriptorPropertyCache _instance = new DeploymentDescriptorPropertyCache();
- private static final boolean _debugResolutionCache = false;
-
- private static final float defaultWebAppVersion = 3f;
- static final String EL_IGNORED = "el-ignored"; //$NON-NLS-1$
- static final String ID = "id"; //$NON-NLS-1$
- static final String INCLUDE_CODA = "include-coda"; //$NON-NLS-1$
- static final String INCLUDE_PRELUDE = "include-prelude"; //$NON-NLS-1$
-
- static final String IS_XML = "is-xml"; //$NON-NLS-1$
- private static String JSP_PROPERTY_GROUP = "jsp-property-group"; //$NON-NLS-1$
- static final String PAGE_ENCODING = "page-encoding"; //$NON-NLS-1$
-
- static final String SCRIPTING_INVALID = "scripting-invalid"; //$NON-NLS-1$
- static final String URL_PATTERN = "url-pattern"; //$NON-NLS-1$
- private static final String SERVLET_MAPPING = "servlet-mapping"; //$NON-NLS-1$
- private static final String WEB_APP_ELEMENT_LOCAL_NAME = ":web-app"; //$NON-NLS-1$
- private static final String WEB_APP_ELEMENT_NAME = "web-app"; //$NON-NLS-1$
-
- private static final String WEB_APP_VERSION_NAME = "version"; //$NON-NLS-1$
- private static final String WEB_INF = "WEB-INF"; //$NON-NLS-1$
- private static final String WEB_XML = "web.xml"; //$NON-NLS-1$
- // private static final String WEB_INF_WEB_XML = WEB_INF + IPath.SEPARATOR
- // + WEB_XML;
- private static final String SLASH_WEB_INF_WEB_XML = Path.ROOT.toString() + WEB_INF + IPath.SEPARATOR + WEB_XML;
-
- static 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 static DeploymentDescriptorPropertyCache getInstance() {
- return _instance;
- }
-
- /**
- * This method is not meant to be called by clients.
- */
- public static void start() {
- ResourcesPlugin.getWorkspace().addResourceChangeListener(getInstance().fResourceChangeListener, IResourceChangeEvent.POST_CHANGE);
- }
-
- /**
- * This method is not meant to be called by clients.
- */
- public static void stop() {
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(getInstance().fResourceChangeListener);
- }
-
- private ResourceErrorHandler errorHandler;
-
- private Map fDeploymentDescriptors = new Hashtable();
-
- private IResourceChangeListener fResourceChangeListener = new ResourceChangeListener();
-
- // for use when reading TLDs
- private EntityResolver resolver;
-
- Map resolvedMap = new HashMap();
-
- final static Object LOCK = new Object();
-
- private DeploymentDescriptorPropertyCache() {
- super();
- }
-
- private void _parseDocument(IPath path, Float[] version, List groupList, List urlPatterns, SubProgressMonitor subMonitor, Document document) {
- Element webapp = document.getDocumentElement();
- if (webapp != null) {
- if (webapp.getTagName().equals(WEB_APP_ELEMENT_NAME) || webapp.getNodeName().endsWith(WEB_APP_ELEMENT_LOCAL_NAME)) {
- // this convention only started with 2.4?
- if (webapp.hasAttribute(WEB_APP_VERSION_NAME)) {
- String versionValue = webapp.getAttribute(WEB_APP_VERSION_NAME);
- versionValue = versionValue.trim();
- if (versionValue.length() > 0) {
- try {
- version[0] = Float.valueOf(versionValue);
- }
- catch (NumberFormatException e) {
- // doesn't matter
- }
- }
- }
- if (version[0] == null) {
- // try determining the version from the doctype reference
- DocumentType doctype = document.getDoctype();
- if (doctype != null) {
- String systemId = doctype.getSystemId();
- String publicId = doctype.getPublicId();
- if ((systemId != null && systemId.endsWith("web-app_2_3.dtd")) || (publicId != null && publicId.indexOf("Web Application 2.3") > 0)) { //$NON-NLS-1$ //$NON-NLS-2$
- version[0] = new Float(2.3);
- }
- else if ((systemId != null && systemId.endsWith("web-app_2_2.dtd")) || (publicId != null && publicId.indexOf("Web Application 2.2") > 0)) { //$NON-NLS-1$ //$NON-NLS-2$
- version[0] = new Float(2.2);
- }
- else if ((systemId != null && systemId.endsWith("web-app_2_1.dtd")) || (publicId != null && publicId.indexOf("Web Application 2.1") > 0)) { //$NON-NLS-1$ //$NON-NLS-2$
- version[0] = new Float(2.1);
- }
- }
- }
- }
- }
- NodeList propertyGroupElements = document.getElementsByTagName(JSP_PROPERTY_GROUP);
- int length = propertyGroupElements.getLength();
- subMonitor.beginTask("Reading Property Groups", length); //$NON-NLS-1$
- for (int i = 0; i < length; i++) {
- PropertyGroup group = PropertyGroup.createFrom(path, propertyGroupElements.item(i), i);
- subMonitor.worked(1);
- if (group != null) {
- groupList.add(group);
- }
- }
-
- // 325554 : only apply to URL patterns for Servlet mappings
- NodeList urlPatternElements = document.getElementsByTagName(URL_PATTERN);
- int urlPatternElementCount = urlPatternElements.getLength();
- for (int i = 0; i < urlPatternElementCount; i++) {
- Node urlPatternElement = urlPatternElements.item(i);
- if (SERVLET_MAPPING.equals(urlPatternElement.getParentNode().getNodeName())) {
- String urlPattern = getContainedText(urlPatternElement);
- if (urlPattern != null && urlPattern.length() > 0) {
- urlPatterns.add(new StringMatcher(urlPattern));
- }
- }
- }
- }
-
- /**
- * Convert the SRV spec version to the JSP spec version
- */
- private float convertSpecVersions(float version) {
- if (version > 0) {
- if (version == 3f)
- return 2.2f;
- if (version == 2.5f)
- return 2.1f;
- else if (version == 2.4f)
- return 2.0f;
- else if (version == 2.3f)
- return 1.2f;
- else if (version == 2.2f)
- return 1.1f;
- else if (version == 2.1f)
- return 1.0f;
- }
- return convertSpecVersions(defaultWebAppVersion);
- }
-
- void deploymentDescriptorChanged(final IPath fullPath) {
- if (fDeploymentDescriptors.containsKey(fullPath.makeAbsolute())) {
- updateCacheEntry(fullPath);
- }
- }
-
- /**
- * parse the specified resource using Xerces, and if that fails, use the
- * SSE XML parser to find the property groups.
- */
- private DeploymentDescriptor fetchDescriptor(IPath path, IProgressMonitor monitor) {
- monitor.beginTask(Messages.DeploymentDescriptorPropertyCache_1, 3);
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
-
- PropertyGroup groups[] = null;
-
- IStructuredModel model = null;
- List groupList = new ArrayList();
- List urlPatterns = new ArrayList();
- Float[] version = new Float[1];
- SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 2);
- DocumentBuilder builder = CommonXML.getDocumentBuilder(false);
- builder.setEntityResolver(getEntityResolver());
- builder.setErrorHandler(getErrorHandler(path));
- try {
- InputSource inputSource = new InputSource();
- String s = FileContentCache.getInstance().getContents(path);
- inputSource.setCharacterStream(new StringReader(s));
- inputSource.setSystemId(path.toString());
- Document document = builder.parse(inputSource);
- _parseDocument(path, version, groupList, urlPatterns, subMonitor, document);
- }
- catch (SAXException e1) {
- /* encountered a fatal parsing error, try our own parser */
- try {
- /**
- * Chiefly because the web.xml file itself is editable, use
- * SSE to get the DOM Document because it is more fault
- * tolerant.
- */
- model = StructuredModelManager.getModelManager().getModelForRead(file);
- monitor.worked(1);
- if (model instanceof IDOMModel) {
- IDOMDocument document = ((IDOMModel) model).getDocument();
- _parseDocument(path, version, groupList, urlPatterns, subMonitor, document);
- }
- }
- catch (Exception e) {
- Logger.logException(e);
- }
- finally {
- if (model != null) {
- model.releaseFromRead();
- }
- }
- }
- catch (IOException e1) {
- /* file is unreadable, create no property groups */
- }
- finally {
- groups = (PropertyGroup[]) groupList.toArray(new PropertyGroup[groupList.size()]);
- subMonitor.done();
- }
-
- if (groups == null) {
- groups = NO_PROPERTY_GROUPS;
- }
-
- DeploymentDescriptor deploymentDescriptor = new DeploymentDescriptor();
- deploymentDescriptor.modificationStamp = file.getModificationStamp();
- deploymentDescriptor.groups = groups;
- deploymentDescriptor.urlPatterns = ((StringMatcher[]) urlPatterns.toArray(new StringMatcher[urlPatterns.size()]));
- deploymentDescriptor.version = version[0];
- monitor.done();
- fDeploymentDescriptors.put(path, new SoftReference(deploymentDescriptor));
- return deploymentDescriptor;
- }
-
- private DeploymentDescriptor getCachedDescriptor(IPath jspFilePath) {
- IPath webxmlPath = getWebXMLPath(jspFilePath);
- if (webxmlPath == null)
- return null;
-
- IFile webxmlFile = ResourcesPlugin.getWorkspace().getRoot().getFile(webxmlPath);
- if (!webxmlFile.isAccessible())
- return null;
-
- Reference descriptorHolder = (Reference) fDeploymentDescriptors.get(webxmlPath);
- DeploymentDescriptor descriptor = null;
-
- if (descriptorHolder == null || ((descriptor = (DeploymentDescriptor) descriptorHolder.get()) == null) || (descriptor.modificationStamp == IResource.NULL_STAMP) || (descriptor.modificationStamp != webxmlFile.getModificationStamp())) {
- descriptor = fetchDescriptor(webxmlPath, new NullProgressMonitor());
- }
- return descriptor;
- }
-
- private EntityResolver getEntityResolver() {
- if (resolver == null) {
- resolver = new EntityResolver() {
- public InputSource resolveEntity(String publicID, String systemID) throws SAXException, IOException {
- InputSource 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;
- }
-
- /**
- * Returns an ErrorHandler that will not stop the parser on reported
- * errors
- */
- private ErrorHandler getErrorHandler(IPath path) {
- if (errorHandler == null) {
- errorHandler = new ResourceErrorHandler(false);
- }
- errorHandler.setPath(path);
- return errorHandler;
- }
-
- /**
- * @param fullPath
- * @return the JSP version supported by the web application containing the
- * path. A value stated within a web.xml file takes priority.
- */
- public float getJSPVersion(IPath fullPath) {
- float version = defaultWebAppVersion;
- /* try applicable web.xml file first */
- DeploymentDescriptor descriptor = getCachedDescriptor(fullPath);
- if (descriptor != null && descriptor.version != null) {
- version = descriptor.version.floatValue();
- return convertSpecVersions(version);
- }
-
- /* check facet settings */
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(fullPath.segment(0));
- version = FacetModuleCoreSupport.getDynamicWebProjectVersion(project);
-
- return convertSpecVersions(version);
- }
-
- /**
- * @param jspFilePath
- * @return PropertyGroups matching the file at the given path or an empty
- * array if no web.xml file exists or no matching property group
- * was defined. A returned PropertyGroup object should be
- * considered short-lived and not saved for later use.
- */
- public PropertyGroup[] getPropertyGroups(IPath jspFilePath) {
- List matchingGroups = new ArrayList(1);
- DeploymentDescriptor descriptor = getCachedDescriptor(jspFilePath);
- if (descriptor == null)
- return NO_PROPERTY_GROUPS;
-
- for (int i = 0; i < descriptor.groups.length; i++) {
- if (descriptor.groups[i].matches(FacetModuleCoreSupport.getRuntimePath(jspFilePath).toString(), false)) {
- matchingGroups.add(descriptor.groups[i]);
- }
- }
- if (matchingGroups.isEmpty()) {
- for (int i = 0; i < descriptor.groups.length; i++) {
- if (descriptor.groups[i].matches(FacetModuleCoreSupport.getRuntimePath(jspFilePath).toString(), true)) {
- matchingGroups.add(descriptor.groups[i]);
- }
- }
- }
- return (PropertyGroup[]) matchingGroups.toArray(new PropertyGroup[matchingGroups.size()]);
- }
-
- /**
- * @param jspFilePath
- * the path of the JSP file
- * @param reference
- * a path reference to test for
- * @return a matching url-mapping value in the corresponding deployment
- * descriptor for the given JSP file path, if a deployment
- * descriptor could be found, null otherwise
- */
- public String getURLMapping(IPath jspFilePath, String reference) {
- DeploymentDescriptor descriptor = getCachedDescriptor(jspFilePath);
- if (descriptor == null)
- return null;
- StringMatcher[] mappings = descriptor.urlPatterns;
- for (int i = 0; i < mappings.length; i++) {
- if (mappings[i].match(reference)) {
- return mappings[i].pattern;
- }
- }
- return null;
- }
-
- private IPath getWebXMLPath(IPath fullPath) {
- /*
- * It can take the better part of a full second to do this, so cache
- * the result.
- */
- IPath resolved = null;
- Map mapForProject = null;
- synchronized (LOCK) {
- mapForProject = (Map) resolvedMap.get(fullPath.segment(0));
- if (mapForProject != null) {
- resolved = (IPath) mapForProject.get(fullPath);
- }
- else {
- mapForProject = new HashMap();
- resolvedMap.put(fullPath.segment(0), mapForProject);
- }
- }
- if (resolved != null) {
- if (_debugResolutionCache) {
- System.out.println("DeploymentDescriptorPropertyCache resolution cache hit for " + fullPath); //$NON-NLS-1$
- }
- }
- else {
- if (_debugResolutionCache) {
- System.out.println("DeploymentDescriptorPropertyCache resolution cache miss for " + fullPath); //$NON-NLS-1$
- }
- resolved = FacetModuleCoreSupport.resolve(fullPath, SLASH_WEB_INF_WEB_XML);
- mapForProject.put(fullPath, resolved);
- }
- return resolved;
- }
-
- public IFile getWebXML(IPath jspFilePath) {
- IPath webxmlPath = getWebXMLPath(jspFilePath);
- if (webxmlPath == null)
- return null;
-
- return ResourcesPlugin.getWorkspace().getRoot().getFile(webxmlPath);
- }
-
- private void updateCacheEntry(IPath fullPath) {
- /* don't update right now; remove and wait for another query to update */
- fDeploymentDescriptors.remove(fullPath);
- }
-}
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 9a58ad2e9f..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, 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
- * 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 a4588ef8c5..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/IntStack.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2011 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 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(10);
- }
-
- 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) {
- int[] newList = new int[size * 2];
- System.arraycopy(list, 0, newList, 0, size);
- list = newList;
- }
- list[size++] = newValue;
- return newValue;
- }
-
- public int size() {
- return size;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- public String toString() {
- StringBuffer s = new StringBuffer(getClass().getName() + ":" +size + " [");
- for (int i = 0; i < size; i++) {
- s.append(list[i]);
- if(i < size - 1) {
- s.append(", ");
- }
- }
- s.append("]");
- return s.toString();
- }
-}
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 176c532ca2..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPHeadTokenizer.java
+++ /dev/null
@@ -1,3924 +0,0 @@
-/* The following code was generated by JFlex 1.4.2 on 7/28/08 9:29 AM */
-
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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 java.util.Arrays;
-
-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.2
- * on 7/28/08 9:29 AM from the specification file
- * <tt>D:/workspaces/wtp301/workspace/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 =
- "\1\11\10\0\1\6\1\10\2\0\1\7\22\0\1\6\1\20\1\37"+
- "\2\0\1\51\1\0\1\40\6\0\1\43\1\34\1\0\1\47\1\0"+
- "\1\44\5\0\1\50\1\41\1\0\1\13\1\12\1\56\1\14\1\52"+
- "\1\53\1\32\1\23\1\21\1\27\1\0\1\46\1\30\1\33\1\54"+
- "\1\0\1\17\1\16\1\35\1\22\1\26\1\0\1\45\1\36\1\24"+
- "\1\31\1\55\1\42\1\15\1\25\7\0\1\53\1\32\1\23\1\21"+
- "\1\27\1\0\1\46\1\30\1\33\1\54\1\0\1\17\1\16\1\35"+
- "\1\22\1\26\1\0\1\45\1\36\1\24\1\31\1\55\1\42\1\15"+
- "\1\25\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\24\1\2\2\1\1\1\2\1\3\1\4\1\5"+
- "\1\6\1\1\1\5\1\7\1\5\1\1\1\10\1\1"+
- "\1\11\6\0\1\12\1\13\15\0\1\14\20\0\1\15"+
- "\1\0\1\16\1\0\1\2\1\3\1\4\1\6\3\0"+
- "\1\17\1\7\1\0\1\10\1\11\10\0\1\20\5\0"+
- "\1\14\12\0\1\15\1\16\1\2\1\17\67\0\1\21"+
- "\20\0\1\22\4\0\1\21\17\0\1\22\6\0\1\23"+
- "\15\0\1\24\1\0\1\23\2\0\1\25\14\0\1\24"+
- "\2\0\1\25\34\0\1\26\14\0\1\26\2\0\1\27"+
- "\13\0\1\27\132\0\1\30\1\0\1\30\6\0\2\30"+
- "\11\0\1\31\1\0\1\31\2\0\2\31\11\0";
-
- private static int [] zzUnpackAction() {
- int [] result = new int[446];
- 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 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;
-
- /** the number of characters up to the start of the matched text */
- private int yychar;
-
- /**
- * 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 */
- 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, Exception {
- 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 < 194) {
- 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;
- 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) {
- zzEndRead+= numRead;
- return false;
- }
- // unlikely but not impossible: read 0 characters, but not at end of stream
- if (numRead == 0) {
- int c = zzReader.read();
- if (c == -1) {
- return true;
- } else {
- zzBuffer[zzEndRead++] = (char) c;
- return false;
- }
- }
-
- // numRead < 0
- return true;
- }
-
-
- /**
- * 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 = 0;
- yychar = 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) throws java.lang.Exception {
- String message;
- try {
- message = ZZ_ERROR_MSG[errorCode];
- }
- catch (ArrayIndexOutOfBoundsException e) {
- message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR];
- }
-
- throw new java.lang.Exception(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) throws java.lang.Exception {
- 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, java.lang.Exception {
- 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;
- zzEndReadL = zzEndRead;
- 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 9: zzIsFinal = true; zzState = 9; break zzForNext;
- case 11: zzIsFinal = true; zzState = 10; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext;
- }
-
- case 1:
- switch (zzInput) {
- case 1: zzIsFinal = true; zzState = 11; break zzForNext;
- case 2: zzIsFinal = true; zzState = 12; break zzForNext;
- case 3: zzIsFinal = true; zzState = 13; break zzForNext;
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 14; break zzForNext;
- case 9: zzIsFinal = true; zzState = 15; break zzForNext;
- case 11: zzIsFinal = true; zzState = 16; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext;
- }
-
- case 2:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 17; break zzForNext;
- case 9: zzIsFinal = true; zzState = 18; break zzForNext;
- case 12: zzIsFinal = true; zzState = 19; break zzForNext;
- case 23: zzIsFinal = true; zzState = 20; break zzForNext;
- case 45: zzIsFinal = true; zzState = 21; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext;
- }
-
- case 3:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzState = 22; break zzForNext;
- case 15: zzIsFinal = true; zzState = 23; break zzForNext;
- case 19: zzIsFinal = true; zzState = 24; break zzForNext;
- case 22: zzIsFinal = true; zzState = 25; break zzForNext;
- case 28: zzIsFinal = true; zzState = 26; break zzForNext;
- case 41: zzIsFinal = true; zzState = 27; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 8; break zzForNext;
- }
-
- case 4:
- switch (zzInput) {
- case 6:
- case 7: zzIsFinal = true; zzState = 29; break zzForNext;
- case 8: zzIsFinal = true; zzState = 30; break zzForNext;
- case 9: zzIsFinal = true; zzState = 31; break zzForNext;
- case 31: zzIsFinal = true; zzState = 32; break zzForNext;
- case 32: zzIsFinal = true; zzState = 33; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext;
- }
-
- case 5:
- switch (zzInput) {
- case 7:
- case 8:
- case 11: zzIsFinal = true; zzState = 35; break zzForNext;
- case 9: zzIsFinal = true; zzState = 36; break zzForNext;
- case 12: zzIsFinal = true; zzState = 37; break zzForNext;
- case 31: zzIsFinal = true; zzState = 38; break zzForNext;
- case 41: zzIsFinal = true; zzState = 39; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 34; break zzForNext;
- }
-
- case 6:
- switch (zzInput) {
- case 7:
- case 8:
- case 11: zzIsFinal = true; zzState = 35; break zzForNext;
- case 32: zzIsFinal = true; zzState = 38; break zzForNext;
- case 41: zzIsFinal = true; zzState = 39; break zzForNext;
- case 9: zzIsFinal = true; zzState = 40; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 34; break zzForNext;
- }
-
- case 7:
- switch (zzInput) {
- case 11: zzIsFinal = true; zzState = 35; break zzForNext;
- case 12:
- case 41: zzIsFinal = true; zzState = 39; break zzForNext;
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 41; break zzForNext;
- case 9: zzIsFinal = true; zzState = 42; break zzForNext;
- case 31:
- case 32: zzIsFinal = true; zzState = 43; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 34; break zzForNext;
- }
-
- case 9:
- switch (zzInput) {
- case 11: zzState = 44; break zzForNext;
- default: break zzForAction;
- }
-
- case 10:
- switch (zzInput) {
- case 9: zzState = 45; break zzForNext;
- case 16: zzState = 46; break zzForNext;
- case 24: zzState = 47; break zzForNext;
- case 41: zzState = 48; break zzForNext;
- case 44: zzState = 49; break zzForNext;
- default: break zzForAction;
- }
-
- case 11:
- switch (zzInput) {
- case 2: zzIsFinal = true; zzNoLookAhead = true; zzState = 50; break zzForNext;
- default: break zzForAction;
- }
-
- case 12:
- switch (zzInput) {
- case 1: zzIsFinal = true; zzNoLookAhead = true; zzState = 51; break zzForNext;
- default: break zzForAction;
- }
-
- case 13:
- switch (zzInput) {
- case 4: zzState = 52; break zzForNext;
- default: break zzForAction;
- }
-
- case 14:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 53; break zzForNext;
- case 9: zzState = 54; break zzForNext;
- case 11: zzState = 55; break zzForNext;
- default: break zzForAction;
- }
-
- case 15:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 53; break zzForNext;
- case 11: zzState = 56; break zzForNext;
- default: break zzForAction;
- }
-
- case 16:
- switch (zzInput) {
- case 16: zzState = 46; break zzForNext;
- case 24: zzState = 47; break zzForNext;
- case 41: zzState = 48; break zzForNext;
- case 44: zzState = 49; break zzForNext;
- case 9: zzState = 57; break zzForNext;
- case 12: zzState = 58; break zzForNext;
- default: break zzForAction;
- }
-
- case 17:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 59; break zzForNext;
- case 9: zzState = 60; break zzForNext;
- case 12: zzState = 61; break zzForNext;
- default: break zzForAction;
- }
-
- case 18:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 59; break zzForNext;
- case 12: zzState = 61; break zzForNext;
- case 23: zzState = 62; break zzForNext;
- case 45: zzState = 63; break zzForNext;
- default: break zzForAction;
- }
-
- case 19:
- switch (zzInput) {
- case 9: zzState = 64; break zzForNext;
- case 46: zzIsFinal = true; zzState = 65; break zzForNext;
- default: break zzForAction;
- }
-
- case 20:
- switch (zzInput) {
- case 9: zzState = 66; break zzForNext;
- case 29: zzState = 67; break zzForNext;
- default: break zzForAction;
- }
-
- case 21:
- switch (zzInput) {
- case 9: zzState = 68; break zzForNext;
- case 23: zzState = 69; break zzForNext;
- default: break zzForAction;
- }
-
- case 22:
- switch (zzInput) {
- case 15: zzState = 70; break zzForNext;
- case 19: zzState = 71; break zzForNext;
- case 22: zzState = 72; break zzForNext;
- case 28: zzState = 73; break zzForNext;
- case 41: zzState = 74; break zzForNext;
- default: break zzForAction;
- }
-
- case 23:
- switch (zzInput) {
- case 9: zzState = 75; break zzForNext;
- case 43: zzState = 76; break zzForNext;
- default: break zzForAction;
- }
-
- case 24:
- switch (zzInput) {
- case 9: zzState = 77; break zzForNext;
- case 18: zzState = 78; break zzForNext;
- default: break zzForAction;
- }
-
- case 25:
- switch (zzInput) {
- case 9: zzState = 79; break zzForNext;
- case 43: zzState = 80; break zzForNext;
- default: break zzForAction;
- }
-
- case 26:
- switch (zzInput) {
- case 9: zzState = 81; break zzForNext;
- case 46: zzIsFinal = true; zzState = 82; break zzForNext;
- default: break zzForAction;
- }
-
- case 27:
- switch (zzInput) {
- case 9: zzState = 83; break zzForNext;
- case 46: zzIsFinal = true; zzState = 84; break zzForNext;
- default: break zzForAction;
- }
-
- case 29:
- switch (zzInput) {
- case 6:
- case 7: zzIsFinal = true; break zzForNext;
- case 8: zzState = 85; break zzForNext;
- case 9: zzIsFinal = true; zzState = 86; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext;
- }
-
- case 30:
- switch (zzInput) {
- case 6:
- case 7: zzIsFinal = true; zzState = 29; break zzForNext;
- case 8: zzState = 85; break zzForNext;
- case 9: zzIsFinal = true; zzState = 86; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext;
- }
-
- case 31:
- switch (zzInput) {
- case 31: zzIsFinal = true; zzState = 32; break zzForNext;
- case 32: zzIsFinal = true; zzState = 33; break zzForNext;
- case 6:
- case 7:
- case 8: zzState = 85; break zzForNext;
- default: break zzForAction;
- }
-
- case 32:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 87; break zzForNext;
- default: break zzForAction;
- }
-
- case 33:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 88; break zzForNext;
- default: break zzForAction;
- }
-
- case 35:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 89; break zzForNext;
- default: break zzForAction;
- }
-
- case 36:
- switch (zzInput) {
- case 7:
- case 8:
- case 11: zzIsFinal = true; zzState = 35; break zzForNext;
- case 31: zzIsFinal = true; zzState = 38; break zzForNext;
- case 12: zzState = 90; break zzForNext;
- case 41: zzState = 91; break zzForNext;
- default: break zzForAction;
- }
-
- case 37:
- switch (zzInput) {
- case 9: zzState = 92; break zzForNext;
- case 46: zzIsFinal = true; zzState = 93; break zzForNext;
- default: break zzForAction;
- }
-
- case 38:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 94; break zzForNext;
- default: break zzForAction;
- }
-
- case 39:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzState = 35; break zzForNext;
- case 9: zzState = 95; break zzForNext;
- default: break zzForAction;
- }
-
- case 40:
- switch (zzInput) {
- case 7:
- case 8:
- case 11: zzIsFinal = true; zzState = 35; break zzForNext;
- case 32: zzIsFinal = true; zzState = 38; break zzForNext;
- case 41: zzState = 91; break zzForNext;
- default: break zzForAction;
- }
-
- case 41:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 96; break zzForNext;
- default: break zzForAction;
- }
-
- case 42:
- switch (zzInput) {
- case 11: zzIsFinal = true; zzState = 35; break zzForNext;
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 41; break zzForNext;
- case 31:
- case 32: zzIsFinal = true; zzState = 43; break zzForNext;
- case 12:
- case 41: zzState = 91; break zzForNext;
- default: break zzForAction;
- }
-
- case 43:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 97; break zzForNext;
- default: break zzForAction;
- }
-
- case 44:
- switch (zzInput) {
- case 9: zzState = 45; break zzForNext;
- case 16: zzState = 46; break zzForNext;
- case 24: zzState = 47; break zzForNext;
- case 41: zzState = 48; break zzForNext;
- case 44: zzState = 49; break zzForNext;
- default: break zzForAction;
- }
-
- case 45:
- switch (zzInput) {
- case 16: zzState = 46; break zzForNext;
- case 24: zzState = 47; break zzForNext;
- case 41: zzState = 48; break zzForNext;
- case 44: zzState = 49; break zzForNext;
- default: break zzForAction;
- }
-
- case 46:
- switch (zzInput) {
- case 9: zzState = 98; break zzForNext;
- case 17: zzState = 99; break zzForNext;
- default: break zzForAction;
- }
-
- case 47:
- switch (zzInput) {
- case 9: zzState = 100; break zzForNext;
- case 20: zzState = 101; break zzForNext;
- default: break zzForAction;
- }
-
- case 48:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 102; break zzForNext;
- case 42: zzState = 103; break zzForNext;
- default: break zzForAction;
- }
-
- case 49:
- switch (zzInput) {
- case 9: zzState = 104; break zzForNext;
- case 30: zzState = 105; break zzForNext;
- default: break zzForAction;
- }
-
- case 52:
- switch (zzInput) {
- case 5: zzIsFinal = true; zzNoLookAhead = true; zzState = 106; break zzForNext;
- default: break zzForAction;
- }
-
- case 53:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 54; break zzForNext;
- case 11: zzState = 55; break zzForNext;
- default: break zzForAction;
- }
-
- case 54:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 53; break zzForNext;
- case 11: zzState = 55; break zzForNext;
- case 9: zzState = 107; break zzForNext;
- default: break zzForAction;
- }
-
- case 55:
- switch (zzInput) {
- case 12: zzState = 58; break zzForNext;
- case 9: zzState = 108; break zzForNext;
- default: break zzForAction;
- }
-
- case 56:
- switch (zzInput) {
- case 16: zzState = 46; break zzForNext;
- case 24: zzState = 47; break zzForNext;
- case 41: zzState = 48; break zzForNext;
- case 44: zzState = 49; break zzForNext;
- case 9: zzState = 57; break zzForNext;
- case 12: zzState = 58; break zzForNext;
- default: break zzForAction;
- }
-
- case 57:
- switch (zzInput) {
- case 16: zzState = 46; break zzForNext;
- case 24: zzState = 47; break zzForNext;
- case 41: zzState = 48; break zzForNext;
- case 44: zzState = 49; break zzForNext;
- case 12: zzState = 58; break zzForNext;
- default: break zzForAction;
- }
-
- case 58:
- switch (zzInput) {
- case 9: zzState = 109; break zzForNext;
- case 13: zzState = 110; break zzForNext;
- default: break zzForAction;
- }
-
- case 59:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 60; break zzForNext;
- case 12: zzState = 61; break zzForNext;
- default: break zzForAction;
- }
-
- case 60:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 59; break zzForNext;
- case 12: zzState = 61; break zzForNext;
- case 9: zzState = 111; break zzForNext;
- default: break zzForAction;
- }
-
- case 61:
- switch (zzInput) {
- case 9: zzState = 64; break zzForNext;
- case 46: zzIsFinal = true; zzState = 65; break zzForNext;
- default: break zzForAction;
- }
-
- case 62:
- switch (zzInput) {
- case 9: zzState = 66; break zzForNext;
- case 29: zzState = 67; break zzForNext;
- default: break zzForAction;
- }
-
- case 63:
- switch (zzInput) {
- case 9: zzState = 68; break zzForNext;
- case 23: zzState = 69; break zzForNext;
- default: break zzForAction;
- }
-
- case 64:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzState = 65; break zzForNext;
- default: break zzForAction;
- }
-
- case 65:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 112; break zzForNext;
- default: break zzForAction;
- }
-
- case 66:
- switch (zzInput) {
- case 29: zzState = 67; break zzForNext;
- default: break zzForAction;
- }
-
- case 67:
- switch (zzInput) {
- case 9: zzState = 113; break zzForNext;
- case 19: zzState = 114; break zzForNext;
- default: break zzForAction;
- }
-
- case 68:
- switch (zzInput) {
- case 23: zzState = 69; break zzForNext;
- default: break zzForAction;
- }
-
- case 69:
- switch (zzInput) {
- case 9: zzState = 115; break zzForNext;
- case 37: zzState = 116; break zzForNext;
- default: break zzForAction;
- }
-
- case 70:
- switch (zzInput) {
- case 9: zzState = 75; break zzForNext;
- case 43: zzState = 76; break zzForNext;
- default: break zzForAction;
- }
-
- case 71:
- switch (zzInput) {
- case 9: zzState = 77; break zzForNext;
- case 18: zzState = 78; break zzForNext;
- default: break zzForAction;
- }
-
- case 72:
- switch (zzInput) {
- case 9: zzState = 79; break zzForNext;
- case 43: zzState = 80; break zzForNext;
- default: break zzForAction;
- }
-
- case 73:
- switch (zzInput) {
- case 9: zzState = 81; break zzForNext;
- case 46: zzIsFinal = true; zzState = 82; break zzForNext;
- default: break zzForAction;
- }
-
- case 74:
- switch (zzInput) {
- case 9: zzState = 83; break zzForNext;
- case 46: zzIsFinal = true; zzState = 84; break zzForNext;
- default: break zzForAction;
- }
-
- case 75:
- switch (zzInput) {
- case 43: zzState = 76; break zzForNext;
- default: break zzForAction;
- }
-
- case 76:
- switch (zzInput) {
- case 9: zzState = 117; break zzForNext;
- case 29: zzState = 118; break zzForNext;
- default: break zzForAction;
- }
-
- case 77:
- switch (zzInput) {
- case 18: zzState = 78; break zzForNext;
- default: break zzForAction;
- }
-
- case 78:
- switch (zzInput) {
- case 9: zzState = 119; break zzForNext;
- case 29: zzState = 120; break zzForNext;
- default: break zzForAction;
- }
-
- case 79:
- switch (zzInput) {
- case 43: zzState = 80; break zzForNext;
- default: break zzForAction;
- }
-
- case 80:
- switch (zzInput) {
- case 9: zzState = 121; break zzForNext;
- case 38: zzState = 122; break zzForNext;
- default: break zzForAction;
- }
-
- case 81:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzState = 82; break zzForNext;
- default: break zzForAction;
- }
-
- case 82:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 123; break zzForNext;
- default: break zzForAction;
- }
-
- case 83:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzState = 84; break zzForNext;
- default: break zzForAction;
- }
-
- case 84:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 124; break zzForNext;
- default: break zzForAction;
- }
-
- case 85:
- switch (zzInput) {
- case 6:
- case 7: zzIsFinal = true; zzState = 29; break zzForNext;
- case 8: break zzForNext;
- case 9: zzIsFinal = true; zzState = 86; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext;
- }
-
- case 86:
- switch (zzInput) {
- case 6:
- case 7: zzIsFinal = true; zzState = 29; break zzForNext;
- case 8: zzState = 85; break zzForNext;
- case 9: zzIsFinal = true; zzState = 125; break zzForNext;
- default: zzIsFinal = true; zzNoLookAhead = true; zzState = 28; break zzForNext;
- }
-
- case 90:
- switch (zzInput) {
- case 9: zzState = 92; break zzForNext;
- case 46: zzIsFinal = true; zzState = 93; break zzForNext;
- default: break zzForAction;
- }
-
- case 91:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzState = 35; break zzForNext;
- case 9: zzState = 95; break zzForNext;
- default: break zzForAction;
- }
-
- case 92:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzState = 93; break zzForNext;
- default: break zzForAction;
- }
-
- case 93:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 126; break zzForNext;
- default: break zzForAction;
- }
-
- case 95:
- switch (zzInput) {
- case 46: zzIsFinal = true; zzState = 35; break zzForNext;
- default: break zzForAction;
- }
-
- case 98:
- switch (zzInput) {
- case 17: zzState = 99; break zzForNext;
- default: break zzForAction;
- }
-
- case 99:
- switch (zzInput) {
- case 9: zzState = 127; break zzForNext;
- case 18: zzState = 128; break zzForNext;
- default: break zzForAction;
- }
-
- case 100:
- switch (zzInput) {
- case 20: zzState = 101; break zzForNext;
- default: break zzForAction;
- }
-
- case 101:
- switch (zzInput) {
- case 9: zzState = 129; break zzForNext;
- case 14: zzState = 130; break zzForNext;
- default: break zzForAction;
- }
-
- case 102:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 48; break zzForNext;
- case 42: zzState = 103; break zzForNext;
- case 9: zzState = 131; break zzForNext;
- default: break zzForAction;
- }
-
- case 103:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 132; break zzForNext;
- case 20: zzState = 133; break zzForNext;
- case 22: zzState = 134; break zzForNext;
- default: break zzForAction;
- }
-
- case 104:
- switch (zzInput) {
- case 30: zzState = 105; break zzForNext;
- default: break zzForAction;
- }
-
- case 105:
- switch (zzInput) {
- case 9: zzState = 135; break zzForNext;
- case 22: zzState = 136; break zzForNext;
- default: break zzForAction;
- }
-
- case 107:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 53; break zzForNext;
- case 11: zzState = 55; break zzForNext;
- default: break zzForAction;
- }
-
- case 108:
- switch (zzInput) {
- case 12: zzState = 58; break zzForNext;
- default: break zzForAction;
- }
-
- case 109:
- switch (zzInput) {
- case 13: zzState = 110; break zzForNext;
- default: break zzForAction;
- }
-
- case 110:
- switch (zzInput) {
- case 9: zzState = 137; break zzForNext;
- case 14: zzState = 138; break zzForNext;
- default: break zzForAction;
- }
-
- case 111:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 59; break zzForNext;
- case 12: zzState = 61; break zzForNext;
- default: break zzForAction;
- }
-
- case 113:
- switch (zzInput) {
- case 19: zzState = 114; break zzForNext;
- default: break zzForAction;
- }
-
- case 114:
- switch (zzInput) {
- case 9: zzState = 139; break zzForNext;
- case 18: zzState = 140; break zzForNext;
- default: break zzForAction;
- }
-
- case 115:
- switch (zzInput) {
- case 37: zzState = 116; break zzForNext;
- default: break zzForAction;
- }
-
- case 116:
- switch (zzInput) {
- case 9: zzState = 141; break zzForNext;
- case 30: zzState = 142; break zzForNext;
- default: break zzForAction;
- }
-
- case 117:
- switch (zzInput) {
- case 29: zzState = 118; break zzForNext;
- default: break zzForAction;
- }
-
- case 118:
- switch (zzInput) {
- case 9: zzState = 143; break zzForNext;
- case 38: zzState = 144; break zzForNext;
- default: break zzForAction;
- }
-
- case 119:
- switch (zzInput) {
- case 29: zzState = 120; break zzForNext;
- default: break zzForAction;
- }
-
- case 120:
- switch (zzInput) {
- case 9: zzState = 145; break zzForNext;
- case 20: zzState = 146; break zzForNext;
- default: break zzForAction;
- }
-
- case 121:
- switch (zzInput) {
- case 38: zzState = 122; break zzForNext;
- default: break zzForAction;
- }
-
- case 122:
- switch (zzInput) {
- case 9: zzState = 147; break zzForNext;
- case 23: zzState = 148; break zzForNext;
- default: break zzForAction;
- }
-
- case 125:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 85; break zzForNext;
- default: break zzForAction;
- }
-
- case 127:
- switch (zzInput) {
- case 18: zzState = 128; break zzForNext;
- default: break zzForAction;
- }
-
- case 128:
- switch (zzInput) {
- case 9: zzState = 149; break zzForNext;
- case 19: zzState = 150; break zzForNext;
- default: break zzForAction;
- }
-
- case 129:
- switch (zzInput) {
- case 14: zzState = 130; break zzForNext;
- default: break zzForAction;
- }
-
- case 130:
- switch (zzInput) {
- case 9: zzState = 151; break zzForNext;
- case 15: zzState = 152; break zzForNext;
- default: break zzForAction;
- }
-
- case 131:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 48; break zzForNext;
- case 42: zzState = 103; break zzForNext;
- default: break zzForAction;
- }
-
- case 132:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 103; break zzForNext;
- case 20: zzState = 133; break zzForNext;
- case 22: zzState = 134; break zzForNext;
- case 9: zzState = 153; break zzForNext;
- default: break zzForAction;
- }
-
- case 133:
- switch (zzInput) {
- case 9: zzState = 154; break zzForNext;
- case 43: zzState = 155; break zzForNext;
- default: break zzForAction;
- }
-
- case 134:
- switch (zzInput) {
- case 9: zzState = 156; break zzForNext;
- case 43: zzState = 157; break zzForNext;
- default: break zzForAction;
- }
-
- case 135:
- switch (zzInput) {
- case 22: zzState = 136; break zzForNext;
- default: break zzForAction;
- }
-
- case 136:
- switch (zzInput) {
- case 9: zzState = 158; break zzForNext;
- case 33: zzState = 159; break zzForNext;
- default: break zzForAction;
- }
-
- case 137:
- switch (zzInput) {
- case 14: zzState = 138; break zzForNext;
- default: break zzForAction;
- }
-
- case 138:
- switch (zzInput) {
- case 9: zzState = 160; break zzForNext;
- case 15: zzState = 161; break zzForNext;
- default: break zzForAction;
- }
-
- case 139:
- switch (zzInput) {
- case 18: zzState = 140; break zzForNext;
- default: break zzForAction;
- }
-
- case 140:
- switch (zzInput) {
- case 9: zzState = 162; break zzForNext;
- case 17: zzState = 163; break zzForNext;
- default: break zzForAction;
- }
-
- case 141:
- switch (zzInput) {
- case 30: zzState = 142; break zzForNext;
- default: break zzForAction;
- }
-
- case 142:
- switch (zzInput) {
- case 9: zzState = 164; break zzForNext;
- case 27: zzState = 165; break zzForNext;
- default: break zzForAction;
- }
-
- case 143:
- switch (zzInput) {
- case 38: zzState = 144; break zzForNext;
- default: break zzForAction;
- }
-
- case 144:
- switch (zzInput) {
- case 9: zzState = 166; break zzForNext;
- case 25: zzState = 167; break zzForNext;
- default: break zzForAction;
- }
-
- case 145:
- switch (zzInput) {
- case 20: zzState = 146; break zzForNext;
- default: break zzForAction;
- }
-
- case 146:
- switch (zzInput) {
- case 9: zzState = 168; break zzForNext;
- case 23: zzState = 169; break zzForNext;
- default: break zzForAction;
- }
-
- case 147:
- switch (zzInput) {
- case 23: zzState = 148; break zzForNext;
- default: break zzForAction;
- }
-
- case 148:
- switch (zzInput) {
- case 9: zzState = 170; break zzForNext;
- case 23: zzState = 171; break zzForNext;
- default: break zzForAction;
- }
-
- case 149:
- switch (zzInput) {
- case 19: zzState = 150; break zzForNext;
- default: break zzForAction;
- }
-
- case 150:
- switch (zzInput) {
- case 9: zzState = 172; break zzForNext;
- case 20: zzState = 173; break zzForNext;
- default: break zzForAction;
- }
-
- case 151:
- switch (zzInput) {
- case 15: zzState = 152; break zzForNext;
- default: break zzForAction;
- }
-
- case 152:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 174; break zzForNext;
- case 13: zzState = 175; break zzForNext;
- default: break zzForAction;
- }
-
- case 153:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 103; break zzForNext;
- case 20: zzState = 133; break zzForNext;
- case 22: zzState = 134; break zzForNext;
- default: break zzForAction;
- }
-
- case 154:
- switch (zzInput) {
- case 43: zzState = 155; break zzForNext;
- default: break zzForAction;
- }
-
- case 155:
- switch (zzInput) {
- case 9: zzState = 176; break zzForNext;
- case 38: zzState = 177; break zzForNext;
- default: break zzForAction;
- }
-
- case 156:
- switch (zzInput) {
- case 43: zzState = 157; break zzForNext;
- default: break zzForAction;
- }
-
- case 157:
- switch (zzInput) {
- case 9: zzState = 178; break zzForNext;
- case 38: zzState = 179; break zzForNext;
- default: break zzForAction;
- }
-
- case 158:
- switch (zzInput) {
- case 33: zzState = 159; break zzForNext;
- default: break zzForAction;
- }
-
- case 159:
- switch (zzInput) {
- case 9: zzState = 180; break zzForNext;
- case 17: zzState = 181; break zzForNext;
- default: break zzForAction;
- }
-
- case 160:
- switch (zzInput) {
- case 15: zzState = 161; break zzForNext;
- default: break zzForAction;
- }
-
- case 161:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 182; break zzForNext;
- case 9: zzState = 183; break zzForNext;
- default: break zzForAction;
- }
-
- case 162:
- switch (zzInput) {
- case 17: zzState = 163; break zzForNext;
- default: break zzForAction;
- }
-
- case 163:
- switch (zzInput) {
- case 9: zzState = 184; break zzForNext;
- case 27: zzState = 185; break zzForNext;
- default: break zzForAction;
- }
-
- case 164:
- switch (zzInput) {
- case 27: zzState = 165; break zzForNext;
- default: break zzForAction;
- }
-
- case 165:
- switch (zzInput) {
- case 9: zzState = 186; break zzForNext;
- case 18: zzState = 187; break zzForNext;
- default: break zzForAction;
- }
-
- case 166:
- switch (zzInput) {
- case 25: zzState = 167; break zzForNext;
- default: break zzForAction;
- }
-
- case 167:
- switch (zzInput) {
- case 9: zzState = 188; break zzForNext;
- case 43: zzState = 189; break zzForNext;
- default: break zzForAction;
- }
-
- case 168:
- switch (zzInput) {
- case 23: zzState = 169; break zzForNext;
- default: break zzForAction;
- }
-
- case 169:
- switch (zzInput) {
- case 9: zzState = 190; break zzForNext;
- case 29: zzState = 191; break zzForNext;
- default: break zzForAction;
- }
-
- case 170:
- switch (zzInput) {
- case 23: zzState = 171; break zzForNext;
- default: break zzForAction;
- }
-
- case 171:
- switch (zzInput) {
- case 9: zzState = 192; break zzForNext;
- case 29: zzState = 193; break zzForNext;
- default: break zzForAction;
- }
-
- case 172:
- switch (zzInput) {
- case 20: zzState = 173; break zzForNext;
- default: break zzForAction;
- }
-
- case 173:
- switch (zzInput) {
- case 9: zzState = 194; break zzForNext;
- case 21: zzState = 195; break zzForNext;
- default: break zzForAction;
- }
-
- case 174:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 152; break zzForNext;
- case 13: zzState = 175; break zzForNext;
- case 9: zzState = 196; break zzForNext;
- default: break zzForAction;
- }
-
- case 175:
- switch (zzInput) {
- case 9: zzState = 197; break zzForNext;
- case 14: zzState = 198; break zzForNext;
- default: break zzForAction;
- }
-
- case 176:
- switch (zzInput) {
- case 38: zzState = 177; break zzForNext;
- default: break zzForAction;
- }
-
- case 177:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 199; break zzForNext;
- case 9: zzState = 200; break zzForNext;
- default: break zzForAction;
- }
-
- case 178:
- switch (zzInput) {
- case 38: zzState = 179; break zzForNext;
- default: break zzForAction;
- }
-
- case 179:
- switch (zzInput) {
- case 23: zzState = 177; break zzForNext;
- case 9: zzState = 201; break zzForNext;
- default: break zzForAction;
- }
-
- case 180:
- switch (zzInput) {
- case 17: zzState = 181; break zzForNext;
- default: break zzForAction;
- }
-
- case 181:
- switch (zzInput) {
- case 9: zzState = 202; break zzForNext;
- case 27: zzState = 203; break zzForNext;
- default: break zzForAction;
- }
-
- case 182:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; break zzForNext;
- case 9: zzIsFinal = true; zzState = 204; break zzForNext;
- default: break zzForAction;
- }
-
- case 183:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 182; break zzForNext;
- case 9: zzState = 205; break zzForNext;
- default: break zzForAction;
- }
-
- case 184:
- switch (zzInput) {
- case 27: zzState = 185; break zzForNext;
- default: break zzForAction;
- }
-
- case 185:
- switch (zzInput) {
- case 9: zzState = 206; break zzForNext;
- case 29: zzState = 207; break zzForNext;
- default: break zzForAction;
- }
-
- case 186:
- switch (zzInput) {
- case 18: zzState = 187; break zzForNext;
- default: break zzForAction;
- }
-
- case 187:
- switch (zzInput) {
- case 9: zzState = 208; break zzForNext;
- case 29: zzState = 209; break zzForNext;
- default: break zzForAction;
- }
-
- case 188:
- switch (zzInput) {
- case 43: zzState = 189; break zzForNext;
- default: break zzForAction;
- }
-
- case 189:
- switch (zzInput) {
- case 9: zzState = 210; break zzForNext;
- case 38: zzState = 211; break zzForNext;
- default: break zzForAction;
- }
-
- case 190:
- switch (zzInput) {
- case 29: zzState = 191; break zzForNext;
- default: break zzForAction;
- }
-
- case 191:
- switch (zzInput) {
- case 9: zzState = 212; break zzForNext;
- case 20: zzState = 213; break zzForNext;
- default: break zzForAction;
- }
-
- case 192:
- switch (zzInput) {
- case 29: zzState = 193; break zzForNext;
- default: break zzForAction;
- }
-
- case 193:
- switch (zzInput) {
- case 9: zzState = 214; break zzForNext;
- case 19: zzState = 215; break zzForNext;
- default: break zzForAction;
- }
-
- case 194:
- switch (zzInput) {
- case 21: zzState = 195; break zzForNext;
- default: break zzForAction;
- }
-
- case 195:
- switch (zzInput) {
- case 9: zzState = 216; break zzForNext;
- case 22: zzState = 217; break zzForNext;
- default: break zzForAction;
- }
-
- case 196:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 152; break zzForNext;
- case 13: zzState = 175; break zzForNext;
- default: break zzForAction;
- }
-
- case 197:
- switch (zzInput) {
- case 14: zzState = 198; break zzForNext;
- default: break zzForAction;
- }
-
- case 198:
- switch (zzInput) {
- case 9: zzState = 218; break zzForNext;
- case 15: zzState = 219; break zzForNext;
- default: break zzForAction;
- }
-
- case 199:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; break zzForNext;
- case 9: zzIsFinal = true; zzState = 220; break zzForNext;
- default: break zzForAction;
- }
-
- case 200:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 199; break zzForNext;
- case 9: zzState = 221; break zzForNext;
- default: break zzForAction;
- }
-
- case 201:
- switch (zzInput) {
- case 23: zzState = 177; break zzForNext;
- default: break zzForAction;
- }
-
- case 202:
- switch (zzInput) {
- case 27: zzState = 203; break zzForNext;
- default: break zzForAction;
- }
-
- case 203:
- switch (zzInput) {
- case 9: zzState = 222; break zzForNext;
- case 37: zzState = 223; break zzForNext;
- default: break zzForAction;
- }
-
- case 204:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 182; break zzForNext;
- case 9: zzState = 205; break zzForNext;
- default: break zzForAction;
- }
-
- case 205:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 182; break zzForNext;
- default: break zzForAction;
- }
-
- case 206:
- switch (zzInput) {
- case 29: zzState = 207; break zzForNext;
- default: break zzForAction;
- }
-
- case 207:
- switch (zzInput) {
- case 9: zzState = 224; break zzForNext;
- case 38: zzState = 225; break zzForNext;
- default: break zzForAction;
- }
-
- case 208:
- switch (zzInput) {
- case 29: zzState = 209; break zzForNext;
- default: break zzForAction;
- }
-
- case 209:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 226; break zzForNext;
- case 10: zzIsFinal = true; zzState = 227; break zzForNext;
- default: break zzForAction;
- }
-
- case 210:
- switch (zzInput) {
- case 38: zzState = 211; break zzForNext;
- default: break zzForAction;
- }
-
- case 211:
- switch (zzInput) {
- case 9: zzState = 228; break zzForNext;
- case 23: zzState = 229; break zzForNext;
- default: break zzForAction;
- }
-
- case 212:
- switch (zzInput) {
- case 20: zzState = 213; break zzForNext;
- default: break zzForAction;
- }
-
- case 213:
- switch (zzInput) {
- case 9: zzState = 230; break zzForNext;
- case 20: zzState = 231; break zzForNext;
- default: break zzForAction;
- }
-
- case 214:
- switch (zzInput) {
- case 19: zzState = 215; break zzForNext;
- default: break zzForAction;
- }
-
- case 215:
- switch (zzInput) {
- case 9: zzState = 232; break zzForNext;
- case 18: zzState = 233; break zzForNext;
- default: break zzForAction;
- }
-
- case 216:
- switch (zzInput) {
- case 22: zzState = 217; break zzForNext;
- default: break zzForAction;
- }
-
- case 217:
- switch (zzInput) {
- case 9: zzState = 234; break zzForNext;
- case 23: zzState = 235; break zzForNext;
- default: break zzForAction;
- }
-
- case 218:
- switch (zzInput) {
- case 15: zzState = 219; break zzForNext;
- default: break zzForAction;
- }
-
- case 219:
- switch (zzInput) {
- case 9: zzState = 236; break zzForNext;
- case 29: zzState = 237; break zzForNext;
- default: break zzForAction;
- }
-
- case 220:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 199; break zzForNext;
- case 9: zzState = 221; break zzForNext;
- default: break zzForAction;
- }
-
- case 221:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 199; break zzForNext;
- default: break zzForAction;
- }
-
- case 222:
- switch (zzInput) {
- case 37: zzState = 223; break zzForNext;
- default: break zzForAction;
- }
-
- case 223:
- switch (zzInput) {
- case 9: zzState = 238; break zzForNext;
- case 23: zzState = 239; break zzForNext;
- default: break zzForAction;
- }
-
- case 224:
- switch (zzInput) {
- case 38: zzState = 225; break zzForNext;
- default: break zzForAction;
- }
-
- case 225:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 240; break zzForNext;
- case 10: zzIsFinal = true; zzState = 241; break zzForNext;
- default: break zzForAction;
- }
-
- case 226:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 209; break zzForNext;
- case 10: zzIsFinal = true; zzState = 227; break zzForNext;
- case 9: zzState = 242; break zzForNext;
- default: break zzForAction;
- }
-
- case 227:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 243; break zzForNext;
- case 9: zzState = 244; break zzForNext;
- default: break zzForAction;
- }
-
- case 228:
- switch (zzInput) {
- case 23: zzState = 229; break zzForNext;
- default: break zzForAction;
- }
-
- case 229:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 245; break zzForNext;
- case 10: zzIsFinal = true; zzState = 246; break zzForNext;
- default: break zzForAction;
- }
-
- case 230:
- switch (zzInput) {
- case 20: zzState = 231; break zzForNext;
- default: break zzForAction;
- }
-
- case 231:
- switch (zzInput) {
- case 9: zzState = 247; break zzForNext;
- case 21: zzState = 248; break zzForNext;
- default: break zzForAction;
- }
-
- case 232:
- switch (zzInput) {
- case 18: zzState = 233; break zzForNext;
- default: break zzForAction;
- }
-
- case 233:
- switch (zzInput) {
- case 9: zzState = 249; break zzForNext;
- case 17: zzState = 250; break zzForNext;
- default: break zzForAction;
- }
-
- case 234:
- switch (zzInput) {
- case 23: zzState = 235; break zzForNext;
- default: break zzForAction;
- }
-
- case 235:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 251; break zzForNext;
- case 24: zzState = 252; break zzForNext;
- case 34: zzState = 253; break zzForNext;
- default: break zzForAction;
- }
-
- case 236:
- switch (zzInput) {
- case 29: zzState = 237; break zzForNext;
- default: break zzForAction;
- }
-
- case 237:
- switch (zzInput) {
- case 9: zzState = 254; break zzForNext;
- case 30: zzState = 255; break zzForNext;
- default: break zzForAction;
- }
-
- case 238:
- switch (zzInput) {
- case 23: zzState = 239; break zzForNext;
- default: break zzForAction;
- }
-
- case 239:
- switch (zzInput) {
- case 9: zzState = 256; break zzForNext;
- case 19: zzState = 257; break zzForNext;
- default: break zzForAction;
- }
-
- case 240:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 225; break zzForNext;
- case 10: zzIsFinal = true; zzState = 241; break zzForNext;
- case 9: zzState = 258; break zzForNext;
- default: break zzForAction;
- }
-
- case 241:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 259; break zzForNext;
- case 9: zzState = 260; break zzForNext;
- default: break zzForAction;
- }
-
- case 242:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 209; break zzForNext;
- default: break zzForAction;
- }
-
- case 243:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzState = 227; break zzForNext;
- case 6:
- case 7:
- case 8: zzIsFinal = true; break zzForNext;
- default: break zzForAction;
- }
-
- case 244:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 243; break zzForNext;
- default: break zzForAction;
- }
-
- case 245:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 229; break zzForNext;
- case 10: zzIsFinal = true; zzState = 246; break zzForNext;
- case 9: zzState = 261; break zzForNext;
- default: break zzForAction;
- }
-
- case 246:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 262; break zzForNext;
- case 9: zzState = 263; break zzForNext;
- default: break zzForAction;
- }
-
- case 247:
- switch (zzInput) {
- case 21: zzState = 248; break zzForNext;
- default: break zzForAction;
- }
-
- case 248:
- switch (zzInput) {
- case 9: zzState = 264; break zzForNext;
- case 22: zzState = 265; break zzForNext;
- default: break zzForAction;
- }
-
- case 249:
- switch (zzInput) {
- case 17: zzState = 250; break zzForNext;
- default: break zzForAction;
- }
-
- case 250:
- switch (zzInput) {
- case 9: zzState = 266; break zzForNext;
- case 27: zzState = 267; break zzForNext;
- default: break zzForAction;
- }
-
- case 251:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 235; break zzForNext;
- case 24: zzState = 252; break zzForNext;
- case 34: zzState = 253; break zzForNext;
- case 9: zzState = 268; break zzForNext;
- default: break zzForAction;
- }
-
- case 252:
- switch (zzInput) {
- case 9: zzState = 269; break zzForNext;
- case 20: zzState = 270; break zzForNext;
- default: break zzForAction;
- }
-
- case 253:
- switch (zzInput) {
- case 9: zzState = 271; break zzForNext;
- case 14: zzState = 272; break zzForNext;
- default: break zzForAction;
- }
-
- case 254:
- switch (zzInput) {
- case 30: zzState = 255; break zzForNext;
- default: break zzForAction;
- }
-
- case 255:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 273; break zzForNext;
- case 10: zzState = 274; break zzForNext;
- default: break zzForAction;
- }
-
- case 256:
- switch (zzInput) {
- case 19: zzState = 257; break zzForNext;
- default: break zzForAction;
- }
-
- case 257:
- switch (zzInput) {
- case 9: zzState = 275; break zzForNext;
- case 20: zzState = 276; break zzForNext;
- default: break zzForAction;
- }
-
- case 258:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 225; break zzForNext;
- default: break zzForAction;
- }
-
- case 259:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzState = 241; break zzForNext;
- case 6:
- case 7:
- case 8: zzIsFinal = true; break zzForNext;
- default: break zzForAction;
- }
-
- case 260:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 259; break zzForNext;
- default: break zzForAction;
- }
-
- case 261:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 229; break zzForNext;
- default: break zzForAction;
- }
-
- case 262:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzState = 246; break zzForNext;
- case 6:
- case 7:
- case 8: zzIsFinal = true; break zzForNext;
- default: break zzForAction;
- }
-
- case 263:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 262; break zzForNext;
- default: break zzForAction;
- }
-
- case 264:
- switch (zzInput) {
- case 22: zzState = 265; break zzForNext;
- default: break zzForAction;
- }
-
- case 265:
- switch (zzInput) {
- case 9: zzState = 277; break zzForNext;
- case 23: zzState = 278; break zzForNext;
- default: break zzForAction;
- }
-
- case 266:
- switch (zzInput) {
- case 27: zzState = 267; break zzForNext;
- default: break zzForAction;
- }
-
- case 267:
- switch (zzInput) {
- case 9: zzState = 279; break zzForNext;
- case 29: zzState = 280; break zzForNext;
- default: break zzForAction;
- }
-
- case 268:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 235; break zzForNext;
- case 24: zzState = 252; break zzForNext;
- case 34: zzState = 253; break zzForNext;
- default: break zzForAction;
- }
-
- case 269:
- switch (zzInput) {
- case 20: zzState = 270; break zzForNext;
- default: break zzForAction;
- }
-
- case 270:
- switch (zzInput) {
- case 9: zzState = 281; break zzForNext;
- case 14: zzState = 282; break zzForNext;
- default: break zzForAction;
- }
-
- case 271:
- switch (zzInput) {
- case 14: zzState = 272; break zzForNext;
- default: break zzForAction;
- }
-
- case 272:
- switch (zzInput) {
- case 9: zzState = 283; break zzForNext;
- case 15: zzState = 284; break zzForNext;
- default: break zzForAction;
- }
-
- case 273:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 255; break zzForNext;
- case 10: zzState = 274; break zzForNext;
- case 9: zzState = 285; break zzForNext;
- default: break zzForAction;
- }
-
- case 274:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 286; break zzForNext;
- case 31:
- case 32: zzState = 287; break zzForNext;
- default: break zzForAction;
- }
-
- case 275:
- switch (zzInput) {
- case 20: zzState = 276; break zzForNext;
- default: break zzForAction;
- }
-
- case 276:
- switch (zzInput) {
- case 9: zzState = 288; break zzForNext;
- case 27: zzState = 289; break zzForNext;
- default: break zzForAction;
- }
-
- case 277:
- switch (zzInput) {
- case 23: zzState = 278; break zzForNext;
- default: break zzForAction;
- }
-
- case 278:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 290; break zzForNext;
- case 10: zzIsFinal = true; zzState = 291; break zzForNext;
- default: break zzForAction;
- }
-
- case 279:
- switch (zzInput) {
- case 29: zzState = 280; break zzForNext;
- default: break zzForAction;
- }
-
- case 280:
- switch (zzInput) {
- case 9: zzState = 292; break zzForNext;
- case 38: zzState = 293; break zzForNext;
- default: break zzForAction;
- }
-
- case 281:
- switch (zzInput) {
- case 14: zzState = 282; break zzForNext;
- default: break zzForAction;
- }
-
- case 282:
- switch (zzInput) {
- case 9: zzState = 294; break zzForNext;
- case 15: zzState = 295; break zzForNext;
- default: break zzForAction;
- }
-
- case 283:
- switch (zzInput) {
- case 15: zzState = 284; break zzForNext;
- default: break zzForAction;
- }
-
- case 284:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 296; break zzForNext;
- case 22: zzState = 297; break zzForNext;
- default: break zzForAction;
- }
-
- case 285:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 255; break zzForNext;
- case 10: zzState = 274; break zzForNext;
- default: break zzForAction;
- }
-
- case 286:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 274; break zzForNext;
- case 31:
- case 32: zzState = 287; break zzForNext;
- case 9: zzState = 298; break zzForNext;
- default: break zzForAction;
- }
-
- case 287:
- switch (zzInput) {
- case 9: zzState = 299; break zzForNext;
- case 24: zzState = 300; break zzForNext;
- default: break zzForAction;
- }
-
- case 288:
- switch (zzInput) {
- case 27: zzState = 289; break zzForNext;
- default: break zzForAction;
- }
-
- case 289:
- switch (zzInput) {
- case 9: zzState = 301; break zzForNext;
- case 45: zzState = 302; break zzForNext;
- default: break zzForAction;
- }
-
- case 290:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 278; break zzForNext;
- case 10: zzIsFinal = true; zzState = 291; break zzForNext;
- case 9: zzState = 303; break zzForNext;
- default: break zzForAction;
- }
-
- case 291:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 304; break zzForNext;
- case 9: zzState = 305; break zzForNext;
- default: break zzForAction;
- }
-
- case 292:
- switch (zzInput) {
- case 38: zzState = 293; break zzForNext;
- default: break zzForAction;
- }
-
- case 293:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 306; break zzForNext;
- case 10: zzIsFinal = true; zzState = 307; break zzForNext;
- default: break zzForAction;
- }
-
- case 294:
- switch (zzInput) {
- case 15: zzState = 295; break zzForNext;
- default: break zzForAction;
- }
-
- case 295:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: break zzForNext;
- case 9: zzState = 308; break zzForNext;
- case 22: zzState = 309; break zzForNext;
- default: break zzForAction;
- }
-
- case 296:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 284; break zzForNext;
- case 22: zzState = 297; break zzForNext;
- case 9: zzState = 310; break zzForNext;
- default: break zzForAction;
- }
-
- case 297:
- switch (zzInput) {
- case 9: zzState = 311; break zzForNext;
- case 25: zzState = 312; break zzForNext;
- default: break zzForAction;
- }
-
- case 298:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 274; break zzForNext;
- case 31:
- case 32: zzState = 287; break zzForNext;
- default: break zzForAction;
- }
-
- case 299:
- switch (zzInput) {
- case 24: zzState = 300; break zzForNext;
- case 9: zzState = 313; break zzForNext;
- default: break zzForAction;
- }
-
- case 300:
- switch (zzInput) {
- case 9: zzState = 314; break zzForNext;
- case 20: zzState = 315; break zzForNext;
- default: break zzForAction;
- }
-
- case 301:
- switch (zzInput) {
- case 45: zzState = 302; break zzForNext;
- default: break zzForAction;
- }
-
- case 302:
- switch (zzInput) {
- case 9: zzState = 316; break zzForNext;
- case 23: zzState = 317; break zzForNext;
- default: break zzForAction;
- }
-
- case 303:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 278; break zzForNext;
- default: break zzForAction;
- }
-
- case 304:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzState = 291; break zzForNext;
- case 6:
- case 7:
- case 8: zzIsFinal = true; break zzForNext;
- default: break zzForAction;
- }
-
- case 305:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 304; break zzForNext;
- default: break zzForAction;
- }
-
- case 306:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 293; break zzForNext;
- case 10: zzIsFinal = true; zzState = 307; break zzForNext;
- case 9: zzState = 318; break zzForNext;
- default: break zzForAction;
- }
-
- case 307:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 319; break zzForNext;
- case 9: zzState = 320; break zzForNext;
- default: break zzForAction;
- }
-
- case 308:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 295; break zzForNext;
- case 22: zzState = 309; break zzForNext;
- case 9: zzState = 321; break zzForNext;
- default: break zzForAction;
- }
-
- case 309:
- switch (zzInput) {
- case 9: zzState = 322; break zzForNext;
- case 25: zzState = 323; break zzForNext;
- default: break zzForAction;
- }
-
- case 310:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 284; break zzForNext;
- case 22: zzState = 297; break zzForNext;
- default: break zzForAction;
- }
-
- case 311:
- switch (zzInput) {
- case 25: zzState = 312; break zzForNext;
- default: break zzForAction;
- }
-
- case 312:
- switch (zzInput) {
- case 9: zzState = 324; break zzForNext;
- case 26: zzState = 325; break zzForNext;
- default: break zzForAction;
- }
-
- case 313:
- switch (zzInput) {
- case 24: zzState = 300; break zzForNext;
- default: break zzForAction;
- }
-
- case 314:
- switch (zzInput) {
- case 20: zzState = 315; break zzForNext;
- default: break zzForAction;
- }
-
- case 315:
- switch (zzInput) {
- case 9: zzState = 326; break zzForNext;
- case 20: zzState = 327; break zzForNext;
- default: break zzForAction;
- }
-
- case 316:
- switch (zzInput) {
- case 23: zzState = 317; break zzForNext;
- default: break zzForAction;
- }
-
- case 317:
- switch (zzInput) {
- case 9: zzState = 328; break zzForNext;
- case 35: zzState = 329; break zzForNext;
- default: break zzForAction;
- }
-
- case 318:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 293; break zzForNext;
- default: break zzForAction;
- }
-
- case 319:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzState = 307; break zzForNext;
- case 6:
- case 7:
- case 8: zzIsFinal = true; break zzForNext;
- default: break zzForAction;
- }
-
- case 320:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzIsFinal = true; zzState = 319; break zzForNext;
- default: break zzForAction;
- }
-
- case 321:
- switch (zzInput) {
- case 6:
- case 7:
- case 8: zzState = 295; break zzForNext;
- case 22: zzState = 309; break zzForNext;
- default: break zzForAction;
- }
-
- case 322:
- switch (zzInput) {
- case 25: zzState = 323; break zzForNext;
- default: break zzForAction;
- }
-
- case 323:
- switch (zzInput) {
- case 9: zzState = 330; break zzForNext;
- case 26: zzState = 331; break zzForNext;
- default: break zzForAction;
- }
-
- case 324:
- switch (zzInput) {
- case 26: zzState = 325; break zzForNext;
- default: break zzForAction;
- }
-
- case 325:
- switch (zzInput) {
- case 9: zzState = 332; break zzForNext;
- case 15: zzState = 333; break zzForNext;
- default: break zzForAction;
- }
-
- case 326:
- switch (zzInput) {
- case 20: zzState = 327; break zzForNext;
- default: break zzForAction;
- }
-
- case 327:
- switch (zzInput) {
- case 9: zzState = 334; break zzForNext;
- case 22: zzState = 335; break zzForNext;
- default: break zzForAction;
- }
-
- case 328:
- switch (zzInput) {
- case 35: zzState = 329; break zzForNext;
- default: break zzForAction;
- }
-
- case 329:
- switch (zzInput) {
- case 20: zzState = 133; break zzForNext;
- case 22: zzState = 134; break zzForNext;
- case 9: zzState = 336; break zzForNext;
- default: break zzForAction;
- }
-
- case 330:
- switch (zzInput) {
- case 26: zzState = 331; break zzForNext;
- default: break zzForAction;
- }
-
- case 331:
- switch (zzInput) {
- case 9: zzState = 337; break zzForNext;
- case 15: zzState = 338; break zzForNext;
- default: break zzForAction;
- }
-
- case 332:
- switch (zzInput) {
- case 15: zzState = 333; break zzForNext;
- default: break zzForAction;
- }
-
- case 333:
- switch (zzInput) {
- case 9: zzState = 339; break zzForNext;
- case 27: zzState = 340; break zzForNext;
- default: break zzForAction;
- }
-
- case 334:
- switch (zzInput) {
- case 22: zzState = 335; break zzForNext;
- default: break zzForAction;
- }
-
- case 335:
- switch (zzInput) {
- case 9: zzState = 341; break zzForNext;
- case 33: zzState = 342; break zzForNext;
- default: break zzForAction;
- }
-
- case 336:
- switch (zzInput) {
- case 20: zzState = 133; break zzForNext;
- case 22: zzState = 134; break zzForNext;
- default: break zzForAction;
- }
-
- case 337:
- switch (zzInput) {
- case 15: zzState = 338; break zzForNext;
- default: break zzForAction;
- }
-
- case 338:
- switch (zzInput) {
- case 9: zzState = 343; break zzForNext;
- case 27: zzState = 344; break zzForNext;
- default: break zzForAction;
- }
-
- case 339:
- switch (zzInput) {
- case 27: zzState = 340; break zzForNext;
- default: break zzForAction;
- }
-
- case 340:
- switch (zzInput) {
- case 9: zzState = 345; break zzForNext;
- case 19: zzState = 346; break zzForNext;
- default: break zzForAction;
- }
-
- case 341:
- switch (zzInput) {
- case 33: zzState = 342; break zzForNext;
- default: break zzForAction;
- }
-
- case 342:
- switch (zzInput) {
- case 9: zzState = 347; break zzForNext;
- case 28: zzState = 348; break zzForNext;
- default: break zzForAction;
- }
-
- case 343:
- switch (zzInput) {
- case 27: zzState = 344; break zzForNext;
- default: break zzForAction;
- }
-
- case 344:
- switch (zzInput) {
- case 9: zzState = 349; break zzForNext;
- case 19: zzState = 350; break zzForNext;
- default: break zzForAction;
- }
-
- case 345:
- switch (zzInput) {
- case 19: zzState = 346; break zzForNext;
- default: break zzForAction;
- }
-
- case 346:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 8: break zzForAction;
- default: break zzForNext;
- }
-
- case 347:
- switch (zzInput) {
- case 28: zzState = 348; break zzForNext;
- default: break zzForAction;
- }
-
- case 348:
- switch (zzInput) {
- case 9: zzState = 352; break zzForNext;
- case 28: zzState = 353; break zzForNext;
- default: break zzForAction;
- }
-
- case 349:
- switch (zzInput) {
- case 19: zzState = 350; break zzForNext;
- default: break zzForAction;
- }
-
- case 350:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 8: break zzForAction;
- default: break zzForNext;
- }
-
- case 351:
- switch (zzInput) {
- case 9: zzState = 355; break zzForNext;
- case 28: zzState = 356; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 352:
- switch (zzInput) {
- case 28: zzState = 353; break zzForNext;
- default: break zzForAction;
- }
-
- case 353:
- switch (zzInput) {
- case 9: zzState = 357; break zzForNext;
- case 34: zzState = 358; break zzForNext;
- default: break zzForAction;
- }
-
- case 354:
- switch (zzInput) {
- case 9: zzState = 359; break zzForNext;
- case 28: zzState = 360; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 355:
- switch (zzInput) {
- case 28: zzState = 356; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 356:
- switch (zzInput) {
- case 28: break zzForNext;
- case 9: zzState = 361; break zzForNext;
- case 17: zzState = 362; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 357:
- switch (zzInput) {
- case 34: zzState = 358; break zzForNext;
- default: break zzForAction;
- }
-
- case 358:
- switch (zzInput) {
- case 9: zzState = 363; break zzForNext;
- case 34: zzState = 364; break zzForNext;
- default: break zzForAction;
- }
-
- case 359:
- switch (zzInput) {
- case 28: zzState = 360; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 360:
- switch (zzInput) {
- case 28: break zzForNext;
- case 9: zzState = 365; break zzForNext;
- case 17: zzState = 366; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 361:
- switch (zzInput) {
- case 28: zzState = 356; break zzForNext;
- case 17: zzState = 362; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 362:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 9: zzState = 367; break zzForNext;
- case 20: zzState = 368; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 363:
- switch (zzInput) {
- case 34: zzState = 364; break zzForNext;
- default: break zzForAction;
- }
-
- case 364:
- switch (zzInput) {
- case 9: zzState = 369; break zzForNext;
- case 34: zzState = 370; break zzForNext;
- default: break zzForAction;
- }
-
- case 365:
- switch (zzInput) {
- case 28: zzState = 360; break zzForNext;
- case 17: zzState = 366; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 366:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 9: zzState = 371; break zzForNext;
- case 20: zzState = 372; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 367:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 20: zzState = 368; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 368:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 9: zzState = 373; break zzForNext;
- case 17: zzState = 374; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 369:
- switch (zzInput) {
- case 34: zzState = 370; break zzForNext;
- default: break zzForAction;
- }
-
- case 370:
- switch (zzInput) {
- case 9: zzState = 375; break zzForNext;
- case 35: zzState = 376; break zzForNext;
- default: break zzForAction;
- }
-
- case 371:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 20: zzState = 372; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 372:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 9: zzState = 377; break zzForNext;
- case 17: zzState = 378; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 373:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 17: zzState = 374; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 374:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 6:
- case 7: zzState = 379; break zzForNext;
- case 8: zzState = 380; break zzForNext;
- default: zzState = 346; break zzForNext;
- }
-
- case 375:
- switch (zzInput) {
- case 35: zzState = 376; break zzForNext;
- default: break zzForAction;
- }
-
- case 376:
- switch (zzInput) {
- case 9: zzState = 381; break zzForNext;
- case 34: zzState = 382; break zzForNext;
- default: break zzForAction;
- }
-
- case 377:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 17: zzState = 378; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 378:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 6:
- case 7: zzState = 383; break zzForNext;
- case 8: zzState = 384; break zzForNext;
- case 9: zzState = 385; break zzForNext;
- default: zzState = 350; break zzForNext;
- }
-
- case 379:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 9: zzState = 386; break zzForNext;
- case 34: zzState = 387; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 380:
- switch (zzInput) {
- case 9: zzState = 388; break zzForNext;
- case 34: zzState = 389; break zzForNext;
- default: break zzForAction;
- }
-
- case 381:
- switch (zzInput) {
- case 34: zzState = 382; break zzForNext;
- default: break zzForAction;
- }
-
- case 382:
- switch (zzInput) {
- case 9: zzState = 390; break zzForNext;
- case 36: zzState = 391; break zzForNext;
- default: break zzForAction;
- }
-
- case 383:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 9: zzState = 392; break zzForNext;
- case 13: zzState = 393; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 384:
- switch (zzInput) {
- case 9: zzState = 394; break zzForNext;
- case 13: zzState = 395; break zzForNext;
- default: break zzForAction;
- }
-
- case 385:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 6:
- case 7: zzState = 383; break zzForNext;
- case 8: zzState = 384; break zzForNext;
- case 9: zzState = 396; break zzForNext;
- default: zzState = 350; break zzForNext;
- }
-
- case 386:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 34: zzState = 387; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 387:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 9: zzState = 397; break zzForNext;
- case 14: zzState = 398; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 388:
- switch (zzInput) {
- case 34: zzState = 389; break zzForNext;
- default: break zzForAction;
- }
-
- case 389:
- switch (zzInput) {
- case 9: zzState = 399; break zzForNext;
- case 14: zzState = 400; break zzForNext;
- default: break zzForAction;
- }
-
- case 390:
- switch (zzInput) {
- case 36: zzState = 391; break zzForNext;
- default: break zzForAction;
- }
-
- case 391:
- switch (zzInput) {
- case 9: zzState = 401; break zzForNext;
- case 35: zzState = 402; break zzForNext;
- default: break zzForAction;
- }
-
- case 392:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 13: zzState = 393; break zzForNext;
- case 9: zzState = 403; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 393:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 9: zzState = 404; break zzForNext;
- case 24: zzState = 405; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 394:
- switch (zzInput) {
- case 13: zzState = 395; break zzForNext;
- case 9: zzState = 406; break zzForNext;
- default: break zzForAction;
- }
-
- case 395:
- switch (zzInput) {
- case 9: zzState = 407; break zzForNext;
- case 24: zzState = 408; break zzForNext;
- default: break zzForAction;
- }
-
- case 396:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 6:
- case 7: zzState = 383; break zzForNext;
- case 8: zzState = 384; break zzForNext;
- default: zzState = 350; break zzForNext;
- }
-
- case 397:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 14: zzState = 398; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 398:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 9: zzState = 409; break zzForNext;
- case 15: zzIsFinal = true; zzState = 410; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 399:
- switch (zzInput) {
- case 14: zzState = 400; break zzForNext;
- default: break zzForAction;
- }
-
- case 400:
- switch (zzInput) {
- case 9: zzState = 411; break zzForNext;
- case 15: zzIsFinal = true; zzState = 412; break zzForNext;
- default: break zzForAction;
- }
-
- case 401:
- switch (zzInput) {
- case 35: zzState = 402; break zzForNext;
- default: break zzForAction;
- }
-
- case 402:
- switch (zzInput) {
- case 9: zzState = 413; break zzForNext;
- case 18: zzState = 414; break zzForNext;
- default: break zzForAction;
- }
-
- case 403:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 13: zzState = 393; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 404:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 24: zzState = 405; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 405:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 9: zzState = 415; break zzForNext;
- case 20: zzState = 416; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 406:
- switch (zzInput) {
- case 13: zzState = 395; break zzForNext;
- default: break zzForAction;
- }
-
- case 407:
- switch (zzInput) {
- case 24: zzState = 408; break zzForNext;
- default: break zzForAction;
- }
-
- case 408:
- switch (zzInput) {
- case 9: zzState = 417; break zzForNext;
- case 20: zzState = 418; break zzForNext;
- default: break zzForAction;
- }
-
- case 409:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 15: zzIsFinal = true; zzState = 410; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 410:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 9: zzIsFinal = true; zzState = 419; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 411:
- switch (zzInput) {
- case 15: zzIsFinal = true; zzState = 412; break zzForNext;
- default: break zzForAction;
- }
-
- case 412:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 420; break zzForNext;
- default: break zzForAction;
- }
-
- case 413:
- switch (zzInput) {
- case 18: zzState = 414; break zzForNext;
- default: break zzForAction;
- }
-
- case 414:
- switch (zzInput) {
- case 9: zzState = 421; break zzForNext;
- case 37: zzState = 422; break zzForNext;
- default: break zzForAction;
- }
-
- case 415:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 20: zzState = 416; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 416:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 9: zzState = 423; break zzForNext;
- case 14: zzState = 424; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 417:
- switch (zzInput) {
- case 20: zzState = 418; break zzForNext;
- default: break zzForAction;
- }
-
- case 418:
- switch (zzInput) {
- case 9: zzState = 425; break zzForNext;
- case 14: zzState = 426; break zzForNext;
- default: break zzForAction;
- }
-
- case 419:
- switch (zzInput) {
- case 28: zzState = 351; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 346; break zzForNext;
- }
-
- case 421:
- switch (zzInput) {
- case 37: zzState = 422; break zzForNext;
- default: break zzForAction;
- }
-
- case 422:
- switch (zzInput) {
- case 9: zzState = 427; break zzForNext;
- case 38: zzState = 428; break zzForNext;
- default: break zzForAction;
- }
-
- case 423:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 14: zzState = 424; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 424:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 9: zzState = 429; break zzForNext;
- case 15: zzIsFinal = true; zzState = 430; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 425:
- switch (zzInput) {
- case 14: zzState = 426; break zzForNext;
- default: break zzForAction;
- }
-
- case 426:
- switch (zzInput) {
- case 9: zzState = 431; break zzForNext;
- case 15: zzIsFinal = true; zzState = 432; break zzForNext;
- default: break zzForAction;
- }
-
- case 427:
- switch (zzInput) {
- case 38: zzState = 428; break zzForNext;
- default: break zzForAction;
- }
-
- case 428:
- switch (zzInput) {
- case 9: zzState = 433; break zzForNext;
- case 28: zzState = 434; break zzForNext;
- default: break zzForAction;
- }
-
- case 429:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 15: zzIsFinal = true; zzState = 430; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 430:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 9: zzIsFinal = true; zzState = 435; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 431:
- switch (zzInput) {
- case 15: zzIsFinal = true; zzState = 432; break zzForNext;
- default: break zzForAction;
- }
-
- case 432:
- switch (zzInput) {
- case 9: zzIsFinal = true; zzNoLookAhead = true; zzState = 436; break zzForNext;
- default: break zzForAction;
- }
-
- case 433:
- switch (zzInput) {
- case 28: zzState = 434; break zzForNext;
- default: break zzForAction;
- }
-
- case 434:
- switch (zzInput) {
- case 9: zzState = 437; break zzForNext;
- case 39: zzState = 438; break zzForNext;
- default: break zzForAction;
- }
-
- case 435:
- switch (zzInput) {
- case 28: zzState = 354; break zzForNext;
- case 8: break zzForAction;
- default: zzState = 350; break zzForNext;
- }
-
- case 437:
- switch (zzInput) {
- case 39: zzState = 438; break zzForNext;
- default: break zzForAction;
- }
-
- case 438:
- switch (zzInput) {
- case 9: zzState = 439; break zzForNext;
- case 40: zzState = 440; break zzForNext;
- default: break zzForAction;
- }
-
- case 439:
- switch (zzInput) {
- case 40: zzState = 440; break zzForNext;
- default: break zzForAction;
- }
-
- case 440:
- switch (zzInput) {
- case 9: zzState = 441; break zzForNext;
- case 40: zzState = 442; break zzForNext;
- default: break zzForAction;
- }
-
- case 441:
- switch (zzInput) {
- case 40: zzState = 442; break zzForNext;
- default: break zzForAction;
- }
-
- case 442:
- switch (zzInput) {
- case 9: zzState = 443; break zzForNext;
- case 40: zzState = 444; break zzForNext;
- default: break zzForAction;
- }
-
- case 443:
- switch (zzInput) {
- case 40: zzState = 444; break zzForNext;
- default: break zzForAction;
- }
-
- case 444:
- switch (zzInput) {
- case 28: zzState = 394; break zzForNext;
- case 9: zzState = 445; break zzForNext;
- default: break zzForAction;
- }
-
- case 445:
- switch (zzInput) {
- case 28: zzState = 394; 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 26: break;
- case 16:
- { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF83ByteBOM;}
- }
- case 27: break;
- case 1:
- { if(yychar > MAX_TO_SCAN) {hasMore=false; return EncodingParserConstants.MAX_CHARS_REACHED;}
- }
- case 28: break;
- case 4:
- { yybegin(SQ_STRING); string.setLength(0);
- }
- case 29: break;
- case 8:
- { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.UnDelimitedStringValue;
- }
- case 30: break;
- case 5:
- { string.append( yytext() );
- }
- case 31: break;
- case 9:
- { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTermintatedUnDelimitedStringValue;
- }
- case 32: break;
- case 21:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageLanguage;
- }
- case 33: break;
- case 15:
- { yypushback(yylength()); popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 34: break;
- case 25:
- { isXHTML = true;
- }
- case 35: break;
- case 23:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageEncoding;
- }
- case 36: break;
- case 11:
- { if (yychar == 0 ) {hasMore = false; return EncodingParserConstants.UTF16LE;}
- }
- case 37: break;
- case 7:
- { popState(); valueText = string.toString(); return EncodingParserConstants.StringValue;
- }
- case 38: break;
- case 14:
- { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;
- }
- case 39: break;
- case 22:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return JSPHeadTokenizerConstants.PageContentType;
- }
- case 40: break;
- case 17:
- { if (yychar == 0 ) {yybegin(ST_XMLDecl); return XMLHeadTokenizerConstants.XMLDeclStart;}
- }
- case 41: break;
- case 2:
- { yypushback(1); yybegin(UnDelimitedString); string.setLength(0);
- }
- case 42: break;
- case 12:
- { yybegin(YYINITIAL); return XMLHeadTokenizerConstants.XMLDeclEnd;
- }
- case 43: break;
- case 13:
- { yybegin(YYINITIAL); return JSPHeadTokenizerConstants.PageDirectiveEnd;
- }
- case 44: break;
- case 24:
- { isWML = true;
- }
- case 45: break;
- case 18:
- { yybegin(ST_PAGE_DIRECTIVE); return JSPHeadTokenizerConstants.PageDirectiveStart;
- }
- case 46: break;
- case 6:
- { yypushback(yylength());popState(); valueText = string.toString(); return EncodingParserConstants.InvalidTerminatedStringValue;
- }
- case 47: break;
- case 20:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDelEncoding;
- }
- case 48: break;
- case 19:
- { pushCurrentState(); yybegin(QuotedAttributeValue); return XMLHeadTokenizerConstants.XMLDeclVersion;
- }
- case 49: break;
- case 3:
- { yybegin(DQ_STRING); string.setLength(0);
- }
- case 50: 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 7b71657cc0..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, 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.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$
-}
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 8a6e5c677d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/JSPResourceEncodingDetector.java
+++ /dev/null
@@ -1,541 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.core.runtime.content.IContentDescription;
-import org.eclipse.jst.jsp.core.internal.Logger;
-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.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.contenttype.EncodingParserConstants;
-import org.eclipse.wst.xml.core.internal.contenttype.XMLHeadTokenizerConstants;
-
-import com.ibm.icu.util.StringTokenizer;
-
-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 || tokenType == EncodingParserConstants.UTF16LE) {
- canHandleAsUnicode = true;
- String enc = "UTF-16"; //$NON-NLS-1$
- byte[] bom = (tokenType == EncodingParserConstants.UTF16BE) ? IContentDescription.BOM_UTF_16BE : IContentDescription.BOM_UTF_16LE;
- createEncodingMemento(enc, EncodingMemento.DETECTED_STANDARD_UNICODE_BYTES);
- fEncodingMemento.setUnicodeStream(true);
- fEncodingMemento.setUnicodeBOM(bom);
- }
- 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) {
- /*
- * Based partially on
- * org.eclipse.jst.jsp.core.internal.document.PageDirectiveAdapterImpl
- * .getMimeTypeFromContentTypeValue(String) , divides the full value
- * into segments according to ';', assumes the first specifies the
- * content type itself if it has no '=', and that the remainder are
- * parameters which may specify a charset
- */
-
- String cleanContentTypeValue = StringUtils.stripNonLetterDigits(contentType);
- /* Break the mime header into the main value and its parameters, separated by ';' */
- StringTokenizer tokenizer = new StringTokenizer(cleanContentTypeValue, ";"); //$NON-NLS-1$
- int tLen = tokenizer.countTokens();
- if (tLen == 0)
- return;
- String[] tokens = new String[tLen];
- int j = 0;
- while (tokenizer.hasMoreTokens()) {
- tokens[j] = tokenizer.nextToken();
- j++;
- }
-
- int firstParameter = 0;
- if (tokens[0].indexOf('=') == -1) {
- /*
- * no equal sign in the first segment, so assume it indicates a
- * content type properly
- */
- fContentType = tokens[0].trim();
- firstParameter = 1;
- }
- /*
- * now handle parameters as name=value pairs, looking for "charset"
- * specifically
- */
- Pattern equalPattern = Pattern.compile("\\s*=\\s*"); //$NON-NLS-1$
- for (int i = firstParameter; i < tokens.length; i++) {
- String[] pair = equalPattern.split(tokens[i]);
- if (pair.length < 2)
- continue;
- if (pair[0].trim().equals("charset")) { //$NON-NLS-1$
- fCharset = pair[1].trim();
- }
- }
- }
-
-
- /**
- * 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 Exception {
- 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);
- try {
- 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);
- }
- }
- } catch (Exception e) {
- Logger.log(Logger.ERROR_DEBUG, e.getMessage());
- }
- }
-
- /**
- *
- */
- 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;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/Messages.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/Messages.java
deleted file mode 100644
index bd8b46275f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/Messages.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.contenttype;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.jst.jsp.core.internal.contenttype.messages"; //$NON-NLS-1$
- public static String DeploymentDescriptorPropertyCache_1;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/messages.properties b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/messages.properties
deleted file mode 100644
index 269d3ad903..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/contenttype/messages.properties
+++ /dev/null
@@ -1 +0,0 @@
-DeploymentDescriptorPropertyCache_1=Reading Deployment Descriptor
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 fdf9a70ed7..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, 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.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);
- }
-
-}
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 0f7bed4bf0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapter.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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();
-
- String getElIgnored();
-
- /**
- * This method is to give this adapter a chance to use
- * the AdapterFactories 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();
-}
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 fc986daa99..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, 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 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());
- }
-}
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 e53329ec80..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveAdapterImpl.java
+++ /dev/null
@@ -1,711 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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.io.Reader;
-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.document.DocumentReader;
-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.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 String elIgnored = null;
-
- 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);
- }
- }
- if (languageKnown(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)) {
- result = languageKnown(newLanguage);
- }
- 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;
- DocumentReader in = new DocumentReader(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(Reader 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 {
- try {
- in.close();
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- }
- return desc;
- }
-
- public String getElIgnored() {
- return elIgnored;
- }
-
- public void setElIgnored(String ignored) {
- elIgnored = ignored;
- }
-} \ 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 b443a8a690..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, 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.document;
-
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-
-interface PageDirectiveWatcher extends INodeAdapter {
-
- String getContentType();
-
- String getLanguage();
-
- int getOffset();
-
-}
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 1fbb07aa06..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, 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.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());
- }}
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 be4ce58cd2..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/document/PageDirectiveWatcherImpl.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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;
- if (target.hasAttribute("contentType")) { //$NON-NLS-1$
- String contentTypeValue = target.getAttribute("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(), contentTypeValue);
- }
- if (target.hasAttribute("language")) { //$NON-NLS-1$
- String languageValue = target.getAttribute("language"); //$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.changedLanguage(((IndexedRegion) targetElement).getStartOffset(), languageValue);
- }
- if (target.hasAttribute("isELIgnored")) { //$NON-NLS-1$
- String elIgnored = target.getAttribute("isELIgnored"); //$NON-NLS-1$
- PageDirectiveAdapterImpl pageDirectiveAdapter = (PageDirectiveAdapterImpl) ((IDOMDocument) targetElement.getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
- pageDirectiveAdapter.setElIgnored(elIgnored);
- }
-
- }
-
- 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();
- }
-
-}
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 7dc153dd7e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/AttrImplForJSP.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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;
-import org.w3c.dom.Node;
-import org.w3c.dom.UserDataHandler;
-
-public class AttrImplForJSP extends AttrImpl {
-
- protected AttrImplForJSP() {
- }
-
- protected AttrImplForJSP(AttrImplForJSP that) {
- super(that);
- }
-
- 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);
- }
-
- public Node cloneNode(boolean deep) {
- Node cloned = new AttrImplForJSP(this);
- notifyUserDataHandlers(UserDataHandler.NODE_CLONED, cloned);
- return cloned;
- }
-}
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 c9ccc58ec2..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, 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.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 23a8baa90d..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, 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.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 dcc8ce2b28..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, 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.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 05fa231701..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/ElementImplForJSP.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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;
-
-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);
- }
-
- protected ElementImpl newInstance() {
- return new ElementImplForJSP(this);
- }
-}
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 337d75b269..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, 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.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 afaa719ad4..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, 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.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 b44737fdab..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/domdocument/TextImplForJSP.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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;
-import org.w3c.dom.Node;
-import org.w3c.dom.UserDataHandler;
-
-public class TextImplForJSP extends TextImpl {
-
- protected TextImplForJSP() {
- }
-
- protected TextImplForJSP(TextImplForJSP that) {
- super(that);
- }
-
- protected boolean isNotNestedContent(String regionType) {
- boolean result = regionType != DOMJSPRegionContexts.JSP_CONTENT;
- return result;
- }
- protected void setOwnerDocument(Document ownerDocument) {
- super.setOwnerDocument(ownerDocument);
- }
-
- public Node cloneNode(boolean deep) {
- Node cloned = new TextImplForJSP(this);
- notifyUserDataHandlers(UserDataHandler.NODE_CLONED, cloned);
- return cloned;
- }
-
-}
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 291c5478e1..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, 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.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;
-
-}
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 84c5e7e4bc..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, 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.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));
-
- }
-
-}
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 9b215265b7..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/encoding/JSPDocumentLoader.java
+++ /dev/null
@@ -1,311 +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.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.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(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(((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(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);
-
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/ArrayMap.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/ArrayMap.java
deleted file mode 100644
index 507ec77525..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/ArrayMap.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.Collection;
-import java.util.Hashtable;
-import java.util.Iterator;
-
-/**
- * This implementation of a hashtable maps keys to arrays
- * to support multiple values being associated with a single
- * key. To remove a specific entry, a key and inserted value must
- * be provided. Removing just based on the key name will remove all
- * values stored under that key
- *
- */
-public class ArrayMap extends Hashtable {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- public ArrayMap(int size) {
- super(size);
- }
-
- public synchronized Object put(Object key, Object value) {
- Object[] values = (Object[]) super.get(key);
- Object[] newValues = null;
-
- if (values == null || values.length == 0)
- newValues = new Object[1];
- else {
- newValues = new Object[values.length + 1];
- System.arraycopy(values, 0, newValues, 0, values.length);
- }
-
- newValues[newValues.length - 1] = value;
- return super.put(key, newValues);
- }
-
- /**
- * Removes the first occurrence of <code>value</code> from the list
- * of values associated with <code>key</code>
- *
- * @param key the key that has <code>value</code>
- * @param value the specific value to remove from the key
- * @return The item removed from the list of values
- */
- public synchronized Object remove(Object key, Object value) {
- Object[] values = (Object[]) super.get(key);
- Object removed = null;
- Object[] result = null;
- if (values != null && value != null) {
- for (int i = 0; i < values.length; i++) {
- if (value.equals(values[i])) {
- removed = values[i];
- result = new Object[values.length - 1];
-
- if (result.length > 0) {
- // Copy left of value
- System.arraycopy(values, 0, result, 0, i);
- // Copy right of value
- if (i < (values.length - 1))
- System.arraycopy(values, i+1, result, i, result.length - i);
- }
- else
- super.remove(key);
-
- break;
- }
- }
- }
-
- if(result != null && result.length > 0)
- super.put(key, result);
-
- return removed;
- }
-
- public Collection values() {
- Collection valuemaps = super.values();
- Collection values = new ArrayList();
-
- for(Iterator i = valuemaps.iterator(); i.hasNext();)
- values.addAll(Arrays.asList((Object[]) i.next()));
-
- return values;
- }
-
-}
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 7ace8d4799..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/CompilationUnitHelper.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package org.eclipse.jst.jsp.core.internal.java;
-
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IProblemRequestor;
-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() {
- /* (non-Javadoc)
- * @see org.eclipse.jdt.core.WorkingCopyOwner#getProblemRequestor(org.eclipse.jdt.core.ICompilationUnit)
- */
- public IProblemRequestor getProblemRequestor(ICompilationUnit workingCopy) {
- return CompilationUnitHelper.this.getProblemRequestor();
- }
- 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 2d65350061..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, 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.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/IJSPProblem.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/IJSPProblem.java
deleted file mode 100644
index 8270cd825f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/IJSPProblem.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2009 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.compiler.IProblem;
-
-public interface IJSPProblem extends IProblem {
-
- int F_PROBLEM_ID_LITERAL = 0xA0000000;
-
- int TEIClassNotFound = F_PROBLEM_ID_LITERAL + 1;
- int TEIValidationMessage = F_PROBLEM_ID_LITERAL + 2;
- int TEIClassNotInstantiated = F_PROBLEM_ID_LITERAL + 3;
- int TEIClassMisc = F_PROBLEM_ID_LITERAL + 4;
- int TagClassNotFound = F_PROBLEM_ID_LITERAL + 5;
- int UseBeanInvalidID = F_PROBLEM_ID_LITERAL + 6;
- int UseBeanMissingTypeInfo = F_PROBLEM_ID_LITERAL + 7;
- int UseBeanAmbiguousType = F_PROBLEM_ID_LITERAL + 8;
- int StartCustomTagMissing = F_PROBLEM_ID_LITERAL + 9;
- int EndCustomTagMissing = F_PROBLEM_ID_LITERAL + 10;
- int UseBeanStartTagMissing = F_PROBLEM_ID_LITERAL + 11;
- int UseBeanEndTagMissing = F_PROBLEM_ID_LITERAL + 12;
- int ELProblem = F_PROBLEM_ID_LITERAL + 13;
-
- /**
- * @return the ID of this JSP problem
- */
- int getEID();
-
-}
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 17f641f395..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/IJSPTranslation.java
+++ /dev/null
@@ -1,90 +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.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);
-
- /**
- * @param javaOffset
- * @return whether the given offset within the translated Java source maps
- * directly to a scripting region in the original JSP
- */
- public boolean isIndirect(int javaOffset);
-
- /**
- * 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 e9c6bd9536..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, 2009 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);
- // [290769] Mangle _ since mangling inserts _ as a delimiter
- if (currentChar == '_' || !Character.isJavaIdentifierPart(currentChar))
- modifiedName.append(mangleChar(currentChar));
- else
- modifiedName.append(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 a9b5be3dd0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPIncludeRegionHelper.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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 intended 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, boolean appendAsIndirectSource) {
- super(translator, appendAsIndirectSource);
- }
-
- // 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);
- }
-
- protected void prepareText(IStructuredDocumentRegion sdRegion) {
- fStrippedText = fTextBefore = fTextToParse.substring(sdRegion.getStartOffset(), sdRegion.getEndOffset());
- }
-}
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 37afdfc6a3..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPProblemRequestor.java
+++ /dev/null
@@ -1,91 +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()) {
- synchronized (fCollectedProblems) {
- 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 6edf76c81b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java
+++ /dev/null
@@ -1,643 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.WorkspaceJob;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-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;
-
- // 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;
- private List fTranslationProblems;
- private Collection fIncludedPaths;
-
- /** the {@link JSPTranslator} used by this {@link JSPTranslator} */
- private JSPTranslator fTranslator;
-
- 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)
- initialize();
- }
-
- private void initialize() {
- if(fTranslator != null) {
- fJavaText = fTranslator.getTranslation().toString();
- fJspText = fTranslator.getJspText();
- fClassname = fTranslator.getClassname();
- fJava2JspMap = fTranslator.getJava2JspRanges();
- fJsp2JavaMap = fTranslator.getJsp2JavaRanges();
- fJava2JspImportsMap = fTranslator.getJava2JspImportRanges();
- fJava2JspUseBeanMap = fTranslator.getJava2JspUseBeanRanges();
- fJava2JspIndirectMap = fTranslator.getJava2JspIndirectRanges();
- fTranslationProblems = fTranslator.getTranslationProblems();
- fIncludedPaths = fTranslator.getIncludedPaths();
- }
- }
-
- /**
- * @return {@link JSPTranslator} used by this {@link JSPTranslation}
- */
- protected JSPTranslator getTranslator() {
- return this.fTranslator;
- }
-
- 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;
- }
-
- public Collection getIncludedPaths() {
- return fIncludedPaths;
- }
-
- /**
- *
- * @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 {
-
- IJavaProject je = getJavaProject();
-
- if (je == null || !je.exists())
- return null;
-
- final String name = getClassname() + ".java";
- IPackageFragmentRoot packageFragmentRoot = null;
- IPackageFragmentRoot[] packageFragmentRoots = je.getPackageFragmentRoots();
- for (int i = 0; i < packageFragmentRoots.length; i++) {
- if (!packageFragmentRoots[i].isArchive() && !packageFragmentRoots[i].isExternal()) {
- packageFragmentRoot = packageFragmentRoots[i];
- break;
- }
- }
- 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;
- }
- final IPackageFragment fragment = packageFragmentRoot.getPackageFragment(IPackageFragmentRoot.DEFAULT_PACKAGEROOT_PATH);
- ICompilationUnit cu = fragment.getCompilationUnit(name).getWorkingCopy(getWorkingCopyOwner(), getProgressMonitor());
- 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();
- if (problems != null) {
- if (fTranslationProblems.isEmpty()) {
- return problems;
- }
- List combinedProblems = null;
- synchronized (problems) {
- combinedProblems = new ArrayList(problems);
- }
- combinedProblems.addAll(fTranslationProblems);
- return combinedProblems;
- }
- return fTranslationProblems;
- }
-
- /**
- * 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);
- }
- }
-
- public void retranslate(JSPTranslator translator) {
- fTranslator = translator;
- initialize();
-
- synchronized (fLock) {
- setContents(getCompilationUnit());
- }
- }
-
- /**
- * Reconciles the compilation unit for this JSPTranslation
- */
- public void reconcileCompilationUnit() {
- ICompilationUnit cu = getCompilationUnit();
- if (cu != null) {
- try {
- synchronized(cu) {
- cu.reconcile(ICompilationUnit.NO_AST, false, 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) {
- Job discarder = new WorkspaceJob(fClassname) {
- public IStatus runInWorkspace(IProgressMonitor monitor) throws CoreException {
- 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
- }
- return Status.OK_STATUS;
- }
- };
- discarder.schedule();
- }
- }
- }
-}
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 365fc1dbb5..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapter.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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;
-
- /**
- * <p>Constructs a {@link JSPTranslationAdapter} that will create a new {@link JSPTranslator}<p>
- *
- * @param xmlModel {@link IDOMModel} this {@link JSPTranslationAdapter} is for
- */
- public JSPTranslationAdapter(IDOMModel xmlModel) {
- setXMLModel(xmlModel);
- initializeJavaPlugins();
- }
-
- /**
- * <p>Constructs a {@link JSPTranslationAdapter} using an existing {@link JSPTranslator}</p>
- *
- * @param xmlModel {@link IDOMModel} this {@link JSPTranslationAdapter} is for
- * @param translator existing {@link JSPTranslator} this {@link JSPTranslationAdapter} will use
- */
- public JSPTranslationAdapter(IDOMModel xmlModel, JSPTranslator translator) {
- this(xmlModel);
- this.fTranslator = translator;
- this.fJavaDocument = new Document(translator.getTranslation().toString());
- this.fJSPTranslation = new JSPTranslationExtension(getXMLModel().getStructuredDocument(), fJavaDocument, getJavaProject(), this.fTranslator);
- this.fDocumentIsDirty = false;
- }
-
- /**
- * 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();
- }
- }
-
- /**
- * <p>Returns the JSPTranslation for this adapter.</p>
- *
- * <p><b>IMPORTANT: </b><i>This will force translation of the
- * document if it has not already been called. To avoid
- * accidental translation before calling this method call
- * {@link #hasTranslation()} to verify a translation
- * has already been forced by this adapter.</i></p>
- *
- * @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 = createTranslator();
- StringBuffer emptyContents = translator.getEmptyTranslation();
- fJavaDocument = new Document(emptyContents.toString());
- }
- // Just a dirty translation, re-translate
- if (fJSPTranslation != null) {
- if (DEBUG)
- System.out.println("JSPTranslationAdapter retranslating:" + fJSPTranslation); //$NON-NLS-1$
- fJSPTranslation.retranslate(fJavaDocument, translator);
- fDocumentIsDirty = false;
- return fJSPTranslation;
- }
- fJSPTranslation = new JSPTranslationExtension(getXMLModel().getStructuredDocument(), fJavaDocument, getJavaProject(), translator);
- fDocumentIsDirty = false;
- }
- return fJSPTranslation;
- }
-
- /**
- * <p>Knowing weather the translation has already been retrieved
- * from this adapter is important if you do not wan't to force
- * the translation of a document that has not yet been translated</p>
- *
- * @return <code>true</code> if {@link #getJSPTranslation()} has
- * been called on this adapter already, <code>false</code> otherwise
- */
- public boolean hasTranslation() {
- return fJSPTranslation != null;
- }
-
- JSPTranslator createTranslator() {
- return new JSPTranslator();
- }
-
- /**
- * 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 = createTranslator();
- 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;
- }
-}
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 52cac51ccc..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationAdapterFactory.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.INodeNotifier;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-/**
- * Factory for JSPTranslationAdapters.
- *
- * @author pavery
- *
- */
-public class JSPTranslationAdapterFactory extends AbstractAdapterFactory {
-
- /** the adapter associated with this factory */
- private JSPTranslationAdapter fAdapter = null;
-
- // for debugging
- static final boolean DEBUG = Boolean.valueOf(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jsptranslation")).booleanValue(); //$NON-NLS-1$;
-
- public JSPTranslationAdapterFactory() {
- super(IJSPTranslation.class, true);
- }
-
-
- protected INodeAdapter createAdapter(INodeNotifier target) {
- if (target instanceof IDOMNode && fAdapter == null) {
- /* attempt to load externalized translator and create adapter from it
- * else create new adapter */
- IDOMModel model = ((IDOMNode) target).getModel();
-
- JSPTranslator translator = JSPTranslatorPersister.getPersistedTranslator(model);
- if(translator != null) {
- fAdapter = new JSPTranslationAdapter(model, translator);
- } else {
- fAdapter= new JSPTranslationAdapter(model);
- }
-
- 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();
- }
-}
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 a0ab71529e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationExtension.java
+++ /dev/null
@@ -1,495 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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.jdt.core.ToolFactory;
-import org.eclipse.jdt.core.formatter.CodeFormatter;
-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.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionCollection;
-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;
- private CodeFormatter fCodeFormatter = 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 void retranslate(IDocument javaDocument, JSPTranslator translator) {
- fJavaDocument = javaDocument;
- retranslate(translator);
-
- 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);
- if (!(replaceText.length() == 0 && jspPos.length == 0))//Unwanted TextEdit can lead to MalformedTreeException.See: Bug 321977
- 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, Position jspPos) {
-
- // 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, jspPos.offset);
- 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;
- }
- }
- }
- else if (lastRegion != null && checkForELRegion(lastRegion)) {//Check for EL region, we don't want to replace EL region with corresponding java text,leave it as it is.
- result = getJspText().substring(jspPos.offset, jspPos.offset + jspPos.length);
- }
- }
- return result;
- }
-
- private boolean checkForELRegion(IStructuredDocumentRegion container) {
- Iterator regions = container.getRegions().iterator();
- ITextRegion region = null;
- while (regions.hasNext()) {
- region = (ITextRegion) regions.next();
- if (region instanceof ITextRegionCollection) {
- ITextRegionCollection parentRegion = ((ITextRegionCollection) region);
- Iterator childRegions = parentRegion.getRegions().iterator();
- while (childRegions.hasNext()) {
- ITextRegion childRegion = (ITextRegion) childRegions.next();
- if (childRegion.getType() == DOMJSPRegionContexts.JSP_EL_OPEN)
- return true;
- }
- }
- }
- return false;
- }
-
- 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
- // BUG188636 - just get indent info from code formatter
- String level1 = getCodeFormatter().createIndentationString(1);
- String level3 = getCodeFormatter().createIndentationString(3);
- String theOld = "\n" + level3; //$NON-NLS-1$
- String theNew = "\n" + level1; //$NON-NLS-1$
- textBefore = textBefore.replaceAll(theOld, theNew);
-
- // 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) {
- // BUG188636 - just get initial indent from code formatter
- String indent = getCodeFormatter().createIndentationString(1);
- // // 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;
- }
-
- private CodeFormatter getCodeFormatter() {
- if (fCodeFormatter == null)
- fCodeFormatter = ToolFactory.createCodeFormatter(null);
- return fCodeFormatter;
- }
-
-
- /**
- * 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();
-
- /* should not specify a limited region because other edits outside
- * these original edits might be added later.
- */
- MultiTextEdit multiEdit = new MultiTextEdit();
- 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()]);
- }
-
- /**
- * @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 2d72c36a21..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslationUtil.java
+++ /dev/null
@@ -1,125 +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 org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.modelhandler.ModelHandlerForJSP;
-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);
- ModelHandlerForJSP.ensureTranslationAdapterFactory(xmlModel);
- 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();
- }
-}
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 800cc85e25..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslator.java
+++ /dev/null
@@ -1,3610 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 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
- * Frits Jalvingh - contributions for bug 150794
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.Reader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.Stack;
-
-import javax.servlet.jsp.tagext.VariableInfo;
-
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-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.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.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.compiler.IProblem;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-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.contenttype.DeploymentDescriptorPropertyCache;
-import org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache.PropertyGroup;
-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.internal.taglib.CustomTag;
-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.internal.util.FacetModuleCoreSupport;
-import org.eclipse.jst.jsp.core.internal.util.ZeroStructuredDocumentRegion;
-import org.eclipse.jst.jsp.core.jspel.IJSPELTranslator;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.html.core.internal.contentmodel.JSP20Namespace;
-import org.eclipse.wst.sse.core.internal.FileBufferModelManager;
-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.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.text.MessageFormat;
-import com.ibm.icu.util.StringTokenizer;
-
-/**
- * Translates a JSP document into a HttpServlet subclass. Keeps two way mapping from
- * Java translation to the original JSP source, which can be obtained through
- * getJava2JspRanges() and getJsp2JavaRanges().
- */
-public class JSPTranslator implements Externalizable {
- /**
- * <p>This value should be incremented if any of the following methods change:
- * <ul>
- * <li>{@link #writeExternal(ObjectOutput)}</li>
- * <li>{@link #readExternal(ObjectInput)}</li>
- * <li>{@link #writeString(ObjectOutput, String)}</li>
- * <li>{@link #readString(ObjectInput)}</li>
- * <li>{@link #writeRanges(ObjectOutput, HashMap)}</li>
- * <li>{@link #readRanges(ObjectInput)}</li>
- * </ul>
- *
- * This is because if any of these change then previously externalized {@link JSPTranslator}s
- * will no longer be able to be read by the new implementation. This value is used by
- * the {@link Externalizable} API automatically to determine if the file being read is of the
- * correct version to be read by the current implementation of the {@link JSPTranslator}</p>
- *
- * @see #writeExternal(ObjectOutput)
- * @see #readExternal(ObjectInput)
- * @see #writeString(ObjectOutput, String)
- * @see #readString(ObjectInput)
- * @see #writeRanges(ObjectOutput, HashMap)
- * @see #readRanges(ObjectInput)
- */
- private static final long serialVersionUID = 2L;
-
- /** for debugging */
- private static final boolean DEBUG = Boolean.valueOf(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspjavamapping")).booleanValue(); //$NON-NLS-1$
-
- /** handy plugin ID constant */
- private static final String JSP_CORE_PLUGIN_ID = "org.eclipse.jst.jsp.core"; //$NON-NLS-1$
-
- // constants for reading extension point
- /** Default EL Translator extension ID */
- private static final String DEFAULT_JSP_EL_TRANSLATOR_ID = "org.eclipse.jst.jsp.defaultJSP20"; //$NON-NLS-1$
-
- /** the name of the element in the extension point */
- private static final String EL_TRANSLATOR_EXTENSION_NAME = "elTranslator"; //$NON-NLS-1$
-
- /** the name of the property in the extension point */
- private static final String ELTRANSLATOR_PROP_NAME = "ELTranslator"; //$NON-NLS-1$
-
-
- // these constants are commonly used strings during translation
- /** end line characters */
- public static final String ENDL = "\n"; //$NON-NLS-1$
-
- /** session variable declaration */
- private static final String SESSION_VARIABLE_DECLARATION = "javax.servlet.http.HttpSession session = pageContext.getSession();" + ENDL; //$NON-NLS-1$
-
- /** footer text */
- private static final String FOOTER = "}}"; //$NON-NLS-1$
-
- /** exception declaration */
- private static final String EXCEPTION = "Throwable exception = new Throwable();"; //$NON-NLS-1$
-
- /** expression prefix */
- public static final String EXPRESSION_PREFIX = "out.print("; //$NON-NLS-1$
-
- /** expression suffix */
- public static final String EXPRESSION_SUFFIX = ");"; //$NON-NLS-1$
-
- /** try/catch start */
- private static final String TRY_CATCH_START = ENDL + "try {" + ENDL; //$NON-NLS-1$
-
- /** try/catch end */
- private static final String TRY_CATCH_END = " } catch (java.lang.Exception e) {} " + ENDL; //$NON-NLS-1$
-
- /** JSP tag name prefix */
- static final String JSP_PREFIX = "jsp:"; //$NON-NLS-1$
-
-
- // these constants are to keep track of what type of code is currently being translated
- /** code in question is standard JSP */
- protected final static int STANDARD_JSP = 0;
-
- /** code in question is embedded (JSP as an attribute or within comment tags) */
- protected final static int EMBEDDED_JSP = 1;
-
- /** code in question is a JSP declaration */
- protected final static int DECLARATION = 2;
-
- /** code in question is a JSP expression */
- protected final static int EXPRESSION = 4;
-
- /** code in question is a JSP scriptlet */
- protected final static int SCRIPTLET = 8;
-
-
- // strings specific to this translation
- /** translated class header */
- String fClassHeader = null;
-
- /** translated class name */
- String fClassname = null;
-
- /** translated class super class */
- String fSuperclass = null;
-
- /** translated class imports */
- String fImplicitImports = null;
-
- /** translated class service header */
- String fServiceHeader = null;
-
- /** translated user defined imports */
- private StringBuffer fUserImports = new StringBuffer();
-
- //translation specific state
- /** {@link IDOMModel} for the JSP file being translated */
- IDOMModel fStructuredModel = null;
-
- /** {@link IStructuredDocument} for the JSP file being translated */
- IStructuredDocument fStructuredDocument = null;
-
- /** the EL translator */
- private IJSPELTranslator fELTranslator = null;
-
- /** reported translation problems */
- private List fTranslationProblems = new ArrayList();
-
- /** 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 = false;
- private boolean 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();
-
- /**
- * A map of tag names to tag library variable information; used to store
- * the ones needed for AT_END variable support.
- */
- private StackMap fTagToVariableMap = null;
- private Stack fUseBeansStack = new Stack();
-
- /** the final translated java document */
- private StringBuffer fResult;
-
- /** the buffer where the cursor is */
- private StringBuffer fCursorOwner = null;
-
- private IStructuredDocumentRegion fCurrentNode;
-
- /** flag for if the cursor is in the current regionb eing translated */
- private boolean fInCodeRegion = false;
-
- /** used to avoid infinite looping include files */
- private Stack fIncludes = null;
- private Set fIncludedPaths = new HashSet(2);
- private boolean fProcessIncludes = true;
- /** 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();
-
- /** EL Translator ID (pluggable) */
- private String fELTranslatorID;
-
- /**
- * <code>true</code> if code has been found, such as HTML tags, that is not translated
- * <code>false</code> otherwise. Useful for deciding if a place holder needs to be
- * written to translation
- */
- private boolean fFoundNonTranslatedCode;
-
- /**
- * <code>true</code> if code has been translated for the current region,
- * <code>false</code> otherwise
- */
- private boolean fCodeTranslated;
-
- /**
- * A structure for holding a region collection marker and list of variable
- * information. The region can be used later for positioning validation
- * messages.
- */
- static class RegionTags {
- ITextRegionCollection region;
- CustomTag tag;
-
- RegionTags(ITextRegionCollection region, CustomTag tag) {
- this.region = region;
- this.tag = tag;
- }
- }
-
- public JSPTranslator() {
- init();
- }
-
- /**
- * 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 the simple class name, not fully qualified
- */
- 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;
- }
-
- private IJSPProblem createJSPProblem(final int problemEID, final int problemID, final String message, final int start, final int end) {
- final int line = fStructuredDocument.getLineOfOffset(start);
- final char[] classname = fClassname.toCharArray();
-
- /*
- * Note: these problems would result in translation errors on the
- * server, so the severity is not meant to be controllable
- */
- return new IJSPProblem() {
- public void setSourceStart(int sourceStart) {
- }
-
- public void setSourceLineNumber(int lineNumber) {
- }
-
- public void setSourceEnd(int sourceEnd) {
- }
-
- public boolean isWarning() {
- return false;
- }
-
- public boolean isError() {
- return true;
- }
-
- public int getSourceStart() {
- return start;
- }
-
- public int getSourceLineNumber() {
- return line;
- }
-
- public int getSourceEnd() {
- return end;
- }
-
- public char[] getOriginatingFileName() {
- return classname;
- }
-
- public String getMessage() {
- return message;
- }
-
- public int getID() {
- return problemID;
- }
-
- public String[] getArguments() {
- return new String[0];
- }
-
- public int getEID() {
- return problemEID;
- }
- };
- }
-
- 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
- */
- 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();
- fIncludedPaths.clear();
-
- fJspTextBuffer = new StringBuffer();
-
- fFoundNonTranslatedCode = false;
- fCodeTranslated = false;
-
- }
-
- /**
- * @return just the "shell" of a servlet, nothing contributed from the JSP
- * doc
- */
- public final StringBuffer getEmptyTranslation() {
- reset();
- buildResult(true);
- return getTranslation();
- }
-
- /**
- * <p>put the final java document together</p>
- *
- * @param updateRanges <code>true</code> if the ranges need to be updated as the result
- * is built, <code>false</code> if the ranges have already been updated. This is useful
- * if building a result from a persisted {@link JSPTranslator}.
- */
- private final void buildResult(boolean updateRanges) {
- // 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() + TRY_CATCH_START.length()
- + fUserCode.length() + TRY_CATCH_END.length() + FOOTER.length());
-
- int javaOffset = 0;
-
- fResult.append(fImplicitImports);
- javaOffset += fImplicitImports.length();
-
- // updateRanges(fIndirectImports, javaOffset);
- if(updateRanges) {
- updateRanges(fImportRanges, javaOffset);
- }
- // user imports
- append(fUserImports);
- javaOffset += fUserImports.length();
-
- // class header
- fResult.append(fClassHeader);
- javaOffset += fClassHeader.length();
- fResult.append(fSuperclass + "{" + ENDL); //$NON-NLS-1$
- javaOffset += fSuperclass.length() + 2;
-
- if(updateRanges) {
- updateRanges(fDeclarationRanges, javaOffset);
- }
- // user declarations
- append(fUserDeclarations);
- javaOffset += fUserDeclarations.length();
-
- if(updateRanges) {
- updateRanges(fUserELRanges, javaOffset);
- }
- append(fUserELExpressions);
- javaOffset += fUserELExpressions.length();
-
- fResult.append(fServiceHeader);
- javaOffset += fServiceHeader.length();
- // session participant
- if (fIsInASession) {
- fResult.append(SESSION_VARIABLE_DECLARATION);
- javaOffset += SESSION_VARIABLE_DECLARATION.length();
- }
- // error page
- if (fIsErrorPage) {
- fResult.append(EXCEPTION);
- javaOffset += EXCEPTION.length();
- }
-
-
- fResult.append(TRY_CATCH_START);
- javaOffset += TRY_CATCH_START.length();
-
- if(updateRanges) {
- updateRanges(fCodeRanges, javaOffset);
- }
-
- // user code
- append(fUserCode);
- javaOffset += fUserCode.length();
-
-
- fResult.append(TRY_CATCH_END);
- javaOffset += TRY_CATCH_END.length();
-
- // footer
- fResult.append(FOOTER);
- javaOffset += FOOTER.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());
- }
-
- return fResult;
- }
-
- public List getTranslationProblems() {
- return fTranslationProblems;
- }
-
- /**
- * 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, ITextRegionCollection customTag) {
- addTaglibVariables(tagToAdd, customTag, -1);
- }
- /**
- * Add the server-side scripting variables used by this tag, along with
- * any scoping.
- *
- * @param tagToAdd
- * @param customTag
- */
- protected void addTaglibVariables(String tagToAdd, ITextRegionCollection customTag, int index) {
- if (customTag.getFirstRegion().getType().equals(DOMRegionContext.XML_TAG_OPEN)) {
- /*
- * Start tag
- */
- addStartTagVariable(tagToAdd, customTag,index);
- }
- else if (customTag.getFirstRegion().getType().equals(DOMRegionContext.XML_END_TAG_OPEN)) {
- /*
- * End tag
- */
- addEndTagVariable(tagToAdd, customTag);
- }
- }
-
- private void addEndTagVariable(String tagToAdd, ITextRegionCollection customTag){
- IFile f = getFile();
- if (f == null || !f.exists())
- return;
- String decl = ""; //$NON-NLS-1$
- RegionTags regionTag = (RegionTags) fTagToVariableMap.pop(tagToAdd);
- if (regionTag != null) {
- // even an empty array will indicate a need for a closing brace
- TaglibVariable[] taglibVars = regionTag.tag.getTagVariables();
- StringBuffer text = new StringBuffer();
- if (regionTag.tag.isIterationTag())
- doAfterBody(text, regionTag);
- text.append("} // </"); //$NON-NLS-1$
- text.append(tagToAdd);
- text.append(">\n"); //$NON-NLS-1$
- appendToBuffer(text.toString(), fUserCode, false, customTag);
- for (int i = 0; i < taglibVars.length; i++) {
- if (taglibVars[i].getScope() == VariableInfo.AT_END) {
- decl = taglibVars[i].getDeclarationString();
- appendToBuffer(decl, fUserCode, false, customTag);
- }
- }
- }
- else {
- /*
- * Since something should have been in the map because of a
- * start tag, its absence now means an unbalanced end tag.
- * Extras will be checked later to flag unbalanced start tags.
- */
- IJSPProblem missingStartTag = createJSPProblem(IJSPProblem.StartCustomTagMissing, IJSPProblem.F_PROBLEM_ID_LITERAL, NLS.bind(JSPCoreMessages.JSPTranslator_4, tagToAdd), customTag.getStartOffset(), customTag.getEndOffset());
- fTranslationProblems.add(missingStartTag);
- }
- }
- private void addStartTagVariable(String tagToAdd,ITextRegionCollection customTag, int index){
- IFile f = getFile();
-
- if (f == null || !f.exists())
- return;
- TaglibHelper helper = TaglibHelperManager.getInstance().getTaglibHelper(f);
- String decl = ""; //$NON-NLS-1$
- List problems = new ArrayList();
- CustomTag tag = helper.getCustomTag(tagToAdd, getStructuredDocument(), customTag, problems);
- TaglibVariable[] taglibVars = tag.getTagVariables();
- fTranslationProblems.addAll(problems);
- /*
- * Add AT_BEGIN variables
- */
- for (int i = 0; i < taglibVars.length; i++) {
- if (taglibVars[i].getScope() == VariableInfo.AT_BEGIN) {
- decl = taglibVars[i].getDeclarationString();
- appendToBuffer(decl, fUserCode, false, customTag);
- }
- }
- boolean isEmptyTag = false;
- if (index != -1)
- isEmptyTag= isEmptyTag(customTag, index);
- else
- isEmptyTag= isEmptyTag(customTag);
-
- /*
- * Add a single { to limit the scope of NESTED variables
- */
- StringBuffer text = new StringBuffer();
- if (!isEmptyTag && tag.isIterationTag() && tag.getTagClassName() != null) {
- text.append("\nwhile(true) "); //$NON-NLS-1$
- }
- text.append("{ // <"); //$NON-NLS-1$
- text.append(tagToAdd);
- if (isEmptyTag)
- text.append("/>\n"); //$NON-NLS-1$
- else
- text.append(">\n"); //$NON-NLS-1$
-
- appendToBuffer(text.toString(), fUserCode, false, customTag);
-
- for (int i = 0; i < taglibVars.length; i++) {
- if (taglibVars[i].getScope() == VariableInfo.NESTED) {
- decl = taglibVars[i].getDeclarationString();
- appendToBuffer(decl, fUserCode, false, customTag);
- }
- }
- /*
- * For empty tags, add the corresponding } and AT_END variables immediately.
- */
- if (isEmptyTag) {
- text = new StringBuffer();
- text.append("} // <"); //$NON-NLS-1$
- text.append(tagToAdd);
- text.append("/>\n"); //$NON-NLS-1$
- appendToBuffer(text.toString(), fUserCode, false, customTag);
- /* 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, customTag);
- }
- }
- }
- else {
- /*
- * For non-empty tags, remember the variable information
- */
- fTagToVariableMap.push(tagToAdd, new RegionTags(customTag, tag));
- }
-
- }
-
- private boolean isEmptyTag(ITextRegionCollection customTag, int index) {
- String type = null;
- // custom tag is embedded
- ITextRegionList regions = customTag.getRegions();
- ITextRegion nextRegion = regions.get(index);
- int size = customTag.getNumberOfRegions() ;
- type = nextRegion.getType();
- while (index <= size && !(DOMRegionContext.XML_EMPTY_TAG_CLOSE.equals(type) || DOMRegionContext.XML_TAG_NAME.equals(type) || DOMRegionContext.XML_TAG_CLOSE.equals(type) )) {
- nextRegion = regions.get(++index);
- type = nextRegion.getType();
- }
-
- return DOMRegionContext.XML_EMPTY_TAG_CLOSE.equals(type);
- }
-
- private boolean isEmptyTag(ITextRegionCollection customTag) {
- ITextRegion lastRegion = customTag.getLastRegion();
- // custom tag is embedded
- if (customTag instanceof ITextRegionContainer) {
- ITextRegionList regions = customTag.getRegions();
- int size = customTag.getNumberOfRegions() - 1;
- while (size > 0 && !(DOMRegionContext.XML_EMPTY_TAG_CLOSE.equals(lastRegion.getType()) || DOMRegionContext.XML_TAG_NAME.equals(lastRegion.getType()) || DOMRegionContext.XML_TAG_CLOSE.equals(lastRegion.getType()) )) {
- lastRegion = regions.get(--size);
- }
- }
-
- return DOMRegionContext.XML_EMPTY_TAG_CLOSE.equals(lastRegion.getType());
- }
-
- private void addCustomTaglibVariables(String tagToAdd, ITextRegionCollection customTag, ITextRegion prevRegion, int index) {
- //Can't judge by first region as start and end tag are part of same ContextRegionContainer
- if (prevRegion != null && prevRegion.getType().equals(DOMRegionContext.XML_END_TAG_OPEN)) {
- /*
- * End tag
- */
- addEndTagVariable(tagToAdd, customTag);
- }
- else if (prevRegion != null && prevRegion.getType().equals(DOMRegionContext.XML_TAG_OPEN)) {
- /*
- * Start tag
- */
- addStartTagVariable(tagToAdd,customTag, index);
- }
- }
-
- private void doAfterBody(StringBuffer buffer, RegionTags regionTag) {
- buffer.append("\tif ( (new "); //$NON-NLS-1$
- buffer.append(regionTag.tag.getTagClassName());
- buffer.append("()).doAfterBody() != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)\n\t\tbreak;\n"); //$NON-NLS-1$
- }
-
- /**
- * @return the workspace file for this model, null otherwise
- */
- private IFile getFile() {
- IFile f = null;
- ITextFileBuffer buffer = FileBufferModelManager.getInstance().getBuffer(getStructuredDocument());
- if (buffer != null) {
- IPath path = buffer.getLocation();
- if (path.segmentCount() > 1) {
- f = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- if (f != null && f.isAccessible()) {
- return f;
- }
- }
- return null;
- }
-
- /*
- * 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 StackMap();
- }
- fTranslationProblems.clear();
-
- setCurrentNode(new ZeroStructuredDocumentRegion(fStructuredDocument, 0));
- translatePreludes();
-
- setCurrentNode(fStructuredDocument.getFirstStructuredDocumentRegion());
-
- while (getCurrentNode() != null && !isCanceled()) {
- //no code has been translated for this region yet
- fCodeTranslated = false;
- // 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 no code was translated for this region then found "non translated code"
- if(!fCodeTranslated) {
- fFoundNonTranslatedCode = true;
- }
-
- if (getCurrentNode() != null)
- advanceNextNode();
- }
-
- writePlaceHolderForNonTranslatedCode();
-
- setCurrentNode(new ZeroStructuredDocumentRegion(fStructuredDocument, fStructuredDocument.getLength()));
- translateCodas();
-
- /*
- * Any contents left in the map indicate start tags that never had end
- * tags. While the '{' that is present without the matching '}' should
- * cause a Java translation fault, that's not particularly helpful to
- * a user who may only know how to use custom tags as tags. Ultimately
- * unbalanced custom tags should just be reported as unbalanced tags,
- * and unbalanced '{'/'}' only reported when the user actually
- * unbalanced them with scriptlets.
- */
- Iterator regionAndTaglibVariables = fTagToVariableMap.values().iterator();
- while (regionAndTaglibVariables.hasNext()) {
- RegionTags regionTag = (RegionTags) regionAndTaglibVariables.next();
- ITextRegionCollection extraStartRegion = regionTag.region;
- IJSPProblem missingEndTag = createJSPProblem(IJSPProblem.EndCustomTagMissing, IJSPProblem.F_PROBLEM_ID_LITERAL, NLS.bind(JSPCoreMessages.JSPTranslator_5,regionTag.tag.getTagName()), extraStartRegion.getStartOffset(), extraStartRegion.getEndOffset());
- fTranslationProblems.add(missingEndTag);
-
- StringBuffer text = new StringBuffer();
- // Account for iteration tags that have a missing end tag
- if (regionTag.tag.isIterationTag())
- doAfterBody(text, regionTag);
- text.append("} // [</"); //$NON-NLS-1$
- text.append(regionTag.tag.getTagName());
- text.append(">]"); //$NON-NLS-1$
- appendToBuffer(text.toString(), fUserCode, false, fStructuredDocument.getLastStructuredDocumentRegion());
- }
- fTagToVariableMap.clear();
-
- /*
- * Now do the same for jsp:useBean tags, whose contents get their own
- * { & }
- */
- while (!fUseBeansStack.isEmpty()) {
- appendToBuffer("}", fUserCode, false, fStructuredDocument.getLastStructuredDocumentRegion()); //$NON-NLS-1$
- ITextRegionCollection extraStartRegion = (ITextRegionCollection) fUseBeansStack.pop();
- IJSPProblem missingEndTag = createJSPProblem(IJSPProblem.UseBeanEndTagMissing, IJSPProblem.F_PROBLEM_ID_LITERAL, NLS.bind(JSPCoreMessages.JSPTranslator_5,JSP11Namespace.ElementName.USEBEAN), extraStartRegion.getStartOffset(), extraStartRegion.getEndOffset());
- fTranslationProblems.add(missingEndTag);
- }
-
- buildResult(true);
- }
-
- /**
- * Translates a region container (and XML JSP container, or <% JSP
- * container). This method should only be called in this class and for
- * containers in the primary structured document as all buffer appends
- * will be direct.
- */
- 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
- }
- }
- }
- }
-
- protected void init() {
- fClassname = "_JSPServlet"; //$NON-NLS-1$
- fClassHeader = "public class " + fClassname + " extends "; //$NON-NLS-1$ //$NON-NLS-2$
-
- 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$
-
- 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 = JspFactory.getDefaultFactory().getPageContext(this, request, response, null, true, JspWriter.DEFAULT_BUFFER, true);" + ENDL + //$NON-NLS-1$
- "javax.servlet.ServletContext application = pageContext.getServletContext();" + ENDL + //$NON-NLS-1$
- "javax.servlet.ServletConfig config = pageContext.getServletConfig();" + ENDL + //$NON-NLS-1$
- "javax.servlet.jsp.JspWriter out = pageContext.getOut();" + ENDL + //$NON-NLS-1$
- "Object page = this;" + ENDL; //$NON-NLS-1$
- fSuperclass = "javax.servlet.http.HttpServlet"; //$NON-NLS-1$
- }
-
- /**
- *
- * @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)
- *
- * This method should only be called in this class and for containers in
- * the primary structured document as all buffer appends will be direct
- */
- protected void translateRegionContainer(ITextRegionCollection container, int JSPType) {
-
- ITextRegionCollection containerRegion = container;
-
- 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 (DOMRegionContext.BLOCK_TEXT == type) {
- // check if it's nested jsp in a script tag...
- if (region instanceof ITextRegionContainer) {
- // pass in block text's container & iterator
- Iterator regionIterator = ((ITextRegionCollection) region).getRegions().iterator();
- translateJSPNode(region, regionIterator, type, EMBEDDED_JSP);
- }
- else {
- //be sure to combine all of the text from the block region
- StringBuffer fullText = new StringBuffer(containerRegion.getFullText(region));
- while(regions.hasNext()) {
- region = (ITextRegion)regions.next();
- if (region instanceof ITextRegionContainer) {
- // pass in block text's container & iterator
- Iterator regionIterator = ((ITextRegionCollection) region).getRegions().iterator();
- translateJSPNode(region, regionIterator, type, EMBEDDED_JSP);
- }
-
- if(region.getType() == DOMRegionContext.BLOCK_TEXT) {
- fullText.append(containerRegion.getFullText(region));
- } else {
- //update type for when we exit if statement for BLOCK_TEXT
- type = region.getType();
- break;
- }
- }
-
- /**
- * LIMITATION - Normally the script content within a
- * script tag is a single document region with a single
- * BLOCK_TEXT text region within it. Any JSP scripting
- * will be within its own region container (for the sake
- * of keeping the scripting open/content/end as a group)
- * also of BLOCK_TEXT. That ignores custom tags that might
- * be in there, though, as they require proper scoping and
- * variable declaration to be performed even though
- * they're not proper nodes in the DOM. The only way to
- * really do this is to treat the entire script content as
- * JSP content on its own, akin to an included segment.
- * Further complicating this solution is that tagdependent
- * custom tags have their comment marked as BLOCK_TEXT as
- * well, so there's no clear way to tell the two cases
- * apart.
- */
-
- // ////////////////////////////////////////////////////////////////////////////////
- // THIS EMBEDDED JSP TEXT WILL COME OUT LATER WHEN
- // PARTITIONING HAS
- // SUPPORT FOR NESTED XML-JSP
- // CMVC 241882
- decodeScriptBlock(fullText.toString(), containerRegion.getStartOffset());
- // ////////////////////////////////////////////////////////////////////////////////
- }
- }
- // if (region instanceof ITextRegionCollection &&
- // ((ITextRegionCollection) region).getNumberOfRegions() > 0) {
- // translateRegionContainer((ITextRegionCollection) region,
- // EMBEDDED_JSP);
- // }
- 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);
- }
- else if(type != null && type == DOMRegionContext.XML_CONTENT && region instanceof ITextRegionContainer) {
- //this case was put in to parse EL that is not in an attribute
- translateXMLContent((ITextRegionContainer)region);
- }
- //the end tags of these regions are "translated" in a sense
- else if(type == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE ||
- type == DOMJSPRegionContexts.JSP_CLOSE) {
- this.fCodeTranslated = true;
- }
- }
- }
-
- /*
- * ////////////////////////////////////////////////////////////////////////////////// **
- * TEMP WORKAROUND FOR CMVC 241882 Takes a String and blocks out
- * jsp:scriptlet, jsp:expression, and jsp:declaration @param blockText
- * @return
- */
- void decodeScriptBlock(String blockText, int startOfBlock) {
- XMLJSPRegionHelper helper = new XMLJSPRegionHelper(this, false);
- 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
- }
-
- /**
- * This currently only detects EL content and translates it,
- * but if other cases arise later then they could be added in here
- *
- * @param embeddedContainer the container that may contain EL
- */
- protected void translateXMLContent(ITextRegionContainer embeddedContainer) {
- ITextRegionList embeddedRegions = embeddedContainer.getRegions();
- int length = embeddedRegions.size();
- for (int i = 0; i < length; i++) {
- ITextRegion delim = embeddedRegions.get(i);
- String type = delim.getType();
-
- // check next region to see if it's EL content
- if (i + 1 < length) {
- if((type == DOMJSPRegionContexts.JSP_EL_OPEN || type == DOMJSPRegionContexts.JSP_VBL_OPEN)) {
- ITextRegion region = null;
-
- int start = delim.getEnd();
- while (++i < length) {
- region = embeddedRegions.get(i);
- if (region == null || !isELType(region.getType()))
- break;
- }
- fLastJSPType = EXPRESSION;
- String elText = embeddedContainer.getFullText().substring(start, (region != null ? region.getStart() : embeddedContainer.getLength() - 1));
- translateEL(elText, embeddedContainer.getText(delim), fCurrentNode,
- embeddedContainer.getEndOffset(delim), elText.length());
- }
- }
- }
- }
-
- private boolean isELType(String type) {
- return DOMJSPRegionContexts.JSP_EL_CONTENT.equals(type) || DOMJSPRegionContexts.JSP_VBL_CONTENT.equals(type) || DOMJSPRegionContexts.JSP_EL_DQUOTE.equals(type) || DOMJSPRegionContexts.JSP_VBL_DQUOTE.equals(type) || DOMJSPRegionContexts.JSP_EL_QUOTED_CONTENT.equals(type) || DOMJSPRegionContexts.JSP_VBL_QUOTED_CONTENT.equals(type) || DOMJSPRegionContexts.JSP_EL_SQUOTE.equals(type) || DOMJSPRegionContexts.JSP_VBL_SQUOTE.equals(type);
- }
-
- /**
- * 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 && !fullTagName.startsWith(JSP_PREFIX)) {
- addTaglibVariables(fullTagName, container,-1); // 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 (getCurrentNode() != null) {
- // 'regions' contain the attrs
- translatePageDirectiveAttributes(regions, getCurrentNode());
- }
- }
- else if (directiveName.equals("tag")) { //$NON-NLS-1$
- translatePageDirectiveAttributes(regions, getCurrentNode());
- }
- else if (directiveName.equals("variable")) { //$NON-NLS-1$
- translateVariableDirectiveAttributes(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(container,regions);
- }
- }
- }
- }
-
- /**
- * translates embedded containers for ALL attribute values
- *
- * @param regions
- */
- private void checkAllAttributeValueContainers(ITextRegionCollection container, Iterator regions) {
- // tag name is not jsp
- // handle embedded jsp attributes...
- ITextRegion embedded = null;
- // Iterator attrRegions = null;
- // ITextRegion attrChunk = null;
- ITextRegion prevRegion = null;
- while (regions.hasNext()) {
- embedded = (ITextRegion) regions.next();
- if (embedded.getType() == DOMRegionContext.XML_TAG_NAME || embedded.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME)
-
- {
- String fullTagName = container.getText(embedded);
- if (fullTagName.indexOf(':') > -1 && !fullTagName.startsWith(JSP_PREFIX)) {
- if (prevRegion != null)
- addCustomTaglibVariables(fullTagName, container,prevRegion,-1); // it may be a custom tag
- }
- }
- else 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;
- // }
- // }
- }
- prevRegion = embedded;
- }
- }
-
- /**
- * 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)) {
- // 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$
-
- StringBuffer regionText = new StringBuffer();
- // read structured document regions until </jsp:scriptlet> or EOF
- while (sdr != null && sdr.getType() != DOMRegionContext.XML_TAG_NAME) {
-
- // setup for next region
- if (regionText.length() == 0)
- start = sdr.getStartOffset();
- sdrText = sdr.getText();
-
- if (sdr.getType() == DOMRegionContext.XML_CDATA_TEXT) {
- // Clear out the buffer
- if (regionText.length() > 0) {
- writeToBuffer(type, regionText.toString(), start, end);
- regionText = new StringBuffer();
- }
- // 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
- regionText.append(EscapedTextUtil.getUnescapedText(sdrText));
- end = sdr.getEndOffset();
- }
- sdr = sdr.getNext();
- }
-
- if (regionText.length() > 0)
- writeToBuffer(type, regionText.toString(), start, end);
- setCurrentNode(sdr);
- setSourceReferencePoint();
- }
-
- private void writeToBuffer(int type, String content, int jspStart, int jspEnd) {
- switch (type) {
- case SCRIPTLET :
- translateScriptletString(content, getCurrentNode(), jspStart, jspEnd - jspStart, false);
- break;
- case EXPRESSION :
- translateExpressionString(content, getCurrentNode(), jspStart, jspEnd - jspStart, false);
- break;
- case DECLARATION :
- translateDeclarationString(content, getCurrentNode(), jspStart, jspEnd - jspStart, false);
- 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...
- }
- else if (DOMRegionContext.XML_COMMENT_TEXT.equals(commentRegion.getType())) {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=222215
- // support custom tags hidden in a comment region
- decodeScriptBlock(node.getFullText(commentRegion), node.getStartOffset(commentRegion));
- }
- }
- }
-
- /**
- * 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(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, regions);
- // ensure the rest of this method won't be called
- }
- /* NOTE: the type here is of the node preceding the current node
- * thus must check to see if the current node is JSP close, if it is
- * then the JSP is something akin to <%%> and should not be translated
- * (Bug 189318)
- */
- if (contentRegion != null && contentRegion.getType() != DOMJSPRegionContexts.JSP_CLOSE) {
- 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) {
- List elProblems = translator.translateEL(elText, delim, currentNode, contentStart, contentLength, fUserELExpressions, fUserELRanges, fStructuredDocument);
- fTranslationProblems.addAll(elProblems);
- }
- }
-
- /**
- * Discover and instantiate an EL translator.
- */
- public IJSPELTranslator getELTranslator() {
- if (fELTranslator == null) {
-
- /*
- * name of plugin that exposes this extension point
- */
- IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(JSP_CORE_PLUGIN_ID, 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 regions
- * iterator for collection
- */
- private void translateEmbeddedJSPInBlock(ITextRegionCollection collection, Iterator regions) {
- ITextRegion region = null;
- while (regions.hasNext()) {
- region = (ITextRegion) regions.next();
- if (isJSP(region.getType()))
- break;
- region = null;
- }
- if (region != null) {
- translateEmbeddedJSPInAttribute(collection);
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=126377
- // all of collection was translated so just finish off iterator
- while (regions.hasNext())
- regions.next();
- }
- }
-
- /*
- * Translates all embedded jsp regions in embeddedContainer 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;
- String quotetype = null;
- final int length = embeddedRegions.size();
- for (int i = 0; i < length; i++) {
-
- // possible delimiter, check later
- delim = embeddedRegions.get(i);
- type = delim.getType();
- if (type == DOMRegionContext.XML_TAG_NAME ) {
- String fullTagName = embeddedContainer.getText(delim);
- if (fullTagName.indexOf(':') > -1 && !fullTagName.startsWith(JSP_PREFIX)) {
- ITextRegion prevRegion =null;
- if (i>0)
- prevRegion = embeddedRegions.get(i-1);
- addCustomTaglibVariables(fullTagName, embeddedContainer,prevRegion,i+1); // it may be a custom tag
- }
- }
- if(type == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_DQUOTE || type == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_SQUOTE
- || type == DOMJSPRegionContexts.JSP_TAG_ATTRIBUTE_VALUE_DQUOTE || type == DOMJSPRegionContexts.JSP_TAG_ATTRIBUTE_VALUE_SQUOTE)
- quotetype = type;
-
- // 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(), quotetype);
- }
- 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(), false);
- }
- 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(), false);
- }
- else if (type == DOMJSPRegionContexts.JSP_EL_OPEN || type == DOMJSPRegionContexts.JSP_VBL_OPEN) {
- fLastJSPType = EXPRESSION;
- ITextRegion region = null;
-
- int start = delim.getEnd();
- while (++i < length) {
- region = embeddedRegions.get(i);
- if (region == null || !isELType(region.getType()))
- break;
- }
- final String elText = embeddedContainer.getFullText().substring(start, (region != null ? region.getStart() : embeddedContainer.getLength() - 1));
- translateEL(elText, embeddedContainer.getText(delim), fCurrentNode, embeddedContainer.getEndOffset(delim), elText.length());
- }
-
- // 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;
- }
- }
- }
-
- 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(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.equals("taglib")) { //$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.equals("page")) { //$NON-NLS-1$
- translatePageDirectiveAttributes(regions, getCurrentNode());
- }
- else if (regionText.equals("tag")) { //$NON-NLS-1$
- // some attributes overlap, so both are handled in this method
- translatePageDirectiveAttributes(regions, getCurrentNode());
- }
- else if (regionText.equals("variable")) { //$NON-NLS-1$
- translateVariableDirectiveAttributes(regions);
- }
- else if (regionText.equals("attribute")) { //$NON-NLS-1$
- translateAttributeDirectiveAttributes(regions);
- }
- }
- }
-
- private void translateAttributeDirectiveAttributes(Iterator regions) {
- ITextRegion r = null;
- String attrName, attrValue;
-
- String varType = "java.lang.String"; //$NON-NLS-1$ // the default class...
- String varName = null;
- String description = "";//$NON-NLS-1$
- boolean isFragment = false;
-
- // 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 = getCurrentNode().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(getCurrentNode().getText(r));
- }
- // has equals, but no value?
- }
- if (attrName.equals(JSP11Namespace.ATTR_NAME_TYPE)) {
- varType = attrValue;
- }
- else if (attrName.equals(JSP20Namespace.ATTR_NAME_FRAGMENT)) {
- isFragment = Boolean.valueOf(attrValue).booleanValue();
- }
- else if (attrName.equals(JSP11Namespace.ATTR_NAME_NAME)) {
- varName = attrValue;
- }
- else if (attrName.equals(JSP20Namespace.ATTR_NAME_DESCRIPTION)) {
- description = attrValue;
- }
- }
- }
- }
- if (varName != null) {
- if (isFragment) {
- // 2.0:JSP.8.5.2
- varType = "javax.servlet.jsp.tagext.JspFragment"; //$NON-NLS-1$
- }
- String declaration = new TaglibVariable(varType, varName, "", description).getDeclarationString(true, TaglibVariable.M_PRIVATE); //$NON-NLS-1$
- appendToBuffer(declaration, fUserDeclarations, false, fCurrentNode);
- }
- }
-
- private void translateVariableDirectiveAttributes(Iterator regions) {
- /*
- * Shouldn't create a scripting variable in *this* tag file's
- * translation, only in JSP files that use it -
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=188780
- */
- }
-
- /*
- * 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.isDeleted() && taglibRegions.hasNext()) {
- r = (ITextRegion) taglibRegions.next();
- if (r.getType().equals(DOMJSPRegionContexts.JSP_DIRECTIVE_NAME)) {
- String text = sdRegion.getText(r);
- if (JSP12TLDNames.TAGLIB.equals(text) || JSP12Namespace.ElementName.DIRECTIVE_TAGLIB.equals(text)) {
- 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()); //$NON-NLS-1$
- }
- }
- }
-
- /*
- * 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 iterator of the attributes of a page directive and the
- * directive itself. The iterator is used in case it can be optimized, but
- * the documentRegion is still required to ensure that the values are
- * extracted from the correct text.
- */
- protected void translatePageDirectiveAttributes(Iterator regions, IStructuredDocumentRegion documentRegion) {
- 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 = documentRegion.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(documentRegion.getText(r));
- }
- // has equals, but no value?
- }
- setDirectiveAttribute(attrName, attrValue);
- }
- }
- }
- }
-
- /**
- * sets the appropriate page/tag 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 = Boolean.valueOf(attrValue).booleanValue();
- }
- 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 = Boolean.valueOf(attrValue).booleanValue();
- }
- }
-
- protected void handleIncludeFile(String filename) {
- if (filename != null && fProcessIncludes) {
- IPath modelPath = getModelPath();
- IPath basePath = modelPath;
- if (basePath != null) {
- /*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=227576
- *
- * The resolution of the included fragment should use the file
- * containing the directive as the base reference, not always
- * the main JSP being invoked. Verified behavior with Apache
- * Tomcat 5.5.20.
- */
- if (!getIncludes().isEmpty()) {
- basePath = new Path((String) getIncludes().peek());
- }
- String filePathString = FacetModuleCoreSupport.resolve(basePath, filename).toString();
- fIncludedPaths.add(filePathString);
-
- if (!getIncludes().contains(filePathString) && !filePathString.equals(modelPath.toString())) {
- getIncludes().push(filePathString);
- JSPIncludeRegionHelper helper = new JSPIncludeRegionHelper(this, true);
- // Should we consider preludes on this segment?
- helper.parse(filePathString);
- getIncludes().pop();
- }
- }
- }
- }
-
- private Stack getIncludes() {
- if (fIncludes == null)
- fIncludes = new Stack();
- return fIncludes;
- }
-
- public Collection getIncludedPaths() {
- return fIncludedPaths;
- }
-
- protected void translateExpressionString(String newText, ITextRegionCollection embeddedContainer, int jspPositionStart, int jspPositionLength, boolean isIndirect) {
- appendToBuffer(EXPRESSION_PREFIX, fUserCode, false, embeddedContainer, true);
- appendToBuffer(newText, fUserCode, true, embeddedContainer, jspPositionStart, jspPositionLength, isIndirect, true);
- appendToBuffer(EXPRESSION_SUFFIX, fUserCode, false, embeddedContainer);
- }
-
- protected void translateExpressionString(String newText, ITextRegionCollection embeddedContainer, int jspPositionStart, int jspPositionLength, String quotetype) {
- if(quotetype == null || quotetype == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_DQUOTE ||quotetype == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_SQUOTE ) {
- translateExpressionString(newText, embeddedContainer, jspPositionStart, jspPositionLength, false);
- return;
- }
-
- //-- This is a quoted attribute. We need to unquote as per the JSP spec: JSP 2.0 page 1-36
- appendToBuffer(EXPRESSION_PREFIX, fUserCode, false, embeddedContainer, true);
-
- int length = newText.length();
- int runStart = 0;
- int i = 0;
- for ( ; i < length; i++) {
- //-- collect a new run
- char c = newText.charAt(i);
- if (c == '\\') {
- //-- Escaped value. Add the run, then unescape
- int runLength = i-runStart;
- if (runLength > 0) {
- appendToBuffer(newText.substring(runStart, i), fUserCode, true, embeddedContainer, jspPositionStart, runLength, false, true);
- jspPositionStart += runLength + 1;
- jspPositionLength -= runLength + 1;
- }
- runStart = ++i;
- if (i >= length) { // Escape but no data follows?!
- //- error.
- break;
- }
- c = newText.charAt(i); // The escaped character, copied verbatim
- }
- }
- //-- Copy last-run
- int runLength = i - runStart;
- if (runLength > 0)
- appendToBuffer(newText.substring(runStart, i), fUserCode, true, embeddedContainer, jspPositionStart, runLength, false, false);
- appendToBuffer(EXPRESSION_SUFFIX, fUserCode, false, embeddedContainer);
- }
-
- protected void translateDeclarationString(String newText, ITextRegionCollection embeddedContainer, int jspPositionStart, int jspPositionLength, boolean isIndirect) {
- appendToBuffer(newText, fUserDeclarations, true, embeddedContainer, jspPositionStart, jspPositionLength, isIndirect);
- 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, boolean isIndirect) {
- appendToBuffer(newText, fUserCode, true, embeddedContainer, jspPositionStart, jspPositionLength, isIndirect);
- }
-
- // the following 3 methods determine the cursor position
- // <%= %>
- protected void translateExpression(ITextRegionCollection region) {
- String newText = getUnescapedRegionText(region, EXPRESSION);
- appendToBuffer(EXPRESSION_PREFIX, fUserCode, false, region, true);
- appendToBuffer(newText, fUserCode, true, region, true);
- appendToBuffer(EXPRESSION_SUFFIX, fUserCode, false, region);
- }
-
- //
- // <%! %>
- protected void translateDeclaration(ITextRegionCollection region) {
- String newText = getUnescapedRegionText(region, DECLARATION);
- appendToBuffer(newText, fUserDeclarations, true, region);
- appendToBuffer(ENDL, fUserDeclarations, false, region);
- }
-
- //
- // <% %>
- protected void translateScriptlet(ITextRegionCollection region) {
- String newText = getUnescapedRegionText(region, SCRIPTLET);
- appendToBuffer(newText, fUserCode, true, region);
- }
-
- /**
- * 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);
- }
-
- /**
- * Append using a region, probably indirect mapping (eg. <%@page
- * include=""%>)
- *
- * @param newText
- * @param buffer
- * @param addToMap
- * @param jspReferenceRegion
- * @param nonl
- */
- private void appendToBuffer(String newText, StringBuffer buffer, boolean addToMap, ITextRegionCollection jspReferenceRegion, boolean nonl) {
- int start = 0, length = 0;
- if (jspReferenceRegion != null) {
- start = jspReferenceRegion.getStartOffset();
- length = jspReferenceRegion.getLength();
- }
- appendToBuffer(newText, buffer, addToMap, jspReferenceRegion, start, length, false, nonl);
- }
-
- private void appendToBuffer(String newText, StringBuffer buffer, boolean addToMap, ITextRegionCollection jspReferenceRegion, int jspPositionStart, int jspPositionLength, boolean isIndirect) {
- appendToBuffer(newText, buffer, addToMap, jspReferenceRegion, jspPositionStart, jspPositionLength, isIndirect, false);
- }
-
-
- /**
- * 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, boolean nonl) {
-
- int origNewTextLength = newText.length();
-
- // nothing to append
- if (jspReferenceRegion == null)
- return;
-
- // add a newline so translation looks cleaner
- if (! nonl && !newText.endsWith(ENDL))
- newText += ENDL;
-
- //dump any non translated code before writing translated code
- writePlaceHolderForNonTranslatedCode();
-
- //if appending to the buffer can assume something got translated
- fCodeTranslated = true;
-
- 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);
- /*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=212242 - Check for
- * the existence of '(' first.
- */
- int parenPos = -1;
- if (className.length() >= 4 && (parenPos = className.indexOf('(')) >= 0) {
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=86132
- int classNameLength = className.substring(0, parenPos).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 && getCurrentNode().getType() != DOMJSPRegionContexts.JSP_CLOSE) // 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;
- ITextRegion idRegion = null;
- String type = null;
- ITextRegion typeRegion = null;
- String className = null;
- ITextRegion classnameRegion = null;
- String beanName = null;
- ITextRegion beanNameRegion = null;
-
- if (DOMRegionContext.XML_END_TAG_OPEN.equals(container.getFirstRegion().getType())) {
- if (!fUseBeansStack.isEmpty()) {
- fUseBeansStack.pop();
- appendToBuffer("}", fUserCode, false, fCurrentNode); //$NON-NLS-1$
- }
- else {
- // no useBean start tag being remembered
- ITextRegionCollection extraEndRegion = container;
- IJSPProblem missingStartTag = createJSPProblem(IJSPProblem.UseBeanStartTagMissing, IJSPProblem.F_PROBLEM_ID_LITERAL, NLS.bind(JSPCoreMessages.JSPTranslator_4,JSP11Namespace.ElementName.USEBEAN), extraEndRegion.getStartOffset(), extraEndRegion.getEndOffset());
- fTranslationProblems.add(missingStartTag);
- }
- return;
- }
-
- 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;
- idRegion = r;
- }
- else if (attrName.equals("class")) {//$NON-NLS-1$
- className = attrValue;
- classnameRegion = r;
- }
- else if (attrName.equals("type")) {//$NON-NLS-1$
- type = attrValue;
- typeRegion = r;
- }
- else if (attrName.equals("beanName")) { //$NON-NLS-1$
- beanName = attrValue;
- beanNameRegion = r;
- }
- }
- }
-
- if (id != null) {
- // The id is not a valid Java identifier
- if (!isValidJavaIdentifier(id) && idRegion != null) {
- Object problem = createJSPProblem(IJSPProblem.UseBeanInvalidID, IProblem.ParsingErrorInvalidToken, MessageFormat.format(JSPCoreMessages.JSPTranslator_0, new String[]{id}), container.getStartOffset(idRegion), container.getTextEndOffset(idRegion) - 1);
- fTranslationProblems.add(problem);
- }
- // No Type information is provided
- if (((type == null && className == null) || (type == null && beanName != null)) && idRegion != null) {
- Object problem = createJSPProblem(IJSPProblem.UseBeanMissingTypeInfo, IProblem.UndefinedType, NLS.bind(JSPCoreMessages.JSPTranslator_3, new String[]{id}), container.getStartOffset(idRegion), container.getTextEndOffset(idRegion) - 1);
- fTranslationProblems.add(problem);
- }
- // Cannot specify both a class and a beanName
- if (className != null && beanName != null && beanNameRegion != null) {
- ITextRegion nameRegion = container.getRegions().get(1);
- Object problem = createJSPProblem(IJSPProblem.UseBeanAmbiguousType, IProblem.AmbiguousType, JSPCoreMessages.JSPTranslator_2, container.getStartOffset(nameRegion), container.getTextEndOffset(nameRegion) - 1);
- fTranslationProblems.add(problem);
- }
- /*
- * Only have a class or a beanName at this point, and potentially
- * a type has id w/ type and/or classname/beanName
- */
- // Type id = new Classname/Beanname();
- // or
- // Type id = null; // if there is no classname or beanname
- if ((type != null || className != null)) {
- if (className != null)
- className = decodeType(className);
-
- if (type == null) {
- type = className;
- typeRegion = classnameRegion;
- }
- else
- type = decodeType(type);
-
- /* Now check the types (multiple of generics may be involved) */
- List errorTypeNames = new ArrayList(2);
- if (!isTypeFound(type, errorTypeNames)) {
- for (int i = 0; i < errorTypeNames.size(); i++) {
- Object problem = createJSPProblem(IJSPProblem.F_PROBLEM_ID_LITERAL, IProblem.UndefinedType, MessageFormat.format(JSPCoreMessages.JSPTranslator_1, new String[]{errorTypeNames.get(i).toString()}), container.getStartOffset(typeRegion), container.getTextEndOffset(typeRegion) - 1);
- fTranslationProblems.add(problem);
- }
- }
- else {
- 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$
- else if (beanName != null)
- suffix = "(" + type + ") java.beans.Beans.instantiate(getClass().getClassLoader(), \"" + beanName + "\");" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- appendToBuffer(prefix + suffix, fUserCode, true, fCurrentNode);
- }
- }
- }
- /*
- * Add a brace and remember the start tag regardless of whether a
- * variable was correctly created
- */
- if (!DOMRegionContext.XML_EMPTY_TAG_CLOSE.equals(container.getLastRegion().getType())) {
- fUseBeansStack.push(container);
- appendToBuffer("{", fUserCode, false, fCurrentNode); //$NON-NLS-1$
- }
- }
-
- /**
- * Decodes type strings for XML-style JSPs
- *
- * @param type the string to decode
- * @return the decoded string
- */
- private String decodeType(String type) {
- final int length = type.length();
- final StringBuffer buffer = new StringBuffer(length);
- for (int i = 0; i < length; i++) {
- final char c = type.charAt(i);
- if (c == '&') {
- if (length > i + 3) {
- final String code = type.substring(i + 1, i + 4);
- final boolean isGt = "gt;".equals(code); //$NON-NLS-1$
- if (isGt || "lt;".equals(code)) { //$NON-NLS-1$
- i+=3;
- buffer.append(isGt ? '>' : '<');
- continue;
- }
- }
- }
- buffer.append(c);
- }
- return buffer.toString();
- }
-
- /**
- * @param type
- * @return
- */
- private boolean isTypeFound(String rawTypeValue, List errorTypeNames) {
- IFile file = getFile();
- if(file == null)
- return true;
-
- IProject project = file.getProject();
- IJavaProject p = JavaCore.create(project);
- if (p.exists()) {
- String types[] = new String[3];
- if (rawTypeValue.indexOf('<') > 0) {
- // JSR 14 : Generics are being used, parse them out
- try {
- StringTokenizer toker = new StringTokenizer(rawTypeValue);
- // generic
- types[0] = toker.nextToken("<"); //$NON-NLS-1$
- // type 1 or key
- types[1] = toker.nextToken(",>"); //$NON-NLS-1$
- // type 2 or value
- types[2] = toker.nextToken(",>"); //$NON-NLS-1$
- }
- catch (NoSuchElementException e) {
- // StringTokenizer failure with unsupported syntax
- }
- }
- else {
- types[0] = rawTypeValue;
- }
-
- for (int i = 0; i < types.length; i++) {
- if (types[i] != null) {
- // remove any array suffixes
- if (types[i].indexOf('[') > 0) {
- types[i] = types[i].substring(0, types[i].indexOf('['));
- }
- // remove any "extends" prefixes (JSR 14)
- if (types[i].indexOf("extends") > 0) { //$NON-NLS-1$
- types[i] = StringUtils.strip(types[i].substring(types[i].indexOf("extends"))); //$NON-NLS-1$
- }
-
- addNameToListIfTypeNotFound(p, types[i], errorTypeNames);
- }
- }
- }
- return errorTypeNames.isEmpty();
- }
-
- private void addNameToListIfTypeNotFound(IJavaProject p, String typeName, List collectedNamesNotFound) {
- try {
- if (typeName != null) {
- IType type = p.findType(typeName);
- if (type == null || !type.exists()) {
- collectedNamesNotFound.add(typeName);
- }
- else {
- IResource typeResource = type.getResource();
- if(typeResource != null) {
-
- }
- }
- }
- }
- catch (JavaModelException e) {
- // Not a Java Project
- }
- }
-
- private boolean isValidJavaIdentifier(String id) {
- char[] idChars = id.toCharArray();
- if (idChars.length < 1)
- return false;
- boolean isValid = Character.isJavaIdentifierStart(idChars[0]);
- for (int i = 1; i < idChars.length; i++) {
- isValid = isValid && Character.isJavaIdentifierPart(idChars[i]);
- }
- return isValid;
- }
-
- 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 IStructuredDocument getStructuredDocument() {
- return fStructuredDocument;
- }
-
- private IPath getModelPath() {
- IPath path = null;
- ITextFileBuffer buffer = FileBufferModelManager.getInstance().getBuffer(getStructuredDocument());
- if (buffer != null) {
- path = buffer.getLocation();
- }
- return path;
- }
-
- private void translateCodas() {
- fProcessIncludes = false;
- IPath modelpath = getModelPath();
- if (modelpath != null) {
- PropertyGroup[] propertyGroups = DeploymentDescriptorPropertyCache.getInstance().getPropertyGroups(modelpath);
- for (int j = 0; j < propertyGroups.length; j++) {
- IPath[] codas = propertyGroups[j].getIncludeCoda();
- for (int i = 0; i < codas.length; i++) {
- if (!getIncludes().contains(codas[i].toString()) && !codas[i].equals(modelpath)) {
- getIncludes().push(codas[i]);
- JSPIncludeRegionHelper helper = new JSPIncludeRegionHelper(this, true);
- helper.parse(codas[i].toString());
- getIncludes().pop();
- }
- }
- }
- }
- fProcessIncludes = true;
- }
-
- private void translatePreludes() {
- fProcessIncludes = false;
- IPath modelpath = getModelPath();
- if (modelpath != null) {
- PropertyGroup[] propertyGroups = DeploymentDescriptorPropertyCache.getInstance().getPropertyGroups(modelpath);
- for (int j = 0; j < propertyGroups.length; j++) {
- IPath[] preludes = propertyGroups[j].getIncludePrelude();
- for (int i = 0; i < preludes.length; i++) {
- if (!getIncludes().contains(preludes[i].toString()) && !preludes[i].equals(modelpath)) {
- getIncludes().push(preludes[i]);
- JSPIncludeRegionHelper helper = new JSPIncludeRegionHelper(this, true);
- helper.parse(preludes[i].toString());
- getIncludes().pop();
- }
- }
- }
- }
- fProcessIncludes = true;
- }
-
- /**
- * <p>Writes an empty expression to {@link #fUserCode} if previously
- * found non translated code</p>
- * <p>This should be done before appending any newly translated code.</p>
- */
- private void writePlaceHolderForNonTranslatedCode() {
- if(fFoundNonTranslatedCode) {
- String text = ("{" + EXPRESSION_PREFIX + "\"\"" + EXPRESSION_SUFFIX + "}" + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- " //markup"+ ENDL); //$NON-NLS-1$
- fUserCode.append(text);
- fOffsetInUserCode += text.length();
- fFoundNonTranslatedCode = false;
- }
- }
-
- /**
- * <p><b>NOTE: </b>If the implementation of this method is changed be sure to update
- * {@link #readExternal(ObjectInput)} and {@link #serialVersionUID}</p>
- *
- * @see #readExternal(ObjectInput)
- * @see #serialVersionUID
- * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
- */
- public void writeExternal(ObjectOutput out) throws IOException {
- writeString(out, this.fClassHeader);
- writeString(out, this.fClassname);
- writeString(out, this.fSuperclass);
- writeString(out, this.fImplicitImports);
- writeString(out, this.fServiceHeader);
- writeBuffer(out, this.fUserImports);
- out.writeInt(this.fSourcePosition);
- out.writeInt(this.fRelativeOffset);
- out.writeInt(this.fCursorPosition);
- out.writeBoolean(this.fIsErrorPage);
- out.writeBoolean(this.fCursorInExpression);
- out.writeBoolean(this.fIsInASession);
- writeBuffer(out, this.fUserCode);
- writeBuffer(out, this.fUserELExpressions);
- writeBuffer(out, this.fUserDeclarations);
- writeBuffer(out, this.fCursorOwner);
- out.writeBoolean(this.fInCodeRegion);
- out.writeBoolean(this.fProcessIncludes);
- out.writeInt(this.fOffsetInUserImports);
- out.writeInt(this.fOffsetInUserDeclarations);
- out.writeInt(this.fOffsetInUserCode);
-
- //write included paths
- out.writeInt(this.fIncludedPaths.size());
- Iterator iter = this.fIncludedPaths.iterator();
- while(iter.hasNext()) {
- writeString(out, (String)iter.next());
- }
-
- writeRanges(out, this.fImportRanges);
- writeRanges(out, this.fCodeRanges);
- writeRanges(out, this.fDeclarationRanges);
- writeRanges(out, this.fUseBeanRanges);
- writeRanges(out, this.fUserELRanges);
- writeRanges(out, this.fIndirectRanges);
- writeString(out, this.fELTranslatorID);
- }
-
- /**
- * <p><b>NOTE 1: </b>After reading in an externalized {@link JSPTranslator} the caller must
- * manually call {@link #postReadExternalSetup(IStructuredModel)} to finish setting up
- * the {@link JSPTranslator} for use.</p>
- *
- * <p><b>NOTE 2: </b>If the implementation of this method is changed be sure to update
- * {@link #writeExternal(ObjectOutput)} and {@link #serialVersionUID}</p>
- *
- * @see #writeExternal(ObjectOutput)
- * @see #serialVersionUID
- * @see java.io.Externalizable#readExternal(java.io.ObjectInput)
- */
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
- this.fClassHeader = readString(in);
- this.fClassname = readString(in);
- this.fSuperclass = readString(in);
- this.fImplicitImports = readString(in);
- this.fServiceHeader = readString(in);
- this.fUserImports = new StringBuffer(readString(in));
- this.fSourcePosition = in.readInt();
- this.fRelativeOffset = in.readInt();
- this.fCursorPosition = in.readInt();
- this.fIsErrorPage = in.readBoolean();
- this.fCursorInExpression = in.readBoolean();
- this.fIsInASession = in.readBoolean();
- this.fUserCode = new StringBuffer(readString(in));
- this.fUserELExpressions = new StringBuffer(readString(in));
- this.fUserDeclarations = new StringBuffer(readString(in));
- this.fCursorOwner = new StringBuffer(readString(in));
- this.fInCodeRegion = in.readBoolean();
- this.fProcessIncludes = in.readBoolean();
- this.fOffsetInUserImports = in.readInt();
- this.fOffsetInUserDeclarations = in.readInt();
- this.fOffsetInUserCode = in.readInt();
-
- //read included paths
- int size = in.readInt();
- this.fIncludedPaths = new HashSet(size);
- for(int i = 0; i < size; ++i) {
- this.fIncludedPaths.add(readString(in));
- }
-
- this.fImportRanges = readRanges(in);
- this.fCodeRanges = readRanges(in);
- this.fDeclarationRanges = readRanges(in);
- this.fUseBeanRanges = readRanges(in);
- this.fUserELRanges = readRanges(in);
- this.fIndirectRanges = readRanges(in);
- this.fELTranslatorID = readString(in);
-
- //build result
- this.buildResult(false);
- }
-
- /**
- * <p>This does mandatory setup needed after a JSPTranslator is restored from
- * a persisted file</p>
- *
- * @param jspModel {@link IStructuredModel} representing the JSP file that this
- * is a translator for
- */
- protected void postReadExternalSetup(IStructuredModel jspModel) {
- this.fStructuredDocument = jspModel.getStructuredDocument();
- this.fJspTextBuffer = new StringBuffer(this.fStructuredDocument.get());
- if(jspModel instanceof IDOMModel) {
- this.fStructuredModel = (IDOMModel)jspModel;
- }
- }
-
- /**
- * <p>Writes a string to an {@link ObjectOutput} stream</p>
- *
- * <p><b>NOTE: </b>If the implementation of this method is changed be sure to update
- * {@link #readString(ObjectInput)} and {@link #serialVersionUID}</p>
- *
- * @param out {@link ObjectOutput} stream to write <code>s</code> too
- * @param s {@link String} to write to <code>out</code>
- *
- * @throws IOException IO can throw exceptions
- *
- * @see #readString(ObjectInput)
- */
- private static void writeString(ObjectOutput out, String s) throws IOException {
- if(s != null) {
- out.writeInt(s.length());
- out.writeChars(s);
- } else {
- out.writeInt(0);
- }
- }
-
- /**
- * <p>Reads a {@link String} written by {@link #writeString(ObjectOutput, String)} from
- * a {@link ObjectInput} stream.</p>
- *
- * <p><b>NOTE: </b>If the implementation of this method is changed be sure to update
- * {@link #writeString(ObjectOutput, String)} and {@link #serialVersionUID}</p>
- *
- * @param in {@link ObjectInput} stream to read the {@link String} from
- * @return {@link String} read from <code>in</code>
- *
- * @throws IOException IO Can throw exceptions
- *
- * @see #writeString(ObjectOutput, String)
- */
- private static String readString(ObjectInput in) throws IOException {
- int length = in.readInt();
- char charArray[] = new char[length];
- for(int i=0; i < length;i++){
- charArray[i] = in.readChar();
- }
- return new String(charArray);
- }
-
- /**
- * <p>Writes a {@link StringBuffer} to an {@link ObjectOutput} stream</p>
- *
- * @param out {@link ObjectOutput} stream to write <code>s</code> too
- * @param s {@link String} to write to <code>out</code>
- *
- * @throws IOException IO can throw exceptions
- *
- * @see #readString(ObjectInput)
- */
- private static void writeBuffer(ObjectOutput out, StringBuffer buff) throws IOException {
- if(buff != null && buff.length() > 0) {
- writeString(out, buff.toString());
- } else {
- writeString(out, null);
- }
- }
-
- /**
- * <p>Writes a {@link HashMap} of {@link Position}s to an {@link ObjectOutput} stream</p>
- *
- * <p><b>NOTE: </b>If the implementation of this method is changed be sure to update
- * {@link #readRanges(ObjectInput)} and {@link #serialVersionUID}</p>
- *
- * @param out {@link ObjectOutput} stream to write to
- * @param ranges {@link HashMap} of {@link Position}s to write to <code>out</code>
- *
- * @throws IOException IO can throw exceptions
- *
- * @see #readRanges(ObjectInput)
- */
- private static void writeRanges(ObjectOutput out, HashMap ranges) throws IOException {
- //this is a strange hack because Position is not designed to be used as keys in a Map, see Position doc
- HashMap temp = new HashMap();
- temp.putAll(ranges);
-
- Iterator iter = temp.keySet().iterator();
- out.writeInt(ranges.size());
- while(iter.hasNext()) {
- Position javaPos = (Position)iter.next();
- Position jspPos = (Position)temp.get(javaPos);
- out.writeInt(javaPos.offset);
- out.writeInt(javaPos.length);
- out.writeBoolean(javaPos.isDeleted);
-
- if(jspPos != null) {
- out.writeInt(jspPos.offset);
- out.writeInt(jspPos.length);
- out.writeBoolean(jspPos.isDeleted);
- } else {
- out.writeInt(-1);
- out.writeInt(-1);
- }
- }
- }
-
- /**
- * <p>Reads a {@link HashMap} of {@link Position}s from an {@link ObjectInput} stream that was written by
- * {@link #writeRanges(ObjectOutput, HashMap)}</p>
- *
- * <p><b>NOTE: </b>If the implementation of this method is changed be sure to update
- * {@link #writeRanges(ObjectOutput, HashMap)} and {@link #serialVersionUID}</p>
- *
- * @param in {@link ObjectInput} stream to read the {@link HashMap} of {@link Position}s from
- * @return {@link HashMap} of {@link Position}s read from <code>in</code>
- *
- * @throws IOException IO can throw exceptions
- *
- * @see #writeRanges(ObjectOutput, HashMap)
- */
- private static HashMap readRanges(ObjectInput in) throws IOException {
- int size = in.readInt();
- HashMap ranges = new HashMap(size);
- for(int i = 0; i < size; ++i) {
- Position javaPos = new Position(in.readInt(), in.readInt());
- if(in.readBoolean()) {
- javaPos.delete();
- }
-
- //if the jspPos was null for some reason then -1 was written for length and offset
- Position jspPos = null;
- int jspPosOffset = in.readInt();
- int jspPosLength = in.readInt();
- if(jspPosOffset != -1 && jspPosLength != -1) {
- jspPos = new Position(jspPosOffset, jspPosLength);
- }
-
- //only read a boolean if the jspPos was not null
- if(jspPos != null && in.readBoolean()) {
- jspPos.delete();
- }
-
- ranges.put(javaPos, jspPos);
- }
-
- return ranges;
- }
-
- /**
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object obj) {
- boolean equal = false;
- if(obj instanceof JSPTranslator) {
- JSPTranslator other = (JSPTranslator)obj;
- equal = this.fClassHeader.equals(other.fClassHeader) &&
- this.fClassname.equals(other.fClassname) &&
- this.fSuperclass.equals(other.fSuperclass) &&
- this.fImplicitImports.equals(other.fImplicitImports) &&
- this.fServiceHeader.equals(other.fServiceHeader) &&
- buffersEqual(this.fUserImports, other.fUserImports) &&
- this.fSourcePosition == other.fSourcePosition &&
- this.fRelativeOffset == other.fRelativeOffset &&
- this.fCursorPosition == other.fCursorPosition &&
- this.fIsErrorPage == other.fIsErrorPage &&
- this.fCursorInExpression == other.fCursorInExpression &&
- this.fIsInASession == other.fIsInASession &&
- buffersEqual(this.fUserCode, other.fUserCode) &&
- buffersEqual(this.fUserELExpressions, other.fUserELExpressions) &&
- buffersEqual(this.fUserDeclarations, other.fUserDeclarations) &&
- buffersEqual(this.fCursorOwner, other.fCursorOwner) &&
- this.fInCodeRegion == other.fInCodeRegion &&
- this.fProcessIncludes == other.fProcessIncludes &&
- this.fOffsetInUserImports == other.fOffsetInUserImports &&
- this.fOffsetInUserDeclarations == other.fOffsetInUserDeclarations &&
- this.fOffsetInUserCode == other.fOffsetInUserCode &&
- rangesEqual(this.fImportRanges, other.fImportRanges) &&
- rangesEqual(this.fCodeRanges, other.fCodeRanges) &&
- rangesEqual(this.fDeclarationRanges, other.fDeclarationRanges) &&
- rangesEqual(this.fUseBeanRanges, other.fUseBeanRanges) &&
- rangesEqual(this.fUserELRanges, other.fUserELRanges) &&
- rangesEqual(this.fIndirectRanges, other.fIndirectRanges) &&
- (
- (this.fELTranslatorID != null && other.fELTranslatorID != null) ||
- (this.fELTranslatorID == null && other.fELTranslatorID != null && other.fELTranslatorID.length() == 0) ||
- (this.fELTranslatorID != null && this.fELTranslatorID.length() == 0 && other.fELTranslatorID == null) ||
- (this.fELTranslatorID.equals(other.fELTranslator))
- );
- }
- return equal;
- }
-
- /**
- * <p><code>null</code> is considered equivlent to an empty buffer</p>
- *
- * @param buff1 can be <code>null</code>
- * @param buff2 can be <code>null</code>
- * @return <code>true</code> if the two given buffers are equal, <codee>false</code> otherwise
- */
- private static boolean buffersEqual(StringBuffer buff1, StringBuffer buff2) {
- return (buff1 == null && buff2 == null) ||
- (buff1 != null && buff2!= null && buff1.toString().equals(buff2.toString())) ||
- (buff1 == null && buff2 != null && buff2.length() == 0) ||
- (buff1 != null && buff1.length() == 0 && buff2 == null);
- }
-
- /**
- * @param ranges1
- * @param ranges2
- * @return <code>true</code> if the two maps of ranges contains the same key/value pares,
- * <code>false</code> otherwise
- */
- private static boolean rangesEqual(HashMap ranges1, HashMap ranges2) {
- //this is a strange hack because Position is not designed to be used as keys in a Map, see Position doc
- HashMap temp = new HashMap();
- temp.putAll(ranges1);
- ranges1 = temp;
-
- boolean equal = false;
- if(ranges1 != null && ranges2 != null) {
- equal = true;
- Iterator ranges1Keys = ranges1.keySet().iterator();
- while(ranges1Keys.hasNext() && equal) {
- Position key = (Position)ranges1Keys.next();
- Position ranges1Value = (Position)ranges1.get(key);
- Position ranges2Value = (Position)ranges2.get(key);
- equal = ranges1Value.equals(ranges2Value);
- }
- }
-
- return equal;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslatorPersister.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslatorPersister.java
deleted file mode 100644
index d41723b227..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslatorPersister.java
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InvalidClassException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.UnsupportedEncodingException;
-import java.util.zip.CRC32;
-
-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.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPIndexManager;
-import org.eclipse.jst.jsp.core.internal.modelhandler.ModelHandlerForJSP;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.FileBufferModelManager;
-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;
-
-/**
- * <p>This is a static class used to persist JSP translations and retrieve the persisted
- * translations.</p>
- *
- * <p>It is not actually in charge of finding files to persist, rather it provides API
- * for some other mechanism that tracks JSP files to call into to persist the translations.</p>
- *
- * <p>This class can be deactivated through the <code>persistJSPTranslations</code> system property,
- * a value of <code>true</code> means the persister is activated (which is the default), value of
- * <code>false</code> means the persister is not activated.</p>
- *
- * @see JSPIndexManager
- */
-public class JSPTranslatorPersister{
- /**
- * <code>true</code> if the persister is activated, <code>false</code>
- * otherwise. This is determined by checking the system property
- * <code>persistJSPTranslations</code>, if no value supplied then
- * default is <code>true</code>
- */
- public static final boolean ACTIVATED =
- Boolean.valueOf(System.getProperty("persistJSPTranslations", "true")).booleanValue(); //$NON-NLS-1$ //$NON-NLS-2$
-
- /** the location where {@link JSPTranslator}s are externalized too for persistence purposes */
- private static final IPath PERSIST_LOCATION = JSPCorePlugin.getDefault().getStateLocation().append("translators"); //$NON-NLS-1$
-
- /** used to calculate persisted translator file names */
- private static final CRC32 CHECKSUM_CALC = new CRC32();
-
- /** lock to use while using the checksum */
- private static final Object CHECKSUM_CALC_LOCK = new Object();
-
- /**
- * <p>Private constructor to prevent creating an instance of this class</p>
- */
- private JSPTranslatorPersister() {
- }
-
- /**
- * <p>Given the {@link IStructuredModel} of a JSP file attempts to retrieve the persisted
- * {@link JSPTranslator} for that model.</p>
- * <p><b>NOTE: </b><i>It is possible for there not to be a persisted translator</i></p>
- *
- * @param model {@link IStructuredModel} to get the persisted {@link JSPTranslator} for
- * @return the persisted {@link JSPTranslator} for the given <code>model</code>, or
- * <code>null</code> if none could be found or an existing one could not be read
- */
- public static JSPTranslator getPersistedTranslator(IStructuredModel model) {
- String persistedTranslatorFilePath = getPersistedTranslatorFilePath(model.getBaseLocation());
- File persistedTranslatorFile = new File(persistedTranslatorFilePath);
-
- //attempt to read in the externalized translator
- JSPTranslator translator = null;
- ObjectInputStream in = null;
- try {
- //get the persisted translator file if one exists
- if(persistedTranslatorFile.exists()) {
- long persistedTranslatorFileTimestamp = persistedTranslatorFile.lastModified();
- long jspFileTimestamp = FileBufferModelManager.getInstance().getBuffer(
- model.getStructuredDocument()).getModificationStamp();
-
- /* if the persisted translator timestamp is newer then the jsp file timestamp
- * then the translation has not become stale, otherwise it has so delete
- * it and don't use it */
- if(persistedTranslatorFileTimestamp > jspFileTimestamp) {
- FileInputStream fis = new FileInputStream(persistedTranslatorFile);
- in = new ObjectInputStream(fis);
- translator = (JSPTranslator)in.readObject();
-
- //do post read external setup
- if(translator != null) {
- translator.postReadExternalSetup(model);
- }
- } else {
- persistedTranslatorFile.delete();
- }
- }
- } catch(InvalidClassException e) {
- /* this means that the externalized translator is for an older version
- * of the JSPTranslator, so delete it */
- persistedTranslatorFile.delete();
- }catch (IOException e) {
- Logger.logException("Could not read externalized JSPTranslator at " + persistedTranslatorFilePath, e); //$NON-NLS-1$
- } catch (ClassNotFoundException e) {
- Logger.logException("Class of a serialized JSPTranslator cannot be found", e); //$NON-NLS-1$
- } finally {
- if(in != null) {
- try {
- in.close();
- } catch (IOException e) {
- Logger.logException("Could not close externalized JSPTranslator that was just read", e); //$NON-NLS-1$
- }
- }
- }
-
- return translator;
- }
-
- /**
- * @param resource JSP resource who's translation should be persisted
- */
- public static void persistTranslation(IResource resource) {
- if(ACTIVATED) {
- IPath path = resource.getFullPath();
- String filePath = getPersistedTranslatorFilePath(path.toString());
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
-
- JSPTranslator translator = getJSPTranslator(file);
- if(translator != null) {
- persistTranslator(translator, filePath);
- }
- }
- }
-
- /**
- * @param resource JSP resource who's translation should no longer be persisted
- */
- public static void removePersistedTranslation(IResource resource) {
- if(ACTIVATED) {
- File file = getPersistedFile(resource.getFullPath());
- file.delete();
- }
- }
-
- /**
- * @param resource JSP resource that has moved and thus its persisted translation should be updated
- * @param fromPath Path the JSP resource moved from
- */
- public static void movePersistedTranslation(IResource resource, IPath fromPath) {
- if(ACTIVATED) {
- File from = getPersistedFile(fromPath);
- File to = getPersistedFile(resource.getFullPath());
-
- from.renameTo(to);
- }
- }
-
- /**
- * <p>Given the path to a JSP file determines the path to its persisted {@link JSPTranslator}</p>
- *
- * @param jspFilePath {@link IPath} to JSP file for which the path to its persisted {@link JSPTranslator}
- * should be determined
- *
- * @return OS file path to the persisted {@link JSPTranslator} associated with the JSP file at
- * <code>jspFilePath</code>
- */
- private static String getPersistedTranslatorFilePath(String jspFilePath) {
- String persistedTranslatorFileName = "error.translator"; //$NON-NLS-1$
- synchronized(CHECKSUM_CALC_LOCK){
- try {
- CHECKSUM_CALC.reset();
- CHECKSUM_CALC.update(jspFilePath.getBytes("utf16")); //$NON-NLS-1$
- persistedTranslatorFileName = Long.toString(CHECKSUM_CALC.getValue()) + ".translator"; //$NON-NLS-1$
- } catch (UnsupportedEncodingException e) {
- Logger.logException("Could not get utf16 encoded bytes to create checksum to store persisted file.", e); //$NON-NLS-1$
- }
- }
-
- IPath location = PERSIST_LOCATION;
-
- // ensure the folder exists on disk
- File folder = new File(location.toOSString());
- if (!folder.isDirectory()) {
- try {
- folder.mkdir();
- }
- catch (SecurityException e) {
- }
- }
-
- location = location.addTrailingSeparator();
- location = location.append(persistedTranslatorFileName);
- return location.toOSString();
- }
-
- /**
- * <p>Gets the associated {@link JSPTranslator} for a specific JSP file.</p>
- * <p><b>NOTE: </b><i>This does not get the persisted translator but rather the
- * associated translator in memory</i></p>
- *
- * @param jspFile {@link IFile} to the JSP file that the associated {@link JSPTranslator}
- * is needed for
- * @return {@link JSPTranslator} associated with the given <code>jspFilePath</code>, or
- * <code>null</code> if none can be found.
- */
- private static JSPTranslator getJSPTranslator(IFile jspFile) {
- IStructuredModel model = null;
- JSPTranslator translator = null;
- try {
- model = StructuredModelManager.getModelManager().getModelForRead(jspFile);
- if(model instanceof IDOMModel) {
- IDOMDocument doc = ((IDOMModel)model).getDocument();
- ModelHandlerForJSP.ensureTranslationAdapterFactory(model);
- JSPTranslationAdapter adapter = (JSPTranslationAdapter)doc.getAdapterFor(IJSPTranslation.class);
-
- //don't want to persist a translator that has not already been requested
- if(adapter != null && adapter.hasTranslation()) {
- translator = adapter.getJSPTranslation().getTranslator();
- }
- }
- } catch (IOException e) {
- Logger.logException("Could not get translator for " + jspFile.getName() + //$NON-NLS-1$
- " because could not read model for same.", e); //$NON-NLS-1$
- } catch (CoreException e) {
- Logger.logException("Could not get translator for " + jspFile.getName() + //$NON-NLS-1$
- " because could not read model for same.", e); //$NON-NLS-1$
- } finally {
- if(model != null) {
- model.releaseFromRead();
- }
- }
-
- return translator;
- }
-
- /**
- * <p>Persists a {@link JSPTranslator} to disk for a specific JSP file</p>
- *
- * @param translator {@link JSPTranslator} to persist to disk
- * @param jspFilePath {@link IPath} to the JSP file the given <code>translator</code> is for
- */
- private static void persistTranslator(JSPTranslator translator, String filePath) {
- try {
- FileOutputStream fos = new FileOutputStream(filePath);
- ObjectOutputStream out = new ObjectOutputStream(fos);
- out.writeObject(translator);
- out.close();
- } catch (IOException e) {
- Logger.logException("Was unable to externalize JSPTranslator " + translator + //$NON-NLS-1$
- " to " + filePath, e); //$NON-NLS-1$
- }
- }
-
- /**
- * @param path {@link IPath} to the JSP file that the persisted translator is needed for
- * @return The persisted translator {@link File} for the JSP file at the given path
- * or <code>null</code> if no persisted translator exists for the JSP file at the given path
- */
- private static File getPersistedFile(IPath path) {
- return new File(getPersistedTranslatorFilePath(path.toString()));
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/StackMap.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/StackMap.java
deleted file mode 100644
index 24126871d2..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/StackMap.java
+++ /dev/null
@@ -1,158 +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.java;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.Stack;
-
-/**
- * @author nitin
- *
- */
-class StackMap {
-
- private Map fInternalMap = null;
-
- public StackMap() {
- fInternalMap = new HashMap();
- }
-
- /**
- * Removes all mappings from this StackMap
- */
- public void clear() {
- fInternalMap.clear();
- }
-
- /**
- * Returns the most recently pushed value to which this map maps the
- * specified key. Returns <tt>null</tt> if the map contains no mapping
- * for this key.
- *
- * @param key
- * key whose associated value is to be returned.
- * @return the most recently put value to which this map maps the
- * specified key, or <tt>null</tt> if the map contains no
- * mapping for this key.
- */
- public Object peek(Object key) {
- Stack stack = (Stack) fInternalMap.get(key);
- if (stack != null) {
- Object o = stack.peek();
- if (stack.isEmpty()) {
- fInternalMap.remove(key);
- }
- return o;
- }
- return null;
- }
-
- /**
- * Associates the specified value with the specified key in this map. If
- * the map previously contained a mapping for this key, the old value is
- * pushed onto the top of this key's private stack.
- *
- * @param key
- * key with which the specified value is to be associated.
- * @param value
- * value to be associated with the specified key.
- * @return newest value associated with specified key
- *
- * @throws UnsupportedOperationException
- * if the <tt>put</tt> operation is not supported by this
- * StackMap.
- * @throws ClassCastException
- * if the class of the specified key or value prevents it from
- * being stored in this StackMap.
- * @throws IllegalArgumentException
- * if some aspect of this key or value prevents it from being
- * stored in this StackMap.
- * @throws NullPointerException,
- * as this map does not permit <tt>null</tt> keys or values
- */
- public Object push(Object key, Object value) {
- Stack stack = (Stack) fInternalMap.get(key);
- if (stack == null) {
- stack = new Stack();
- fInternalMap.put(key, stack);
- }
- Object o = stack.push(value);
- return o;
- }
-
- /**
- * Removes the most-recent mapping for this key from this StackMap if it
- * is present.
- *
- * <p>
- * Returns the value to which the map previously associated the key, or
- * <tt>null</tt> if the map contained no mapping for this key. The map
- * will not contain a mapping for the specified key once the call returns.
- *
- * @param key
- * key whose stack is to be popped
- * @return most-recently pushed value associated with specified key, or
- * <tt>null</tt> if there was no mapping for key.
- *
- * @throws ClassCastException
- * if the key is of an inappropriate type for this map.
- * @throws NullPointerException
- * if the key is <tt>null</tt> as this class does not permit
- * <tt>null</tt> keys
- */
- public Object pop(Object key) {
- Stack stack = (Stack) fInternalMap.get(key);
- if (stack != null) {
- Object o = stack.pop();
- if (stack.isEmpty()) {
- fInternalMap.remove(key);
- }
- return o;
- }
- return null;
- }
-
- /**
- * Returns the number of entries in this StackMap, the sum of the sizes of
- * every remembered stack.
- *
- * @return the number of entries in this map.
- */
- int size() {
- int size = 0;
- Iterator i = fInternalMap.values().iterator();
- while (i.hasNext()) {
- Collection c = (Collection) i.next();
- size += c.size();
- }
- return size;
- }
-
- /**
- * Returns all of the values of this StackMap.
- *
- * @return the values of every Stack within this StackMap.
- */
- Collection values() {
- Collection values = new LinkedList();
- Iterator i = fInternalMap.values().iterator();
- while (i.hasNext()) {
- Collection c = (Collection) i.next();
- values.addAll(c);
- }
- return values;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslationAdapter.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslationAdapter.java
deleted file mode 100644
index 0125fcda50..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslationAdapter.java
+++ /dev/null
@@ -1,24 +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.java;
-
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-class TagTranslationAdapter extends JSPTranslationAdapter {
- TagTranslationAdapter(IDOMModel xmlModel) {
- super(xmlModel);
- }
-
- JSPTranslator createTranslator() {
- return new TagTranslator();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslationAdapterFactory.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslationAdapterFactory.java
deleted file mode 100644
index 4807976931..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslationAdapterFactory.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2010 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;
-
-public class TagTranslationAdapterFactory extends AbstractAdapterFactory {
-
- // for debugging
- static final boolean DEBUG = Boolean.valueOf(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jsptranslation")).booleanValue(); //$NON-NLS-1$;
-
- private TagTranslationAdapter fAdapter = null;
-
- public TagTranslationAdapterFactory() {
- super(IJSPTranslation.class, true);
- }
-
- public INodeAdapterFactory copy() {
- return new TagTranslationAdapterFactory();
- }
-
- protected INodeAdapter createAdapter(INodeNotifier target) {
- if (target instanceof IDOMNode && fAdapter == null) {
- fAdapter = new TagTranslationAdapter(((IDOMNode) target).getModel());
- if (DEBUG) {
- System.out.println("(+) TagTranslationAdapterFactory [" + this + "] created adapter: " + fAdapter); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- return fAdapter;
- }
-
- public void release() {
- if (fAdapter != null) {
- if (DEBUG) {
- System.out.println("(-) TagTranslationAdapterFactory [" + this + "] releasing adapter: " + fAdapter); //$NON-NLS-1$ //$NON-NLS-2$
- }
- fAdapter.release();
- }
- super.release();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslator.java
deleted file mode 100644
index 2d7c17d021..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/TagTranslator.java
+++ /dev/null
@@ -1,38 +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.java;
-
-class TagTranslator extends JSPTranslator {
-
- public TagTranslator() {
- super();
- }
-
- protected void init() {
- fClassHeader = "public class _TagHandler extends "; //$NON-NLS-1$
- fClassname = "_TagHandler"; //$NON-NLS-1$
-
- 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$
-
- fServiceHeader = "public void doTag() throws JspException, java.io.IOException, IllegalStateException, SkipPageException {" + //$NON-NLS-1$
- "javax.servlet.http.HttpServletResponse response = null;" + ENDL + //$NON-NLS-1$
- "javax.servlet.http.HttpServletRequest request = null;" + ENDL + //$NON-NLS-1$
- "JspContext jspContext = null;" + ENDL + //$NON-NLS-1$
- "javax.servlet.ServletContext application = null;" + ENDL + //$NON-NLS-1$
- "javax.servlet.jsp.JspWriter out = null;" + ENDL + //$NON-NLS-1$
- "javax.servlet.ServletConfig config = null;" + ENDL; //$NON-NLS-1$
-
- fSuperclass = "javax.servlet.jsp.tagext.SimpleTagSupport"; //$NON-NLS-1$
- }
-}
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 d281590e08..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/XMLJSPRegionHelper.java
+++ /dev/null
@@ -1,550 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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.Iterator;
-import java.util.List;
-
-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.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
-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.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.internal.util.FileContentCache;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IModelHandler;
-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.modelhandler.ModelHandlerRegistry;
-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.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;
- /**
- * Determines whether translated source appends are indicated as
- * "indirect", affecting how offsets are mapped.
- */
- boolean fAppendAsIndirectSource;
-
- public XMLJSPRegionHelper(JSPTranslator translator, boolean appendAsIndirectSource) {
- getLocalParser().addStructuredDocumentRegionHandler(this);
- this.fTranslator = translator;
- fAppendAsIndirectSource = appendAsIndirectSource;
- }
-
- 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;
- fTextToParse = textToParse;
- }
-
- public void forceParse() {
- String contents = fTextToParse;
-
- IStructuredDocument document = (IStructuredDocument) new JSPDocumentLoader().createNewStructuredDocument();
- if(contents != null && document != null) {
- // from outer class
- List blockMarkers = this.fTranslator.getBlockMarkers();
- // 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);
-
- document.set(contents);
- IStructuredDocumentRegion cursor = document.getFirstStructuredDocumentRegion();
- while(cursor != null) {
- nodeParsed(cursor);
- cursor = cursor.getNext();
- }
- }
- }
-
- /*
- * parse an entire file
- *
- * @param filename @return
- */
- public boolean parse(String filePathString) {
- boolean parsed = false;
- IStructuredDocument document = null;
- String contents = null;
-
- IPath filePath = new Path(filePathString);
- IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
- if (f == null || !f.isAccessible()) {
- f = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(filePath);
- }
- if (f != null && f.isAccessible()) {
- /*
- * using a real document allows us to pull out text in the
- * translator for dealing with TEI variables
- */
- try {
- IModelHandler handler = ModelHandlerRegistry.getInstance().getHandlerFor(f, false);
- if (handler == null)
- handler = ModelHandlerRegistry.getInstance().getHandlerForContentTypeId(ContentTypeIdForJSP.ContentTypeID_JSPFRAGMENT);
- document = (IStructuredDocument) handler.getDocumentLoader().createNewStructuredDocument();
- contents = FileContentCache.getInstance().getContents(f.getFullPath());
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- if (contents != null && document != null) {
- // from outer class
- List blockMarkers = this.fTranslator.getBlockMarkers();
- // 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);
- // forces parse
- document.set(contents);
- IStructuredDocumentRegion cursor = document.getFirstStructuredDocumentRegion();
- while (cursor != null) {
- nodeParsed(cursor);
- cursor = cursor.getNext();
- }
- parsed = true;
- }
- return parsed;
- }
-
-
- /*
- * 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 {
- if (isJSPEndRegion(sdRegion)) {
- String nameStr = getRegionName(sdRegion);
- if (isPossibleCustomTag(nameStr)) {
- // this custom tag may define variables
- this.fTranslator.addTaglibVariables(nameStr, sdRegion);
- }
- fTagname = null;
- }
- else if (isJSPStartRegion(sdRegion)) {
- int illegalContent = hasIllegalContent(sdRegion);
- if (illegalContent >= 0)
- decodeRemainingRegions(sdRegion, illegalContent);
- 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) {
- 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;
- /*
- * We may have been asked to decode a script block with an XML
- * comment in it (a common provision for browsers not
- * supporting client scripting). While
- * scriptlets/expressions/declarations will be identified as
- * part of the normal parsing process, the temporary document
- * used here will be parsed differently, respecting the
- * comment since it's not in a tag block region any more, and
- * the custom tags in the comment will not be found. Run those
- * comment text pieces through the translator on their own.
- */
- ITextRegion first = sdRegion.getFirstRegion();
- ITextRegion last = sdRegion.getLastRegion();
-
- /* Decode everything between the comment delimiters at once */
- if (DOMRegionContext.XML_COMMENT_OPEN.equals(first.getType()) && DOMRegionContext.XML_COMMENT_CLOSE.equals(last.getType())) {
- fTranslator.decodeScriptBlock(sdRegion.getFullText().substring(first.getEnd(), last.getStart()), 0);
- }
- }
- // 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 decodeRemainingRegions(IStructuredDocumentRegion sdRegion, int start) {
- ITextRegionList regionList = sdRegion.getRegions();
- if(regionList != null) {
- ITextRegion region = regionList.get(start);
- String text = sdRegion.getFullText();
- if (text != null && region != null && region.getStart() <= text.length())
- fTranslator.decodeScriptBlock(text.substring(region.getStart(), text.length()), 0);
- }
- }
-
- private int hasIllegalContent(IStructuredDocumentRegion sdRegion) {
- ITextRegionList list = sdRegion.getRegions();
- for (int i = 0; i < list.size(); i++) {
- ITextRegion region = list.get(i);
- String type = region.getType();
- if (type == DOMRegionContext.UNDEFINED)
- return i;
- if (type == DOMRegionContext.XML_END_TAG_OPEN || type == DOMRegionContext.XML_EMPTY_TAG_CLOSE || type == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE)
- return -1;
- }
- return -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(), fAppendAsIndirectSource);
- fPossibleOwner = JSPTranslator.DECLARATION;
- }
-
- protected void processExpression(IStructuredDocumentRegion sdRegion) {
- prepareText(sdRegion);
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- this.fTranslator.translateExpressionString(fStrippedText, currentNode, currentNode.getStartOffset(), currentNode.getLength(), fAppendAsIndirectSource);
- fPossibleOwner = JSPTranslator.EXPRESSION;
- }
-
- protected void processScriptlet(IStructuredDocumentRegion sdRegion) {
- prepareText(sdRegion);
- IStructuredDocumentRegion currentNode = fTranslator.getCurrentNode();
- this.fTranslator.translateScriptletString(fStrippedText, currentNode, currentNode.getStartOffset(), currentNode.getLength(), fAppendAsIndirectSource);
- 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)) {
- String prefix = null;
- if (beanType.length() != 0) {
- /* a type was specified */
- prefix = beanType + " " + beanId + " = "; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- /* no type was specified, use the concrete class value */
- prefix = beanClass + " " + beanId + " = "; //$NON-NLS-1$ //$NON-NLS-2$
- }
- /*
- * Define as null by default. If a concrete class was
- * specified, supply a default constructor invocation instead.
- */
- String suffix = "null;\n"; //$NON-NLS-1$
- // 186771 - JSP Validator problem with included useBean
- if (beanClass.length() > 0) {
- 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(), fAppendAsIndirectSource);
- 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 (isTaglibDirective(fTagname)) {
- // also add the ones created here to the parent document
- String prefix = getAttributeValue("prefix", sdRegion); //$NON-NLS-1$
- TLDCMDocumentManager documentManager = this.fTranslator.getTLDCMDocumentManager();
- if (documentManager != null) {
- List docs = documentManager.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)) {
- this.fTranslator.translatePageDirectiveAttributes(sdRegion.getRegions().iterator(), sdRegion);
- }
- }
-
- /*
- * 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
- */
- protected boolean isJSPStartRegion(IStructuredDocumentRegion sdRegion) {
- return (sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_TAG_OPEN || sdRegion.getFirstRegion().getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN);
- }
-
- private boolean isJSPEndRegion(IStructuredDocumentRegion sdRegion) {
- return (sdRegion.getFirstRegion().getType() == DOMRegionContext.XML_END_TAG_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) {
-// int colonIndex = tagName.indexOf(":");
-// if (colonIndex > 0) {
-// String prefix = tagName.substring(0, colonIndex);
-// if (prefix.equals("jsp")) { //$NON-NLS-1$
-// return false;
-// }
-// if (prefix.length() > 0) {
-// TagMarker[] prefixes = (TagMarker[]) fLocalParser.getNestablePrefixes().toArray(new TagMarker[0]);
-// for (int i = 0; i < prefixes.length; i++) {
-// if (prefix.equals(prefixes[i].getTagName())) {
-// return true;
-// }
-// }
-// }
-// }
-// return false;
- return tagName.indexOf(':') > -1 && !tagName.startsWith(JSPTranslator.JSP_PREFIX);
- }
-
- 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 filePath - the path to the file
- * @return the contents, null if the file could not be found
- */
- protected String getContents(String filePath) {
- IPath path = new Path(filePath);
- return FileContentCache.getInstance().getContents(path.makeAbsolute());
- }
-} \ No newline at end of file
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 2fe1e507ff..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 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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 API and 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 99a7bf985d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGenerator.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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.List;
-import java.util.Map;
-
-import org.eclipse.jst.jsp.core.jspel.ELProblem;
-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 root
- * @param currentNode
- * @param result
- * @param codeMap
- * @param document
- * @param jspReferenceRegion
- * @param contentStart
- * @param contentLength
- * @return a {@link List} of {@link ELProblem}s reported by the {@link ELGeneratorVisitor} this {@link ELGenerator} uses
- */
- public List 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);
- visitor.startFunctionDefinition(root.getFirstToken().beginColumn - 1);
- root.jjtAccept(visitor, null);
- visitor.endFunctionDefinition(root.getLastToken().endColumn - 1);
-
- return visitor.getELProblems();
- }
-}
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 58be0392b0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ELGeneratorVisitor.java
+++ /dev/null
@@ -1,737 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2011 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
- *
- * Bug 154474 EL: 'and', 'or', ... operator
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=154474
- * Bernhard Huemer <bernhard.huemer@gmail.com>
- *
- *******************************************************************************/
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-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.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
-import org.eclipse.jst.jsp.core.jspel.ELProblem;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.sse.core.internal.FileBufferModelManager;
-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;
-import org.eclipse.wst.sse.core.internal.validate.ValidationMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-public class ELGeneratorVisitor implements JSPELParserVisitor {
-
- private static final String PREFERENCE_NODE_QUALIFIER = JSPCorePlugin.getDefault().getBundle().getSymbolicName();
- 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, javax.servlet.jsp.JspException {" + 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 fExpressionHeader2_param = "()" + ENDL + //$NON-NLS-1$
- "\t\tthrows java.io.IOException, javax.servlet.ServletException, javax.servlet.jsp.JspException {" + ENDL + //$NON-NLS-1$
- "javax.servlet.jsp.PageContext pageContext = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map<String, String> param = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map<String, String[]> paramValues = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map<String, String> header = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map<String, String[]> headerValues = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map<String, javax.servlet.http.Cookie> cookie = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map<String, String> initParam = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map<String, Object> pageScope = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map<String, Object> requestScope = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map<String, Object> sessionScope = null;" + ENDL + //$NON-NLS-1$
- "java.util.Map<String, Object> 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 String fHttpServletRequestBooleanMethodNames[] = {"requestedSessionIdFromCookie", "requestedSessionIdFromUrl", "requestedSessionIdFromURL", "requestedSessionIdValid", "userInRole", "secure"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
-
- private static final HashMap fJSPImplicitObjectMap = new HashMap(fJspImplicitObjects.length);
- private static final Set fHttpServletRequestBooleanMethods = new HashSet(fHttpServletRequestBooleanMethodNames.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));
- }
-
- for (int i = 0; i < fHttpServletRequestBooleanMethodNames.length; i++) {
- fHttpServletRequestBooleanMethods.add(fHttpServletRequestBooleanMethodNames[i]);
- }
- }
- private static final byte[] HTTP_REQUEST = new byte[0];
-
- 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;
- // start of the generated function definition, if any:
- private int fGeneratedFunctionStart;
-
- // 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;
-
- private boolean fUseParameterizedTypes;
-
- private List fELProblems;
- private IScopeContext[] fScopeContexts = null;
-
- /**
- * 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$
- fOperatorMap.put("and", "&&"); //$NON-NLS-1$ //$NON-NLS-2$
- fOperatorMap.put("or", "||"); //$NON-NLS-1$ //$NON-NLS-2$
- fOperatorMap.put("not", "!"); //$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;
- fGeneratedFunctionStart = -1; //set when generating function definition
- fUseParameterizedTypes = compilerSupportsParameterizedTypes();
- fELProblems = new ArrayList();
- fScopeContexts = getScopeContexts();
- }
-
- /**
- * 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)) {
- String javaFuncName = getFunctionNameFromSignature(function.getSignature());
- if (javaFuncName == null)
- javaFuncName = functionName;
- return function.getClassName() + "." + javaFuncName; //$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) {
- return node.childrenAccept(this, data);
- }
-
- public void startFunctionDefinition(int start) {
- fGeneratedFunctionStart = fResult.length();
- append(fExpressionHeader1, start, start);
- append(Integer.toString(getMethodCounter()), start, start);
- if (fUseParameterizedTypes)
- append(fExpressionHeader2_param, start, start);
- else
- append(fExpressionHeader2, start, start);
- }
-
- public void endFunctionDefinition(int end) {
- if (fGeneratedFunctionStart < 0) {
- throw new IllegalStateException("Cannot end function definition because none has been started."); //$NON-NLS-1$
- }
- append(fFooter, end, end);
-
- // something is preventing good code generation so empty out the result
- // and the map.
- if (!fCanGenerate) {
- fResult.delete(fGeneratedFunctionStart, fResult.length());
- fOffsetInUserCode = fResult.length();
- // remove all fCodeMap entries for the removed code:
- for (Iterator it = fCodeMap.entrySet().iterator(); it.hasNext();) {
- Map.Entry entry = (Entry) it.next();
- if (entry.getKey() instanceof Position) {
- Position pos = (Position) entry.getKey();
- if (pos.getOffset() >= fGeneratedFunctionStart) {
- it.remove();
- }
- }
- }
- }
- fGeneratedFunctionStart = -1;
- }
-
-
- private boolean compilerSupportsParameterizedTypes() {
- if (fDocument != null) {
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IPath location = TaglibController.getLocation(fDocument);
- if (location != null && location.segmentCount() > 0) {
- IJavaProject project = JavaCore.create(root.getProject(location.segment(0)));
- String compliance = project.getOption(JavaCore.COMPILER_SOURCE, true);
- try {
- return Float.parseFloat(compliance) >= 1.5;
- }
- catch (NumberFormatException e) {
- return false;
- }
- }
- }
- return false;
- }
-
- /**
- * 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);
- //content assist can cause a null pointer here without the extra null check
- if(prefix.firstToken.image.equals("pageContext") && suffix.getPropertyNameToken() != null && suffix.getPropertyNameToken().image.equals("request")) {
- append("((HttpServletRequest)");
- data = HTTP_REQUEST;
- }
- }
- }
- 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 place 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)
- String prefix = "get"; //$NON-NLS-1$
- append(node.firstToken);
- if (data == HTTP_REQUEST && !"request".equals(suffix.image)) { //$NON-NLS-1$
- if (fHttpServletRequestBooleanMethods.contains(suffix.image)) {
- prefix = "is"; //$NON-NLS-1$
- }
- }
- append(prefix + ucaseName + "()", suffix); //$NON-NLS-1$
-
- 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 if(node.getLastToken().image.equals(".") && node.getLastToken().next.image.equals("")) { //$NON-NLS-1$ //$NON-NLS-2$
- //this allows for content assist in the case of something along the lines of "pageContext." and then ctl-space
- append(node.firstToken);
- append("get()", node.getLastToken().beginColumn, node.getLastToken().beginColumn); //$NON-NLS-1$
- } else {
- append(node.firstToken);
- }
- return null;
- }
-
-
- /**
- * Function invocation
- */
- public Object visit(ASTFunctionInvocation node, Object data) {
- String functionTranslation = genFunction(node.getFullFunctionName());
- if(null != functionTranslation) {
-
- //find the token representing the function name
- Token jspFuncNameToken = getJSPFuncNameToken(node);
-
- /* if there is a dot in the function name then separate out the class path
- * from the function name and append.
- * else just append
- * in both cases use the jsp function name token as the mapped token
- */
- int indexOfDot = functionTranslation.lastIndexOf('.');
- if(indexOfDot != -1) {
- String funcClass = functionTranslation.substring(0,indexOfDot+1);
- String funcName = functionTranslation.substring(indexOfDot+1);
- append(funcClass, jspFuncNameToken);
- append(funcName, jspFuncNameToken);
- } else {
- append(functionTranslation, jspFuncNameToken);
- }
-
- //append any parameters
- append("(");
- if(node.children != null) {
- 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$
- }
- else {
- final int sev = getProblemSeverity(JSPCorePreferenceNames.VALIDATION_EL_FUNCTION_UNDEFINED);
- if (sev != ValidationMessage.IGNORE) {
- //column offsets are 1 based not 0 based, thus subtract one
- final int problemOffset = fContentStart + node.getFirstToken().beginColumn - 1;
- final int problemLength = node.getLastToken().endColumn - 1;
-
- //could not find function translation so report error
- fELProblems.add(new ELProblem(sev, new Position(problemOffset, problemLength), NLS.bind(JSPCoreMessages.JSPELTranslator_0, node.getFullFunctionName())));
- }
-
- //error message to be injected into translation purely for debugging purposes
- String errorMsg = "\"Could not find function translation for: " + node.getFullFunctionName() + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- append(errorMsg);
- }
- return null;
- }
-
- /**
- * @return the {@link ELProblem}s found by this visitor
- */
- public List getELProblems() {
- return fELProblems;
- }
-
- /**
- * Literal
- */
- public Object visit(ASTLiteral node, Object data) {
- if (isSingleQuotedStringLiteral(node)) {
- //replace the single quotes with double quotes quotes
- //so java compiler will be happy
- //(see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=104943)
- String image = node.firstToken.image;
- image = "\"" + image.substring(1, image.length()-1) + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- node.firstToken.image = image;
- }
-
- append(node.firstToken);
- return null;
- }
-
- /**
- * Indicates whether the given ASTLiteral is a single quoted string literal,
- * As opposed to a double quoted ASTLiteral
- *
- * @param node the ASTLiteral to check to see if it is single quoted
- *
- * @return true, if the given token is a single quoted string literal,
- * false otherwise
- */
- private static boolean isSingleQuotedStringLiteral(ASTLiteral node) {
- String content = node.firstToken.image;
- return content.length() > 1 && content.startsWith("'") && content.endsWith("'"); //$NON-NLS-1$ // $NON-NLS-2$
- }
-
- /**
- * <p>Given a method signature parse out the method name and return it.
- * The method name in the signature is found by finding a word with
- * whitespace before it and a '<code>(</code>' after it.</p>
- *
- * @param methodSignature the signature of the method to get the method name out of.
- * @return the method name from the given signature, or <code>null</code> if it
- * can not be found.
- */
- private static String getFunctionNameFromSignature (String methodSignature) {
- int length = methodSignature.length();
- char c = 0;
- int identifierStart = -1;
- int whitespaceStart = -1;
- // keep track of the index of the last identifier before the (
- for (int i = 0; i < length; i++) {
- c = methodSignature.charAt(i);
- if (Character.isJavaIdentifierPart(c) && whitespaceStart >= identifierStart)
- identifierStart = i;
- else if (Character.isWhitespace(c))
- whitespaceStart = i;
- else if (c == '(') {
- if (identifierStart >= 0) {
- return methodSignature.substring(identifierStart, i).trim();
- }
- }
- }
- return null;
- }
-
- /**
- * Returns the {@link Token} the represents the function name in
- * the {@link ASTFunctionInvocation}. This is designated as the
- * first token after the {@link Token} whose image is ":".
- * If such a token can not be found then the first token of the
- * {@link ASTFunctionInvocation} is returned.
- *
- * @param funcInvo the {@link ASTFunctionInvocation} to find the function name {@link Token} in
- * @return the {@link Token} in the given {@link ASTFunctionInvocation} that represents the
- * function name, or if that can't be found the first {@link Token} in the {@link ASTFunctionInvocation}.
- */
- private Token getJSPFuncNameToken(ASTFunctionInvocation funcInvo) {
- Token funcNameToken = funcInvo.getFirstToken();
-
- Token temp = funcInvo.getFirstToken();
- do {
- if(temp.image.equals(":")) {
- funcNameToken = temp.next;
- }
- } while(temp.next != null && funcNameToken == null);
-
-
- return funcNameToken;
- }
-
- /**
- * @param key preference key used to get the severity for a problem
- * @param contexts preference service contexts
- * @return The severity of the problem represented by the given preference key
- */
- private int getProblemSeverity(String key) {
- return Platform.getPreferencesService().getInt(PREFERENCE_NODE_QUALIFIER, key, IMessage.NORMAL_SEVERITY, fScopeContexts);
- }
-
- private IScopeContext[] getScopeContexts() {
- IScopeContext[] scopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};
- final IFile file = getFile();
- if (file != null && file.exists()) {
- final IProject project = file.getProject();
- if (project.exists()) {
- final ProjectScope projectScope = new ProjectScope(project);
- if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
- scopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
- }
- }
- }
- return scopes;
- }
-
- private IFile getFile() {
- IFile f = null;
- if (fDocument != null) {
- final ITextFileBuffer buffer = FileBufferModelManager.getInstance().getBuffer(fDocument);
- if (buffer != null) {
- final IPath path = buffer.getLocation();
- if (path.segmentCount() > 1) {
- f = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- if (f != null && f.isAccessible()) {
- return f;
- }
- }
- }
- 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 951a84b1ac..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JJTJSPELParserState.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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
- * IBM Corporation - Bug 318281 - EL validation error for quote escaping
- *
- *******************************************************************************/
-/* Generated By:JavaCC: Do not edit this line. JJTJSPELParserState.java Version 4.2 */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-public class JJTJSPELParserState {
- private java.util.List nodes;
- private java.util.List marks;
-
- private int sp; // number of nodes on stack
- private int mk; // current mark
- private boolean node_created;
-
- public JJTJSPELParserState() {
- nodes = new java.util.ArrayList();
- marks = new java.util.ArrayList();
- 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. */
- public boolean nodeCreated() {
- return node_created;
- }
-
- /* Call this to reinitialize the node stack. It is called
- automatically by the parser's ReInit() method. */
- public void reset() {
- nodes.clear();
- marks.clear();
- sp = 0;
- mk = 0;
- }
-
- /* Returns the root node of the AST. It only makes sense to call
- this after a successful parse. */
- public Node rootNode() {
- return (Node)nodes.get(0);
- }
-
- /* Pushes a node on to the stack. */
- public void pushNode(Node n) {
- nodes.add(n);
- ++sp;
- }
-
- /* Returns the node on the top of the stack, and remove it from the
- stack. */
- public Node popNode() {
- if (--sp < mk) {
- mk = ((Integer)marks.remove(marks.size()-1)).intValue();
- }
- return (Node)nodes.remove(nodes.size()-1);
- }
-
- /* Returns the node currently on the top of the stack. */
- public Node peekNode() {
- return (Node)nodes.get(nodes.size()-1);
- }
-
- /* Returns the number of children on the stack in the current node
- scope. */
- public int nodeArity() {
- return sp - mk;
- }
-
-
- public void clearNodeScope(Node n) {
- while (sp > mk) {
- popNode();
- }
- mk = ((Integer)marks.remove(marks.size()-1)).intValue();
- }
-
-
- public void openNodeScope(Node n) {
- marks.add(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. */
- public void closeNodeScope(Node n, int num) {
- mk = ((Integer)marks.remove(marks.size()-1)).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 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. */
- public void closeNodeScope(Node n, boolean condition) {
- if (condition) {
- int a = nodeArity();
- mk = ((Integer)marks.remove(marks.size()-1)).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.remove(marks.size()-1)).intValue();
- node_created = false;
- }
- }
-}
-/* JavaCC - OriginalChecksum=cf01a3e21044e1fa20cdfdc7a552e885 (do not edit this line) */
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 6a087f8483..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jj
+++ /dev/null
@@ -1,676 +0,0 @@
-/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. JSPEL.jj */
-/*@egen*//*******************************************************************************
- * Copyright (c) 2005, 2010 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
- * IBM Corporation - Bug 318281 - EL validation error for quote escaping
- *
- *******************************************************************************/
-/* 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;
-}
-
-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()) 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(4) 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 53f7692069..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPEL.jjt
+++ /dev/null
@@ -1,282 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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
- * IBM Corporation - Bug 318281 - EL validation error for quote escaping
- *
- *******************************************************************************/
-/* 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()) 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(4) 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 f06ac5a2cc..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParser.java
+++ /dev/null
@@ -1,1496 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2011 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
- * IBM Corporation - Bug 318281 - EL validation error for quote escaping
- * IBM Corporation - Bug 351996 - JSP validator shows false errors for EL conditional operator
- *
- *******************************************************************************/
-/* 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);
- 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:
- Expression();
- break;
- default:
- jj_la1[16] = jj_gen;
- }
- jj_consume_token(RPAREN);
- break;
- default:
- jj_la1[17] = jj_gen;
- if (jj_2_2(4)) {
- FunctionInvocation();
- } else {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case IDENTIFIER:
- jj_consume_token(IDENTIFIER);
- break;
- default:
- jj_la1[18] = 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[19] = 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[20] = 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 + ":");
- name = jj_consume_token(IDENTIFIER);
- if(null != prefix && null != name)
- jjtn000.setFullFunctionName(prefix.image + ":" + (null == name ? "" : name.image));
- else if(null != name)
- jjtn000.setFullFunctionName(name.image);
- jj_consume_token(LPAREN);
- 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:
- Expression();
- break;
- default:
- jj_la1[21] = jj_gen;
- }
- label_8:
- while (true) {
- switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
- case COMMA:
- break;
- default:
- jj_la1[22] = jj_gen;
- break label_8;
- }
- jj_consume_token(COMMA);
- Expression();
- }
- try {
- jj_consume_token(RPAREN);
- } catch (Exception e) {
-
- }
- } 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_11() {
- if (jj_3R_12()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_13()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- final private boolean jj_3R_33() {
- if (jj_3R_36()) return true;
- return false;
- }
-
- final private boolean jj_3R_40() {
- if (jj_3R_11()) return true;
- return false;
- }
-
- final private boolean jj_3R_39() {
- if (jj_3R_9()) return true;
- return false;
- }
-
- final private boolean jj_3R_18() {
- if (jj_3R_20()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_21()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- final private boolean jj_3R_10() {
- if (jj_scan_token(IDENTIFIER)) return true;
- if (jj_scan_token(COLON)) return true;
- if (jj_scan_token(IDENTIFIER)) return true;
- if (jj_scan_token(LPAREN)) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_37()) jj_scanpos = xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_38()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(RPAREN)) return true;
- return false;
- }
-
- final private boolean jj_3R_36() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_39()) {
- jj_scanpos = xsp;
- if (jj_3R_40()) return true;
- }
- return false;
- }
-
- final private boolean jj_3R_35() {
- if (jj_scan_token(LBRACKET)) return true;
- if (jj_3R_36()) return true;
- if (jj_scan_token(RBRACKET)) return true;
- return false;
- }
-
- final private boolean jj_3R_19() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(16)) {
- jj_scanpos = xsp;
- if (jj_scan_token(17)) {
- jj_scanpos = xsp;
- if (jj_scan_token(14)) {
- jj_scanpos = xsp;
- if (jj_scan_token(15)) {
- jj_scanpos = xsp;
- if (jj_scan_token(22)) {
- jj_scanpos = xsp;
- if (jj_scan_token(23)) {
- jj_scanpos = xsp;
- if (jj_scan_token(20)) {
- jj_scanpos = xsp;
- if (jj_scan_token(21)) return true;
- }
- }
- }
- }
- }
- }
- }
- if (jj_3R_18()) return true;
- return false;
- }
-
- final private boolean jj_3R_28() {
- if (jj_3R_31()) return true;
- return false;
- }
-
- final private boolean jj_3R_34() {
- if (jj_scan_token(DOT)) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(47)) jj_scanpos = xsp;
- return false;
- }
-
- final private boolean jj_3R_31() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_34()) {
- jj_scanpos = xsp;
- if (jj_3R_35()) return true;
- }
- return false;
- }
-
- final private boolean jj_3R_30() {
- if (jj_scan_token(LPAREN)) return true;
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_33()) jj_scanpos = xsp;
- if (jj_scan_token(RPAREN)) return true;
- return false;
- }
-
- final private boolean jj_3R_38() {
- if (jj_scan_token(COMMA)) return true;
- if (jj_3R_36()) return true;
- return false;
- }
-
- final private boolean jj_3R_15() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(41)) {
- jj_scanpos = xsp;
- if (jj_scan_token(42)) return true;
- }
- if (jj_3R_14()) return true;
- return false;
- }
-
- final private boolean jj_3R_16() {
- if (jj_3R_18()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_19()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- final private boolean jj_3_2() {
- if (jj_3R_10()) return true;
- return false;
- }
-
- final private boolean jj_3R_29() {
- if (jj_3R_32()) return true;
- return false;
- }
-
- final private boolean jj_3R_27() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_29()) {
- jj_scanpos = xsp;
- if (jj_3R_30()) {
- jj_scanpos = xsp;
- if (jj_3_2()) {
- jj_scanpos = xsp;
- if (jj_scan_token(47)) return true;
- }
- }
- }
- return false;
- }
-
- final private boolean jj_3R_26() {
- if (jj_3R_27()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_28()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- final private boolean jj_3R_17() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(18)) {
- jj_scanpos = xsp;
- if (jj_scan_token(19)) {
- jj_scanpos = xsp;
- if (jj_scan_token(24)) {
- jj_scanpos = xsp;
- if (jj_scan_token(25)) return true;
- }
- }
- }
- if (jj_3R_16()) return true;
- return false;
- }
-
- final private boolean jj_3R_25() {
- if (jj_3R_26()) return true;
- return false;
- }
-
- final private boolean jj_3R_14() {
- if (jj_3R_16()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_17()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- final private boolean jj_3R_13() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(43)) {
- jj_scanpos = xsp;
- if (jj_scan_token(44)) return true;
- }
- if (jj_3R_12()) return true;
- return false;
- }
-
- final private boolean jj_3R_37() {
- if (jj_3R_36()) return true;
- return false;
- }
-
- final private boolean jj_3R_24() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(39)) {
- jj_scanpos = xsp;
- if (jj_scan_token(40)) {
- jj_scanpos = xsp;
- if (jj_scan_token(33)) {
- jj_scanpos = xsp;
- if (jj_scan_token(45)) return true;
- }
- }
- }
- if (jj_3R_22()) return true;
- return false;
- }
-
- final private boolean jj_3R_21() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(32)) {
- jj_scanpos = xsp;
- if (jj_scan_token(33)) return true;
- }
- if (jj_3R_20()) return true;
- return false;
- }
-
- final private boolean jj_3R_22() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_3R_24()) {
- jj_scanpos = xsp;
- if (jj_3R_25()) return true;
- }
- return false;
- }
-
- final private boolean jj_3R_23() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(34)) {
- jj_scanpos = xsp;
- if (jj_scan_token(35)) {
- jj_scanpos = xsp;
- if (jj_scan_token(36)) {
- jj_scanpos = xsp;
- if (jj_scan_token(37)) {
- jj_scanpos = xsp;
- if (jj_scan_token(38)) return true;
- }
- }
- }
- }
- if (jj_3R_22()) return true;
- return false;
- }
-
- final private boolean jj_3R_9() {
- if (jj_3R_11()) return true;
- if (jj_scan_token(COND)) return true;
- if (jj_3R_11()) return true;
- if (jj_scan_token(COLON)) return true;
- if (jj_3R_11()) return true;
- return false;
- }
-
- final private boolean jj_3R_32() {
- Token xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(10)) {
- jj_scanpos = xsp;
- if (jj_scan_token(11)) {
- jj_scanpos = xsp;
- if (jj_scan_token(5)) {
- jj_scanpos = xsp;
- if (jj_scan_token(6)) {
- jj_scanpos = xsp;
- if (jj_scan_token(8)) {
- jj_scanpos = xsp;
- if (jj_scan_token(12)) return true;
- }
- }
- }
- }
- }
- return false;
- }
-
- final private boolean jj_3R_12() {
- if (jj_3R_14()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_15()) { jj_scanpos = xsp; break; }
- }
- return false;
- }
-
- final private boolean jj_3_1() {
- if (jj_3R_9()) return true;
- return false;
- }
-
- final private boolean jj_3R_20() {
- if (jj_3R_22()) return true;
- Token xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_23()) { jj_scanpos = xsp; break; }
- }
- 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 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,0x4001d60,0x0,0x0,0x40002000,0x4001d60,0x10000000,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,0xa182,0x0,0x8000,0x8000,0x0,0xa182,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 b2172f7d12..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELParserTokenManager.java
+++ /dev/null
@@ -1,849 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2011 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
- * IBM Corporation - Bug 318281 - EL validation error for quote escaping
- * IBM Corporation - Bug 351996 - JSP validator shows false errors for EL conditional operator
- *
- *******************************************************************************/
-/* 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);
-}
-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;
- 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 ((0x8400000000L & l) != 0L)
- 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 ((0x8400000000L & l) != 0L)
- 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);
- 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);
- 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 727d8636c3..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/JSPELTranslator.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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
- * IBM Corporation - Bug 298304 User-configurable severities for EL problems
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
-import org.eclipse.jst.jsp.core.jspel.ELProblem;
-import org.eclipse.jst.jsp.core.jspel.IJSPELTranslator;
-import org.eclipse.wst.sse.core.internal.FileBufferModelManager;
-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.validate.ValidationMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-
-
-public class JSPELTranslator implements IJSPELTranslator {
-
- private static final String PREFERENCE_NODE_QUALIFIER = JSPCorePlugin.getDefault().getBundle().getSymbolicName();
- /**
- * 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();
- List generatorELProblems = gen.generate(expression, currentNode, fUserELExpressions, fUserELRanges, document, currentNode, contentStart, contentLength);
- elProblems.addAll(generatorELProblems);
- }
- } catch (ParseException e) {
- final int sev = getProblemSeverity(JSPCorePreferenceNames.VALIDATION_EL_SYNTAX, getScopeContexts(document));
- if (sev != ValidationMessage.IGNORE) {
- 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(sev, pos, e.getLocalizedMessage()));
- }
- } catch (TokenMgrError te) {
- int sev = getProblemSeverity(JSPCorePreferenceNames.VALIDATION_EL_LEXER, getScopeContexts(document));
- if (sev != ValidationMessage.IGNORE) {
- Position pos = new Position(contentStart, contentLength);
- elProblems.add(new ELProblem(sev, pos, JSPCoreMessages.JSPEL_Token));
- }
- }
- return elProblems;
- }
-
- /**
- * @param key preference key used to get the severity for a problem
- * @param contexts preference service contexts
- * @return The severity of the problem represented by the given preference key
- */
- private int getProblemSeverity(String key, IScopeContext[] contexts) {
- return Platform.getPreferencesService().getInt(PREFERENCE_NODE_QUALIFIER, key, IMessage.NORMAL_SEVERITY, contexts);
- }
-
- private IScopeContext[] getScopeContexts(IStructuredDocument document) {
- IScopeContext[] scopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};
- final IFile file = getFile(document);
- if (file != null && file.exists()) {
- final IProject project = file.getProject();
- if (project.exists()) {
- ProjectScope projectScope = new ProjectScope(project);
- if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
- scopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
- }
- }
- }
- return scopes;
- }
-
- private IFile getFile(IStructuredDocument document) {
- IFile f = null;
- final ITextFileBuffer buffer = FileBufferModelManager.getInstance().getBuffer(document);
- if (buffer != null) {
- final IPath path = buffer.getLocation();
- if (path.segmentCount() > 1) {
- f = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- if (f != null && f.isAccessible()) {
- return f;
- }
- }
- return null;
- }
-}
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 fbaa061235..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/ParseException.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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
- * IBM Corporation - Bug 318281 - EL validation error for quote escaping
- *
- *******************************************************************************/
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 4.1 */
-/* JavaCCOptions:KEEP_LINE_COL=null */
-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 {
-
- /**
- * The version identifier for this Serializable class.
- * Increment only if the <i>serialized</i> form of the
- * class changes.
- */
- 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.
- */
- public ParseException(Token currentTokenVal,
- int[][] expectedTokenSequencesVal,
- String[] tokenImageVal
- )
- {
- super(initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal));
- 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();
- }
-
- /** Constructor with message. */
- public ParseException(String message) {
- super(message);
- }
-
-
- /**
- * 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;
-
- /**
- * 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) the correct error message
- * gets displayed.
- */
- private static String initialise(Token currentToken,
- int[][] expectedTokenSequences,
- String[] tokenImage) {
- String eol = System.getProperty("line.separator", "\n");
- StringBuffer expected = new StringBuffer();
- 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.append(tokenImage[expectedTokenSequences[i][j]]).append(' ');
- }
- if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
- expected.append("...");
- }
- expected.append(eol).append(" ");
- }
- 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 += " " + tokenImage[tok.kind];
- retval += " \"";
- retval += add_escapes(tok.image);
- retval += " \"";
- 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.toString();
- 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.
- */
- static 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();
- }
-
-}
-/* JavaCC - OriginalChecksum=2450ea96e71c048c1be00d6aa17c7b52 (do not edit this line) */
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 657c505ce3..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/SimpleCharStream.java
+++ /dev/null
@@ -1,481 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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
- * IBM Corporation - Bug 318281 - EL validation error for quote escaping
- *
- *******************************************************************************/
-/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.1 */
-/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-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
-{
-/** Whether parser is static. */
- public static final boolean staticFlag = false;
- int bufsize;
- int available;
- int tokenBegin;
-/** Position in buffer. */
- 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 int tabSize = 8;
-
- protected void setTabSize(int i) { tabSize = i; }
- protected int getTabSize(int i) { return tabSize; }
-
-
- 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;
- }
- }
-
-/** Start. */
- 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 += (tabSize - (column % tabSize));
- break;
- default :
- break;
- }
-
- bufline[bufpos] = line;
- bufcolumn[bufpos] = column;
- }
-
-/** Read a character. */
- 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];
- }
-
- /** Get token end column number. */
- public int getEndColumn() {
- return bufcolumn[bufpos];
- }
-
- /** Get token end line number. */
- public int getEndLine() {
- return bufline[bufpos];
- }
-
- /** Get token beginning column number. */
- public int getBeginColumn() {
- return bufcolumn[tokenBegin];
- }
-
- /** Get token beginning line number. */
- public int getBeginLine() {
- return bufline[tokenBegin];
- }
-
-/** Backup a number of characters. */
- public void backup(int amount) {
-
- inBuf += amount;
- if ((bufpos -= amount) < 0)
- bufpos += bufsize;
- }
-
- /** Constructor. */
- 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];
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.Reader dstream, int startline,
- int startcolumn)
- {
- this(dstream, startline, startcolumn, 4096);
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.Reader dstream)
- {
- this(dstream, 1, 1, 4096);
- }
-
- /** Reinitialise. */
- 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;
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.Reader dstream, int startline,
- int startcolumn)
- {
- ReInit(dstream, startline, startcolumn, 4096);
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.Reader dstream)
- {
- ReInit(dstream, 1, 1, 4096);
- }
- /** Constructor. */
- public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
- {
- this(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize)
- {
- this(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn) throws java.io.UnsupportedEncodingException
- {
- this(dstream, encoding, startline, startcolumn, 4096);
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.InputStream dstream, int startline,
- int startcolumn)
- {
- this(dstream, startline, startcolumn, 4096);
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
- {
- this(dstream, encoding, 1, 1, 4096);
- }
-
- /** Constructor. */
- public SimpleCharStream(java.io.InputStream dstream)
- {
- this(dstream, 1, 1, 4096);
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn, int buffersize) throws java.io.UnsupportedEncodingException
- {
- ReInit(encoding == null ? new java.io.InputStreamReader(dstream) : new java.io.InputStreamReader(dstream, encoding), startline, startcolumn, buffersize);
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn, int buffersize)
- {
- ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn, buffersize);
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, String encoding) throws java.io.UnsupportedEncodingException
- {
- ReInit(dstream, encoding, 1, 1, 4096);
- }
-
- /** Reinitialise. */
- public void ReInit(java.io.InputStream dstream)
- {
- ReInit(dstream, 1, 1, 4096);
- }
- /** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, String encoding, int startline,
- int startcolumn) throws java.io.UnsupportedEncodingException
- {
- ReInit(dstream, encoding, startline, startcolumn, 4096);
- }
- /** Reinitialise. */
- public void ReInit(java.io.InputStream dstream, int startline,
- int startcolumn)
- {
- ReInit(dstream, startline, startcolumn, 4096);
- }
- /** Get token literal value. */
- 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);
- }
-
- /** Get the suffix. */
- 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;
- }
-
- /** Reset buffer when finished. */
- 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];
- }
-
-}
-/* JavaCC - OriginalChecksum=f319cd62855f4b29d5c4e9550c8852eb (do not edit this line) */
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 6bad947b10..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/jspel/Token.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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
- * IBM Corporation - Bug 318281 - EL validation error for quote escaping
- *
- *******************************************************************************/
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 4.1 */
-/* JavaCCOptions:TOKEN_EXTENDS=,KEEP_LINE_COL=null,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-package org.eclipse.jst.jsp.core.internal.java.jspel;
-
-/**
- * Describes the input token stream.
- */
-
-public class Token implements java.io.Serializable {
-
- /**
- * The version identifier for this Serializable class.
- * Increment only if the <i>serialized</i> form of the
- * class changes.
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * 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;
-
- /** The line number of the first character of this Token. */
- public int beginLine;
- /** The column number of the first character of this Token. */
- public int beginColumn;
- /** The line number of the last character of this Token. */
- public int endLine;
- /** The column number of the last character of this Token. */
- public int 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;
-
- /**
- * An optional attribute value of the Token.
- * Tokens which are not used as syntactic sugar will often contain
- * meaningful values that will be used later on by the compiler or
- * interpreter. This attribute value is often different from the image.
- * Any subclass of Token that actually wants to return a non-null value can
- * override this method as appropriate.
- */
- public Object getValue() {
- return null;
- }
-
- /**
- * No-argument constructor
- */
- public Token() {}
-
- /**
- * Constructs a new token for the specified Image.
- */
- public Token(int kind)
- {
- this(kind, null);
- }
-
- /**
- * Constructs a new token for the specified Image and Kind.
- */
- public Token(int kind, String image)
- {
- this.kind = kind;
- this.image = image;
- }
-
- /**
- * 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, simply add something like :
- *
- * case MyParserConstants.ID : return new IDToken(ofKind, image);
- *
- * to the following switch statement. Then you can cast matchedToken
- * variable to the appropriate type and use sit in your lexical actions.
- */
- public static Token newToken(int ofKind, String image)
- {
- switch(ofKind)
- {
- default : return new Token(ofKind, image);
- }
- }
-
- public static Token newToken(int ofKind)
- {
- return newToken(ofKind, null);
- }
-
-}
-/* JavaCC - OriginalChecksum=688686a2181e010445ea99e501e9cd07 (do not edit this line) */
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/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 ddd050d79c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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 org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-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.JSPTranslatorPersister;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.wst.sse.core.indexing.AbstractIndexManager;
-
-/**
- * <p>Index manger used to update the JDT index with the Java translations
- * of JSPs.</p>
- *
- * <p>Also keeps JSP persistence up to date</p>
- *
- * <p>Any action that needs the JDT index to have all of the latest JSP changes processed
- * should wait for this manger to report that it is consistent,
- * {@link #waitForConsistent(org.eclipse.core.runtime.IProgressMonitor)}. Such actions
- * include but are not limited to searching and refactoring JSPs.</p>
- */
-public class JSPIndexManager extends AbstractIndexManager {
- /** the singleton instance of the {@link JSPIndexManager} */
- private static JSPIndexManager INSTANCE;
-
- /** the JSP {@link IContentType} */
- private static final IContentType JSP_CONTENT_TYPE =
- Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
-
- /** the location to store state */
- private IPath fWorkingLocation;
-
- /**
- * <p>Private singleton constructor</p>
- */
- private JSPIndexManager() {
- super(JSPCoreMessages.JSPIndexManager);
- }
-
- /**
- * @return the singleton instance of the {@link JSPIndexManager}
- */
- public static JSPIndexManager getDefault() {
- return INSTANCE != null ? INSTANCE : (INSTANCE = new JSPIndexManager());
- }
-
- /**
- * @see indexer.internal.indexing.AbstractIndexManager#isResourceToIndex(int, java.lang.String)
- */
- protected boolean isResourceToIndex(int type, IPath path) {
- String name = path.lastSegment();
- return
- type == IResource.PROJECT ||
- (type == IResource.FOLDER && !name.equals("bin") && !name.startsWith(".")) || //$NON-NLS-1$ //$NON-NLS-2$
- JSP_CONTENT_TYPE.isAssociatedWith(path.lastSegment());
- }
-
- /**
- * @see indexer.internal.indexing.AbstractIndexManager#getWorkingLocation()
- */
- protected IPath getWorkingLocation() {
- if(this.fWorkingLocation == null) {
- //create path to working area
- IPath workingLocation =
- JSPCorePlugin.getDefault().getStateLocation().append("jspsearch"); //$NON-NLS-1$
-
- // ensure that it exists on disk
- File folder = new File(workingLocation.toOSString());
- if (!folder.isDirectory()) {
- try {
- folder.mkdir();
- }
- catch (SecurityException e) {
- Logger.logException(this.getName() +
- ": Error while creating state location: " + folder + //$NON-NLS-1$
- " This renders the index manager irrevocably broken for this workspace session", //$NON-NLS-1$
- e);
- }
- }
-
- this.fWorkingLocation = workingLocation;
- }
-
- return this.fWorkingLocation;
- }
-
- /**
- * @see indexer.internal.indexing.AbstractIndexManager#performAction(byte, byte, org.eclipse.core.resources.IResource, org.eclipse.core.runtime.IPath)
- */
- protected void performAction(byte source, byte action, IResource resource,
- IPath movePath) {
-
- //inform the persister of the action unless it come from a full workspace scan
- if(JSPTranslatorPersister.ACTIVATED && source != AbstractIndexManager.SOURCE_WORKSPACE_SCAN) {
- switch(action) {
- case AbstractIndexManager.ACTION_ADD: {
- JSPTranslatorPersister.persistTranslation(resource);
- break;
- }
- case AbstractIndexManager.ACTION_REMOVE: {
- JSPTranslatorPersister.removePersistedTranslation(resource);
- break;
- }
- case AbstractIndexManager.ACTION_ADD_MOVE_FROM: {
- JSPTranslatorPersister.movePersistedTranslation(resource, movePath);
- break;
- }
- case AbstractIndexManager.ACTION_REMOVE_MOVE_TO: {
- //do nothing, taken care of by AbstractIndexManager.ACTION_ADD_MOVE_FROM
- break;
- }
- }
- }
-
- //add any new JSP files to the JDT index using the JSPSearchSupport
- if(action == AbstractIndexManager.ACTION_ADD ||
- action == AbstractIndexManager.ACTION_ADD_MOVE_FROM) {
-
- IFile file = (IFile)resource; //this assumption can be made because of #isResourceToIndex
- JSPSearchSupport ss = JSPSearchSupport.getInstance();
- try {
- IProject project = file.getProject();
- if (project != null) {
- IJavaProject jproject = JavaCore.create(project);
- if (jproject.exists()) {
- ss.addJspFile(file);
- }
- }
- }
- catch (Exception e) {
- String filename = file != null ? file.getFullPath().toString() : ""; //$NON-NLS-1$
- Logger.logException("JPSIndexManger: problem indexing:" + filename, e); //$NON-NLS-1$
- }
- }
- }
-}
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 9afdda906b..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, 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.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 b78944fb4d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchDocument.java
+++ /dev/null
@@ -1,254 +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.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.JSPTranslationExtension;
-import org.eclipse.jst.jsp.core.internal.modelhandler.ModelHandlerForJSP;
-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)
- */
-public class JSPSearchDocument {
-
- private String fJSPPathString = null;
- private String fCUPath = null;
- private SearchParticipant fParticipant = null;
- private long fLastModifiedStamp;
- private char[] fCachedCharContents;
-
- /**
- * @param file
- * @param participant
- * @throws CoreException
- */
- public JSPSearchDocument(String filePath, SearchParticipant participant) {
- //Assert.isNotNull(filePath, "Search support for JSP requires file paths"); //$NON-NLS-1$
- 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) {
- ModelHandlerForJSP.ensureTranslationAdapterFactory(sm);
- }
-
- /**
- * 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()) {
- 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;
- }
-
- 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;
- }
-}
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 6e84b2b1de..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, 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.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;
- }
-}
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 9e5cd4f227..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchScope.java
+++ /dev/null
@@ -1,125 +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.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() {
- return (IPath[]) fResourcePaths.toArray(new IPath[fResourcePaths.size()]);
- }
-
- public boolean includesBinaries() {
- return false;
- }
-
- public boolean includesClasspaths() {
- return false;
- }
-
- public void setIncludesBinaries(boolean includesBinaries) {
- // do nothing
- }
-
- public void setIncludesClasspaths(boolean includesClasspaths) {
- // do nothing
- }
-}
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 7d1ed20d7b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/search/JSPSearchSupport.java
+++ /dev/null
@@ -1,595 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.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.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;
-
- 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.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;
-
- 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;
- }
-
- 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)
- *
- * @deprecated use {@link #search(String, IJavaSearchScope, int, int, int, boolean, SearchRequestor, IProgressMonitor)}
- */
- public void search(String searchText, IJavaSearchScope scope, int searchFor, int limitTo, int matchMode, boolean isCaseSensitive, SearchRequestor requestor) {
- this.search(searchText, scope, searchFor, limitTo, matchMode, isCaseSensitive,
- requestor, new NullProgressMonitor());
- }
-
- /**
- * 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
- *
- * @deprecated use {@link #search(IJavaElement, IJavaSearchScope, SearchRequestor, IProgressMonitor)}
- */
- public void search(IJavaElement element, IJavaSearchScope scope, SearchRequestor requestor) {
- this.search(element, scope, requestor, new NullProgressMonitor());
- }
-
- /**
- * 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
- *
- * @deprecated should use {@link #search(IJavaElement, IJavaSearchScope, SearchRequestor, IProgressMonitor)}
- * so that operation can be canceled
- */
- public void searchRunnable(IJavaElement element, IJavaSearchScope scope, SearchRequestor requestor) {
- this.searchRunnable(element, scope, requestor, new NullProgressMonitor());
- }
-
- /**
- * 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,
- IProgressMonitor monitor) {
-
- //wait for the index
- JSPIndexManager.getDefault().waitForConsistent(monitor);
-
- 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,
- IProgressMonitor monitor) {
-
- //wait for the index
- JSPIndexManager.getDefault().waitForConsistent(monitor);
-
- 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, IProgressMonitor monitor) {
-
- //wait for the index
- JSPIndexManager.getDefault().waitForConsistent(monitor);
-
- 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) {
-
- IPath 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);
- //}
- return indexLocation;
- }
-
- // copied from JDT IndexManager
- public IPath getModelJspPluginWorkingLocation() {
-
- if (this.fJspPluginLocation != null)
- return this.fJspPluginLocation;
-
- // Append the folder name "jspsearch" to keep the state location area cleaner
- IPath stateLocation = JSPCorePlugin.getDefault().getStateLocation().append("jspsearch"); //$NON-NLS-1$
-
- // 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));
-
- // ensure that it exists on disk
- File folder = new File(stateLocation.toOSString());
- if (!folder.isDirectory()) {
- try {
- folder.mkdir();
- }
- catch (SecurityException e) {
- }
- }
-
- 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;
- }
-}
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 2e07148e39..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, 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.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 9ee8a41d01..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, 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.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;
- }
-
-}
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 23b90ab4c9..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/JSPModelLoader.java
+++ /dev/null
@@ -1,647 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.io.Reader;
-import java.util.ArrayList;
-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.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.DocumentReader;
-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.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.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(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;
- DocumentReader reader = new DocumentReader(doc);
- return getContentDescription(reader);
- }
-
- /**
- * Returns content description for an input stream Assumes it's JSP
- * content. Closes the input stream when finished.
- *
- * @param reader
- * @return the IContentDescription for in, or null if in is null
- */
- private IContentDescription getContentDescription(Reader reader) {
-
- if (reader == null)
- return null;
-
- IContentDescription desc = null;
- try {
-
- IContentType contentTypeJSP = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- desc = contentTypeJSP.getDescriptionFor(reader, IContentDescription.ALL);
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- finally {
- if (reader != null) {
- try {
- reader.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(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(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(structuredDocument.getParser());
- // remember, embedded type factories are automatically cleared when
- // embededType changed
- pageDirectiveAdapter.setEmbeddedType(newEmbeddedContentType);
- if (newEmbeddedContentType != null) {
- newEmbeddedContentType.initializeFactoryRegistry(model.getFactoryRegistry());
- newEmbeddedContentType.initializeParser(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;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.sse.core.internal.model.AbstractModelLoader#initEmbeddedTypePre(org.eclipse.wst.sse.core.internal.provisional.IStructuredModel)
- */
- protected void initEmbeddedTypePre(IStructuredModel model) {
- JSPModelLoader.this.initEmbeddedTypePre(model, model.getStructuredDocument());
- }
-
- protected void initEmbeddedTypePre(IStructuredModel model, IStructuredDocument structuredDocument) {
-
- // note: this will currently only work for models backed by files
- EmbeddedTypeHandler embeddedContentType = null;
- IDOMModel domModel = (IDOMModel) model;
-
- if (embeddedContentType == null) {
- IContentDescription desc = getContentDescription(structuredDocument);
- 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);
- }
-
- /**
- * As part of the model cloning process, ensure that the new model has the
- * same embedded content type handler as the old model, and that it is
- * properly initialized
- */
- protected void initEmbeddedType(IStructuredModel oldModel, IStructuredModel newModel) {
- EmbeddedTypeHandler existingEmbeddedType = getEmbeddedType(oldModel);
- if (existingEmbeddedType == null) {
- initEmbeddedTypePre(newModel, newModel.getStructuredDocument());
- initEmbeddedTypePost(newModel);
- }
- else {
- EmbeddedTypeHandler newEmbeddedContentType = existingEmbeddedType.newInstance();
- // 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 initialization 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 implementation of
- // ModelQueryAdapter 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;
- }
-
-}
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 aa74637a89..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/ModelHandlerForJSP.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.Platform;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.content.IContentType;
-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.java.IJSPTranslation;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslationAdapterFactory;
-import org.eclipse.jst.jsp.core.internal.java.TagTranslationAdapterFactory;
-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.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;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-
-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();
- }
-
- public static void ensureTranslationAdapterFactory(IStructuredModel sm) {
- if (sm.getFactoryRegistry().getFactoryFor(IJSPTranslation.class) == null) {
- /*
- * Check for tag/tagx files, otherwise add the JSP translation
- * factory for better compatibility with other possible subtypes
- * of JSP.
- */
- IContentType thisContentType = Platform.getContentTypeManager().getContentType(sm.getContentTypeIdentifier());
- IContentType tagContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSPTAG);
- if (thisContentType.isKindOf(tagContentType)) {
- INodeAdapterFactory factory = new TagTranslationAdapterFactory();
- sm.getFactoryRegistry().addFactory(factory);
- }
- else {
- INodeAdapterFactory factory = null;
-// if (false) {
-// IContentType textContentType = Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT);
-// IContentType jspContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
-// /*
-// * This IAdapterManager call is temporary placeholder code
-// * that should not be relied upon in any way!
-// */
-// if (thisContentType.isKindOf(jspContentType)) {
-// IContentType testContentType = thisContentType;
-// INodeAdapterFactory holdFactory = null;
-// while (!testContentType.equals(textContentType) && holdFactory == null) {
-// holdFactory = (INodeAdapterFactory) Platform.getAdapterManager().getAdapter(testContentType.getId(), IJSPTranslation.class.getName());
-// testContentType = testContentType.getBaseType();
-// }
-// }
-// }
- if (factory == null) {
- factory = new JSPTranslationAdapterFactory();
- }
-
- sm.getFactoryRegistry().addFactory(factory);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/ModelHandlerForTag.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/ModelHandlerForTag.java
deleted file mode 100644
index 1cb5f634f0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/ModelHandlerForTag.java
+++ /dev/null
@@ -1,38 +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.modelhandler;
-
-import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
-
-public class ModelHandlerForTag extends ModelHandlerForJSP {
-
- /**
- * 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.tagsource"; //$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.tag"; //$NON-NLS-1$
-
-
- public ModelHandlerForTag() {
- super();
- setId(ModelHandlerID);
- setAssociatedContentTypeId(AssociatedContentTypeID);
- }
-
- public IModelLoader getModelLoader() {
- return new TagModelLoader();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/TagModelLoader.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/TagModelLoader.java
deleted file mode 100644
index b13da797a9..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelhandler/TagModelLoader.java
+++ /dev/null
@@ -1,42 +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.modelhandler;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jst.jsp.core.internal.modelquery.ModelQueryAdapterFactoryForTag;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
-
-public class TagModelLoader extends JSPModelLoader {
-
- public TagModelLoader() {
- }
-
- public List getAdapterFactories() {
- List factories = super.getAdapterFactories();
- /*
- * Replace the default JSP model query by using our own factory
- */
-
- Iterator i = factories.iterator();
- while (i.hasNext()) {
- if (((INodeAdapterFactory) i.next()).isFactoryForType(ModelQueryAdapter.class)) {
- i.remove();
- }
- }
-
- factories.add(new ModelQueryAdapterFactoryForTag());
- return factories;
- }
-}
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 6350e54b41..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, 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.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);
- }
-}
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 c689f5c1ea..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryAssociationProvider.java
+++ /dev/null
@@ -1,27 +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.modelquery;
-
-import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.SimpleAssociationProvider;
-
-/**
- * @deprecated
- */
-public class JSPModelQueryAssociationProvider extends SimpleAssociationProvider {
-
- /**
- * @param modelQueryCMProvider
- * org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQueryCMProvider
- */
- public JSPModelQueryAssociationProvider() {
- super(new JSPModelQueryCMProvider());
- }
-}
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 5b77a58e26..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryCMProvider.java
+++ /dev/null
@@ -1,87 +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.modelquery;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.Path;
-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.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-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.IDOMModel;
-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 = null;
- if (node instanceof IDOMNode) {
- IDOMModel model = ((IDOMNode) node).getModel();
- String modelPath = model.getBaseLocation();
- if (modelPath != null && !IModelManager.UNMANAGED_MODEL.equals(modelPath)) {
- float version = DeploymentDescriptorPropertyCache.getInstance().getJSPVersion(new Path(modelPath));
- jcmdoc = JSPCMDocumentFactory.getCMDocument(version);
- }
- }
- if (jcmdoc == null) {
- 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;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryExtension.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryExtension.java
deleted file mode 100644
index 0b00471d6d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryExtension.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jst.jsp.core.internal.contentmodel.JSPCMDocumentFactory;
-import org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP20Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.wst.html.core.internal.contentmodel.JSPCMDocument;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-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.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.extension.ModelQueryExtension;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocType;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * An implementation of {@link ModelQueryExtension} for JSP tags in JSP documents
- */
-public class JSPModelQueryExtension extends ModelQueryExtension {
-
- private static final String TAG_JSP_ROOT = "jsp:root";
-
- /**
- * Originally taken from JSPContentAssistProcessor
- *
- * @see org.eclipse.wst.xml.core.internal.contentmodel.modelquery.extension.ModelQueryExtension#getAvailableElementContent(org.w3c.dom.Element, java.lang.String, int)
- */
- public CMNode[] getAvailableElementContent(Element parentElement,
- String namespace, int includeOptions) {
-
- CMNode[] nodes = EMPTY_CMNODE_ARRAY;
- ArrayList nodeList = new ArrayList();
-
- //only returns anything if looking for child nodes
- if(((includeOptions & ModelQuery.INCLUDE_CHILD_NODES) != 0) && parentElement instanceof IDOMNode) {
- IDOMNode node = (IDOMNode)parentElement;
- // get position dependent CMDocuments and insert their tags as
- // proposals
- ModelQueryAdapter mqAdapter = null;
- if (node.getNodeType() == Node.DOCUMENT_NODE) {
- mqAdapter = (ModelQueryAdapter) node.getAdapterFor(ModelQueryAdapter.class);
- } else {
- mqAdapter = (ModelQueryAdapter) ((IDOMNode) node.getOwnerDocument()).getAdapterFor(ModelQueryAdapter.class);
- }
-
- if (mqAdapter != null) {
- CMDocument doc = mqAdapter.getModelQuery().getCorrespondingCMDocument(node);
- if (doc != null) {
- CMDocument jcmdoc = getDefaultJSPCMDocument(node);
- CMNamedNodeMap jspelements = jcmdoc.getElements();
-
- /* For a built-in JSP action the content model is properly
- * set up, so don't just blindly add the rest--unless this
- * will be a direct child of the document
- */
- if (jspelements != null && (!(doc instanceof JSPCMDocument) || node.getNodeType() == Node.DOCUMENT_NODE)) {
- List rejectElements = new ArrayList();
-
- // determine if the document is in XML form
- Document domDoc = null;
- if (node.getNodeType() == Node.DOCUMENT_NODE) {
- domDoc = (Document) node;
- } else {
- domDoc = node.getOwnerDocument();
- }
-
- // Show XML tag forms of JSP markers if jsp:root is
- // the document element OR it's HTML but
- // isn't really in the text.
- // If the document isn't strictly XML, pull out the
- // XML tag forms it is xml format
- rejectElements.add(JSP12Namespace.ElementName.SCRIPTLET);
- rejectElements.add(JSP12Namespace.ElementName.EXPRESSION);
- rejectElements.add(JSP12Namespace.ElementName.DECLARATION);
- rejectElements.add(JSP12Namespace.ElementName.DIRECTIVE_INCLUDE);
- rejectElements.add(JSP12Namespace.ElementName.DIRECTIVE_PAGE);
- rejectElements.add(JSP12Namespace.ElementName.TEXT);
- rejectElements.add(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
- rejectElements.add(JSP20Namespace.ElementName.DIRECTIVE_TAG);
- rejectElements.add(JSP20Namespace.ElementName.DIRECTIVE_ATTRIBUTE);
- rejectElements.add(JSP20Namespace.ElementName.DIRECTIVE_VARIABLE);
- if (isXMLFormat(domDoc)) {
- // jsp actions
- rejectElements.add(JSP12Namespace.ElementName.FALLBACK);
- rejectElements.add(JSP12Namespace.ElementName.USEBEAN);
- rejectElements.add(JSP12Namespace.ElementName.GETPROPERTY);
- rejectElements.add(JSP12Namespace.ElementName.SETPROPERTY);
- rejectElements.add(JSP12Namespace.ElementName.INCLUDE);
- rejectElements.add(JSP12Namespace.ElementName.FORWARD);
- rejectElements.add(JSP12Namespace.ElementName.PLUGIN);
- rejectElements.add(JSP12Namespace.ElementName.FALLBACK);
- rejectElements.add(JSP12Namespace.ElementName.PARAM);
- rejectElements.add(JSP12Namespace.ElementName.PARAMS);
- }
-
-
- // don't show jsp:root if a document element already
- // exists
- Element docElement = domDoc.getDocumentElement();
- if (docElement != null &&((docElement.getNodeName().equals(TAG_JSP_ROOT)) ||
- ((((IDOMNode) docElement).getStartStructuredDocumentRegion() != null ||
- ((IDOMNode) docElement).getEndStructuredDocumentRegion() != null)))) {
-
- rejectElements.add(JSP12Namespace.ElementName.ROOT);
- }
-
- for (int j = 0; j < jspelements.getLength(); j++) {
- CMElementDeclaration ed = (CMElementDeclaration) jspelements.item(j);
- if (!rejectElements.contains(ed.getNodeName())) {
- nodeList.add(ed);
- }
- }
-
- }
- }
- // No cm document (such as for the Document (a non-Element) node itself)
- else {
- CMNamedNodeMap jspElements = getDefaultJSPCMDocument(node).getElements();
- int length = jspElements.getLength();
- for (int i = 0; i < length; i++) {
- nodeList.add(jspElements.item(i));
- }
- }
- }
-
- nodes = (CMNode[])nodeList.toArray(new CMNode[nodeList.size()]);
- }
-
- return nodes;
- }
-
- /**
- * <p>For JSP files and segments, this is just the JSP
- * document, but when editing tag files and their fragments, it
- * should be the tag document.</p>
- *
- * <p>It may also vary based on the model being edited in the future.</p>
- *
- * <p><b>NOTE:</b>Copied from JSPContentAssistProcessor</p>
- *
- * @return the default non-embedded CMDocument for the document being
- * edited.
- */
- private CMDocument getDefaultJSPCMDocument(IDOMNode node) {
- CMDocument jcmdoc = null;
-
- // handle tag files here
- String contentType = node.getModel().getContentTypeIdentifier();
- if (ContentTypeIdForJSP.ContentTypeID_JSPTAG.equals(contentType)) {
- jcmdoc = JSPCMDocumentFactory.getCMDocument(CMDocType.TAG20_DOC_TYPE);
- } else {
- String modelPath = node.getModel().getBaseLocation();
- if (modelPath != null && !IModelManager.UNMANAGED_MODEL.equals(modelPath)) {
- float version = DeploymentDescriptorPropertyCache.getInstance().getJSPVersion(new Path(modelPath));
- jcmdoc = JSPCMDocumentFactory.getCMDocument(version);
- }
- if (jcmdoc == null) {
- jcmdoc = JSPCMDocumentFactory.getCMDocument();
- }
- }
-
- return jcmdoc;
- }
-
- /**
- * <p><b>NOTE:</b>Copied from JSPContentAssistProcessor</p>
- *
- * @param doc determine if this {@link Document} is in an XML format
- * @return is the given document in an XML format
- */
- private boolean isXMLFormat(Document doc) {
- boolean result = false;
- if (doc != null) {
- Element docElement = doc.getDocumentElement();
- result = docElement != null &&
- ((docElement.getNodeName().equals(TAG_JSP_ROOT)) ||
- ((((IDOMNode) docElement).getStartStructuredDocumentRegion() == null &&
- ((IDOMNode) docElement).getEndStructuredDocumentRegion() == null)));
- }
- return result;
- }
-}
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 18ee57592e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/JSPModelQueryImpl.java
+++ /dev/null
@@ -1,163 +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.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.contentmodel.modelqueryimpl.SimpleAssociationProvider;
-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 SimpleAssociationProvider(new JSPModelQueryCMProvider()));
- 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);
- }
-}
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 7d5c14cdf7..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/ModelQueryAdapterFactoryForJSP.java
+++ /dev/null
@@ -1,217 +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.modelquery;
-
-import java.io.File;
-import java.net.URI;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-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();
- if (model.getBaseLocation() != null) {
- stateNotifier.addModelStateListener(this);
- }
-
- org.eclipse.wst.sse.core.internal.util.URIResolver resolver = model.getResolver();
- if (Debug.displayInfo)
- System.out.println("----------------ModelQueryAdapterFactoryForJSP... baseLocation : " + resolver.getFileBaseLocation()); //$NON-NLS-1$
-
- /**
- * XMLCatalogIdResolver currently requires a filesystem
- * location string. Customarily this will be what is in the
- * deprecated SSE URIResolver and required by the Common URI
- * Resolver.
- */
- URIResolver idResolver = null;
- if (resolver != null) {
- idResolver = new XMLCatalogIdResolver(resolver.getFileBaseLocation(), resolver);
- }
- else {
- /*
- * 203649 - this block may be necessary due to ordering of
- * setting the resolver into the model
- */
- String baseLocation = null;
- String modelsBaseLocation = model.getBaseLocation();
- if (modelsBaseLocation != null) {
- File file = new Path(modelsBaseLocation).toFile();
- if (file.exists()) {
- baseLocation = file.getAbsolutePath();
- }
- else {
- IPath basePath = new Path(model.getBaseLocation());
- IResource derivedResource = null;
- if (basePath.segmentCount() > 1)
- derivedResource = ResourcesPlugin.getWorkspace().getRoot().getFile(basePath);
- else
- derivedResource = ResourcesPlugin.getWorkspace().getRoot().getProject(basePath.segment(0));
- IPath derivedPath = derivedResource.getLocation();
- if (derivedPath != null) {
- baseLocation = derivedPath.toString();
- }
- else {
- URI uri = derivedResource.getLocationURI();
- if (uri != null) {
- baseLocation = uri.toString();
- }
- }
- }
- if(baseLocation == null) {
- baseLocation = modelsBaseLocation;
- }
- }
- idResolver = new XMLCatalogIdResolver(baseLocation, null);
- }
-
- ModelQuery modelQuery = createModelQuery(model, idResolver);
- modelQuery.setEditMode(ModelQuery.EDIT_MODE_UNCONSTRAINED);
- modelQueryAdapterImpl = new JSPModelQueryAdapterImpl(new CMDocumentCache(), modelQuery, idResolver);
- }
- }
- return modelQueryAdapterImpl;
- }
-
- protected ModelQuery createModelQuery(IStructuredModel model, URIResolver resolver) {
- return new JSPModelQueryImpl(model, resolver);
- }
-
- /**
- * @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) {
- if (baseFile.getLocation() != null) {
- baseLocation = baseFile.getLocation().toString();
- }
- if (baseLocation == null && baseFile.getLocationURI() != null) {
- baseLocation = baseFile.getLocationURI().toString();
- }
- if (baseLocation == null) {
- baseLocation = baseFile.getFullPath().toString();
- }
- }
- else {
- baseLocation = model.getBaseLocation();
- }
- modelQueryAdapterImpl.setIdResolver(new XMLCatalogIdResolver(baseLocation, model.getResolver()));
- }
-
- public void modelAboutToBeReinitialized(IStructuredModel structuredModel) {
- // TODO Auto-generated method stub
-
- }
-
- public void modelReinitialized(IStructuredModel structuredModel) {
- updateResolver(structuredModel);
-
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/ModelQueryAdapterFactoryForTag.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/ModelQueryAdapterFactoryForTag.java
deleted file mode 100644
index ec9abb759a..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/ModelQueryAdapterFactoryForTag.java
+++ /dev/null
@@ -1,36 +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.modelquery;
-
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.SimpleAssociationProvider;
-
-public class ModelQueryAdapterFactoryForTag extends ModelQueryAdapterFactoryForJSP {
-
- public ModelQueryAdapterFactoryForTag() {
- }
-
- public ModelQueryAdapterFactoryForTag(Object key, boolean registerAdapters) {
- super(key, registerAdapters);
- }
-
- public INodeAdapterFactory copy() {
- return new ModelQueryAdapterFactoryForTag(getAdapterKey(), isShouldRegisterAdapter());
- }
-
- protected ModelQuery createModelQuery(IStructuredModel model, URIResolver resolver) {
- return new TagModelQuery(new SimpleAssociationProvider(new TagModelQueryCMProvider()));
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TagModelQuery.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TagModelQuery.java
deleted file mode 100644
index 73ef1cc04d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TagModelQuery.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.core.resources.IProject;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.EmbeddedTypeHandler;
-import org.eclipse.wst.sse.core.internal.modelhandler.ModelHandlerUtility;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-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.xml.core.internal.contentmodel.CMDocument;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQuery;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelquery.ModelQueryAssociationProvider;
-import org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.ModelQueryImpl;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.MovableModelQuery;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * ModelQuery for JSP Tag files. Prioritizes the Tag content model and any
- * loaded tag libraries in the model before falling back to the embedded model
- * query, if one is found.
- */
-public class TagModelQuery extends ModelQueryImpl implements ModelQuery, MovableModelQuery {
- /**
- * The default mime-type for the embedded ModelQuery
- */
- public static final String DEFAULT_MIMETYPE = "text/html";
-
-
- /**
- * The prefix used with ProjectScope to find the (possibly user-set)
- * embedded mime-type on a .tag file.
- */
- private static final String PREFERENCE_PREFIX = "embeddedMimeType/";
-
- public static String createPreferenceKey(IPath fullPath) {
- return PREFERENCE_PREFIX + fullPath.removeFirstSegments(1).toString();
- }
-
- private ModelQuery fEmbeddedModelQuery;
-
- /**
- * @param modelQueryAssociationProvider
- */
- public TagModelQuery(ModelQueryAssociationProvider modelQueryAssociationProvider) {
- super(modelQueryAssociationProvider);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.
- * ModelQueryImpl#getCMElementDeclaration(org.w3c.dom.Element)
- */
- public CMElementDeclaration getCMElementDeclaration(Element element) {
- CMElementDeclaration cmElementDeclaration = super.getCMElementDeclaration(element);
- if (cmElementDeclaration == null) {
- ModelQuery embeddedModelQuery = getEmbeddedModelQuery(element);
- if (embeddedModelQuery != null) {
- return embeddedModelQuery.getCMElementDeclaration(element);
- }
- }
- return cmElementDeclaration;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.xml.core.internal.contentmodel.modelqueryimpl.
- * ModelQueryImpl#getCorrespondingCMDocument(org.w3c.dom.Node)
- */
- public CMDocument getCorrespondingCMDocument(Node node) {
- CMDocument document = super.getCorrespondingCMDocument(node);
- if (document == null) {
- ModelQuery embeddedModelQuery = getEmbeddedModelQuery(node);
- if (embeddedModelQuery != null) {
- return embeddedModelQuery.getCorrespondingCMDocument(node);
- }
- }
- return document;
- }
-
- private String getEmbeddedMimeType(Node node) {
- String type = DEFAULT_MIMETYPE;
- if (node instanceof IDOMNode) {
- IStructuredModel model = ((IDOMNode) node).getModel();
- String baseLocation = model.getBaseLocation();
- if (!baseLocation.equals(IModelManager.UNMANAGED_MODEL)) {
- IPath path = new Path(baseLocation);
- if (path.segmentCount() > 1) {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
- if (project.isAccessible()) {
- String key = createPreferenceKey(path);
- IEclipsePreferences preferences = new ProjectScope(project).getNode(JSPCorePlugin.getDefault().getBundle().getSymbolicName());
- type = preferences.get(key, DEFAULT_MIMETYPE);
- }
- }
- }
- }
- return type;
- }
-
- private ModelQuery getEmbeddedModelQuery(Node node) {
- if (fEmbeddedModelQuery == null) {
- String embeddedMimeType = getEmbeddedMimeType(node);
- if (embeddedMimeType != null) {
- EmbeddedTypeHandler embeddedContentTypeHandler = ModelHandlerUtility.getEmbeddedContentTypeFor(embeddedMimeType);
- if (embeddedContentTypeHandler != null) {
- List adapterFactories = embeddedContentTypeHandler.getAdapterFactories();
- for (int i = 0; i < adapterFactories.size(); i++) {
- INodeAdapterFactory factory = (INodeAdapterFactory) adapterFactories.get(i);
- if (factory.isFactoryForType(ModelQueryAdapter.class)) {
- INodeAdapter adapter = factory.adapt((INodeNotifier) node.getOwnerDocument());
- if (adapter instanceof ModelQueryAdapter) {
- fEmbeddedModelQuery = ((ModelQueryAdapter) adapter).getModelQuery();
- }
- }
- }
- }
- }
- }
- return fEmbeddedModelQuery;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.xml.core.internal.ssemodelquery.MovableModelQuery#setIdResolver(org.eclipse.wst.common.uriresolver.internal.provisional.URIResolver)
- */
- public void setIdResolver(URIResolver newURIResolver) {
- fEmbeddedModelQuery = null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TagModelQueryCMProvider.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TagModelQueryCMProvider.java
deleted file mode 100644
index 7f5108ab1e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TagModelQueryCMProvider.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2011 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.core.runtime.Path;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TAGCMDocumentFactory;
-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.contenttype.DeploymentDescriptorPropertyCache;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-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.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.w3c.dom.Node;
-
-/**
- * CMDocument provider for HTML and JSP documents.
- */
-public class TagModelQueryCMProvider implements ModelQueryCMProvider {
-
- protected TagModelQueryCMProvider() {
- 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 tagdoc =null;
- if (node instanceof IDOMNode) {
- IDOMModel model = ((IDOMNode) node).getModel();
- String modelPath = model.getBaseLocation();
- if (modelPath != null && !IModelManager.UNMANAGED_MODEL.equals(modelPath)) {
- float version = DeploymentDescriptorPropertyCache.getInstance().getJSPVersion(new Path(modelPath));
- tagdoc = TAGCMDocumentFactory.getCMDocument(version);
- }
- }
-
- CMDocument result = null;
- try {
- if (node.getNodeType() == Node.ELEMENT_NODE && tagdoc != null) {
- String elementName = node.getNodeName();
-
- // test to see if this node belongs to JSP's CMDocument (case
- // sensitive)
- CMElementDeclaration dec = (CMElementDeclaration) tagdoc.getElements().getNamedItem(elementName);
- if (dec != null) {
- result = tagdoc;
- }
- }
-
- 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.isEmpty())
- result = (CMDocument) documents.get(0);
- }
- }
- }
- catch (Exception e) {
- e.printStackTrace();
- }
-// 204990 - JSP/Web Page Editors: tag files do not support content assist on html element attributes
-// if (result == null) {
-// result = tagdoc;
-// }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TaglibModelQueryExtension.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TaglibModelQueryExtension.java
deleted file mode 100644
index 33e8c1d435..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/modelquery/TaglibModelQueryExtension.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2010 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.ArrayList;
-import java.util.List;
-
-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.wst.sse.core.internal.provisional.text.IStructuredDocument;
-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.contentmodel.modelquery.extension.ModelQueryExtension;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-import org.w3c.dom.Element;
-
-/**
- * An implementation of {@link ModelQueryExtension} for tag libraries in JSP documents
- */
-public class TaglibModelQueryExtension extends ModelQueryExtension {
-
- /**
- * @see org.eclipse.wst.xml.core.internal.contentmodel.modelquery.extension.ModelQueryExtension#getAvailableElementContent(org.w3c.dom.Element, java.lang.String, int)
- */
- public CMNode[] getAvailableElementContent(Element parentElement,
- String namespace, int includeOptions) {
-
- CMNode[] nodes = EMPTY_CMNODE_ARRAY;
- ArrayList nodeList = new ArrayList();
-
- //only returns anything if looking for child nodes
- if(((includeOptions & ModelQuery.INCLUDE_CHILD_NODES) != 0) && parentElement instanceof IDOMElement) {
- //get the trackers
- IDOMElement elem = (IDOMElement)parentElement;
- IStructuredDocument structDoc = elem.getModel().getStructuredDocument();
- TLDCMDocumentManager manager = TaglibController.getTLDCMDocumentManager(structDoc);
-
- if(manager != null) {
- List trackers = new ArrayList(manager.getTaglibTrackers());
-
- //for each tracker add each of its elements to the node list
- for(int trackerIndex = 0; trackerIndex < trackers.size(); ++trackerIndex) {
- CMNamedNodeMap elements = ((TaglibTracker)trackers.get(trackerIndex)).getElements();
- for(int elementIndex = 0; elementIndex < elements.getLength(); ++elementIndex) {
- nodeList.add(elements.item(elementIndex));
- }
- }
-
- nodes = (CMNode[])nodeList.toArray(new CMNode[nodeList.size()]);
- }
- }
-
- return nodes;
- }
-}
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 963a70dbab..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, 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.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;
- }
-}
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 98cae518e7..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPReParser.java
+++ /dev/null
@@ -1,379 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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();
- if (result == null)
- result = checkForJSPEL();
- }
- return result;
- }
-
- private StructuredDocumentEvent checkForJSPEL() {
- StructuredDocumentEvent result = null;
- result = checkForCriticalKey("${"); //$NON-NLS-1$
- if (result == null)
- result = checkForCriticalKey("}"); //$NON-NLS-1$
- 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();
- }
-
-}
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 44af4f771f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/JSPSourceParser.java
+++ /dev/null
@@ -1,427 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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());
-
- //if adding this region to a previous container then need to add this
- //region to the container and update its start location
- if(currentNode.getLastRegion() instanceof ITextRegionContainer) {
- region.adjustStart(-currentNode.getLastRegion().getStart() - currentNode.getStart());
- ((ITextRegionContainer)currentNode.getLastRegion()).getRegions().add(region);
- }
- }
- // 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);
- }
-
-}
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 0d36daeec7..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, 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.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;
- }
-}
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 498ed946d3..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, 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.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;
- }
-
-}
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 2ed137d4f0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/parser/internal/JSPTokenizer.java
+++ /dev/null
@@ -1,4079 +0,0 @@
-/* The following code was generated by JFlex 1.2.2 on 10/17/11 2:40 PM */
-
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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
- * Frits Jalvingh - contributions for bug 150794
- *******************************************************************************/
-
-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.contenttype.IntStack;
-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;
-
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.informatik.tu-muenchen.de/~kleing/jflex/">JFlex</a> 1.2.2
- * on 10/17/11 2:40 PM from the specification file
- * <tt>file:/Users/dev/workspaces/indigo/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 = 42;
- 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 = 41;
- 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 = 37;
- 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;
- final public static int ST_JSP_ATTRIBUTE_VALUE = 40;
-
- /**
- * Translates characters to character classes
- */
- final private static String yycmap_packed =
- "\11\0\1\5\1\27\2\0\1\20\22\0\1\20\1\26\1\12\1\66"+
- "\1\15\1\23\1\13\1\14\1\25\1\25\1\25\1\25\1\25\1\7"+
- "\1\6\1\3\12\21\1\11\1\73\1\1\1\52\1\2\1\4\1\22"+
- "\1\41\1\74\1\37\1\40\1\56\1\71\1\63\1\63\1\64\1\63"+
- "\1\63\1\34\1\32\1\65\1\53\1\55\1\63\1\70\1\67\1\42"+
- "\1\72\2\63\1\30\1\54\1\63\1\36\1\17\1\24\1\0\1\10"+
- "\1\0\1\60\1\104\1\75\1\61\1\44\1\71\1\76\1\106\1\47"+
- "\1\101\1\63\1\35\1\33\1\51\1\50\1\102\1\63\1\45\1\46"+
- "\1\57\1\103\1\43\1\63\1\31\1\62\1\63\1\16\1\0\1\105"+
- "\71\0\1\100\10\0\27\77\1\0\37\77\1\0\72\77\2\0\13\77"+
- "\2\0\10\77\1\0\65\77\1\0\104\77\11\0\44\77\3\0\2\77"+
- "\4\0\36\77\70\0\131\77\22\0\7\77\16\0\2\100\56\0\106\100"+
- "\32\0\2\100\44\0\1\77\1\100\3\77\1\0\1\77\1\0\24\77"+
- "\1\0\54\77\1\0\7\77\3\0\1\77\1\0\1\77\1\0\1\77"+
- "\1\0\1\77\1\0\22\77\15\0\14\77\1\0\102\77\1\0\14\77"+
- "\1\0\44\77\1\0\4\100\11\0\65\77\2\0\2\77\2\0\2\77"+
- "\3\0\34\77\2\0\10\77\2\0\2\77\67\0\46\77\2\0\1\77"+
- "\7\0\46\77\12\0\21\100\1\0\27\100\1\0\3\100\1\0\1\100"+
- "\1\0\2\100\1\0\1\100\13\0\33\77\5\0\3\77\56\0\32\77"+
- "\5\0\1\100\12\77\10\100\15\0\12\100\6\0\1\100\107\77\2\0"+
- "\5\77\1\0\17\77\1\0\4\77\1\0\1\77\17\100\2\77\2\100"+
- "\1\0\4\100\2\0\12\100\u0207\0\3\100\1\0\65\77\2\0\1\100"+
- "\1\77\20\100\3\0\4\100\3\0\12\77\2\100\2\0\12\100\21\0"+
- "\3\100\1\0\10\77\2\0\2\77\2\0\26\77\1\0\7\77\1\0"+
- "\1\77\3\0\4\77\2\0\1\100\1\0\7\100\2\0\2\100\2\0"+
- "\3\100\11\0\1\100\4\0\2\77\1\0\3\77\2\100\2\0\12\100"+
- "\2\77\20\0\1\100\2\0\6\77\4\0\2\77\2\0\26\77\1\0"+
- "\7\77\1\0\2\77\1\0\2\77\1\0\2\77\2\0\1\100\1\0"+
- "\5\100\4\0\2\100\2\0\3\100\13\0\4\77\1\0\1\77\7\0"+
- "\12\100\2\100\3\77\14\0\3\100\1\0\7\77\1\0\1\77\1\0"+
- "\3\77\1\0\26\77\1\0\7\77\1\0\2\77\1\0\5\77\2\0"+
- "\1\100\1\77\10\100\1\0\3\100\1\0\3\100\22\0\1\77\5\0"+
- "\12\100\21\0\3\100\1\0\10\77\2\0\2\77\2\0\26\77\1\0"+
- "\7\77\1\0\2\77\2\0\4\77\2\0\1\100\1\77\6\100\3\0"+
- "\2\100\2\0\3\100\10\0\2\100\4\0\2\77\1\0\3\77\4\0"+
- "\12\100\22\0\2\100\1\0\6\77\3\0\3\77\1\0\4\77\3\0"+
- "\2\77\1\0\1\77\1\0\2\77\3\0\2\77\3\0\3\77\3\0"+
- "\10\77\1\0\3\77\4\0\5\100\3\0\3\100\1\0\4\100\11\0"+
- "\1\100\17\0\11\100\21\0\3\100\1\0\10\77\1\0\3\77\1\0"+
- "\27\77\1\0\12\77\1\0\5\77\4\0\7\100\1\0\3\100\1\0"+
- "\4\100\7\0\2\100\11\0\2\77\4\0\12\100\22\0\2\100\1\0"+
- "\10\77\1\0\3\77\1\0\27\77\1\0\12\77\1\0\5\77\4\0"+
- "\7\100\1\0\3\100\1\0\4\100\7\0\2\100\7\0\1\77\1\0"+
- "\2\77\4\0\12\100\22\0\2\100\1\0\10\77\1\0\3\77\1\0"+
- "\27\77\1\0\20\77\4\0\6\100\2\0\3\100\1\0\4\100\11\0"+
- "\1\100\10\0\2\77\4\0\12\100\221\0\56\77\1\0\1\77\1\100"+
- "\2\77\7\100\5\0\6\77\1\100\10\100\1\0\12\100\47\0\2\77"+
- "\1\0\1\77\2\0\2\77\1\0\1\77\2\0\1\77\6\0\4\77"+
- "\1\0\7\77\1\0\3\77\1\0\1\77\1\0\1\77\2\0\2\77"+
- "\1\0\2\77\1\0\1\77\1\100\2\77\6\100\1\0\2\100\1\77"+
- "\2\0\5\77\1\0\1\100\1\0\6\100\2\0\12\100\76\0\2\100"+
- "\6\0\12\100\13\0\1\100\1\0\1\100\1\0\1\100\4\0\2\100"+
- "\10\77\1\0\41\77\7\0\24\100\1\0\6\100\4\0\6\100\1\0"+
- "\1\100\1\0\25\100\3\0\7\100\1\0\1\100\346\0\46\77\12\0"+
- "\47\77\11\0\1\77\1\0\2\77\1\0\3\77\1\0\1\77\1\0"+
- "\2\77\1\0\5\77\51\0\1\77\1\0\1\77\1\0\1\77\13\0"+
- "\1\77\1\0\1\77\1\0\1\77\3\0\2\77\3\0\1\77\5\0"+
- "\3\77\1\0\1\77\1\0\1\77\1\0\1\77\1\0\1\77\3\0"+
- "\2\77\3\0\2\77\1\0\1\77\50\0\1\77\11\0\1\77\2\0"+
- "\1\77\2\0\2\77\7\0\2\77\1\0\1\77\1\0\7\77\50\0"+
- "\1\77\4\0\1\77\10\0\1\77\u0c06\0\234\77\4\0\132\77\6\0"+
- "\26\77\2\0\6\77\2\0\46\77\2\0\6\77\2\0\10\77\1\0"+
- "\1\77\1\0\1\77\1\0\1\77\1\0\37\77\2\0\65\77\1\0"+
- "\7\77\1\0\1\77\3\0\3\77\1\0\7\77\3\0\4\77\2\0"+
- "\6\77\4\0\15\77\5\0\3\77\1\0\7\77\323\0\15\100\4\0"+
- "\1\100\104\0\1\77\3\0\2\77\2\0\1\77\121\0\3\77\u0e82\0"+
- "\1\100\1\0\1\77\31\0\11\77\6\100\1\0\5\100\13\0\124\77"+
- "\4\0\2\100\2\0\2\100\2\0\132\77\1\0\3\100\6\0\50\77"+
- "\u1cd3\0\u51a6\77\u0c5a\0\u2ba4\77\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, 71, 142, 213, 284, 355, 426, 497, 568, 639,
- 710, 781, 852, 923, 994, 1065, 1136, 1207, 1278, 1349,
- 1420, 1491, 1562, 1633, 1704, 1775, 1846, 1917, 1988, 2059,
- 2130, 2201, 2272, 2343, 2414, 2485, 2556, 2627, 2698, 2769,
- 2840, 2911, 2982, 3053, 3124, 3195, 3266, 3337, 3408, 3479,
- 3550, 3621, 3692, 3763, 3834, 3905, 3976, 4047, 4118, 4189,
- 4260, 4331, 4402, 4473, 4544, 4615, 4544, 4615, 4686, 4544,
- 4544, 4615, 4757, 4828, 4899, 4970, 5041, 5112, 5183, 5254,
- 4544, 4615, 5325, 5396, 5467, 4544, 5538, 5538, 5609, 5680,
- 5751, 5325, 4544, 5822, 5893, 4544, 5964, 6035, 6106, 6177,
- 4544, 4615, 6248, 6319, 6390, 6461, 6532, 6603, 4544, 6674,
- 6674, 6745, 6816, 6887, 6958, 7029, 4544, 7100, 7171, 7242,
- 7313, 7384, 7455, 7526, 7597, 4544, 7668, 7739, 7810, 7881,
- 7952, 8023, 8094, 8165, 4544, 8236, 8307, 8378, 8449, 8520,
- 8591, 8662, 8733, 8733, 8804, 8875, 8946, 9017, 9017, 9088,
- 9159, 9230, 9301, 9301, 9372, 9443, 9514, 9585, 4544, 9656,
- 9656, 9727, 9798, 9869, 9940, 4544, 4544, 4615, 4544, 4615,
- 10011, 10082, 7739, 10153, 10224, 10295, 10366, 10437, 10508, 10579,
- 10650, 4544, 10721, 10792, 10863, 10934, 4544, 11005, 11076, 11147,
- 11218, 4544, 4544, 11289, 4544, 11360, 11431, 4544, 11360, 11502,
- 11573, 4544, 11502, 11644, 11715, 4544, 11786, 4544, 11857, 11928,
- 11999, 12070, 12141, 4544, 4544, 12212, 4544, 12283, 12354, 4544,
- 12283, 12425, 12496, 4544, 12425, 12567, 12638, 12709, 4544, 12780,
- 12851, 12922, 4544, 4544, 12993, 13064, 13135, 13206, 13277, 13348,
- 13419, 13490, 13561, 13632, 13703, 13774, 13845, 13916, 13987, 4544,
- 14058, 14129, 14200, 4544, 4544, 5538, 5680, 4544, 14271, 14342,
- 5751, 14413, 14484, 5822, 5964, 6035, 14555, 6106, 4544, 14626,
- 14697, 14768, 6177, 14839, 14910, 4544, 13064, 4544, 6674, 6745,
- 4544, 14981, 15052, 6816, 15123, 15194, 4544, 15265, 15336, 15407,
- 15478, 7668, 15549, 7881, 4544, 15620, 15691, 7952, 15762, 15833,
- 15904, 15975, 16046, 16117, 16188, 8449, 4544, 16259, 16330, 8733,
- 8804, 4544, 16401, 16472, 16543, 16614, 16685, 16756, 16827, 8946,
- 8733, 9017, 9088, 4544, 9159, 9230, 9017, 9301, 9372, 4544,
- 16898, 16969, 17040, 17111, 17182, 17253, 17324, 17395, 17466, 9656,
- 9727, 4544, 17537, 17608, 17679, 17750, 17821, 17892, 17963, 18034,
- 18105, 18176, 10082, 10224, 4544, 18247, 18318, 10295, 18389, 18460,
- 18531, 18602, 4544, 18673, 4544, 4544, 4544, 4544, 18744, 18815,
- 18886, 18957, 11360, 4544, 19028, 19099, 11502, 4544, 19170, 19241,
- 19312, 19383, 19454, 19525, 19596, 19667, 19738, 12070, 12283, 4544,
- 19809, 19880, 12425, 4544, 19951, 20022, 20093, 20164, 20235, 20306,
- 20377, 20448, 20519, 4544, 4544, 4544, 20590, 20661, 20732, 20803,
- 20874, 4544, 20945, 21016, 21087, 4544, 4544, 4544, 4544, 21158,
- 4544, 4544, 4970, 21229, 21300, 21371, 21442, 21513, 21584, 21655,
- 21726, 21797, 21868, 21939, 22010, 22081, 4544, 4544, 22152, 22223,
- 22294, 22365, 22294, 22436, 22507, 22436, 22578, 22649, 22720, 22791,
- 22862, 22933, 23004, 23075, 23075, 23146, 23217, 23288, 23359, 23359,
- 23430, 23501, 9514, 9514, 9514, 23572, 23643, 23714, 23785, 23785,
- 23856, 23927, 9869, 9869, 9869, 23998, 24069, 10224, 24140, 10295,
- 24211, 24282, 24282, 24353, 24353, 18886, 24424, 11147, 11147, 11147,
- 24495, 24566, 11360, 11360, 11360, 24637, 24708, 11502, 11502, 11502,
- 24779, 24850, 11644, 11644, 11644, 19454, 24921, 24992, 11857, 11857,
- 11857, 19667, 25063, 25134, 12070, 12070, 12070, 25205, 12283, 12283,
- 12283, 25276, 25347, 12425, 12425, 12425, 25418, 25489, 12567, 12567,
- 12567, 20235, 25560, 25631, 12780, 12780, 12780, 20448, 25702, 4544,
- 4544, 25773, 25844, 4544, 25915, 25986, 26057, 26128, 26199, 26270,
- 7668, 4544, 4544, 26341, 26412, 26483, 26554, 26625, 16685, 17182,
- 9514, 26696, 17821, 9869, 26767, 4544, 10082, 11147, 11360, 26838,
- 11502, 26909, 11644, 26980, 4544, 11857, 27051, 12070, 12283, 27122,
- 12425, 27193, 12567, 27264, 4544, 12780, 27335, 27406, 27477, 27548,
- 27619, 27690, 27761, 27832, 27903, 27974, 28045, 28116, 28187, 28258,
- 28329, 28400, 28471, 28542, 28613, 28684, 28755, 28826, 28897, 4970,
- 28968, 29039, 29110, 29181, 29252, 4544, 4544, 29323, 29394, 29465,
- 29536, 19454, 19667, 29607, 29678, 20235, 20448, 29749, 29820, 29891,
- 29962, 4544, 4544, 4544, 30033, 30104, 30175, 30246, 30317, 30388,
- 30459, 30530, 7242, 30601, 30672, 30743, 30814, 30885, 30956, 31027,
- 4544, 31098, 31169, 9514, 9869, 11360, 11502, 12283, 12425, 31240,
- 31311, 31382, 31453, 31524, 31595, 31666, 31737, 4970, 31808, 31879,
- 31950, 32021, 32092, 32163, 32234, 32305, 32376, 32447, 32518, 32589,
- 32660, 32731, 32802, 32873, 32944, 33015, 33086, 33157, 33228, 33299,
- 33370, 33441, 33512, 33583, 33654, 33725, 33796, 33867, 33938, 34009,
- 34080, 34151, 34222, 34293, 4544, 34364, 34435, 34506, 34577, 7242,
- 34648, 34719, 34790, 34861, 34932, 35003, 35074, 35145, 35216, 35287,
- 35358, 35429, 35500, 35571
- };
-
- /**
- * 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\1\72\1\76"+
- "\3\72\1\77\42\72\1\100\20\72\1\101\1\102\105\101"+
- "\1\103\1\104\22\103\1\105\2\103\1\106\57\103\1\107"+
- "\1\110\105\107\1\103\1\104\5\103\1\111\17\103\1\106"+
- "\60\103\1\104\2\103\1\112\1\113\2\103\2\114\6\103"+
- "\1\113\6\103\1\113\1\115\1\116\4\114\1\103\10\114"+
- "\1\117\2\114\1\103\11\114\1\117\1\114\1\103\4\114"+
- "\1\103\4\114\1\103\4\114\1\103\1\114\1\103\1\104"+
- "\2\103\1\112\1\120\12\103\1\120\6\103\1\120\57\103"+
- "\1\121\1\122\2\121\1\123\22\121\1\106\57\121\1\103"+
- "\1\104\2\103\1\124\1\113\2\103\2\125\6\103\1\113"+
- "\6\103\1\113\6\125\1\103\13\125\1\103\13\125\1\103"+
- "\4\125\1\103\4\125\1\103\4\125\1\103\1\125\1\103"+
- "\1\104\2\103\1\124\1\113\2\103\2\125\6\103\1\113"+
- "\6\103\1\113\6\125\1\103\13\125\1\126\13\125\1\103"+
- "\4\125\1\103\4\125\1\103\4\125\1\103\1\125\1\127"+
- "\1\104\1\103\1\130\1\131\1\113\4\127\1\132\1\127"+
- "\1\133\3\127\1\113\6\127\1\113\57\127\1\103\1\104"+
- "\2\103\1\134\22\103\1\106\60\103\1\104\1\135\1\136"+
- "\1\103\1\113\2\103\2\137\6\103\1\113\6\103\1\113"+
- "\6\137\1\103\13\137\1\103\13\137\1\103\4\137\1\103"+
- "\4\137\1\103\4\137\1\103\1\137\1\103\1\104\1\135"+
- "\1\136\1\103\1\113\2\103\2\137\6\103\1\113\6\103"+
- "\1\113\6\137\1\103\13\137\1\140\13\137\1\103\4\137"+
- "\1\103\4\137\1\103\4\137\1\103\1\137\1\141\1\104"+
- "\1\135\1\142\1\141\1\113\4\141\1\143\1\141\1\144"+
- "\3\141\1\113\6\141\1\113\57\141\1\103\1\104\3\103"+
- "\1\113\12\103\1\113\6\103\1\113\57\103\1\145\1\146"+
- "\21\145\1\147\63\145\1\103\1\150\3\103\1\113\2\103"+
- "\2\151\6\103\1\113\2\103\1\152\3\103\1\113\6\151"+
- "\1\103\13\151\1\103\13\151\1\103\4\151\1\103\4\151"+
- "\1\103\4\151\1\103\1\151\1\103\1\150\3\103\1\153"+
- "\12\103\1\153\2\103\1\152\3\103\1\153\60\103\1\150"+
- "\3\103\1\113\2\103\2\154\6\103\1\113\2\103\1\152"+
- "\3\103\1\113\6\154\1\103\13\154\1\103\13\154\1\103"+
- "\4\154\1\103\4\154\1\103\4\154\1\103\1\154\1\103"+
- "\1\150\3\103\1\113\2\103\2\154\6\103\1\113\2\103"+
- "\1\152\3\103\1\113\6\154\1\103\13\154\1\155\13\154"+
- "\1\103\4\154\1\103\4\154\1\103\4\154\1\103\1\154"+
- "\1\156\1\150\1\103\1\157\1\156\1\113\4\156\1\160"+
- "\1\156\1\161\3\156\1\113\2\156\1\162\3\156\1\113"+
- "\57\156\1\163\1\164\1\165\1\166\4\163\2\167\16\163"+
- "\6\170\1\163\13\170\1\163\13\170\1\163\4\170\1\163"+
- "\4\170\1\163\1\171\3\170\1\163\1\170\1\103\1\172"+
- "\1\165\1\166\1\103\1\113\2\103\2\173\3\103\1\174"+
- "\2\103\1\113\6\103\1\113\6\173\1\103\13\173\1\103"+
- "\13\173\1\175\4\173\1\103\4\173\1\103\4\173\1\103"+
- "\1\173\1\103\1\172\1\165\1\166\1\103\1\113\2\103"+
- "\2\173\6\103\1\113\6\103\1\113\6\173\1\103\13\173"+
- "\1\176\13\173\1\103\4\173\1\103\4\173\1\103\4\173"+
- "\1\103\1\173\1\177\1\200\1\165\1\201\1\177\1\113"+
- "\4\177\1\202\1\177\1\203\1\204\2\177\1\113\6\177"+
- "\1\113\36\177\1\205\20\177\1\103\1\206\1\207\2\103"+
- "\1\113\12\103\1\113\6\103\1\113\10\103\1\210\1\211"+
- "\2\103\1\212\11\103\1\212\1\103\1\211\1\210\26\103"+
- "\1\104\1\207\2\103\1\113\12\103\1\113\6\103\1\113"+
- "\6\103\1\213\51\103\1\104\1\207\2\103\1\113\2\103"+
- "\2\214\6\103\1\113\6\103\1\113\6\214\1\213\13\214"+
- "\1\103\13\214\1\103\4\214\1\103\4\214\1\103\4\214"+
- "\1\103\1\214\1\103\1\104\1\207\2\103\1\113\12\103"+
- "\1\113\6\103\1\113\6\103\1\213\7\103\1\215\6\103"+
- "\1\216\11\103\1\215\12\103\1\216\4\103\1\217\1\104"+
- "\1\207\1\220\1\217\1\113\4\217\1\221\1\217\1\222"+
- "\3\217\1\113\6\217\1\113\6\217\1\223\50\217\1\224"+
- "\1\104\1\207\1\225\1\224\1\113\4\224\1\226\1\224"+
- "\1\227\3\224\1\113\6\224\1\113\6\224\1\230\50\224"+
- "\1\231\1\104\1\207\1\232\1\231\1\113\4\231\1\233"+
- "\1\231\1\234\3\231\1\113\6\231\1\113\57\231\1\235"+
- "\1\236\1\237\104\235\1\240\1\104\1\207\1\241\1\240"+
- "\1\113\4\240\1\242\1\240\1\243\3\240\1\113\6\240"+
- "\1\113\57\240\1\244\1\245\1\246\104\244\1\247\1\250"+
- "\105\247\1\103\1\104\25\103\1\106\57\103\1\251\1\252"+
- "\105\251\1\103\1\104\5\103\1\253\17\103\1\106\57\103"+
- "\1\254\1\255\1\165\1\256\1\254\1\113\4\254\1\257"+
- "\1\254\1\260\1\261\2\254\1\113\6\254\1\113\36\254"+
- "\1\262\20\254\1\263\1\264\3\263\1\265\6\263\1\266"+
- "\1\267\2\263\1\265\6\263\1\265\36\263\1\270\20\263"+
- "\1\271\1\264\3\271\1\272\4\271\1\273\2\271\1\274"+
- "\2\271\1\272\6\271\1\272\36\271\1\275\20\271\1\276"+
- "\1\277\10\276\1\300\1\276\1\301\1\302\67\276\1\303"+
- "\1\276\1\304\1\305\12\304\1\306\12\304\1\307\57\304"+
- "\1\310\1\311\10\310\1\312\14\310\1\313\57\310\1\103"+
- "\1\104\12\103\1\306\12\103\1\106\60\103\1\104\10\103"+
- "\1\312\14\103\1\106\57\103\1\314\1\315\10\314\1\316"+
- "\4\314\1\317\65\314\1\320\1\314\1\321\1\322\12\321"+
- "\1\266\2\321\1\323\65\321\1\320\1\321\1\324\1\325"+
- "\10\324\1\326\1\324\1\327\51\324\1\330\16\324\1\331"+
- "\1\324\1\332\1\333\12\332\1\334\12\332\1\335\57\332"+
- "\1\336\1\337\10\336\1\340\14\336\1\341\57\336\1\103"+
- "\1\104\12\103\1\334\12\103\1\106\60\103\1\104\10\103"+
- "\1\340\14\103\1\106\57\103\1\342\1\343\10\342\1\316"+
- "\4\342\1\344\65\342\1\345\1\342\1\346\1\347\12\346"+
- "\1\266\2\346\1\350\65\346\1\345\1\346\1\72\1\0"+
- "\11\72\1\0\1\72\1\0\5\72\1\0\42\72\1\0"+
- "\20\72\3\0\1\351\1\352\16\0\1\353\2\0\1\354"+
- "\65\0\1\355\2\0\2\356\6\0\1\355\6\0\1\355"+
- "\6\356\1\0\13\356\1\0\13\356\1\357\4\356\1\0"+
- "\4\356\1\0\4\356\1\0\1\356\1\72\1\0\11\72"+
- "\1\0\1\72\1\360\1\361\4\72\1\0\64\72\1\0"+
- "\11\72\1\0\1\72\1\362\5\72\1\0\42\72\1\362"+
- "\20\72\5\0\1\355\2\0\2\363\6\0\1\355\2\0"+
- "\1\364\3\0\1\355\6\363\1\0\13\363\1\0\13\363"+
- "\1\0\4\363\1\0\4\363\1\0\4\363\1\0\1\363"+
- "\1\72\1\0\11\72\1\0\2\72\1\365\4\72\1\0"+
- "\42\72\1\366\20\72\132\0\1\353\2\0\1\367\104\0"+
- "\1\370\71\0\1\371\101\0\1\372\111\0\1\113\12\0"+
- "\1\113\6\0\1\113\65\0\4\114\7\0\1\114\6\0"+
- "\6\114\1\0\13\114\1\0\13\114\1\0\4\114\1\0"+
- "\11\114\1\0\1\114\6\0\4\114\7\0\1\114\6\0"+
- "\2\114\2\373\2\114\1\0\13\114\1\0\13\114\1\0"+
- "\4\114\1\0\11\114\1\0\1\114\6\0\4\114\7\0"+
- "\1\114\6\0\2\114\1\373\1\374\2\114\1\0\13\114"+
- "\1\0\13\114\1\0\4\114\1\0\11\114\1\0\1\114"+
- "\6\0\4\114\7\0\1\114\6\0\2\114\2\375\2\114"+
- "\1\0\13\114\1\0\13\114\1\0\4\114\1\0\11\114"+
- "\1\0\1\114\5\0\1\120\12\0\1\120\6\0\1\120"+
- "\61\0\1\376\106\0\1\377\112\0\4\125\7\0\1\125"+
- "\6\0\6\125\1\0\13\125\1\0\13\125\1\0\4\125"+
- "\1\0\11\125\1\0\1\125\1\127\2\0\1\u0100\1\127"+
- "\1\0\4\127\1\0\1\127\1\0\3\127\1\0\6\127"+
- "\1\0\60\127\1\0\1\377\1\u0100\1\127\1\0\4\127"+
- "\1\0\1\127\1\0\3\127\1\0\6\127\1\0\57\127"+
- "\1\u0101\1\0\10\u0101\1\u0102\2\u0101\1\u0103\1\u0101\1\u0104"+
- "\46\u0101\1\u0103\20\u0101\1\u0105\1\0\12\u0105\1\u0102\1\u0106"+
- "\1\u0105\1\u0107\46\u0105\1\u0106\20\u0105\2\0\1\135\1\u0108"+
- "\111\0\4\137\7\0\1\137\6\0\6\137\1\0\13\137"+
- "\1\0\13\137\1\0\4\137\1\0\11\137\1\0\1\137"+
- "\1\141\2\0\1\u0109\1\141\1\0\4\141\1\0\1\141"+
- "\1\0\3\141\1\0\6\141\1\0\60\141\1\0\1\135"+
- "\1\u010a\1\141\1\0\4\141\1\0\1\141\1\0\3\141"+
- "\1\0\6\141\1\0\57\141\1\143\1\0\1\u010b\1\u010c"+
- "\1\143\1\u010b\4\143\1\u010d\1\143\1\u010b\1\u010e\1\143"+
- "\1\u010f\1\u010b\6\143\1\u010b\36\143\1\u010e\20\143\1\144"+
- "\1\0\1\u0110\1\u0111\1\144\1\u0110\4\144\1\u0110\1\144"+
- "\1\u010d\1\u0112\1\144\1\u0113\1\u0110\6\144\1\u0110\36\144"+
- "\1\u0112\20\144\2\0\1\u0114\127\0\1\353\2\0\1\u0115"+
- "\66\0\4\151\7\0\1\151\6\0\6\151\1\0\13\151"+
- "\1\0\13\151\1\0\4\151\1\0\11\151\1\0\1\151"+
- "\2\0\1\u0116\111\0\1\153\12\0\1\153\6\0\1\153"+
- "\65\0\4\154\7\0\1\154\6\0\6\154\1\0\13\154"+
- "\1\0\13\154\1\0\4\154\1\0\11\154\1\0\1\154"+
- "\1\156\2\0\1\u0117\1\156\1\0\4\156\1\0\1\156"+
- "\1\0\3\156\1\0\6\156\1\0\57\156\1\u0118\1\0"+
- "\10\u0118\1\u0119\2\u0118\1\u011a\1\u0118\1\u011b\46\u0118\1\u011a"+
- "\20\u0118\1\u011c\1\0\12\u011c\1\u0119\1\u011d\1\u011c\1\u011e"+
- "\46\u011c\1\u011d\20\u011c\1\156\1\0\1\u0116\1\u0117\1\156"+
- "\1\0\4\156\1\0\1\156\1\0\3\156\1\0\6\156"+
- "\1\0\57\156\1\163\3\0\24\163\6\0\1\163\13\0"+
- "\1\163\13\0\1\163\4\0\1\163\4\0\1\163\4\0"+
- "\1\163\4\0\1\351\17\0\1\353\2\0\1\354\62\0"+
- "\1\u011f\104\0\1\163\3\0\2\163\4\167\7\163\1\167"+
- "\6\163\6\170\1\163\13\170\1\163\13\170\1\163\4\170"+
- "\1\163\4\170\1\167\4\170\1\163\1\170\6\0\4\170"+
- "\7\0\1\170\6\0\6\170\1\0\13\170\1\0\13\170"+
- "\1\0\4\170\1\0\11\170\1\0\1\170\6\0\4\170"+
- "\7\0\1\170\6\0\6\170\1\0\7\170\1\u0120\3\170"+
- "\1\0\13\170\1\0\4\170\1\0\11\170\1\0\1\170"+
- "\3\0\1\351\4\0\2\u0121\11\0\1\353\2\0\1\354"+
- "\1\0\6\u0121\1\0\13\u0121\1\0\13\u0121\1\0\4\u0121"+
- "\1\0\4\u0121\1\0\4\u0121\1\0\1\u0121\6\0\4\173"+
- "\7\0\1\173\6\0\6\173\1\0\13\173\1\0\13\173"+
- "\1\0\4\173\1\0\11\173\1\0\1\173\16\0\1\u0122"+
- "\106\0\1\u0123\70\0\1\177\2\0\1\u0124\1\177\1\0"+
- "\4\177\1\0\1\177\1\0\3\177\1\0\6\177\1\0"+
- "\57\177\3\0\1\351\4\0\2\u0125\11\0\1\353\2\0"+
- "\1\354\1\0\6\u0125\1\0\13\u0125\1\0\13\u0125\1\0"+
- "\4\u0125\1\0\4\u0125\1\0\4\u0125\1\0\1\u0125\1\177"+
- "\1\0\1\u011f\1\u0124\1\177\1\0\4\177\1\0\1\177"+
- "\1\0\3\177\1\0\6\177\1\0\57\177\1\u0126\1\0"+
- "\10\u0126\1\u0127\2\u0126\1\u0128\1\u0126\1\u0129\46\u0126\1\u0128"+
- "\20\u0126\1\u012a\1\0\12\u012a\1\u0127\1\u012b\1\u012a\1\u012c"+
- "\46\u012a\1\u012b\20\u012a\1\177\2\0\1\u0124\1\177\1\0"+
- "\4\177\1\0\1\177\1\0\1\177\1\u012d\1\177\1\0"+
- "\6\177\1\0\60\177\2\0\1\u0124\1\177\1\0\4\177"+
- "\1\0\1\177\1\0\1\177\1\u012e\1\177\1\0\6\177"+
- "\1\0\57\177\3\0\1\351\17\0\1\353\2\0\1\u0115"+
- "\130\0\1\u012f\2\0\1\u012f\75\0\1\u0130\14\0\1\u0130"+
- "\63\0\2\u0131\51\0\24\u0132\1\u0133\62\u0132\6\0\4\214"+
- "\7\0\1\214\6\0\6\214\1\0\13\214\1\0\13\214"+
- "\1\0\4\214\1\0\11\214\1\0\1\214\54\0\1\u0134"+
- "\5\0\1\u0134\116\0\1\u0135\10\0\1\u0135\3\0\1\217"+
- "\2\0\1\u0136\1\217\1\0\4\217\1\0\1\217\1\0"+
- "\3\217\1\0\6\217\1\0\57\217\1\u0137\1\0\10\u0137"+
- "\1\u0138\2\u0137\1\u0139\1\u0137\1\u013a\46\u0137\1\u0139\20\u0137"+
- "\1\u013b\1\0\1\u013b\2\u013c\1\u013b\4\u013c\2\u013b\1\u013d"+
- "\1\u013e\1\u013b\1\u013f\4\u013c\1\u013b\11\u013c\1\u013b\27\u013c"+
- "\1\u013e\10\u013c\2\u013b\4\u013c\1\u013b\1\u013c\1\223\2\u0132"+
- "\1\u0140\1\223\1\u0132\4\223\1\u0132\1\223\1\u0132\3\223"+
- "\1\u0132\3\223\1\u0141\2\223\1\u0132\57\223\1\224\2\0"+
- "\1\u0142\1\224\1\0\4\224\1\0\1\224\1\0\3\224"+
- "\1\0\6\224\1\0\57\224\12\u0143\1\u0144\74\u0143\14\u0145"+
- "\1\u0144\72\u0145\1\230\2\u0132\1\u0146\1\230\1\u0132\4\230"+
- "\1\u0132\1\230\1\u0132\3\230\1\u0132\3\230\1\u0147\2\230"+
- "\1\u0132\57\230\1\231\2\0\1\u0148\1\231\1\0\4\231"+
- "\1\0\1\231\1\0\3\231\1\0\6\231\1\0\57\231"+
- "\1\u0149\1\0\10\u0149\1\u014a\2\u0149\1\u014b\1\u0149\1\u014c"+
- "\46\u0149\1\u014b\20\u0149\1\u014d\1\0\1\u014d\2\u014e\1\u014d"+
- "\4\u014e\2\u014d\1\u014f\1\u0150\1\u014d\1\u0151\4\u014e\1\u014d"+
- "\11\u014e\1\u014d\27\u014e\1\u0150\10\u014e\2\u014d\4\u014e\1\u014d"+
- "\1\u014e\2\235\1\0\106\235\1\0\20\235\1\u0152\2\235"+
- "\1\u0153\60\235\1\240\2\0\1\u0154\1\240\1\0\4\240"+
- "\1\0\1\240\1\0\3\240\1\0\6\240\1\0\57\240"+
- "\1\u0155\1\0\10\u0155\1\u0156\2\u0155\1\u0157\1\u0155\1\u0158"+
- "\46\u0155\1\u0157\20\u0155\1\u0159\1\0\1\u0159\2\u015a\1\u0159"+
- "\4\u015a\2\u0159\1\u015b\1\u015c\1\u0159\1\u015d\4\u015a\1\u0159"+
- "\11\u015a\1\u0159\27\u015a\1\u015c\10\u015a\2\u0159\4\u015a\1\u0159"+
- "\1\u015a\2\244\1\0\106\244\1\0\20\244\1\u015e\2\244"+
- "\1\u015f\60\244\7\0\1\u0160\77\0\1\254\2\0\1\u0161"+
- "\1\254\1\0\4\254\1\0\1\254\1\0\3\254\1\0"+
- "\6\254\1\0\60\254\1\0\1\u011f\1\u0161\1\254\1\0"+
- "\4\254\1\0\1\254\1\0\3\254\1\0\6\254\1\0"+
- "\57\254\1\u0162\1\0\10\u0162\1\u0163\2\u0162\1\u0164\1\u0162"+
- "\1\u0165\46\u0162\1\u0164\20\u0162\1\u0166\1\0\12\u0166\1\u0163"+
- "\1\u0167\1\u0166\1\u0168\46\u0166\1\u0167\20\u0166\1\254\2\0"+
- "\1\u0161\1\254\1\0\4\254\1\0\1\254\1\0\1\254"+
- "\1\u0169\1\254\1\0\6\254\1\0\60\254\2\0\1\u0161"+
- "\1\254\1\0\4\254\1\0\1\254\1\0\1\254\1\u016a"+
- "\1\254\1\0\6\254\1\0\57\254\1\263\1\0\12\263"+
- "\2\0\50\263\1\0\20\263\3\0\1\u016b\17\0\1\353"+
- "\2\0\1\367\60\0\1\263\1\0\3\263\1\265\6\263"+
- "\2\0\2\263\1\265\6\263\1\265\36\263\1\0\20\263"+
- "\5\0\1\u016c\10\0\1\u016d\1\0\1\u016c\6\0\1\u016c"+
- "\64\0\1\u016c\10\0\1\u016e\1\0\1\u016c\6\0\1\u016c"+
- "\57\0\1\271\1\0\10\271\1\0\2\271\1\0\50\271"+
- "\1\0\21\271\1\0\3\271\1\272\4\271\1\0\2\271"+
- "\1\0\2\271\1\272\6\271\1\272\36\271\1\0\20\271"+
- "\5\0\1\u016c\10\0\1\u016f\1\0\1\u016c\6\0\1\u016c"+
- "\64\0\1\u016c\10\0\1\u0170\1\0\1\u016c\6\0\1\u016c"+
- "\57\0\12\276\1\0\1\276\1\0\1\u0171\67\276\1\0"+
- "\13\276\1\0\1\276\1\0\1\u0171\5\276\1\u0172\61\276"+
- "\1\0\13\276\1\0\1\276\1\0\1\276\1\u0173\66\276"+
- "\1\u0174\1\276\14\u0175\1\u0176\106\u0175\1\u0176\6\u0175\1\u0177"+
- "\2\u0175\1\u0178\60\u0175\12\u0179\1\u017a\106\u0179\1\u017a\10\u0179"+
- "\1\u017b\2\u0179\1\u017c\60\u0179\12\314\1\0\4\314\1\u017d"+
- "\65\314\1\0\13\314\1\0\4\314\1\u017d\3\314\1\u017e"+
- "\61\314\1\0\13\314\1\u017f\74\314\14\321\1\0\2\321"+
- "\1\u0180\65\321\1\0\15\321\1\0\2\321\1\u0180\3\321"+
- "\1\u0181\61\321\1\0\15\321\1\u0182\72\321\12\324\1\0"+
- "\1\324\1\0\70\324\1\0\13\324\1\0\1\324\1\0"+
- "\6\324\1\u0183\61\324\1\0\13\324\1\0\1\324\1\0"+
- "\1\324\1\u0184\66\324\1\0\1\324\14\u0185\1\u0186\106\u0185"+
- "\1\u0186\6\u0185\1\u0187\2\u0185\1\u0188\60\u0185\12\u0189\1\u018a"+
- "\106\u0189\1\u018a\10\u0189\1\u018b\2\u0189\1\u018c\60\u0189\12\342"+
- "\1\0\4\342\1\u018d\65\342\1\0\13\342\1\0\4\342"+
- "\1\u018d\3\342\1\u018e\61\342\1\0\13\342\1\u018f\74\342"+
- "\14\346\1\0\2\346\1\u0190\65\346\1\0\15\346\1\0"+
- "\2\346\1\u0190\3\346\1\u0191\61\346\1\0\15\346\1\u0192"+
- "\72\346\7\0\1\u0193\12\0\1\u0194\3\0\1\u0195\23\0"+
- "\1\u0196\43\0\1\u0197\26\0\1\u0198\55\0\1\355\2\0"+
- "\2\u0199\6\0\1\355\6\0\1\355\6\u0199\1\0\13\u0199"+
- "\1\0\13\u0199\1\0\4\u0199\1\0\4\u0199\1\0\4\u0199"+
- "\1\0\1\u0199\1\u019a\1\0\3\u019a\1\u019b\4\356\1\u019a"+
- "\1\0\4\u019a\1\u019b\1\356\1\u019a\1\0\3\u019a\1\u019b"+
- "\6\356\1\u019a\13\356\1\u019a\13\356\1\u019a\4\356\1\u019c"+
- "\11\356\1\u019a\1\356\21\0\1\u019d\7\0\1\u019e\55\0"+
- "\1\72\1\0\11\72\1\0\1\72\1\u019f\5\72\1\0"+
- "\42\72\1\0\20\72\105\361\1\u01a0\1\361\16\0\1\u01a1"+
- "\70\0\1\u019a\1\0\3\u019a\1\u019b\4\363\1\u019a\1\0"+
- "\4\u019a\1\u019b\1\363\1\u019a\1\0\3\u019a\1\u019b\6\363"+
- "\1\u019a\13\363\1\u019a\13\363\1\u019a\4\363\1\u01a2\11\363"+
- "\1\u019a\1\363\23\0\1\364\63\0\105\365\1\u01a3\1\365"+
- "\1\72\1\0\11\72\1\0\1\72\1\0\5\72\1\0"+
- "\42\72\1\u01a4\20\72\36\0\1\u0198\52\0\1\u01a5\106\0"+
- "\1\u01a6\112\0\4\114\7\0\1\114\6\0\4\114\2\u01a7"+
- "\1\0\13\114\1\0\13\114\1\0\4\114\1\0\11\114"+
- "\1\0\1\114\6\0\4\114\7\0\1\114\6\0\4\114"+
- "\1\u01a7\1\u01a8\1\0\13\114\1\0\13\114\1\0\4\114"+
- "\1\0\11\114\1\0\1\114\6\0\4\114\7\0\1\114"+
- "\6\0\6\114\1\0\13\114\1\0\2\114\1\u01a9\10\114"+
- "\1\0\4\114\1\0\6\114\1\u01a9\2\114\1\0\1\114"+
- "\1\u0101\1\0\10\u0101\1\u0102\3\u0101\1\0\71\u0101\1\0"+
- "\10\u0101\1\u0102\2\u0101\1\u01aa\1\u0101\1\u0104\46\u0101\1\u01aa"+
- "\20\u0101\1\u0105\1\0\12\u0105\1\u0102\1\u0105\1\0\71\u0105"+
- "\1\0\12\u0105\1\u0102\1\u01ab\1\u0105\1\u0107\46\u0105\1\u01ab"+
- "\20\u0105\1\u010b\1\0\10\u010b\1\u010d\2\u010b\1\u01ac\1\u010b"+
- "\1\u01ad\46\u010b\1\u01ac\20\u010b\1\143\1\0\1\u010b\1\u010c"+
- "\1\143\1\u010b\4\143\1\u010d\1\143\1\u010b\1\143\1\141"+
- "\1\143\1\u010b\6\143\1\u010b\60\143\1\0\1\u010b\1\u010c"+
- "\1\143\1\u010b\4\143\1\u010d\1\143\1\u010b\1\u01ae\1\143"+
- "\1\u010f\1\u010b\6\143\1\u010b\36\143\1\u01ae\20\143\1\u0110"+
- "\1\0\12\u0110\1\u010d\1\u01af\1\u0110\1\u01b0\46\u0110\1\u01af"+
- "\20\u0110\1\144\1\0\1\u0110\1\u0111\1\144\1\u0110\4\144"+
- "\1\u0110\1\144\1\u010d\1\144\1\141\1\144\1\u0110\6\144"+
- "\1\u0110\60\144\1\0\1\u0110\1\u0111\1\144\1\u0110\4\144"+
- "\1\u0110\1\144\1\u010d\1\u01b1\1\144\1\u0113\1\u0110\6\144"+
- "\1\u0110\36\144\1\u01b1\20\144\1\u0118\1\0\10\u0118\1\u0119"+
- "\3\u0118\1\0\71\u0118\1\0\10\u0118\1\u0119\2\u0118\1\u01b2"+
- "\1\u0118\1\u011b\46\u0118\1\u01b2\20\u0118\1\u011c\1\0\12\u011c"+
- "\1\u0119\1\u011c\1\0\71\u011c\1\0\12\u011c\1\u0119\1\u01b3"+
- "\1\u011c\1\u011e\46\u011c\1\u01b3\20\u011c\6\0\4\170\7\0"+
- "\1\170\6\0\6\170\1\0\13\170\1\0\13\170\1\0"+
- "\4\170\1\0\6\170\1\u01b4\2\170\1\0\1\170\6\0"+
- "\4\u0121\7\0\1\u0121\6\0\6\u0121\1\0\13\u0121\1\0"+
- "\13\u0121\1\0\4\u0121\1\0\11\u0121\1\0\1\u0121\105\u0122"+
- "\1\u01b5\1\u0122\105\u0123\1\u01b6\1\u0123\6\0\4\u0125\7\0"+
- "\1\u0125\6\0\6\u0125\1\0\13\u0125\1\0\13\u0125\1\0"+
- "\4\u0125\1\0\11\u0125\1\0\1\u0125\1\u0126\1\0\10\u0126"+
- "\1\u0127\3\u0126\1\0\71\u0126\1\0\10\u0126\1\u0127\2\u0126"+
- "\1\u01b7\1\u0126\1\u0129\46\u0126\1\u01b7\20\u0126\1\u012a\1\0"+
- "\12\u012a\1\u0127\1\u012a\1\0\71\u012a\1\0\12\u012a\1\u0127"+
- "\1\u01b8\1\u012a\1\u012c\46\u012a\1\u01b8\20\u012a\1\u01b9\2\u01ba"+
- "\1\u01bb\1\u01b9\1\u01ba\4\u01b9\1\u01ba\1\u01b9\1\u01ba\3\u01b9"+
- "\1\u01ba\6\u01b9\1\u01ba\55\u01b9\1\177\1\u01b9\1\u01bc\2\u01bd"+
- "\1\u01be\1\u01bc\1\u01bd\4\u01bc\1\u01bd\1\u01bc\1\u01bd\3\u01bc"+
- "\1\u01bd\6\u01bc\1\u01bd\55\u01bc\1\177\1\u01bc\37\0\1\u01bf"+
- "\35\0\1\u01bf\53\0\1\u01c0\14\0\1\u01c0\73\0\1\u01c1"+
- "\11\0\1\u01c1\76\0\1\u01c2\20\0\1\u01c2\113\0\1\u01c3"+
- "\7\0\1\u01c3\2\0\1\u0137\1\0\10\u0137\1\u0138\3\u0137"+
- "\1\0\71\u0137\1\0\10\u0137\1\u0138\2\u0137\1\u01c4\1\u0137"+
- "\1\u013a\46\u0137\1\u01c4\20\u0137\1\u013b\1\0\12\u013b\1\u0138"+
- "\1\u01c5\1\u013b\1\u013f\46\u013b\1\u01c5\21\u013b\1\0\12\u013b"+
- "\1\u01c6\1\u01c5\1\u013b\1\u013f\46\u013b\1\u01c5\20\u013b\14\0"+
- "\1\u01c7\72\0\1\u013b\1\0\12\u013b\1\u01c6\1\u013b\1\0"+
- "\71\u013b\1\0\12\u013b\1\u0138\1\u01c8\1\u013b\1\u013f\46\u013b"+
- "\1\u01c8\20\u013b\1\u0149\1\0\10\u0149\1\u014a\3\u0149\1\0"+
- "\71\u0149\1\0\10\u0149\1\u014a\2\u0149\1\u01c9\1\u0149\1\u014c"+
- "\46\u0149\1\u01c9\20\u0149\1\u014d\1\0\12\u014d\1\u014a\1\u01ca"+
- "\1\u014d\1\u0151\46\u014d\1\u01ca\21\u014d\1\0\12\u014d\1\u01cb"+
- "\1\u01ca\1\u014d\1\u0151\46\u014d\1\u01ca\20\u014d\14\0\1\u01cc"+
- "\72\0\1\u014d\1\0\12\u014d\1\u01cb\1\u014d\1\0\71\u014d"+
- "\1\0\12\u014d\1\u014a\1\u01cd\1\u014d\1\u0151\46\u014d\1\u01cd"+
- "\20\u014d\2\235\1\0\4\235\1\u01ce\12\235\1\u01cf\3\235"+
- "\1\u01d0\23\235\1\u01d1\36\235\1\0\33\235\1\u01d2\50\235"+
- "\1\u0155\1\0\10\u0155\1\u0156\3\u0155\1\0\71\u0155\1\0"+
- "\10\u0155\1\u0156\2\u0155\1\u01d3\1\u0155\1\u0158\46\u0155\1\u01d3"+
- "\20\u0155\1\u0159\1\0\12\u0159\1\u0156\1\u01d4\1\u0159\1\u015d"+
- "\46\u0159\1\u01d4\21\u0159\1\0\12\u0159\1\u01d5\1\u01d4\1\u0159"+
- "\1\u015d\46\u0159\1\u01d4\20\u0159\14\0\1\u01d6\72\0\1\u0159"+
- "\1\0\12\u0159\1\u01d5\1\u0159\1\0\71\u0159\1\0\12\u0159"+
- "\1\u0156\1\u01d7\1\u0159\1\u015d\46\u0159\1\u01d7\20\u0159\2\244"+
- "\1\0\4\244\1\u01d8\12\244\1\u01d9\3\244\1\u01da\23\244"+
- "\1\u01db\36\244\1\0\33\244\1\u01dc\50\244\23\0\1\u01dd"+
- "\63\0\12\u0162\1\u0163\3\u0162\1\0\71\u0162\1\0\10\u0162"+
- "\1\u01de\2\u0162\1\u01df\1\u0162\1\u0165\46\u0162\1\u01df\20\u0162"+
- "\14\u0166\1\u0163\1\u0166\1\0\71\u0166\1\0\12\u0166\1\u01e0"+
- "\1\u01e1\1\u0166\1\u0168\46\u0166\1\u01e1\20\u0166\1\u01e2\2\u01ba"+
- "\1\u01e3\1\u01e2\1\u01ba\4\u01e2\1\u01ba\1\u01e2\1\u01ba\3\u01e2"+
- "\1\u01ba\6\u01e2\1\u01ba\55\u01e2\1\254\1\u01e2\1\u01e4\2\u01bd"+
- "\1\u01e5\1\u01e4\1\u01bd\4\u01e4\1\u01bd\1\u01e4\1\u01bd\3\u01e4"+
- "\1\u01bd\6\u01e4\1\u01bd\55\u01e4\1\254\1\u01e4\5\0\1\u016c"+
- "\12\0\1\u016c\6\0\1\u016c\57\0\12\276\1\0\1\276"+
- "\1\0\1\276\1\u01e6\66\276\1\u0174\10\276\1\u01e7\2\276"+
- "\1\0\1\276\1\0\1\u0171\4\276\1\u01e8\3\276\1\u01e9"+
- "\23\276\1\u01ea\32\276\1\0\1\276\12\u01e6\1\0\1\u01e6"+
- "\1\0\70\u01e6\1\0\1\u01e6\12\u0174\1\0\1\u0174\1\0"+
- "\1\u01eb\67\u0174\1\0\1\u0174\7\u0175\1\u01ec\4\u0175\1\u0176"+
- "\5\u0175\1\u01ed\3\u0175\1\u01ee\23\u0175\1\u01ef\50\u0175\1\u0176"+
- "\21\u0175\1\u01f0\50\u0175\7\u0179\1\u01f1\2\u0179\1\u017a\7\u0179"+
- "\1\u01f2\3\u0179\1\u01f3\23\u0179\1\u01f4\46\u0179\1\u017a\23\u0179"+
- "\1\u01f5\50\u0179\12\314\1\0\103\314\1\u01f6\2\314\1\0"+
- "\4\314\1\u017d\2\314\1\u01f7\3\314\1\u01f8\23\314\1\u01f9"+
- "\32\314\1\0\1\314\17\u01fa\1\u01fb\67\u01fa\14\321\1\0"+
- "\101\321\1\u01fc\4\321\1\0\2\321\1\u0180\2\321\1\u01fd"+
- "\3\321\1\u01fe\23\321\1\u01ff\32\321\1\0\1\321\17\u0200"+
- "\1\u0201\67\u0200\7\324\1\u0202\2\324\1\0\1\324\1\0"+
- "\5\324\1\u0203\3\324\1\u0204\23\324\1\u0205\32\324\1\0"+
- "\1\324\7\u0185\1\u0206\4\u0185\1\u0186\5\u0185\1\u0207\3\u0185"+
- "\1\u0208\23\u0185\1\u0209\50\u0185\1\u0186\21\u0185\1\u020a\50\u0185"+
- "\7\u0189\1\u020b\2\u0189\1\u018a\7\u0189\1\u020c\3\u0189\1\u020d"+
- "\23\u0189\1\u020e\46\u0189\1\u018a\23\u0189\1\u020f\50\u0189\12\342"+
- "\1\0\103\342\1\u0210\2\342\1\0\4\342\1\u018d\2\342"+
- "\1\u0211\3\342\1\u0212\23\342\1\u0213\32\342\1\0\1\342"+
- "\17\u0214\1\u0215\67\u0214\14\346\1\0\101\346\1\u0216\4\346"+
- "\1\0\2\346\1\u0190\2\346\1\u0217\3\346\1\u0218\23\346"+
- "\1\u0219\32\346\1\0\1\346\17\u021a\1\u021b\67\u021a\7\0"+
- "\1\u021c\106\0\1\u021d\136\0\1\u021e\47\0\1\u0199\1\0"+
- "\11\u0199\1\0\7\u0199\1\0\63\u0199\1\u019a\1\0\11\u019a"+
- "\1\0\7\u019a\1\0\47\u019a\1\0\14\u019a\1\0\3\u019a"+
- "\1\u019b\5\u019a\1\0\4\u019a\1\u019b\2\u019a\1\0\3\u019a"+
- "\1\u019b\43\u019a\1\u021f\13\u019a\21\0\1\u019d\51\0\1\u0220"+
- "\34\0\1\u0221\15\0\3\u0221\2\0\1\u0221\11\0\1\u0221"+
- "\1\0\2\u0221\7\0\1\u0221\2\0\2\u0221\6\0\1\u0221"+
- "\17\0\1\u019f\157\0\1\u01a4\26\0\1\114\1\u0222\2\114"+
- "\7\0\1\114\6\0\6\114\1\0\13\114\1\0\13\114"+
- "\1\0\4\114\1\0\11\114\1\0\1\114\6\0\4\114"+
- "\7\0\1\114\6\0\6\114\1\0\11\114\1\u0223\1\114"+
- "\1\0\1\u0223\12\114\1\0\4\114\1\0\11\114\1\0"+
- "\1\114\1\u0101\1\0\10\u0101\1\u0102\74\u0101\1\u0105\1\0"+
- "\12\u0105\1\u0102\72\u0105\1\u010b\1\0\10\u010b\1\u010d\3\u010b"+
- "\1\0\71\u010b\1\0\10\u010b\1\u010d\2\u010b\1\u0224\1\u010b"+
- "\1\u01ad\46\u010b\1\u0224\20\u010b\1\143\1\0\1\u010b\1\u010c"+
- "\1\143\1\u010b\4\143\1\u010d\1\143\1\u010b\3\143\1\u010b"+
- "\6\143\1\u010b\57\143\1\u0110\1\0\12\u0110\1\u010d\1\u0110"+
- "\1\0\71\u0110\1\0\12\u0110\1\u010d\1\u0225\1\u0110\1\u01b0"+
- "\46\u0110\1\u0225\20\u0110\1\144\1\0\1\u0110\1\u0111\1\144"+
- "\1\u0110\4\144\1\u0110\1\144\1\u010d\3\144\1\u0110\6\144"+
- "\1\u0110\57\144\1\u0118\1\0\10\u0118\1\u0119\74\u0118\1\u011c"+
- "\1\0\12\u011c\1\u0119\72\u011c\6\0\3\170\1\u0226\7\0"+
- "\1\170\6\0\6\170\1\0\13\170\1\0\13\170\1\0"+
- "\4\170\1\0\11\170\1\0\1\170\1\u0126\1\0\10\u0126"+
- "\1\u0127\74\u0126\1\u012a\1\0\12\u012a\1\u0127\72\u012a\1\u01b9"+
- "\2\u01ba\1\u01bb\1\u01b9\1\u01ba\4\u01b9\1\u01ba\1\u01b9\1\u01ba"+
- "\3\u01b9\1\u01ba\6\u01b9\1\u01ba\55\u01b9\1\u0227\1\u01b9\105\u01ba"+
- "\1\u0228\1\u01ba\1\u01bc\2\u01bd\1\u01be\1\u01bc\1\u01bd\4\u01bc"+
- "\1\u01bd\1\u01bc\1\u01bd\3\u01bc\1\u01bd\6\u01bc\1\u01bd\55\u01bc"+
- "\1\u0227\1\u01bc\105\u01bd\1\u0229\1\u01bd\42\0\1\u022a\14\0"+
- "\1\u022a\63\0\2\u022b\103\0\2\u022c\115\0\1\u022d\14\0"+
- "\1\u022d\63\0\2\u022e\51\0\1\u0137\1\0\10\u0137\1\u0138"+
- "\74\u0137\1\u013b\1\0\12\u013b\1\u0138\1\u013b\1\0\70\u013b"+
- "\3\0\2\u022f\1\0\4\u022f\2\0\1\u013d\1\u022f\2\0"+
- "\4\u022f\1\0\11\u022f\1\0\40\u022f\2\0\4\u022f\1\0"+
- "\1\u022f\1\u013b\1\0\12\u013b\1\u0138\72\u013b\1\u0149\1\0"+
- "\10\u0149\1\u014a\74\u0149\1\u014d\1\0\12\u014d\1\u014a\1\u014d"+
- "\1\0\70\u014d\3\0\2\u0230\1\0\4\u0230\2\0\1\u014f"+
- "\1\u0230\2\0\4\u0230\1\0\11\u0230\1\0\40\u0230\2\0"+
- "\4\u0230\1\0\1\u0230\1\u014d\1\0\12\u014d\1\u014a\72\u014d"+
- "\2\235\1\0\4\235\1\u0231\101\235\1\0\34\235\1\u0232"+
- "\47\235\1\u0155\1\0\10\u0155\1\u0156\74\u0155\1\u0159\1\0"+
- "\12\u0159\1\u0156\1\u0159\1\0\70\u0159\3\0\2\u0233\1\0"+
- "\4\u0233\2\0\1\u015b\1\u0233\2\0\4\u0233\1\0\11\u0233"+
- "\1\0\40\u0233\2\0\4\u0233\1\0\1\u0233\1\u0159\1\0"+
- "\12\u0159\1\u0156\72\u0159\2\244\1\0\4\244\1\u0234\101\244"+
- "\1\0\34\244\1\u0235\47\244\2\0\1\u0236\104\0\12\u0162"+
- "\1\u0163\74\u0162\14\u0166\1\u0163\72\u0166\1\u01e2\2\u01ba\1\u01e3"+
- "\1\u01e2\1\u01ba\4\u01e2\1\u01ba\1\u01e2\1\u01ba\3\u01e2\1\u01ba"+
- "\6\u01e2\1\u01ba\55\u01e2\1\u0237\1\u01e2\1\u01e4\2\u01bd\1\u01e5"+
- "\1\u01e4\1\u01bd\4\u01e4\1\u01bd\1\u01e4\1\u01bd\3\u01e4\1\u01bd"+
- "\6\u01e4\1\u01bd\55\u01e4\1\u0237\1\u01e4\7\276\1\u0238\2\276"+
- "\1\0\1\276\1\0\1\u0171\67\276\1\0\1\276\12\u0174"+
- "\1\0\1\u0174\1\0\1\u0174\1\0\70\u0174\7\u0175\1\u0239"+
- "\4\u0175\1\u0176\106\u0175\1\u0176\22\u0175\1\u023a\47\u0175\7\u0179"+
- "\1\u023b\2\u0179\1\u017a\106\u0179\1\u017a\24\u0179\1\u023c\47\u0179"+
- "\7\314\1\u023d\2\314\1\0\4\314\1\u017d\65\314\1\0"+
- "\1\314\12\u023e\1\u023f\72\u023e\1\0\1\u023e\7\321\1\u0240"+
- "\4\321\1\0\2\321\1\u0180\65\321\1\0\1\321\14\u0241"+
- "\1\u023f\70\u0241\1\0\1\u0241\7\324\1\u0242\2\324\1\0"+
- "\1\324\1\0\70\324\1\0\1\324\7\u0185\1\u0243\4\u0185"+
- "\1\u0186\106\u0185\1\u0186\22\u0185\1\u0244\47\u0185\7\u0189\1\u0245"+
- "\2\u0189\1\u018a\106\u0189\1\u018a\24\u0189\1\u0246\47\u0189\7\342"+
- "\1\u0247\2\342\1\0\4\342\1\u018d\65\342\1\0\1\342"+
- "\12\u0248\1\u0249\72\u0248\1\0\1\u0248\7\346\1\u024a\4\346"+
- "\1\0\2\346\1\u0190\65\346\1\0\1\346\14\u024b\1\u0249"+
- "\70\u024b\1\0\1\u024b\40\0\1\u024c\141\0\1\u021f\34\0"+
- "\1\u0221\15\0\3\u0221\2\0\1\u0221\11\0\1\u0221\1\0"+
- "\2\u0221\7\0\1\u0221\1\0\1\u0220\2\u0221\6\0\1\u0221"+
- "\10\0\4\114\7\0\1\114\6\0\6\114\1\0\7\114"+
- "\1\u024d\3\114\1\0\13\114\1\0\4\114\1\0\11\114"+
- "\1\0\1\114\6\0\4\114\7\0\1\114\6\0\6\114"+
- "\1\0\6\114\1\u024e\4\114\1\0\13\114\1\0\1\114"+
- "\1\u024e\2\114\1\0\11\114\1\0\1\114\1\u010b\1\0"+
- "\10\u010b\1\u010d\74\u010b\1\u0110\1\0\12\u0110\1\u010d\72\u0110"+
- "\6\0\4\170\7\0\1\170\6\0\6\170\1\0\6\170"+
- "\1\u024f\4\170\1\0\6\170\1\u0250\4\170\1\0\4\170"+
- "\1\0\11\170\1\0\1\170\54\0\1\u0251\5\0\1\u0251"+
- "\73\0\1\u0252\14\0\1\u0252\66\0\1\u0253\11\0\1\u0253"+
- "\74\0\1\u0254\11\0\1\u0254\77\0\1\u0255\14\0\1\u0255"+
- "\22\0\2\235\1\0\35\235\1\u0256\46\235\2\244\1\0"+
- "\35\244\1\u0257\46\244\14\u0175\1\u0176\23\u0175\1\u0258\46\u0175"+
- "\12\u0179\1\u017a\25\u0179\1\u0259\46\u0179\12\u023e\1\u01fa\4\u023e"+
- "\1\u025a\65\u023e\1\u01fa\1\u023e\14\u0241\1\u0200\2\u0241\1\u025b"+
- "\65\u0241\1\u0200\1\u0241\14\u0185\1\u0186\23\u0185\1\u025c\46\u0185"+
- "\12\u0189\1\u018a\25\u0189\1\u025d\46\u0189\12\u0248\1\u0214\4\u0248"+
- "\1\u025e\65\u0248\1\u0214\1\u0248\14\u024b\1\u021a\2\u024b\1\u025f"+
- "\65\u024b\1\u021a\1\u024b\41\0\1\u0260\53\0\4\114\7\0"+
- "\1\114\6\0\6\114\1\0\13\114\1\0\4\114\1\u0261"+
- "\6\114\1\0\4\114\1\0\11\114\1\0\1\114\6\0"+
- "\4\114\7\0\1\114\6\0\6\114\1\0\3\114\1\u0262"+
- "\7\114\1\0\4\114\1\u0262\6\114\1\0\4\114\1\0"+
- "\11\114\1\0\1\114\6\0\4\170\7\0\1\170\6\0"+
- "\6\170\1\0\11\170\1\u0263\1\170\1\0\13\170\1\0"+
- "\4\170\1\0\11\170\1\0\1\170\6\0\4\170\7\0"+
- "\1\170\6\0\6\170\1\0\10\170\1\u0264\2\170\1\0"+
- "\13\170\1\0\4\170\1\0\11\170\1\0\1\170\55\0"+
- "\1\u0265\24\0\1\u0265\52\0\1\u0266\20\0\1\u0266\70\0"+
- "\1\u0267\13\0\1\u0267\53\0\2\u0268\112\0\1\u0269\35\0"+
- "\1\u0269\11\0\2\235\1\0\36\235\1\u026a\45\235\2\244"+
- "\1\0\36\244\1\u026b\45\244\14\u0175\1\u0176\24\u0175\1\u026c"+
- "\45\u0175\12\u0179\1\u017a\26\u0179\1\u026d\45\u0179\12\u023e\1\u026e"+
- "\4\u023e\1\u025a\65\u023e\1\u01fa\1\u023e\14\u0241\1\u026f\2\u0241"+
- "\1\u025b\65\u0241\1\u0200\1\u0241\14\u0185\1\u0186\24\u0185\1\u0270"+
- "\45\u0185\12\u0189\1\u018a\26\u0189\1\u0271\45\u0189\12\u0248\1\u0272"+
- "\4\u0248\1\u025e\65\u0248\1\u0214\1\u0248\14\u024b\1\u0273\2\u024b"+
- "\1\u025f\65\u024b\1\u021a\1\u024b\42\0\1\u0274\52\0\4\114"+
- "\7\0\1\114\6\0\6\114\1\0\13\114\1\0\7\114"+
- "\1\u0275\3\114\1\0\4\114\1\0\11\114\1\0\1\114"+
- "\6\0\4\170\7\0\1\170\6\0\6\170\1\0\11\170"+
- "\1\u0276\1\170\1\0\13\170\1\0\4\170\1\0\11\170"+
- "\1\0\1\170\6\0\4\170\7\0\1\170\6\0\6\170"+
- "\1\0\6\170\1\u0277\4\170\1\0\13\170\1\0\4\170"+
- "\1\0\11\170\1\0\1\170\44\0\1\u0278\11\0\1\u0278"+
- "\72\0\1\u0279\14\0\1\u0279\71\0\1\u027a\14\0\1\u027a"+
- "\27\0\2\235\1\0\37\235\1\u027b\44\235\2\244\1\0"+
- "\37\244\1\u027c\44\244\14\u0175\1\u0176\25\u0175\1\u027d\44\u0175"+
- "\12\u0179\1\u017a\27\u0179\1\u027e\44\u0179\14\u0185\1\u0186\25\u0185"+
- "\1\u027f\44\u0185\12\u0189\1\u018a\27\u0189\1\u0280\44\u0189\41\0"+
- "\1\u0281\53\0\4\114\7\0\1\114\6\0\5\114\1\u0282"+
- "\1\0\13\114\1\0\13\114\1\0\4\114\1\0\11\114"+
- "\1\0\1\114\6\0\4\170\7\0\1\170\6\0\6\170"+
- "\1\0\13\170\1\0\4\170\1\u0283\6\170\1\0\4\170"+
- "\1\0\11\170\1\0\1\170\6\0\4\170\7\0\1\170"+
- "\6\0\6\170\1\0\5\170\1\u0284\5\170\1\0\13\170"+
- "\1\0\4\170\1\0\11\170\1\0\1\170\2\235\1\0"+
- "\36\235\1\u0285\45\235\2\244\1\0\36\244\1\u0286\45\244"+
- "\14\u0175\1\u0176\24\u0175\1\u0287\45\u0175\12\u0179\1\u017a\26\u0179"+
- "\1\u0288\45\u0179\14\u0185\1\u0186\24\u0185\1\u0289\45\u0185\12\u0189"+
- "\1\u018a\26\u0189\1\u028a\45\u0189\36\0\1\u028b\56\0\4\114"+
- "\7\0\1\114\6\0\6\114\1\0\5\114\1\u028c\5\114"+
- "\1\0\13\114\1\0\4\114\1\0\11\114\1\0\1\114"+
- "\6\0\4\170\7\0\1\170\6\0\6\170\1\0\13\170"+
- "\1\0\13\170\1\0\4\170\1\0\1\170\1\u028d\7\170"+
- "\1\0\1\170\2\235\1\0\33\235\1\u028e\50\235\2\244"+
- "\1\0\33\244\1\u028f\50\244\14\u0175\1\u0176\21\u0175\1\u0290"+
- "\50\u0175\12\u0179\1\u017a\23\u0179\1\u0291\50\u0179\14\u0185\1\u0186"+
- "\21\u0185\1\u0292\50\u0185\12\u0189\1\u018a\23\u0189\1\u0293\50\u0189"+
- "\6\0\4\114\7\0\1\114\6\0\6\114\1\0\7\114"+
- "\1\u0294\3\114\1\0\13\114\1\0\4\114\1\0\11\114"+
- "\1\0\1\114\6\0\4\170\7\0\1\170\6\0\6\170"+
- "\1\0\13\170\1\0\4\170\1\u0295\6\170\1\0\4\170"+
- "\1\0\11\170\1\0\1\170\6\0\4\114\7\0\1\114"+
- "\6\0\6\114\1\0\13\114\1\0\13\114\1\0\4\114"+
- "\1\0\11\114\1\0\1\u0296\6\0\4\170\7\0\1\170"+
- "\6\0\6\170\1\0\10\170\1\u0297\2\170\1\0\13\170"+
- "\1\0\4\170\1\0\11\170\1\0\1\170\6\0\4\114"+
- "\7\0\1\114\6\0\6\114\1\0\5\114\1\u0298\5\114"+
- "\1\0\13\114\1\0\4\114\1\0\11\114\1\0\1\114"+
- "\6\0\4\170\7\0\1\170\6\0\6\170\1\0\4\170"+
- "\1\u0299\6\170\1\0\13\170\1\0\4\170\1\0\11\170"+
- "\1\0\1\170\6\0\4\114\7\0\1\114\6\0\6\114"+
- "\1\0\5\114\1\u029a\5\114\1\0\13\114\1\0\4\114"+
- "\1\0\11\114\1\0\1\114\6\0\4\170\7\0\1\170"+
- "\6\0\6\170\1\0\5\170\1\u029b\5\170\1\0\13\170"+
- "\1\0\4\170\1\0\11\170\1\0\1\170\6\0\4\114"+
- "\7\0\1\114\6\0\6\114\1\0\13\114\1\0\4\114"+
- "\1\u029c\6\114\1\0\4\114\1\0\11\114\1\0\1\114"+
- "\6\u029d\4\u029e\7\u029d\1\u029e\5\u029d\1\0\6\u029e\1\u029d"+
- "\13\u029e\1\u029d\13\u029e\1\u029d\4\u029e\1\u029d\11\u029e\1\u029d"+
- "\1\u029e\43\0\1\u029f\3\0\1\u02a0\7\0\1\u02a1\1\u02a2"+
- "\21\0\1\u02a3\12\0\4\170\7\0\1\170\6\0\6\170"+
- "\1\0\4\170\1\u02a4\3\170\1\u02a5\2\170\1\0\4\170"+
- "\1\u02a6\1\u02a7\5\170\1\0\4\170\1\0\6\170\1\u02a8"+
- "\2\170\1\0\1\170\60\0\1\u02a9\77\0\1\u02aa\115\0"+
- "\1\u02ab\105\0\1\u02ac\107\0\1\u02ad\34\0\4\170\7\0"+
- "\1\170\6\0\6\170\1\0\13\170\1\0\5\170\1\u02ae"+
- "\5\170\1\0\4\170\1\0\11\170\1\0\1\170\6\0"+
- "\4\170\7\0\1\170\6\0\6\170\1\0\12\170\1\u02af"+
- "\1\0\13\170\1\0\4\170\1\0\11\170\1\0\1\170"+
- "\6\0\4\170\7\0\1\170\6\0\6\170\1\0\13\170"+
- "\1\0\5\170\1\u02b0\5\170\1\0\4\170\1\0\11\170"+
- "\1\0\1\170\6\0\4\170\7\0\1\170\6\0\6\170"+
- "\1\0\13\170\1\0\4\170\1\u02b1\6\170\1\0\4\170"+
- "\1\0\11\170\1\0\1\170\6\0\4\170\7\0\1\170"+
- "\6\0\6\170\1\0\13\170\1\0\5\170\1\u02b2\5\170"+
- "\1\0\4\170\1\0\11\170\1\0\1\170\45\0\1\u02b3"+
- "\136\0\1\u02b4\107\0\1\u02b5\67\0\1\u02b6\125\0\1\u02b7"+
- "\16\0\4\170\7\0\1\170\6\0\6\170\1\0\6\170"+
- "\1\u02b8\4\170\1\0\13\170\1\0\4\170\1\0\11\170"+
- "\1\0\1\170\6\0\4\170\7\0\1\170\6\0\6\170"+
- "\1\0\13\170\1\0\13\170\1\0\4\170\1\0\1\170"+
- "\1\u02b9\7\170\1\0\1\170\6\0\4\170\7\0\1\170"+
- "\6\0\6\170\1\0\13\170\1\0\13\170\1\0\4\170"+
- "\1\0\2\170\1\u02ba\6\170\1\0\1\170\6\0\4\170"+
- "\7\0\1\170\6\0\6\170\1\0\13\170\1\0\4\170"+
- "\1\u02bb\6\170\1\0\4\170\1\0\11\170\1\0\1\170"+
- "\6\0\4\170\7\0\1\170\6\0\6\170\1\0\13\170"+
- "\1\0\13\170\1\0\4\170\1\0\2\170\1\u02bc\6\170"+
- "\1\0\1\170\47\0\1\u02bd\74\0\1\u02be\106\0\1\u02bf"+
- "\116\0\1\u02c0\105\0\1\u02c1\50\0\4\170\7\0\1\170"+
- "\6\0\6\170\1\0\10\170\1\u02c2\2\170\1\0\13\170"+
- "\1\0\4\170\1\0\11\170\1\0\1\170\6\0\4\170"+
- "\7\0\1\170\6\0\5\170\1\u02c3\1\0\13\170\1\0"+
- "\13\170\1\0\4\170\1\0\11\170\1\0\1\170\6\0"+
- "\4\170\7\0\1\170\6\0\5\170\1\u02c4\1\0\13\170"+
- "\1\0\13\170\1\0\4\170\1\0\11\170\1\0\1\170"+
- "\6\0\4\170\7\0\1\170\6\0\6\170\1\0\6\170"+
- "\1\u02c5\4\170\1\0\13\170\1\0\4\170\1\0\11\170"+
- "\1\0\1\170\6\0\4\170\7\0\1\170\6\0\6\170"+
- "\1\0\5\170\1\u02c6\5\170\1\0\13\170\1\0\4\170"+
- "\1\0\11\170\1\0\1\170\60\0\1\u02c7\131\0\1\u02c8"+
- "\52\0\1\u02c9\106\0\1\u02ca\45\0\4\170\7\0\1\170"+
- "\6\0\6\170\1\0\13\170\1\0\5\170\1\u02cb\5\170"+
- "\1\0\4\170\1\0\11\170\1\0\1\170\6\0\4\170"+
- "\7\0\1\170\6\0\6\170\1\0\13\170\1\0\13\170"+
- "\1\0\4\170\1\0\7\170\1\u02cc\1\170\1\0\1\170"+
- "\6\0\4\170\7\0\1\170\6\0\6\170\1\0\10\170"+
- "\1\u02cd\2\170\1\0\13\170\1\0\4\170\1\0\11\170"+
- "\1\0\1\170\6\0\4\170\7\0\1\170\6\0\6\170"+
- "\1\0\10\170\1\u02ce\2\170\1\0\13\170\1\0\4\170"+
- "\1\0\11\170\1\0\1\170\104\0\1\u02cf\63\0\1\u02b7"+
- "\131\0\1\u02c1\106\0\1\u02d0\10\0\4\170\7\0\1\170"+
- "\6\0\6\170\1\0\13\170\1\0\13\170\1\0\4\170"+
- "\1\0\10\170\1\u02d1\1\0\1\170\6\0\4\170\7\0"+
- "\1\170\6\0\6\170\1\0\13\170\1\0\6\170\1\u02bc"+
- "\4\170\1\0\4\170\1\0\11\170\1\0\1\170\6\0"+
- "\4\170\7\0\1\170\6\0\6\170\1\0\13\170\1\0"+
- "\13\170\1\0\4\170\1\0\10\170\1\u02c6\1\0\1\170"+
- "\6\0\4\170\7\0\1\170\6\0\6\170\1\0\13\170"+
- "\1\0\13\170\1\0\4\170\1\0\10\170\1\u02d2\1\0"+
- "\1\170\35\0\1\u02b7\154\0\1\u02d3\11\0\4\170\7\0"+
- "\1\170\6\0\5\170\1\u02bc\1\0\13\170\1\0\13\170"+
- "\1\0\4\170\1\0\11\170\1\0\1\170\6\0\4\170"+
- "\7\0\1\170\6\0\6\170\1\0\13\170\1\0\13\170"+
- "\1\0\4\170\1\0\7\170\1\u02d4\1\170\1\0\1\170"+
- "\57\0\1\u02b7\35\0\4\170\7\0\1\170\6\0\6\170"+
- "\1\0\13\170\1\0\4\170\1\u02bc\6\170\1\0\4\170"+
- "\1\0\11\170\1\0\1\170";
-
- /**
- * 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, 1, 1, 0, 0, 0, 0,
- 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,
- 9, 1, 9, 1, 1, 9, 9, 1, 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, 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, 9, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 9, 1, 1, 1, 1, 9,
- 9, 1, 9, 3, 3, 9, 3, 3, 3, 9, 3, 1, 1, 9, 1, 9,
- 1, 1, 1, 1, 1, 9, 9, 1, 9, 3, 3, 9, 3, 3, 3, 9,
- 3, 1, 1, 1, 9, 1, 1, 1, 9, 9, 1, 1, 0, 1, 0, 1,
- 2, 0, 1, 1, 2, 1, 0, 0, 0, 9, 1, 1, 1, 9, 9, 0,
- 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 1, 1, 0,
- 0, 1, 1, 9, 0, 9, 0, 0, 9, 0, 0, 0, 0, 0, 9, 1,
- 1, 2, 2, 0, 1, 0, 9, 0, 0, 0, 0, 0, 1, 1, 0, 0,
- 0, 0, 9, 0, 0, 0, 0, 9, 0, 0, 0, 0, 1, 0, 0, 0,
- 1, 0, 0, 9, 0, 0, 1, 0, 0, 9, 0, 0, 0, 0, 1, 0,
- 0, 1, 1, 0, 0, 9, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0,
- 0, 0, 9, 0, 0, 0, 0, 0, 1, 1, 9, 1, 9, 9, 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, 1, 13,
- 9, 9, 13, 1, 9, 9, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0,
- 1, 0, 0, 1, 13, 13, 0, 0, 3, 2, 2, 3, 2, 2, 0, 0,
- 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1,
- 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1,
- 0, 3, 2, 3, 2, 1, 1, 1, 1, 1, 0, 2, 3, 3, 3, 2,
- 2, 3, 3, 3, 2, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0,
- 0, 1, 1, 1, 1, 2, 3, 3, 3, 2, 2, 3, 3, 3, 2, 1,
- 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 9, 9, 0, 1, 9,
- 0, 1, 1, 0, 0, 1, 5, 13, 13, 0, 0, 0, 0, 0, 0, 0,
- 1, 1, 0, 1, 1, 9, 5, 1, 3, 2, 3, 2, 1, 0, 9, 1,
- 0, 1, 3, 2, 3, 2, 1, 0, 9, 1, 0, 0, 1, 1, 1, 1,
- 0, 0, 0, 0, 0, 1, 1, 2, 2, 0, 0, 2, 2, 0, 0, 0,
- 1, 1, 1, 1, 0, 0, 0, 9, 9, 1, 1, 2, 2, 1, 1, 2,
- 2, 1, 1, 0, 1, 1, 1, 9, 9, 9, 1, 1, 2, 2, 2, 2,
- 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 9, 1, 1, 1, 1, 3,
- 3, 3, 3, 1, 1, 1, 1, 1, 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 ITextRegion fBufferedEmbeddedContainer = null;
- private ITextRegion fProxyUnknownRegion = 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 static final String PROXY_UNKNOWN_CONTEXT = "PROXY_UNKNOWN_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();
-
- // Is the embedded tag a JSP tag
- private boolean fEmbeddedTag = false;
- // Is the non-embedded tag a JSP tag
- private boolean fContainerTag = false;
- // Is the tokenizer in a non-embedded tag (between < and >)
- private boolean fInTagContainer = false;
- // Is the tokenizer in an embedded tag (between < and >)
- private boolean fInTagEmbedded = false;
-
- /**
- * 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);
- }
- int initialLength = fEmbeddedContainer.getRegions().size();
- 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 (endTagName != null && endTagName.length() == 0){
- endTagName = internalTagName;
- }
- 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;
- ITextRegionList embeddedList = fEmbeddedContainer.getRegions();
- if(!isEndingType) {
- // check for ending context
- if (endTagName == null) {
- for (int i = 0; i < endTypes.length; i++) {
- isEndingType = isEndingType || (internalContext == endTypes[i]) || (embeddedList.size() - initialLength) >= 2 && (embeddedList.get(embeddedList.size()-1)).getType() == endTypes[i];
- }
- }
- else {
- isEndingType = ((isInEndTag && internalContext == XML_TAG_CLOSE) || (isInFirstTag && internalContext == XML_EMPTY_TAG_CLOSE)) && internalTagName != null && internalTagName.equals(endTagName);
- }
- }
- 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;
- boolean wasBlockingEnabled = fIsBlockingEnabled;
- try {
- // 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 && same; i++) {
- if(fIsCaseSensitiveBlocking)
- same = yy_buffer[i + yy_currentPos - searchStringLength] == searchString.charAt(i);
- else
- 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;
- }
- finally {
- fIsBlockingEnabled = wasBlockingEnabled;
- }
-}
-/**
- * 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;
- } else if (f_context == PROXY_UNKNOWN_CONTEXT) {
- fBufferedEmbeddedContainer = fProxyUnknownRegion;
- }
- 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);
- }
-
- /* user method */
- private boolean isJspTag() {
- return (fContainerTag && fEmbeddedContainer != null) || (fContainerTag && fInTagContainer) || (fEmbeddedTag && fInTagEmbedded);
- }
-
-
- /**
- * 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[35642];
- int i = 0; /* index in packed string */
- int j = 0; /* index in unpacked array */
- while (i < 9512) {
- 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();
-
- 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 126:
- case 131:
- case 132:
- case 294:
- case 300:
- case 301:
- case 440:
- case 443:
- case 550:
- { /* only allow for non-JSP tags for this does not obey JSP quoting rules */
- 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 725: break;
- case 171:
- case 176:
- case 177:
- case 354:
- case 360:
- case 361:
- case 477:
- case 479:
- case 481:
- case 483:
- case 566:
- { /* JSP attribute values have escape semantics */
- if(Debug.debugTokenizer)
- dump("jsp 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 726: break;
- case 692:
- case 697:
- case 704:
- case 709:
- {
- 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 727: break;
- case 667:
- {
- if(Debug.debugTokenizer)
- dump("XSL processing instruction target");//$NON-NLS-1$
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_PI_ATTRIBUTE_NAME);
- return XML_TAG_NAME;
- }
- case 728: break;
- case 650:
- case 653:
- case 654:
- case 655:
- case 656:
- case 657:
- case 658:
- {
- if(Debug.debugTokenizer)
- dump("\nCDATA start");//$NON-NLS-1$
- fStateStack.push(yystate());
- yybegin(ST_CDATA_TEXT);
- return XML_CDATA_OPEN;
- }
- case 729: break;
- case 642:
- {
- 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 730: break;
- case 633:
- {
- if(Debug.debugTokenizer)
- dump("element");//$NON-NLS-1$
- yybegin(ST_XML_ELEMENT_DECLARATION);
- return XML_ELEMENT_DECLARATION;
- }
- case 731: break;
- case 632:
- {
- if(Debug.debugTokenizer)
- dump("attlist");//$NON-NLS-1$
- yybegin(ST_XML_ATTLIST_DECLARATION);
- return XML_ATTLIST_DECLARATION;
- }
- case 732: break;
- case 631:
- {
- if(Debug.debugTokenizer)
- dump("doctype");//$NON-NLS-1$
- yybegin(ST_XML_DOCTYPE_DECLARATION);
- return XML_DOCTYPE_DECLARATION;
- }
- case 733: break;
- case 616:
- {
- 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 734: break;
- case 615:
- {
- 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 735: break;
- case 609:
- {
- 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 736: break;
- case 584:
- case 625:
- case 626:
- {
- return JSP_VBL_QUOTED_CONTENT;
- }
- case 737: break;
- case 574:
- case 621:
- case 622:
- {
- return JSP_EL_QUOTED_CONTENT;
- }
- case 738: break;
- case 565:
- {
- if(Debug.debugTokenizer)
- dump("\nJSP comment close");//$NON-NLS-1$
- yybegin(YYINITIAL);
- return JSP_COMMENT_CLOSE;
- }
- case 739: break;
- case 552:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint+", el-unquoted");//$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 740: break;
- case 551:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint+", el-unquoted");//$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 741: break;
- case 543:
- {
- if(Debug.debugTokenizer)
- dump("\nCharRef");//$NON-NLS-1$
- return XML_CHAR_REFERENCE;
- }
- case 742: break;
- case 540:
- {
- 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 743: break;
- case 539:
- case 560:
- case 563:
- case 567:
- case 568:
- case 570:
- case 572:
- case 575:
- case 577:
- case 578:
- case 580:
- case 582:
- case 585:
- {
- /* 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+", jspCommentStart");//$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;
- }
- else if(yystate() == ST_JSP_ATTRIBUTE_VALUE) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- return PROXY_CONTEXT;
- }
- }
- case 744: break;
- case 437:
- {
- yybegin(ST_JSP_VBL);
- if(yylength() > 2)
- yypushback(yylength() - 2);
- fELlevel++;
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- assembleEmbeddedContainer(JSP_VBL_OPEN, JSP_VBL_CLOSE);
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return PROXY_CONTEXT;
- }
- case 745: break;
- case 436:
- {
- yybegin(ST_JSP_EL);
- if(yylength() > 2)
- yypushback(yylength() - 2);
- fELlevel++;
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- assembleEmbeddedContainer(JSP_EL_OPEN, JSP_EL_CLOSE);
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return PROXY_CONTEXT;
- }
- case 746: break;
- case 422:
- case 423:
- {
- 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 747: break;
- case 421:
- {
- if(Debug.debugTokenizer)
- dump("comment end");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_COMMENT_CLOSE;
- }
- case 748: break;
- case 420:
- {
- if(Debug.debugTokenizer)
- dump("CDATA end");//$NON-NLS-1$
- yybegin(fStateStack.pop());
- return XML_CDATA_CLOSE;
- }
- case 749: break;
- case 418:
- {
- 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 750: break;
- case 417:
- {
- if(Debug.debugTokenizer)
- dump("\nPEReference");//$NON-NLS-1$
- return XML_PE_REFERENCE;
- }
- case 751: break;
- case 415:
- {
- 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 752: break;
- case 411:
- {
- if(Debug.debugTokenizer)
- dump("\nEntityRef");//$NON-NLS-1$
- return XML_ENTITY_REFERENCE;
- }
- case 753: break;
- case 405:
- case 464:
- case 474:
- case 489:
- case 494:
- case 499:
- case 504:
- case 510:
- case 516:
- case 520:
- case 525:
- case 530:
- case 536:
- {
- /* 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+", jspExpressionStart");//$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;
- }
- else if(yystate() == ST_JSP_ATTRIBUTE_VALUE) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
-
- return PROXY_CONTEXT;
- }
- }
- case 754: break;
- case 404:
- case 463:
- case 473:
- case 488:
- case 493:
- case 498:
- case 503:
- case 509:
- case 515:
- case 519:
- case 524:
- case 529:
- case 535:
- {
- /* 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+", jspDeclarationStart");//$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;
- }
- else if(yystate() == ST_JSP_ATTRIBUTE_VALUE) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- return PROXY_CONTEXT;
- }
- }
- case 755: break;
- case 403:
- case 462:
- case 472:
- case 487:
- case 492:
- case 497:
- case 502:
- case 508:
- case 514:
- case 518:
- case 523:
- case 528:
- case 534:
- {
- /* JSP directive 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 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+", jspDirectiveStart");//$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_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;
- }
- // 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 756: break;
- case 393:
- {
- yybegin(ST_JSP_VBL_DQUOTES_END);
- return JSP_VBL_QUOTED_CONTENT;
- }
- case 757: break;
- case 389:
- {
- yybegin(ST_JSP_VBL_SQUOTES_END);
- return JSP_VBL_QUOTED_CONTENT;
- }
- case 758: break;
- case 387:
- {
- fELlevel++;
- if(fELlevel == 1) {
- return JSP_VBL_OPEN;
- }
- }
- case 759: break;
- case 377:
- {
- yybegin(ST_JSP_EL_DQUOTES_END);
- return JSP_EL_QUOTED_CONTENT;
- }
- case 760: break;
- case 373:
- {
- yybegin(ST_JSP_EL_SQUOTES_END);
- return JSP_EL_QUOTED_CONTENT;
- }
- case 761: break;
- case 371:
- {
- //System.out.println(JSP_EL_CONTENT+ ":[" + yytext() + "]");
- return JSP_EL_CONTENT;
- }
- case 762: break;
- case 370:
- {
- fELlevel++;
- if(fELlevel == 1) {
- return JSP_EL_OPEN;
- }
- }
- case 763: break;
- case 367:
- {
- int enterState = yystate();
- yybegin(ST_JSP_DQUOTED_VBL);
- assembleEmbeddedContainer(JSP_VBL_OPEN, new String[]{JSP_VBL_CLOSE, XML_TAG_ATTRIBUTE_VALUE_DQUOTE, JSP_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) || fEmbeddedContainer.getLastRegion().getType().equals(JSP_TAG_ATTRIBUTE_VALUE_DQUOTE)) {
- yybegin(ST_ABORT_EMBEDDED);
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else {
- yybegin(enterState);
- }
- return PROXY_CONTEXT;
- }
- case 764: break;
- case 366:
- {
- int enterState = yystate();
- yybegin(ST_JSP_DQUOTED_EL);
- assembleEmbeddedContainer(JSP_EL_OPEN, new String[]{JSP_EL_CLOSE, XML_TAG_ATTRIBUTE_VALUE_DQUOTE, JSP_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) || fEmbeddedContainer.getLastRegion().getType().equals(JSP_TAG_ATTRIBUTE_VALUE_DQUOTE)) {
- yybegin(ST_ABORT_EMBEDDED);
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else {
- yybegin(enterState);
- }
- return PROXY_CONTEXT;
- }
- case 765: break;
- case 365:
- {
- int enterState = yystate();
- yybegin(ST_JSP_SQUOTED_VBL);
- assembleEmbeddedContainer(JSP_VBL_OPEN, new String[]{JSP_VBL_CLOSE, XML_TAG_ATTRIBUTE_VALUE_SQUOTE, JSP_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) || fEmbeddedContainer.getLastRegion().getType().equals(JSP_TAG_ATTRIBUTE_VALUE_SQUOTE)) {
- yybegin(ST_ABORT_EMBEDDED);
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else {
- yybegin(enterState);
- }
- return PROXY_CONTEXT;
- }
- case 766: break;
- case 364:
- {
- int enterState = yystate();
- yybegin(ST_JSP_SQUOTED_EL);
- assembleEmbeddedContainer(JSP_EL_OPEN, new String[]{JSP_EL_CLOSE, XML_TAG_ATTRIBUTE_VALUE_SQUOTE, JSP_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) || fEmbeddedContainer.getLastRegion().getType().equals(JSP_TAG_ATTRIBUTE_VALUE_SQUOTE)) {
- yybegin(ST_ABORT_EMBEDDED);
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
- else {
- yybegin(enterState);
- }
- return PROXY_CONTEXT;
- }
- case 767: break;
- case 362:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint+", genericEndTagOpen");//$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 768: break;
- case 306:
- case 320:
- case 326:
- {
- return XML_DOCTYPE_INTERNAL_SUBSET;
- }
- case 769: break;
- case 292:
- {
- 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 || fStateStack.peek() == ST_JSP_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 770: break;
- case 288:
- {
- 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 || fStateStack.peek() == ST_JSP_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 771: break;
- case 286:
- {
- yybegin(YYINITIAL);
- fEmbeddedHint = UNDEFINED;
- if(Debug.debugTokenizer)
- dump("empty tag close");//$NON-NLS-1$
-
- if (fEmbeddedContainer != null)
- fInTagEmbedded = false;
- else
- fInTagContainer = false;
-
- return XML_EMPTY_TAG_CLOSE;
- }
- case 772: break;
- case 277:
- {
- 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 773: break;
- case 275:
- {
- 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 774: break;
- case 254:
- {
- if(Debug.debugTokenizer)
- dump("XML processing instruction end");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_PI_CLOSE;
- }
- case 775: break;
- case 127:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint+", unquoted genericTagOpen");//$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 776: break;
- case 125:
- {
- if(Debug.debugTokenizer)
- dump("equals");//$NON-NLS-1$
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(isJspTag() ? ST_JSP_ATTRIBUTE_VALUE : ST_XML_ATTRIBUTE_VALUE);
- return XML_TAG_ATTRIBUTE_EQUALS;
- }
- case 777: break;
- case 122:
- {
- 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 778: break;
- case 118:
- case 119:
- case 120:
- case 287:
- case 435:
- case 549:
- case 590:
- case 591:
- case 610:
- case 611:
- case 629:
- case 630:
- case 643:
- case 652:
- case 660:
- case 662:
- case 664:
- case 666:
- case 669:
- case 675:
- case 676:
- case 677:
- case 678:
- case 679:
- case 685:
- case 686:
- case 687:
- case 688:
- case 689:
- case 695:
- case 696:
- case 698:
- case 699:
- case 705:
- case 706:
- case 707:
- case 708:
- case 714:
- case 715:
- case 716:
- case 717:
- case 720:
- case 721:
- case 723:
- {
- if(Debug.debugTokenizer)
- dump("tag name");//$NON-NLS-1$
- String tagname = yytext();
- boolean jspTag = tagname.indexOf(':') != -1;
- if (fEmbeddedContainer != null) {
- fEmbeddedTag = jspTag;
- fInTagEmbedded = true;
- }
- else {
- fContainerTag = jspTag;
- fInTagContainer = true;
- }
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- return XML_TAG_NAME;
- }
- case 779: break;
- case 116:
- {
- 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);
-
- if (fEmbeddedContainer != null)
- fInTagEmbedded = false;
- else
- fInTagContainer = false;
-
- return XML_TAG_CLOSE;
- }
- case 780: break;
- case 109:
- case 113:
- case 280:
- {
- if(Debug.debugTokenizer)
- dump("attr value");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_ATTRIBUTE_NAME);
- return XML_TAG_ATTRIBUTE_VALUE;
- }
- case 781: break;
- case 108:
- {
- if(Debug.debugTokenizer)
- dump("equals");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_ATTRIBUTE_VALUE);
- return XML_TAG_ATTRIBUTE_EQUALS;
- }
- case 782: break;
- case 107:
- {
- if(Debug.debugTokenizer)
- dump("attr name");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_EQUALS);
- return XML_TAG_ATTRIBUTE_NAME;
- }
- case 783: break;
- case 104:
- {
- if(Debug.debugTokenizer)
- dump("JSP directive name");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_NAME_WHITESPACE);
- return JSP_DIRECTIVE_NAME;
- }
- case 784: break;
- case 100:
- case 101:
- case 102:
- {
- if(Debug.debugTokenizer)
- dump("JSP code content");//$NON-NLS-1$
- return doScan("%>", false, false, false, JSP_CONTENT, ST_JSP_CONTENT, ST_JSP_CONTENT);
- }
- case 785: break;
- case 96:
- case 98:
- case 99:
- case 268:
- case 269:
- case 270:
- case 273:
- case 274:
- case 429:
- case 432:
- {
- 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 786: break;
- case 95:
- {
- 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 787: break;
- case 94:
- {
- if(Debug.debugTokenizer)
- dump("DHTML processing instruction attribute name");//$NON-NLS-1$
- yybegin(ST_DHTML_EQUALS);
- return XML_TAG_ATTRIBUTE_NAME;
- }
- case 788: break;
- case 92:
- {
- if(Debug.debugTokenizer)
- dump("DHTML processing instruction end");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_PI_CLOSE;
- }
- case 789: break;
- case 86:
- case 88:
- case 257:
- {
- 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 790: break;
- case 85:
- {
- 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 791: break;
- case 84:
- {
- if(Debug.debugTokenizer)
- dump("XML processing instruction attribute name");//$NON-NLS-1$
- yybegin(ST_XML_PI_EQUALS);
- return XML_TAG_ATTRIBUTE_NAME;
- }
- case 792: break;
- case 50:
- case 211:
- case 212:
- case 215:
- case 225:
- case 226:
- case 229:
- case 230:
- case 398:
- case 401:
- case 513:
- case 527:
- case 533:
- {
- return JSP_VBL_CONTENT;
- }
- case 793: break;
- case 43:
- case 189:
- case 190:
- case 193:
- case 203:
- case 204:
- case 208:
- case 209:
- case 368:
- case 382:
- case 385:
- case 485:
- case 486:
- case 501:
- case 507:
- {
- return JSP_EL_CONTENT;
- }
- case 794: break;
- case 35:
- case 163:
- case 164:
- case 350:
- case 471:
- case 475:
- case 564:
- case 598:
- case 618:
- case 635:
- case 645:
- {
- if(Debug.debugTokenizer)
- dump("attlist contentspec");//$NON-NLS-1$
- return XML_ATTLIST_DECL_CONTENT;
- }
- case 795: break;
- case 33:
- case 156:
- case 157:
- case 338:
- case 461:
- case 465:
- case 561:
- case 597:
- case 617:
- case 634:
- case 644:
- {
- if(Debug.debugTokenizer)
- dump("elementdecl contentspec");//$NON-NLS-1$
- return XML_ELEMENT_DECL_CONTENT;
- }
- case 796: break;
- case 22:
- case 114:
- {
- 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);
- char c = yy_buffer[yy_markedPos - 1];
- if (fStateStack.peek()==ST_XML_ATTRIBUTE_VALUE_DQUOTED && c == '\"') {
- return isJspTag() ? JSP_TAG_ATTRIBUTE_VALUE_DQUOTE : XML_TAG_ATTRIBUTE_VALUE_DQUOTE;
- }
- if (fStateStack.peek()==ST_XML_ATTRIBUTE_VALUE_SQUOTED && c == '\'') {
- return isJspTag() ? JSP_TAG_ATTRIBUTE_VALUE_SQUOTE : XML_TAG_ATTRIBUTE_VALUE_SQUOTE;
- }
- yypushback(yylength()-1);
- return XML_TAG_ATTRIBUTE_VALUE;
- }
- yybegin(YYINITIAL);
- return XML_CONTENT;
- }
- case 797: break;
- case 18:
- case 106:
- {
- if(Debug.debugTokenizer)
- dump("white space");//$NON-NLS-1$
- yybegin(ST_JSP_DIRECTIVE_ATTRIBUTE_NAME);
- return WHITE_SPACE;
- }
- case 798: 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 42:
- case 74:
- case 180:
- case 185:
- {
- if(Debug.debugTokenizer)
- dump("white space");//$NON-NLS-1$
- return WHITE_SPACE;
- }
- case 799: break;
- case 0:
- case 57:
- case 60:
- case 61:
- case 63:
- case 237:
- case 239:
- case 242:
- case 245:
- case 408:
- case 409:
- case 410:
- case 414:
- case 416:
- case 419:
- case 542:
- {
- if(Debug.debugTokenizer)
- dump("\nXML content");//$NON-NLS-1$
- return XML_CONTENT;
- }
- case 800: break;
- case 58:
- case 103:
- case 115:
- case 121:
- case 133:
- {
- if(Debug.debugTokenizer)
- dump("\nstart tag open");//$NON-NLS-1$
- if (!fStateStack.empty() && fStateStack.peek()== ST_XML_COMMENT){
- fStateStack.pop();
- fEmbeddedHint = XML_COMMENT_TEXT;
- yybegin(ST_XML_TAG_NAME);
- String tagName = "";
- assembleEmbeddedTagSequence(XML_TAG_OPEN, tagName); // ?
- return PROXY_CONTEXT;
- }
- fEmbeddedHint = XML_TAG_NAME;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- yybegin(ST_XML_TAG_NAME);
- return XML_TAG_OPEN;
- }
- case 801: break;
- case 59:
- case 66:
- case 67:
- case 68:
- case 72:
- case 73:
- case 83:
- case 87:
- case 89:
- case 90:
- case 91:
- case 93:
- case 97:
- case 105:
- case 110:
- case 111:
- case 112:
- case 117:
- case 123:
- case 124:
- case 128:
- case 135:
- case 136:
- case 137:
- case 138:
- case 140:
- case 141:
- case 143:
- case 144:
- case 145:
- case 148:
- case 149:
- case 150:
- case 153:
- case 154:
- case 155:
- case 160:
- case 161:
- case 162:
- case 170:
- case 172:
- case 173:
- case 195:
- case 196:
- case 199:
- case 200:
- case 206:
- case 210:
- case 217:
- case 218:
- case 221:
- case 222:
- case 227:
- case 231:
- {
- if (Debug.debugTokenizer)
- System.out.println("!!!unexpected!!!: \"" + yytext() + "\":" + //$NON-NLS-2$//$NON-NLS-1$
- yychar + "-" + (yychar + yylength()));//$NON-NLS-1$
- return UNDEFINED;
- }
- case 802: break;
- case 62:
- case 243:
- {
- if(Debug.debugTokenizer)
- dump("non-reference %");//$NON-NLS-1$
- return XML_CONTENT;
- }
- case 803: break;
- case 64:
- case 65:
- {
- 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 804: break;
- case 69:
- case 198:
- case 202:
- case 220:
- case 224:
- {
- if(Debug.debugTokenizer)
- dump("LINE FEED");//$NON-NLS-1$
- return WHITE_SPACE;
- }
- case 805: break;
- case 70:
- case 71:
- {
- if(Debug.debugTokenizer)
- dump("comment content");//$NON-NLS-1$
- return scanXMLCommentText();
- }
- case 806: break;
- case 75:
- case 76:
- case 77:
- case 78:
- case 250:
- case 251:
- case 252:
- case 424:
- case 545:
- case 546:
- case 588:
- case 589:
- case 608:
- case 628:
- case 641:
- case 651:
- case 659:
- case 661:
- case 663:
- case 665:
- {
- if(Debug.debugTokenizer)
- dump("processing instruction target");//$NON-NLS-1$
- fEmbeddedHint = XML_CONTENT;
- yybegin(ST_PI_WS);
- return XML_TAG_NAME;
- }
- case 807: break;
- case 79:
- {
- yybegin(ST_PI_CONTENT);
- return WHITE_SPACE;
- }
- case 808: break;
- case 80:
- case 81:
- case 82:
- {
- // 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 809: break;
- case 129:
- case 174:
- {
- String type = yy_lexical_state == ST_XML_ATTRIBUTE_VALUE ? XML_TAG_ATTRIBUTE_VALUE_DQUOTE : JSP_TAG_ATTRIBUTE_VALUE_DQUOTE;
-
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint+", "+type);//$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(type, type);
- fStateStack.pop();
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- if (fEmbeddedContainer.getLastRegion().getType() == UNDEFINED) {
- fProxyUnknownRegion = fRegionFactory.createToken(XML_TAG_ATTRIBUTE_VALUE, fEmbeddedContainer.getStart(), fEmbeddedContainer.getTextLength(), fEmbeddedContainer.getLength());
- return PROXY_UNKNOWN_CONTEXT;
- }
- return PROXY_CONTEXT;
- }
- case 810: break;
- case 130:
- case 175:
- {
- String type = yy_lexical_state == ST_XML_ATTRIBUTE_VALUE ? XML_TAG_ATTRIBUTE_VALUE_SQUOTE : JSP_TAG_ATTRIBUTE_VALUE_SQUOTE;
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint+", "+type);//$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(type, type);
- fStateStack.pop();
- fEmbeddedHint = XML_TAG_ATTRIBUTE_NAME;
- fEmbeddedPostState = ST_XML_EQUALS;
- yybegin(ST_XML_ATTRIBUTE_NAME);
- if (fEmbeddedContainer.getLastRegion().getType() == UNDEFINED) {
- fProxyUnknownRegion = fRegionFactory.createToken(XML_TAG_ATTRIBUTE_VALUE, fEmbeddedContainer.getStart(), fEmbeddedContainer.getTextLength(), fEmbeddedContainer.getLength());
- return PROXY_UNKNOWN_CONTEXT;
- }
- return PROXY_CONTEXT;
- }
- case 811: break;
- case 134:
- {
- 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 812: break;
- case 139:
- {
- if(Debug.debugTokenizer)
- dump("doctype type");//$NON-NLS-1$
- yybegin(ST_XML_DOCTYPE_EXTERNAL_ID);
- return XML_DOCTYPE_NAME;
- }
- case 813: break;
- case 142:
- case 146:
- case 311:
- case 316:
- case 453:
- {
- 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 814: break;
- case 147:
- case 151:
- case 323:
- {
- 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 815: break;
- case 152:
- case 329:
- case 334:
- case 458:
- {
- 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 816: break;
- case 158:
- {
- 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 817: break;
- case 159:
- case 341:
- case 346:
- case 468:
- {
- 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 818: break;
- case 165:
- {
- 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 819: break;
- case 168:
- case 169:
- {
- if(Debug.debugTokenizer)
- dump("\nJSP comment text");//$NON-NLS-1$
- return scanJSPCommentText();
- }
- case 820: break;
- case 178:
- case 182:
- case 183:
- case 184:
- case 187:
- case 188:
- case 363:
- {
- return XML_TAG_ATTRIBUTE_VALUE;
- }
- case 821: break;
- case 179:
- {
- if (Debug.debugTokenizer) {
- System.out.println("begin embedded region: " + fEmbeddedHint+", genericTagOpen");//$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 822: break;
- case 181:
- {
- return isJspTag() ? JSP_TAG_ATTRIBUTE_VALUE_SQUOTE : XML_TAG_ATTRIBUTE_VALUE_SQUOTE;
- }
- case 823: break;
- case 186:
- {
- return isJspTag()? JSP_TAG_ATTRIBUTE_VALUE_DQUOTE : XML_TAG_ATTRIBUTE_VALUE_DQUOTE;
- }
- case 824: break;
- case 191:
- {
- yybegin(ST_JSP_EL_DQUOTES);
- return JSP_EL_DQUOTE;
- }
- case 825: break;
- case 192:
- {
- yybegin(ST_JSP_EL_SQUOTES);
- return JSP_EL_SQUOTE;
- }
- case 826: break;
- case 194:
- {
- fELlevel--;
- if(fELlevel == 0) {
- yybegin(YYINITIAL);
- return JSP_EL_CLOSE;
- }
- return JSP_EL_CONTENT;
- }
- case 827: break;
- case 197:
- {
- yybegin(ST_JSP_EL);
- return JSP_EL_SQUOTE;
- }
- case 828: break;
- case 201:
- {
- yybegin(ST_JSP_EL);
- return JSP_EL_DQUOTE;
- }
- case 829: break;
- case 205:
- {
- return isJspTag() ? JSP_TAG_ATTRIBUTE_VALUE_DQUOTE: XML_TAG_ATTRIBUTE_VALUE_DQUOTE;
- }
- case 830: break;
- case 207:
- {
- return JSP_EL_CLOSE;
- }
- case 831: break;
- case 213:
- {
- yybegin(ST_JSP_VBL_DQUOTES);
- return JSP_VBL_DQUOTE;
- }
- case 832: break;
- case 214:
- {
- yybegin(ST_JSP_VBL_SQUOTES);
- return JSP_VBL_SQUOTE;
- }
- case 833: break;
- case 216:
- {
- fELlevel--;
- if(fELlevel == 0) {
- yybegin(YYINITIAL);
- return JSP_VBL_CLOSE;
- }
- return JSP_VBL_CONTENT;
- }
- case 834: break;
- case 219:
- {
- yybegin(ST_JSP_VBL);
- return JSP_VBL_SQUOTE;
- }
- case 835: break;
- case 223:
- {
- yybegin(ST_JSP_VBL);
- return JSP_VBL_DQUOTE;
- }
- case 836: break;
- case 228:
- {
- return JSP_VBL_CLOSE;
- }
- case 837: break;
- case 232:
- {
- 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 838: break;
- case 233:
- {
- if(Debug.debugTokenizer)
- dump("\nprocessing instruction start");//$NON-NLS-1$
- yybegin(ST_PI);
- return XML_PI_OPEN;
- }
- case 839: break;
- case 234:
- case 337:
- case 349:
- case 369:
- case 374:
- case 378:
- case 381:
- case 384:
- case 386:
- case 390:
- case 394:
- case 397:
- case 400:
- {
- /* 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+", jspScriptletStart");//$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;
- }
- else if(yystate() == ST_JSP_ATTRIBUTE_VALUE) {
- fEmbeddedHint = XML_TAG_ATTRIBUTE_VALUE;
- fEmbeddedPostState = ST_XML_ATTRIBUTE_NAME;
- }
-
- return PROXY_CONTEXT;
- }
- }
- case 840: break;
- case 235:
- {
- fStateStack.push(yystate());
- if(Debug.debugTokenizer)
- dump("\ndeclaration start");//$NON-NLS-1$
- yybegin(ST_XML_DECLARATION);
- return XML_DECLARATION_OPEN;
- }
- case 841: break;
- case 249:
- {
- if(Debug.debugTokenizer)
- dump("processing instruction end");//$NON-NLS-1$
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_PI_CLOSE;
- }
- case 842: break;
- case 253:
- {
- // ended with nothing inside
- fEmbeddedHint = UNDEFINED;
- yybegin(YYINITIAL);
- return XML_PI_CLOSE;
- }
- case 843: break;
- case 166:
- case 167:
- {
- return doBlockTagScan();
- }
- case 844: 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 20daddac52..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceInitializer.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2011 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;
-import org.eclipse.wst.sse.core.internal.validate.ValidationMessage;
-
-/**
- * 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$
-
- node.putInt(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_DIFFERENT_URIS, ValidationMessage.ERROR);
- node.putInt(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_SAME_URIS, ValidationMessage.IGNORE);
- node.putInt(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_MISSING_PREFIX, ValidationMessage.ERROR);
- node.putInt(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_MISSING_URI_OR_TAGDIR, ValidationMessage.ERROR);
- node.putInt(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_UNRESOLVABLE_URI_OR_TAGDIR, ValidationMessage.ERROR);
- node.putInt(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_PAGE_SUPERCLASS_NOT_FOUND, ValidationMessage.ERROR);
- node.putInt(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_INCLUDE_NO_FILE_SPECIFIED, ValidationMessage.ERROR);
- node.putInt(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_INCLUDE_FILE_NOT_FOUND, ValidationMessage.ERROR);
- node.putInt(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_ATTRIBUTE_DUPLICATE_NAME, ValidationMessage.ERROR);
-
- node.putInt(JSPCorePreferenceNames.VALIDATION_JAVA_LOCAL_VARIABLE_NEVER_USED, ValidationMessage.IGNORE);
- node.putInt(JSPCorePreferenceNames.VALIDATION_JAVA_ARGUMENT_IS_NEVER_USED, ValidationMessage.IGNORE);
- node.putInt(JSPCorePreferenceNames.VALIDATION_JAVA_NULL_LOCAL_VARIABLE_REFERENCE, ValidationMessage.IGNORE);
- node.putInt(JSPCorePreferenceNames.VALIDATION_JAVA_POTENTIAL_NULL_LOCAL_VARIABLE_REFERENCE, ValidationMessage.IGNORE);
- node.putInt(JSPCorePreferenceNames.VALIDATION_JAVA_UNUSED_IMPORT, ValidationMessage.IGNORE);
-
- node.putInt(JSPCorePreferenceNames.VALIDATION_EL_SYNTAX, ValidationMessage.ERROR);
- node.putInt(JSPCorePreferenceNames.VALIDATION_EL_LEXER, ValidationMessage.IGNORE);
- node.putInt(JSPCorePreferenceNames.VALIDATION_EL_FUNCTION_UNDEFINED, ValidationMessage.ERROR);
-
- node.putInt(JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_MISSING_REQUIRED_ATTRIBUTE, ValidationMessage.ERROR);
- node.putInt(JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_UNKNOWN_ATTRIBUTE, ValidationMessage.WARNING);
- node.putInt(JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_NON_EMPTY_INLINE_TAG, ValidationMessage.WARNING);
- node.putInt(JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_UNEXPECTED_RTEXPRVALUE, ValidationMessage.WARNING);
-
- node.putInt(JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_VALIDATION_MESSAGE, ValidationMessage.ERROR);
- node.putInt(JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_NOT_FOUND, ValidationMessage.WARNING);
- node.putInt(JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_NOT_INSTANTIATED, ValidationMessage.WARNING);
- node.putInt(JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_RUNTIME_EXCEPTION, ValidationMessage.WARNING);
- node.putInt(JSPCorePreferenceNames.VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND, ValidationMessage.WARNING);
- node.putInt(JSPCorePreferenceNames.VALIDATION_TRANSLATION_USEBEAN_INVALID_ID, ValidationMessage.ERROR);
- node.putInt(JSPCorePreferenceNames.VALIDATION_TRANSLATION_USBEAN_MISSING_TYPE_INFO, ValidationMessage.ERROR);
- node.putInt(JSPCorePreferenceNames.VALIDATION_TRANSLATION_USEBEAN_AMBIGUOUS_TYPE_INFO, ValidationMessage.WARNING);
- }
-}
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 14d7da1533..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/preferences/JSPCorePreferenceNames.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2011 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$
-
- /**
- * Indicates that JSP validation will use per-project preferences
- * <p>
- * Value is of type <code>Boolean</code>.
- * </p>
- */
- public static final String VALIDATION_USE_PROJECT_SETTINGS = "validation.use-project-settings";
-
- /**
- * Validation preference keys
- */
- public static final String VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_DIFFERENT_URIS="validation.directive-taglib-duplicate-prefixes-different-uris";//$NON-NLS-1$
- public static final String VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_SAME_URIS="validation.directive-taglib-duplicate-prefixes-same-uris";//$NON-NLS-1$
- public static final String VALIDATION_DIRECTIVE_TAGLIB_MISSING_PREFIX="validation.directive-taglib-missing-prefix";//$NON-NLS-1$
- public static final String VALIDATION_DIRECTIVE_TAGLIB_MISSING_URI_OR_TAGDIR="validation.directive-taglib-missing-uri-or-tagdir";//$NON-NLS-1$
- public static final String VALIDATION_DIRECTIVE_TAGLIB_UNRESOLVABLE_URI_OR_TAGDIR="validation.directive-taglib-unresolvable-uri-or-tagdir";//$NON-NLS-1$
- public static final String VALIDATION_DIRECTIVE_PAGE_SUPERCLASS_NOT_FOUND="validation.directive-page-superclass-not-found";//$NON-NLS-1$
- public static final String VALIDATION_DIRECTIVE_INCLUDE_NO_FILE_SPECIFIED="validation.directive-include-fragment-file-not-specified";//$NON-NLS-1$
- public static final String VALIDATION_DIRECTIVE_INCLUDE_FILE_NOT_FOUND="validation.directive-include-fragment-file-not-found";//$NON-NLS-1$
- public static final String VALIDATION_DIRECTIVE_ATTRIBUTE_DUPLICATE_NAME="validation.directive-attribute-duplicate";//$NON-NLS-1$
- public static final String VALIDATION_JAVA_LOCAL_VARIABLE_NEVER_USED ="validation.java-local-variable-is-never-used";
- public static final String VALIDATION_JAVA_ARGUMENT_IS_NEVER_USED ="validation.java-";
- public static final String VALIDATION_JAVA_NULL_LOCAL_VARIABLE_REFERENCE ="validation.java-null-local-variable-reference";
- public static final String VALIDATION_JAVA_POTENTIAL_NULL_LOCAL_VARIABLE_REFERENCE ="validation.java-potential-null-local-variable-reference";
- public static final String VALIDATION_JAVA_UNUSED_IMPORT ="validation.java-unused-import";
-
- public static final String VALIDATION_EL_SYNTAX ="validation.el-general-syntax";
- public static final String VALIDATION_EL_LEXER ="validation.el-lexical-failure";
- public static final String VALIDATION_EL_FUNCTION_UNDEFINED = "validation.el-function-undefined";
-
- public static final String VALIDATION_ACTIONS_SEVERITY_MISSING_REQUIRED_ATTRIBUTE = "validation.actions-missing-required-attribute";
- public static final String VALIDATION_ACTIONS_SEVERITY_UNKNOWN_ATTRIBUTE = "validation.actions-unknown-attribute";
- public static final String VALIDATION_ACTIONS_SEVERITY_UNEXPECTED_RTEXPRVALUE = "validation.actions-unexpected-rtexprvalue";
- public static final String VALIDATION_ACTIONS_SEVERITY_NON_EMPTY_INLINE_TAG = "validation.actions-non-empty-inline-tag";
-
- public static final String VALIDATION_TRANSLATION_TEI_VALIDATION_MESSAGE = "validation.translation-tei-message";
- public static final String VALIDATION_TRANSLATION_TEI_CLASS_NOT_FOUND = "validation.translation-tei-class-not-found";
- public static final String VALIDATION_TRANSLATION_TEI_CLASS_NOT_INSTANTIATED = "validation.translation-tei-class-not-instantiated";
- public static final String VALIDATION_TRANSLATION_TEI_CLASS_RUNTIME_EXCEPTION = "validation.translation-tei-class-runtime-exception";
- public static final String VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND = "validation.translation-tag-class-not-found";
- public static final String VALIDATION_TRANSLATION_USEBEAN_INVALID_ID= "validation.translation-usebean-invalid-id";
- public static final String VALIDATION_TRANSLATION_USBEAN_MISSING_TYPE_INFO= "validation.translation-usebean-missing-type-info";
- public static final String VALIDATION_TRANSLATION_USEBEAN_AMBIGUOUS_TYPE_INFO = "validation.translation-usebean-ambiguous-type-info";
-}
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 43d0f75ef6..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, 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.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$
-}
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 89f76e82d0..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, 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.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 {
-
-}
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 3e1fde3bcb..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP20Namespace.java
+++ /dev/null
@@ -1,18 +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.provisional;
-
-/**
- * New names for JSP 2.0 spec.
- */
-
-public interface JSP20Namespace extends org.eclipse.wst.html.core.internal.contentmodel.JSP20Namespace {
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP21Namespace.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP21Namespace.java
deleted file mode 100644
index bbb5d9dac4..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/JSP21Namespace.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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;
-
-public interface JSP21Namespace extends org.eclipse.wst.html.core.internal.contentmodel.JSP21Namespace {
-}
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 0f246bc1e7..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/contenttype/ContentTypeIdForJSP.java
+++ /dev/null
@@ -1,61 +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.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();
-
- /**
- * 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_JSPTAG = getTagConstantString();
-
- /**
- * 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$
- }
-
- static String getTagConstantString() {
- return "org.eclipse.jst.jsp.core.tagsource"; //$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 393dd10d33..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, 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.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$;
-
-}
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 49cc31d047..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/provisional/text/IJSPPartitionTypes.java
+++ /dev/null
@@ -1,34 +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.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 3387e1fb8c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/regions/DOMJSPRegionContexts.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2009 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
- * Frits Jalvingh - contributions for bug 150794
- *
- *******************************************************************************/
-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$
-
- /** Non-taglib XML tag, needing single escape unquoting for embedded expressions */
- 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$
-
- /** Taglib tag attribute with double quote, needing 'double escaping' */
- public static final String JSP_TAG_ATTRIBUTE_VALUE_DQUOTE = "JSP_TAG_ATTRIBUTE_VALUE_DQUOTE"; //$NON-NLS-1$
- /** Taglib tag attribute with single quote, needing 'double escaping' */
- public static final String JSP_TAG_ATTRIBUTE_VALUE_SQUOTE = "JSP_TAG_ATTRIBUTE_VALUE_SQUOTE"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/BuildPathClassLoader.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/BuildPathClassLoader.java
deleted file mode 100644
index 7b5443f1d0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/BuildPathClassLoader.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.taglib;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-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.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-
-/**
- * Custom ClassLoader backed by a Java Project.
- */
-public class BuildPathClassLoader extends ClassLoader {
- private static final boolean DEBUG = Boolean.valueOf(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/taglibclassloader")).booleanValue(); //$NON-NLS-1$
- private IJavaProject fProject;
-
- public BuildPathClassLoader(ClassLoader parent, IJavaProject project) {
- super(parent);
- fProject = project;
- }
-
- /**
- * Closes the given file with "extreme prejudice".
- *
- * @param file the zip file to be closed
- */
- public void closeJarFile(ZipFile file) {
- if (file == null)
- return;
- try {
- file.close();
- }
- catch (IOException ioe) {
- // no cleanup can be done
- Logger.logException("JarUtilities: Could not close file " + file.getName(), ioe); //$NON-NLS-1$
- }
- }
-
- /*
- * This may pose a runtime performance problem as it opens the containing
- * .jar file for each class, but this is countered by no longer leaving
- * file handles open nor having to directly interact the build path at
- * all. If it is a problem, the TaglibHelper should control some
- * "batching" whereby we leave the JarFiles open until directed to close
- * them at the end of TaglibHelper.addTEIVariables(...).
- *
- * @see java.lang.ClassLoader#findClass(java.lang.String)
- */
- protected Class findClass(String className) throws ClassNotFoundException {
- if (DEBUG)
- System.out.println("finding: [" + className + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- try {
- IType type = fProject.findType(className);
- int offset = -1;
- if (type == null && (offset = className.indexOf('$')) != -1) {
- // Internal classes from source files must be referenced by . instead of $
- String cls = className.substring(0, offset) + className.substring(offset).replace('$', '.');
- type = fProject.findType(cls);
- }
- if (type != null) {
- IPath path = null;
- IResource resource = type.getResource();
-
- if (resource != null)
- path = resource.getLocation();
- if (path == null)
- path = type.getPath();
-
- // needs to be compiled before we can load it
- if ("class".equalsIgnoreCase(path.getFileExtension())) {
- IFile file = null;
-
- if (resource != null && resource.getType() == IResource.FILE)
- file = (IFile) resource;
- else
- file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
-
- if (file != null && file.isAccessible()) {
- byte[] bytes = loadBytes(file);
- return defineClass(className, bytes, 0, bytes.length);
- }
- }
- // Look up the class file based on the output location of the java project
- else if ("java".equalsIgnoreCase(path.getFileExtension()) && resource != null) { //$NON-NLS-1$
- if (resource.getProject() != null) {
- IJavaProject jProject = JavaCore.create(resource.getProject());
- String outputClass = StringUtils.replace(type.getFullyQualifiedName(), ".", "/").concat(".class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- IPath classPath = jProject.getOutputLocation().append(outputClass);
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(classPath);
- if (file != null && file.isAccessible()) {
- byte[] bytes = loadBytes(file);
- return defineClass(className, bytes, 0, bytes.length);
- }
- }
- }
- else if ("jar".equalsIgnoreCase(path.getFileExtension())) {
- String expectedFileName = StringUtils.replace(className, ".", "/").concat(".class"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- byte[] bytes = getCachedInputStream(path.toOSString(), expectedFileName);
- return defineClass(className, bytes, 0, bytes.length);
- }
- }
- }
- catch (JavaModelException e) {
- Logger.logException(e);
- }
- return super.findClass(className);
- }
-
- /**
- * Get the entry from the jarfile
- * @param jarFilename the string path of the jarfile
- * @param entryName the fully-qualified entry
- * @return the bytes for the entry within the jarfile or a byte array of size 0
- */
- private byte[] getCachedInputStream(String jarFilename, String entryName) {
- ByteArrayOutputStream buffer = null;
-
- File testFile = new File(jarFilename);
- if (!testFile.exists())
- return null;
-
- ZipFile jarfile = null;
- try {
- jarfile = new ZipFile(jarFilename);
-
- if (jarfile != null) {
- ZipEntry zentry = jarfile.getEntry(entryName);
- if (zentry != null) {
- InputStream entryInputStream = null;
- try {
- entryInputStream = jarfile.getInputStream(zentry);
- }
- catch (IOException ioExc) {
- Logger.logException("JarUtilities: " + jarFilename, ioExc); //$NON-NLS-1$
- }
-
- if (entryInputStream != null) {
- int c;
- if (zentry.getSize() > 0) {
- buffer = new ByteArrayOutputStream((int) zentry.getSize());
- }
- else {
- buffer = new ByteArrayOutputStream();
- }
- // array dim restriction?
- byte bytes[] = new byte[2048];
- try {
- while ((c = entryInputStream.read(bytes)) >= 0) {
- buffer.write(bytes, 0, c);
- }
- }
- catch (IOException ioe) {
- // no cleanup can be done
- }
- finally {
- try {
- entryInputStream.close();
- }
- catch (IOException e) {
- }
- }
- }
- }
- }
- }
- catch (IOException ioExc) {
- Logger.logException("JarUtilities: " + jarFilename, ioExc); //$NON-NLS-1$
- }
- finally {
- closeJarFile(jarfile);
- }
-
- if (buffer != null) {
- return buffer.toByteArray();
- }
- return new byte[0];
- }
-
- /**
- * @param file
- * @return
- */
- private byte[] loadBytes(IFile file) {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- InputStream in = null;
- try {
- in = file.getContents();
- byte[] buffer = new byte[4096];
- int read = 0;
- while ((read = in.read(buffer)) != -1) {
- out.write(buffer, 0, read);
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- finally {
- try {
- if (in != null)
- in.close();
- }
- catch (IOException e) {
- }
- }
- return out.toByteArray();
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/CustomTag.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/CustomTag.java
deleted file mode 100644
index 01867134e1..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/CustomTag.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.taglib;
-
-/**
- * Contains information about a custom tag including the tag name (with prefix),
- * the class that defines the functionality of the tag, TEI class, any scripting variables associated with the
- * TEI class, and if the class is an iteration tag
- *
- */
-public class CustomTag {
-
- private final String fTagName;
- private final String fClassName;
- private final String fTeiClassName;
- private final boolean fIsIterationTag;
- private final TaglibVariable[] fVariables;
-
- public CustomTag(String tagName, String className, String teiClassName, TaglibVariable[] tagVariables, boolean isIterationTag) {
- fTagName = tagName;
- fClassName = className;
- fTeiClassName = teiClassName;
- fVariables = tagVariables;
- fIsIterationTag = isIterationTag;
- }
-
- /**
- * Returns the name of the tag with its prefix
- * @return the tag name including prefix
- */
- public String getTagName() {
- return fTagName;
- }
-
- /**
- * Returns the name of the implementation class for the tag
- * @return the name of the implementation class for the tag
- */
- public String getTagClassName() {
- return fClassName;
- }
-
- /**
- * Returns the name of the TagExtraInfo class for the tag
- * @return the name of the TagExtraInfo class for the tag
- */
- public String getTeiClassName() {
- return fTeiClassName;
- }
-
- /**
- * Returns an array of scripting variables associated with the TagExtraInfo class
- * @return an array of scripting variables associated with the TagExtraInfo class
- */
- public TaglibVariable[] getTagVariables() {
- return fVariables;
- }
-
- /**
- * Identifies if the tag implements the IterationTag interface
- * @return true if the tag implements the IterationTag interface; false otherwise
- */
- public boolean isIterationTag() {
- return fIsIterationTag;
- }
-}
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 0dc3948e8d..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibClassLoader.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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.taglib;
-
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-
-import org.eclipse.core.runtime.IPath;
-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.
- */
-public class TaglibClassLoader extends URLClassLoader {
- // for debugging
- private static final boolean DEBUG = Boolean.valueOf(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/taglibclassloader")).booleanValue(); //$NON-NLS-1$
-
- private static final String FILE = "file:/";
- private static final String RESOURCE = "platform:/resource/";
-
- public TaglibClassLoader(ClassLoader parentLoader) {
- super(new URL[0], parentLoader);
- }
-
- public void addDirectory(String dirPath) {
- addJavaFile(dirPath + "/"); //$NON-NLS-1$
- }
-
- public void addFile(IPath filePath) {
- try {
- URL url = new URL(RESOURCE + filePath.toString()); //$NON-NLS-1$
- super.addURL(url);
- if (DEBUG)
- System.out.println("added: [" + url + "] to classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (MalformedURLException e) {
- Logger.logException(filePath.toString(), e);
- }
- }
-
- public void addFolder(IPath folderPath) {
- try {
- URL url = new URL(RESOURCE + folderPath.toString() + "/"); //$NON-NLS-1$
- super.addURL(url);
- if (DEBUG)
- System.out.println("added: [" + url + "] to classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (MalformedURLException e) {
- Logger.logException(folderPath.toString(), e);
- }
- }
-
- public void addJar(String filename) {
- addJavaFile(filename);
- }
-
- void addJavaFile(String filename) {
- try {
- URL url = new URL(FILE + filename);
- super.addURL(url);
- if (DEBUG)
- System.out.println("added: [" + url + "] to classpath"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (MalformedURLException e) {
- Logger.logException(filename, e);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.net.URLClassLoader#findClass(java.lang.String)
- */
- protected Class findClass(String className) throws ClassNotFoundException {
- if (DEBUG)
- System.out.println("finding: [" + className + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- return super.findClass(className);
- }
-} \ 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 ee37a9869c..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelper.java
+++ /dev/null
@@ -1,1025 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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.taglib;
-
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.jsp.tagext.FunctionInfo;
-import javax.servlet.jsp.tagext.TagAttributeInfo;
-import javax.servlet.jsp.tagext.TagData;
-import javax.servlet.jsp.tagext.TagExtraInfo;
-import javax.servlet.jsp.tagext.TagFileInfo;
-import javax.servlet.jsp.tagext.TagInfo;
-import javax.servlet.jsp.tagext.TagLibraryInfo;
-import javax.servlet.jsp.tagext.ValidationMessage;
-import javax.servlet.jsp.tagext.VariableInfo;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.JSPCoreMessages;
-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.TLDDocument;
-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.jst.jsp.core.internal.java.IJSPProblem;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.NotImplementedException;
-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.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.AbstractMemoryListener;
-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;
-import org.osgi.service.event.Event;
-
-import com.ibm.icu.text.MessageFormat;
-
-/**
- * This class helps find TaglibVariables in a JSP file.
- */
-public class TaglibHelper {
-
- private static final String ITERATION_QUALIFIER = "javax.servlet.jsp.tagext"; //$NON-NLS-1$
- private static final String ITERATION_NAME = "IterationTag"; //$NON-NLS-1$
-
- // 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 ClassLoader fLoader = null;
-
- private IJavaProject fJavaProject;
-
- /**
- * A cache of class names that the class loader could not find.
- * Because the TaglibHelper is destroyed and recreated whenever
- * the classpath changes this cache will not become stale
- */
- private Set fNotFoundClasses = null;
-
- private Map fClassMap = null;
-
- /**
- * Used to keep the {@link #fNotFoundClasses} cache clean when memory is low
- */
- private MemoryListener fMemoryListener;
-
- public TaglibHelper(IProject project) {
- super();
- setProject(project);
- fMemoryListener = new MemoryListener();
- fMemoryListener.connect();
- fNotFoundClasses = new HashSet();
- fClassMap = Collections.synchronizedMap(new HashMap());
- }
-
- /**
- * Checks that <code>type</code> implements an IterationTag
- *
- * @param type
- * @return true if <code>type</code> implements IterationTag
- * @throws JavaModelException
- * @throws ClassNotFoundException thrown when the <code>type</code> is null
- */
- private boolean isIterationTag(IType type) throws JavaModelException, ClassNotFoundException {
- if (type == null) {
- throw new ClassNotFoundException();
- }
- synchronized (fClassMap) {
- if (fClassMap.containsKey(type.getFullyQualifiedName()))
- return ((Boolean) fClassMap.get(type.getFullyQualifiedName())).booleanValue();
- }
-
- String signature;
- String qualifier;
- String name;
- String[] interfaces = type.getSuperInterfaceTypeSignatures();
- boolean isIteration = false;
- // Check any super interfaces for the iteration tag
- for (int i = 0; i < interfaces.length; i++) {
- // For source files, the interface may need to be resolved
- String erasureSig = Signature.getTypeErasure(interfaces[i]);
- qualifier = Signature.getSignatureQualifier(erasureSig);
- name = Signature.getSignatureSimpleName(erasureSig);
- // Interface type is unresolved
- if (erasureSig.charAt(0) == Signature.C_UNRESOLVED) {
- String[][] types = type.resolveType(getQualifiedType(qualifier, name));
- // Type was resolved
- if (types != null && types.length > 0) {
- isIteration = handleInterface(type, types[0][0], types[0][1]);
- }
- }
- else {
- isIteration = handleInterface(type, qualifier, name);
- }
- if (isIteration)
- return true;
- }
-
- signature = type.getSuperclassTypeSignature();
- if (signature != null) {
- String erasureSig = Signature.getTypeErasure(signature);
- qualifier = Signature.getSignatureQualifier(erasureSig);
- name = Signature.getSignatureSimpleName(erasureSig);
- // superclass was unresolved
- if (erasureSig.charAt(0) == Signature.C_UNRESOLVED) {
- String[][] types = type.resolveType(getQualifiedType(qualifier, name));
- // Type was resolved
- if (types != null && types.length > 0) {
- isIteration = isIterationTag(fJavaProject.findType(types[0][0], types[0][1]));
- }
- }
- else {
- isIteration = isIterationTag(fJavaProject.findType(qualifier, name));
- }
- }
- fClassMap.put(type.getFullyQualifiedName(), Boolean.valueOf(isIteration));
- return isIteration;
- }
-
- private boolean handleInterface(IType type, String qualifier, String name) throws JavaModelException, ClassNotFoundException {
- boolean isIteration = false;
- // Qualified interface is an iteration tag
- if (ITERATION_QUALIFIER.equals(qualifier) && ITERATION_NAME.equals(name))
- isIteration = true;
- // Check ancestors of this interface
- else
- isIteration = isIterationTag(fJavaProject.findType(qualifier, name));
-
- fClassMap.put(type.getFullyQualifiedName(), Boolean.valueOf(isIteration));
- return isIteration;
- }
-
- private String getQualifiedType(String qualifier, String name) {
- StringBuffer qual = new StringBuffer(qualifier);
- if (qual.length() > 0)
- qual.append('.');
- qual.append(name);
- return qual.toString();
- }
-
- private boolean isIterationTag(TLDElementDeclaration elementDecl, IStructuredDocument document, ITextRegionCollection customTag, List problems) {
- String className = elementDecl.getTagclass();
- if (className == null || className.length() == 0 || fProject == null || fNotFoundClasses.contains(className))
- return false;
-
- try {
- synchronized (fClassMap) {
- if (fClassMap.containsKey(className))
- return ((Boolean) fClassMap.get(className)).booleanValue();
- }
- return isIterationTag(fJavaProject.findType(className));
- } catch (ClassNotFoundException e) {
- //the class could not be found so add it to the cache
- fNotFoundClasses.add(className);
-
- Object createdProblem = createJSPProblem(document, customTag, IJSPProblem.TagClassNotFound, JSPCoreMessages.TaglibHelper_3, className, true);
- if (createdProblem != null)
- problems.add(createdProblem);
- if (DEBUG)
- Logger.logException(className, e);
- } catch (JavaModelException e) {
- if (DEBUG)
- Logger.logException(className, e);
- } catch (Exception e) {
- // this is 3rd party code, need to catch all errors
- if (DEBUG)
- Logger.logException(className, e);
- } catch (Error e) {
- // this is 3rd party code, need to catch all errors
- if (DEBUG)
- Logger.logException(className, e);
- }
-
- return false;
- }
-
- public CustomTag getCustomTag(String tagToAdd, IStructuredDocument structuredDoc, ITextRegionCollection customTag, List problems) {
- List results = new ArrayList();
- boolean isIterationTag = false;
- String tagClass = null;
- String teiClass = null;
- if (problems == null)
- problems = new ArrayList();
- ModelQuery mq = getModelQuery(structuredDoc);
- if (mq != null) {
- TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(structuredDoc);
-
- if (mgr != null) {
-
- List trackers = mgr.getCMDocumentTrackers(-1);
- Iterator taglibs = trackers.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();
- }
- TLDElementDeclaration tldElementDecl = (TLDElementDeclaration) node;
-
- tagClass = tldElementDecl.getTagclass();
- teiClass = tldElementDecl.getTeiclass();
- isIterationTag = isIterationTag(tldElementDecl, structuredDoc, customTag, problems);
- /*
- * Although clearly not the right place to add validation
- * design-wise, this is the first time we have the
- * necessary information to validate the tag class.
- */
- validateTagClass(structuredDoc, customTag, tldElementDecl, problems);
-
- // 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(structuredDoc, customTag, results, tldElementDecl, prefix, uri, problems);
- }
- break;
- }
- }
- }
- }
-
- return new CustomTag(tagToAdd, tagClass, teiClass, (TaglibVariable[]) results.toArray(new TaglibVariable[results.size()]), isIterationTag);
- }
- /**
- * @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
- * @param problems problems that are generated while creating variables are added to this collection
- */
- public TaglibVariable[] getTaglibVariables(String tagToAdd, IStructuredDocument structuredDoc, ITextRegionCollection customTag, List problems) {
-
- List results = new ArrayList();
- if (problems == null)
- problems = 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();
- }
- TLDElementDeclaration tldElementDecl = (TLDElementDeclaration) node;
-
- /*
- * Although clearly not the right place to add validation
- * design-wise, this is the first time we have the
- * necessary information to validate the tag class.
- */
- boolean tagClassFound = validateTagClass(structuredDoc, customTag, tldElementDecl, problems);
-
- // 1.2+ taglib style
- addVariables(results, node, customTag);
-
- // for 1.1 need more info from taglib tracker
- if (tagClassFound && doc instanceof TaglibTracker) {
- String uri = ((TaglibTracker) doc).getURI();
- String prefix = ((TaglibTracker) doc).getPrefix();
- // only for 1.1 taglibs
- addTEIVariables(structuredDoc, customTag, results, tldElementDecl, prefix, uri, problems);
- }
- }
- }
- }
-
- 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, ITextRegionCollection customTag) {
- List list = ((TLDElementDeclaration) node).getVariables();
- Iterator it = list.iterator();
- while (it.hasNext()) {
- TLDVariable var = (TLDVariable) it.next();
- if (!var.getDeclare())
- continue;
-
- String varName = var.getNameGiven();
- if (varName == null) {
- // 2.0
- varName = var.getAlias();
- }
- 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"; // the default
- // class...//$NON-NLS-1$
- if (var.getVariableClass() != null) {
- varClass = var.getVariableClass();
- }
- results.add(new TaglibVariable(varClass, varName, var.getScope(), var.getDescription()));
- }
- }
- }
-
- /**
- * Adds 1.1 style TaglibVariables (defined in a TagExtraInfo class) to the
- * results list. Also reports problems with the tag and tei classes in
- * fTranslatorProblems.
- *
- * @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(IStructuredDocument document, ITextRegionCollection customTag, List results, TLDElementDeclaration decl, String prefix, String uri, List problems) {
- if (TLDElementDeclaration.SOURCE_TAG_FILE.equals(decl.getProperty(TLDElementDeclaration.TAG_SOURCE)) || fJavaProject == null)
- return;
- String teiClassname = decl.getTeiclass();
- if (teiClassname == null || teiClassname.length() == 0 || fJavaProject == null || fNotFoundClasses.contains(teiClassname))
- return;
-
- ClassLoader loader = getClassloader();
-
- Class teiClass = null;
- try {
- /*
- * JDT could tell us about it, but loading and calling it would
- * still take time
- */
- 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);
-
- 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(), decl.getDescription()));
- }
- }
-
- ValidationMessage[] messages = tei.validate(td);
- if (messages != null && messages.length > 0) {
- for (int i = 0; i < messages.length; i++) {
- Object createdProblem = createValidationMessageProblem(document, customTag, messages[i].getMessage());
- if (createdProblem != null) {
- problems.add(createdProblem);
- }
- }
- }
- }
- }
- else {
- Object createdProblem = createJSPProblem(document, customTag, IJSPProblem.TEIClassMisc, JSPCoreMessages.TaglibHelper_2, teiClassname, true);
- if (createdProblem != null) {
- problems.add(createdProblem);
- }
- // this is 3rd party code, need to catch all exceptions
- if (DEBUG) {
- Logger.log(Logger.WARNING, teiClassname + " is not a subclass of TaxExtraInfo"); //$NON-NLS-1$
- }
- }
- }
- }
- catch (ClassNotFoundException e) {
- //the class could not be found so add it to the cache
- fNotFoundClasses.add(teiClassname);
-
- Object createdProblem = createJSPProblem(document, customTag, IJSPProblem.TEIClassNotFound, JSPCoreMessages.TaglibHelper_0, teiClassname, true);
- if (createdProblem != null) {
- problems.add(createdProblem);
- }
- // TEI class wasn't on build path
- if (DEBUG)
- logException(teiClassname, e);
- }
- catch (InstantiationException e) {
- Object createdProblem = createJSPProblem(document, customTag, IJSPProblem.TEIClassNotInstantiated, JSPCoreMessages.TaglibHelper_1, teiClassname, true);
- if (createdProblem != null) {
- problems.add(createdProblem);
- }
- // TEI class couldn't be instantiated
- 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) {
- Object createdProblem = createJSPProblem(document, customTag, IJSPProblem.TEIClassMisc, JSPCoreMessages.TaglibHelper_2, teiClassname, true);
- if (createdProblem != null) {
- problems.add(createdProblem);
- }
- // 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
- Object createdProblem = createJSPProblem(document, customTag, IJSPProblem.TEIClassNotInstantiated, JSPCoreMessages.TaglibHelper_1, teiClassname, true);
- if (createdProblem != null) {
- problems.add(createdProblem);
- }
- if (DEBUG)
- logException(teiClassname, e);
- }
- finally {
- // Thread.currentThread().setContextClassLoader(oldLoader);
- }
- }
-
- /**
- * @param customTag
- * @param teiClass
- * @return
- */
- private Object createJSPProblem(final IStructuredDocument document, final ITextRegionCollection customTag, final int problemID, final String messageKey, final String argument, boolean preferVars) {
- final String tagname = customTag.getText(customTag.getRegions().get(1));
-
- final int start;
- if (customTag.getNumberOfRegions() > 1) {
- start = customTag.getStartOffset(customTag.getRegions().get(1));
- }
- else {
- start = customTag.getStartOffset();
- }
-
- final int end;
- if (customTag.getNumberOfRegions() > 1) {
- end = customTag.getTextEndOffset(customTag.getRegions().get(1)) - 1;
- }
- else {
- end = customTag.getTextEndOffset() - 1;
- }
-
- final int line = document.getLineOfOffset(start);
-
- final char[] name;
- IPath location = TaglibController.getLocation(document);
- if (location == null) {
- name = new char[0];
- }
- else {
- name = location.toString().toCharArray();
- }
-
- /*
- * Note: these problems would result in translation errors on the
- * server, so the severity is not meant to be controllable
- */
- return new IJSPProblem() {
- public void setSourceStart(int sourceStart) {
- }
-
- public void setSourceLineNumber(int lineNumber) {
- }
-
- public void setSourceEnd(int sourceEnd) {
- }
-
- public boolean isWarning() {
- return false;
- }
-
- public boolean isError() {
- return true;
- }
-
- public int getSourceStart() {
- return start;
- }
-
- public int getSourceLineNumber() {
- return line;
- }
-
- public int getSourceEnd() {
- return end;
- }
-
- public char[] getOriginatingFileName() {
- return name;
- }
-
- public String getMessage() {
- return MessageFormat.format(messageKey, new String[]{tagname, argument});
- }
-
- public int getID() {
- return problemID;
- }
-
- public String[] getArguments() {
- return new String[0];
- }
-
- public int getEID() {
- return problemID;
- }
- };
- }
-
- /**
- * @param customTag
- * @param validationMessage
- * @return
- */
- private Object createValidationMessageProblem(final IStructuredDocument document, final ITextRegionCollection customTag, final String validationMessage) {
- final int start;
- if (customTag.getNumberOfRegions() > 3) {
- start = customTag.getStartOffset(customTag.getRegions().get(2));
- }
- else if (customTag.getNumberOfRegions() > 1) {
- start = customTag.getStartOffset(customTag.getRegions().get(1));
- }
- else {
- start = customTag.getStartOffset();
- }
-
- final int end;
- if (customTag.getNumberOfRegions() > 3) {
- end = customTag.getTextEndOffset(customTag.getRegions().get(customTag.getNumberOfRegions() - 2)) - 1;
- }
- else if (customTag.getNumberOfRegions() > 1) {
- end = customTag.getTextEndOffset(customTag.getRegions().get(1)) - 1;
- }
- else {
- end = customTag.getTextEndOffset();
- }
-
- final int line = document.getLineOfOffset(start);
-
- final char[] name;
- IPath location = TaglibController.getLocation(document);
- if (location == null) {
- name = new char[0];
- }
- else {
- name = location.toString().toCharArray();
- }
-
- return new IJSPProblem() {
- public void setSourceStart(int sourceStart) {
- }
-
- public void setSourceLineNumber(int lineNumber) {
- }
-
- public void setSourceEnd(int sourceEnd) {
- }
-
- public boolean isWarning() {
- return true;
- }
-
- public boolean isError() {
- return false;
- }
-
- public int getSourceStart() {
- return start;
- }
-
- public int getSourceLineNumber() {
- return line;
- }
-
- public int getSourceEnd() {
- return end;
- }
-
- public char[] getOriginatingFileName() {
- return name;
- }
-
- public String getMessage() {
- return validationMessage;
- }
-
- public int getID() {
- return getEID();
- }
-
- public String[] getArguments() {
- return new String[0];
- }
-
- public int getEID() {
- return IJSPProblem.TEIValidationMessage;
- }
- };
- }
-
- /**
- * @param decl
- * @return the TagInfo for the TLDELementDeclaration if the declaration is
- * valid, otherwise null
- */
- private TagInfo getTagInfo(final TLDElementDeclaration decl, TagExtraInfo tei, String prefix, String uri) {
-
- TagLibraryInfo libInfo = new TagLibraryInfoImpl(prefix, uri, decl);
-
- 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(ITextRegionCollection customTag) {
- Hashtable tagDataTable = new Hashtable();
- ITextRegionList regions = customTag.getRegions();
- ITextRegion r = null;
- String attrName = ""; //$NON-NLS-1$
- String attrValue = ""; //$NON-NLS-1$
- final int size = regions.size();
- for (int i = 2; i < 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 (size > ++i) {
- r = regions.get(i);
- if (r.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS && size > ++i) {
- // get attr value
- r = regions.get(i);
- final String type = r.getType();
- if (type == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- // attributes in our document have quotes, so we
- // need to strip them
- attrValue = StringUtils.stripQuotes(customTag.getText(r));
- tagDataTable.put(attrName, attrValue);
- }
- else if (type == DOMJSPRegionContexts.JSP_TAG_ATTRIBUTE_VALUE_DQUOTE || type == DOMJSPRegionContexts.JSP_TAG_ATTRIBUTE_VALUE_SQUOTE) {
- final StringBuffer buffer = new StringBuffer();
- while (size > ++i && (r = regions.get(i)).getType() != type) {
- buffer.append(customTag.getText(r));
- }
- tagDataTable.put(attrName, buffer.toString());
- }
- }
- }
- }
- }
-
- tagDataTable.put("jsp:id", customTag.getText(regions.get(1)) + "_" + customTag.getStartOffset()); //$NON-NLS-1$
-
- return tagDataTable;
- }
-
- private ClassLoader getClassloader() {
- if (fLoader == null) {
- fLoader = new BuildPathClassLoader(this.getClass().getClassLoader(), fJavaProject);
- }
- return fLoader;
- }
-
- /**
- * @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;
- IJavaProject javaProject = JavaCore.create(p);
- if (javaProject.exists()) {
- fJavaProject = javaProject;
- }
- }
-
- private boolean isTagFile(TLDElementDeclaration decl) {
- final String path = decl.getPath();
- return TLDElementDeclaration.SOURCE_TAG_FILE.equals(decl.getProperty(TLDElementDeclaration.TAG_SOURCE)) || (path != null && path.startsWith("/META-INF/tags")); //$NON-NLS-1$
- }
-
- private boolean validateTagClass(IStructuredDocument document, ITextRegionCollection customTag, TLDElementDeclaration decl, List problems) {
- // skip if from a tag file
- if (isTagFile(decl) || fJavaProject == null) {
- return false;
- }
-
- String tagClassname = decl.getTagclass();
- Object tagClass = null;
- if (tagClassname != null && tagClassname.length() > 0 && fJavaProject.exists()) {
- try {
- tagClass = fJavaProject.findType(tagClassname);
- }
- catch (JavaModelException e) {
- Logger.logException(e);
- }
- }
- if (tagClass == null) {
- Object createdProblem = createJSPProblem(document, customTag, IJSPProblem.TagClassNotFound, JSPCoreMessages.TaglibHelper_3, tagClassname, false);
- if (createdProblem != null) {
- problems.add(createdProblem);
- }
- }
- return tagClass != null;
- }
-
- /**
- *
- */
- public void dispose() {
- fLoader = null;
- fJavaProject = null;
- fProject = null;
- fNotFoundClasses = null;
- fClassMap = null;
- fMemoryListener.disconnect();
- fMemoryListener = null;
- }
-
- public void invalidateClass(String className) {
- fClassMap.remove(className);
- }
-
- /**
- * <p>A {@link AbstractMemoryListener} that clears the {@link #fNotFoundClasses} cache
- * whenever specific memory events are received.</p>
- *
- * <p>Events:
- * <ul>
- * <li>{@link AbstractMemoryListener#SEV_NORMAL}</li>
- * <li>{@link AbstractMemoryListener#SEV_SERIOUS}</li>
- * <li>{@link AbstractMemoryListener#SEV_CRITICAL}</li>
- * </ul>
- * </p>
- */
- private class MemoryListener extends AbstractMemoryListener {
- /**
- * <p>Constructor causes this listener to listen for specific memory events.</p>
- * <p>Events:
- * <ul>
- * <li>{@link AbstractMemoryListener#SEV_NORMAL}</li>
- * <li>{@link AbstractMemoryListener#SEV_SERIOUS}</li>
- * <li>{@link AbstractMemoryListener#SEV_CRITICAL}</li>
- * </ul>
- * </p>
- */
- MemoryListener() {
- super(new String[] { SEV_NORMAL, SEV_SERIOUS, SEV_CRITICAL });
- }
-
- /**
- * On any memory event we handle clear out the project descriptions
- *
- * @see org.eclipse.jst.jsp.core.internal.util.AbstractMemoryListener#handleMemoryEvent(org.osgi.service.event.Event)
- */
- protected void handleMemoryEvent(Event event) {
- /* if running low on memory then this cache can be cleared
- * and rebuilt at the expense of processing time
- */
- fNotFoundClasses.clear();
- fClassMap.clear();
- }
-
- }
-
- class TagLibraryInfoImpl extends TagLibraryInfo {
- TLDElementDeclaration decl;
-
- TagLibraryInfoImpl(String prefix, String uri, TLDElementDeclaration decl){
- super(prefix, uri);
- this.decl = decl;
- }
-
- public String getURI() {
- if (Platform.inDebugMode())
- new NotImplementedException().printStackTrace();
- return super.getURI();
- }
-
- public String getPrefixString() {
- if (Platform.inDebugMode())
- new NotImplementedException().printStackTrace();
- return super.getPrefixString();
- }
-
- public String getShortName() {
- return ((TLDDocument)decl.getOwnerDocument()).getShortname();
- }
-
- public String getReliableURN() {
- return ((TLDDocument)decl.getOwnerDocument()).getUri();
- }
-
- public String getInfoString() {
- return ((TLDDocument)decl.getOwnerDocument()).getInfo();
- }
-
- public String getRequiredVersion() {
- return ((TLDDocument)decl.getOwnerDocument()).getJspversion();
- }
-
- public TagInfo[] getTags() {
- if (Platform.inDebugMode())
- new NotImplementedException().printStackTrace();
- return super.getTags();
- }
-
- public TagFileInfo[] getTagFiles() {
- if (Platform.inDebugMode())
- new NotImplementedException().printStackTrace();
- return super.getTagFiles();
- }
-
- public TagInfo getTag(String shortname) {
- if (Platform.inDebugMode())
- new NotImplementedException().printStackTrace();
- return super.getTag(shortname);
- }
-
- public TagFileInfo getTagFile(String shortname) {
- if (Platform.inDebugMode())
- new NotImplementedException().printStackTrace();
- return super.getTagFile(shortname);
- }
-
- public FunctionInfo[] getFunctions() {
- if (Platform.inDebugMode())
- new NotImplementedException().printStackTrace();
- return super.getFunctions();
- }
-
- public FunctionInfo getFunction(String name) {
- new NotImplementedException(name).printStackTrace();
- return super.getFunction(name);
- }
-
- public TagLibraryInfo[] getTagLibraryInfos() {
- if (Platform.inDebugMode())
- new NotImplementedException().printStackTrace();
- return new TagLibraryInfo[] { this };
- }
- }
-}
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 8c5eadfee6..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperCache.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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.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 fProjectName;
-
- public Entry(String projectName, TaglibHelper helper) {
- setProjectName(projectName);
- setHelper(helper);
- }
- public TaglibHelper getHelper() {
- return fHelper;
- }
- public void setHelper(TaglibHelper helper) {
- fHelper = helper;
- }
- public String getProjectName() {
- return fProjectName;
- }
- public void setProjectName(String projectName) {
- fProjectName = projectName;
- }
- public String toString() {
- return "Taglib Helper Entry [" + getProjectName() + "]"; //$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 projectName = project.getName();
- int size = fHelpers.size();
- // fist check for existing
- for (int i=0; i<size; i++) {
- entry = (Entry)fHelpers.get(i);
- if(entry.getProjectName().equals(projectName)) {
- // 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(projectName, project);
- }
- return helper;
- }
-
- /**
- * @param projectName
- * @param f
- * @param mq
- * @return
- */
- private TaglibHelper createNewHelper(String projectName, IProject project) {
-
- TaglibHelper helper;
- // create
- helper = new TaglibHelper(project);
- Entry newEntry = new Entry(projectName, 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
- Entry removed = (Entry) fHelpers.remove(fHelpers.size()-1);
- removed.getHelper().dispose();
- if(DEBUG) {
- Logger.log(Logger.INFO, "(-) TaglibHelperCache removed: " + removed.getProjectName()); //$NON-NLS-1$
- printCacheContents();
- }
- }
- return helper;
- }
-
- public final synchronized void removeHelper(String projectName) {
- Entry entry = null;
- Iterator it = fHelpers.iterator();
- while(it.hasNext()) {
- entry = (Entry)it.next();
- if(entry.getProjectName().equals(projectName)) {
- entry.getHelper().dispose();
- fHelpers.remove(entry);
- if(DEBUG) {
- Logger.log(Logger.INFO, "(-) TaglibHelperCache removed: " + entry); //$NON-NLS-1$
- printCacheContents();
- }
- break;
- }
- }
- }
-
- public final synchronized void invalidate(String projectName, String className) {
- Entry entry = null;
- Iterator it = fHelpers.iterator();
- while(it.hasNext()) {
- entry = (Entry)it.next();
- if(entry.getProjectName().equals(projectName)) {
- entry.getHelper().invalidateClass(className);
- if(DEBUG) {
- Logger.log(Logger.INFO, "(-) TaglibHelperCache invalidated: " + className); //$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 c0b26e0bae..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibHelperManager.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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.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;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-
-/**
- * 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 || (changed[i].getFlags() & IJavaElementDelta.F_REORDER) != 0 || (changed[i].getFlags() & IJavaElementDelta.F_RESOLVED_CLASSPATH_CHANGED) != 0 || (changed[i].getFlags() & IJavaElementDelta.F_PRIMARY_RESOURCE) != 0) {
- IJavaElement proj = changed[i].getElement();
- handleClasspathChange(changed, i, proj);
- }
- }
- }
- else if (delta.getElement().getElementType() == IJavaElement.COMPILATION_UNIT) {
- IJavaElementDelta[] changed = delta.getChangedChildren();
- for (int i = 0; i < changed.length; i++) {
- if ((changed[i].getFlags() & IJavaElementDelta.F_SUPER_TYPES) != 0) {
- IJavaElement element = changed[i].getElement();
- handleSuperTypeChange(element);
- }
- }
- }
- }
-
- private void handleSuperTypeChange(IJavaElement element) {
- IJavaProject project = element.getJavaProject();
- if (element instanceof IType) {
- fCache.invalidate(project.getProject().getName(), ((IType) element).getFullyQualifiedName());
- }
- }
-
- /**
- * @param changed
- * @param i
- * @param proj
- */
- private void handleClasspathChange(IJavaElementDelta[] changed, int i, IJavaElement proj) {
- if (proj.getElementType() == IJavaElement.JAVA_PROJECT) {
- String projectName = ((IJavaProject) proj).getProject().getName();
- fCache.removeHelper(projectName);
- }
- }
-}
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 ab91ce9366..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/taglib/TaglibVariable.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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.taglib;
-
-import javax.servlet.jsp.tagext.VariableInfo;
-
-import org.eclipse.wst.sse.core.utils.StringUtils;
-
-/**
- * Contains info about a TaglibVariable: classname, variablename.
- */
-public class TaglibVariable {
-
- private String fVarClass = null;
- private String fVarName = null;
- private int fScope;
- private String fDescription;
-
- /** fixed end-of-line value */
- 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 static final int M_PRIVATE = 1;
- public static final int M_NONE = 0;
-
- /**
- *
- */
- 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);
- }
-
- public TaglibVariable(String varClass, String varName, String scope, String description) {
- setVarClass(varClass);
- setVarName(varName);
- setScope(scope);
- setDescription(description);
- }
-
- TaglibVariable(String varClass, String varName, int scope, String description) {
- setVarClass(varClass);
- setVarName(varName);
- setScope(scope);
- setDescription(description);
- }
-
- /**
- * @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 getDeclarationString(false, M_NONE);
- }
-
- /**
- * Convenience method.
- *
- * @return
- */
- public final String getDeclarationString(boolean includeDoc, int style) {
- String declaration = null;
- /*
- * no description for now --JDT would need to show it for local
- * variables and ILocalVariable has no "doc range"
- */
- if (includeDoc && getDescription() != null) {
- if (style == M_PRIVATE) {
- declaration = "/** " + ENDL + StringUtils.replace(getDescription(), "*/", "*\\/") + ENDL + " */ " + ENDL + "private " + getVarClass() + " " + getVarName() + " = (" + getVarClass() + ") pageContext.getAttribute(\"" + getVarName() + "\");" + ENDL; //$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$
- }
- else {
- declaration = "/** " + ENDL + StringUtils.replace(getDescription(), "*/", "*\\/") + ENDL + " */ " + ENDL + getVarClass() + " " + getVarName() + " = (" + getVarClass() + ") pageContext.getAttribute(\"" + getVarName() + "\");" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
- }
- }
- else {
- if (style == M_PRIVATE) {
- declaration = "private " + getVarClass() + " " + getVarName() + " = (" + getVarClass() + ") pageContext.getAttribute(\"" + getVarName() + "\");" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
- }
- else {
- declaration = getVarClass() + " " + getVarName() + " = (" + getVarClass() + ") pageContext.getAttribute(\"" + getVarName() + "\");" + ENDL; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
- }
- return declaration;
- }
-
- public String getDescription() {
- return fDescription;
- }
-
- 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;
- }
-
- public void setDescription(String description) {
- fDescription = description;
- }
-}
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 51f5faf2c6..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, 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.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 f40997ab14..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/text/StructuredTextPartitionerForJSP.java
+++ /dev/null
@@ -1,475 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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.IStructuredTypedRegion;
-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 == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_DQUOTE || region_type == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_SQUOTE)
- result = IJSPPartitions.JSP_DEFAULT;
- 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 if (region_type == DOMRegionContext.BLOCK_TEXT) {
- // 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 = ((TagMarker) fCustomActionPrefixes.get(i)).getTagName();
- 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;
- }
-
- //if is a JSP custom tag but not a JSP_EL region
- if (fEnableJSPActionPartitions && !isELRegion(containedChildRegion) && !isScriptletRegion(containedChildRegion) && isAction(sdRegion, offset) && !(containedChildRegion instanceof ITextRegionContainer) ) {
- 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!)
- IStructuredTypedRegion region = getEmbeddedPartitioner().createPartition(offset, length, type);
- super.setInternalPartition(region.getOffset(), region.getLength(), region.getType());
-
- }
-
- /**
- * Sets the language.
- *
- * @param language
- * The language to set
- */
- public void setLanguage(String language) {
- this.fLanguage = language;
- }
-
- /**
- * @param region decide if this region is an EL region
- * @return <code>true</code> if the given <code>region</code> is a EL region,
- * <code>false</code> otherwise.
- */
- private boolean isELRegion(ITextRegion region) {
- String type = region.getType();
- return
- type == DOMJSPRegionContexts.JSP_EL_CLOSE ||
- type == DOMJSPRegionContexts.JSP_EL_CONTENT ||
- type == DOMJSPRegionContexts.JSP_EL_DQUOTE ||
- type == DOMJSPRegionContexts.JSP_EL_OPEN ||
- type == DOMJSPRegionContexts.JSP_EL_QUOTED_CONTENT ||
- type == DOMJSPRegionContexts.JSP_EL_SQUOTE ||
- type == DOMJSPRegionContexts.JSP_VBL_CLOSE ||
- type == DOMJSPRegionContexts.JSP_VBL_CONTENT ||
- type == DOMJSPRegionContexts.JSP_VBL_DQUOTE ||
- type == DOMJSPRegionContexts.JSP_VBL_OPEN ||
- type == DOMJSPRegionContexts.JSP_VBL_QUOTED_CONTENT ||
- type == DOMJSPRegionContexts.JSP_VBL_SQUOTE;
- }
-
- private boolean isScriptletRegion(ITextRegion region) {
- final String type = region.getType();
- return type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN || type == DOMJSPRegionContexts.JSP_CLOSE || type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN || type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN || type == DOMJSPRegionContexts.JSP_CONTENT;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner#doParserSpecificCheck(int, boolean, org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion, org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion, org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion, org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion)
- */
- protected boolean doParserSpecificCheck(int offset, boolean partitionFound, IStructuredDocumentRegion sdRegion, IStructuredDocumentRegion previousStructuredDocumentRegion, ITextRegion next, ITextRegion previousStart) {
- if (previousStart != null && previousStart.getType() == DOMRegionContext.XML_TAG_OPEN && next.getType() == DOMRegionContext.XML_END_TAG_OPEN) {
- ITextRegion previousName = previousStructuredDocumentRegion.getRegionAtCharacterOffset(previousStructuredDocumentRegion.getEndOffset(previousStart));
- ITextRegion nextName = sdRegion.getRegionAtCharacterOffset(sdRegion.getEndOffset(next));
- if (previousName != null && nextName != null && previousName.getType() == DOMRegionContext.XML_TAG_NAME && nextName.getType() == DOMRegionContext.XML_TAG_NAME) {
- setInternalPartition(offset, 0, getPartitionTypeBetween(previousStructuredDocumentRegion, sdRegion));
- partitionFound = true;
- }
- }
- return partitionFound;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.sse.core.internal.text.rules.StructuredTextPartitioner#getParserSpecificPreviousRegion(org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion)
- */
- protected IStructuredDocumentRegion getParserSpecificPreviousRegion(IStructuredDocumentRegion currentRegion) {
- if (currentRegion == null)
- return null;
- do {
- currentRegion = currentRegion.getPrevious();
- } while (currentRegion != null && currentRegion.getType().equals(DOMRegionContext.BLOCK_TEXT));
-
- return currentRegion;
- }
-}
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 bc244b1823..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/CommonXML.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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.ByteArrayInputStream;
-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;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-public class CommonXML {
-
- public synchronized static DocumentBuilder getDocumentBuilder() {
- DocumentBuilder result = null;
- try {
- result = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- result.setEntityResolver(getEntityResolver());
- }
- 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();
- if (!validating)
- result.setEntityResolver(getEntityResolver());
- }
- 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());
- }
- }
-
- /**
- * Returns an EntityResolver that won't try to load and resolve ANY
- * entities
- */
- private static EntityResolver getEntityResolver() {
- EntityResolver resolver = new EntityResolver() {
- public InputSource resolveEntity(String publicID, String systemID) throws SAXException, IOException {
- InputSource 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;
- }
-}
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 b68ad08948..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/DocumentProvider.java
+++ /dev/null
@@ -1,480 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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 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;
-
-import com.ibm.icu.util.StringTokenizer;
-
-/**
- * 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) {
- // parsing exception, notify the user?
- Logger.log(Logger.WARNING_DEBUG, "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_DEBUG, "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;
- }
-
- DocumentBuilder fDocumentBuilder = null;
-
- private DocumentBuilder getDocumentBuilder() {
- if (fDocumentBuilder == null) {
- fDocumentBuilder = CommonXML.getDocumentBuilder(isValidating());
- }
- return fDocumentBuilder;
- }
-
- private DOMImplementation getDomImplementation() {
- DocumentBuilder builder = null;
- try {
- builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
- DOMImplementation impl = builder.getDOMImplementation();
- return impl;
- }
- catch (ParserConfigurationException e1) {
- Logger.logException(e1);
- }
- catch (FactoryConfigurationError e1) {
- Logger.logException(e1);
- }
- 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
- * 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 {
- DOMImplementation domImplementation = getDomImplementation();
- if (domImplementation != null) {
- result = domImplementation.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_DEBUG, "SAXParseException with " + fBaseReference + "/" + getJarFileName() + "/" + getFileName() + " (error) while reading descriptor: " + exception.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-
- public void fatalError(SAXParseException exception) throws SAXException {
- Logger.log(Logger.WARNING_DEBUG, "SAXParseException with " + fBaseReference + "/" + 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_DEBUG, "SAXParseException with " + fBaseReference + "/" + 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;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupport.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupport.java
deleted file mode 100644
index 89ee497163..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupport.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2011 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 org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-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.Path;
-
-/**
- * This class encapsulates any used Module Core and Facets APIs along with
- * fallbacks for use on non-compliant projects and when those services are not
- * available at runtime.
- *
- * Because ModuleCore API calls can result in locks needing to be acquired,
- * none of these methods should be called while other thread locks have
- * already been acquired.
- */
-public final class FacetModuleCoreSupport {
- static final boolean _dump_NCDFE = false;
- private static final String WEB_INF = "WEB-INF"; //$NON-NLS-1$
- private static final IPath WEB_INF_PATH = new Path(WEB_INF);
-
- static final float DEFAULT_SERVLET_VERSION = 3f;
-
- /**
- * @param project
- * @return the computed IPath to the "root" of the web contents, either from facet knowledge or hueristics, or null if one can not be determined
- */
- public static IPath computeWebContentRootPath(IPath path) {
- IPath root = null;
- try {
- root = FacetModuleCoreSupportDelegate.getWebContentRootPath(ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0)));
- }
- catch (NoClassDefFoundError e) {
- if (_dump_NCDFE)
- e.printStackTrace();
- }
- if(root == null) {
- /*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=213245
- *
- * NPE in JSPTaglibDirectiveContentAssistProcessor with
- * non-faceted project
- */
- root = getLocalRoot(path);
- }
- return root;
- }
-
- /**
- * @param project
- * @return the version of the JST Web facet installed on the project, a default version otherwise
- * @throws org.eclipse.core.runtime.CoreException
- */
- public static float getDynamicWebProjectVersion(IProject project) {
- // In the absence of any facet information, assume the highest level
- float version = DEFAULT_SERVLET_VERSION;
- try {
- version = FacetModuleCoreSupportDelegate.getDynamicWebProjectVersion(project);
- }
- catch (NoClassDefFoundError e) {
- if (_dump_NCDFE)
- e.printStackTrace();
- }
- return version;
- }
-
- /**
- * @param project
- * @return the IPath to the "root" of the web contents
- */
- public static IPath getWebContentRootPath(IProject project) {
- if (project == null)
- return null;
-
- IPath path = null;
- try {
- path = FacetModuleCoreSupportDelegate.getWebContentRootPath(project);
- }
- catch (NoClassDefFoundError e) {
- if (_dump_NCDFE)
- e.printStackTrace();
- }
- return path;
- }
-
- /**
- * @param project
- * @return the IPaths to acceptable "roots" in a project
- */
- public static IPath[] getAcceptableRootPaths(IProject project) {
- if (project == null)
- return null;
- IPath[] paths = null;
- try {
- paths = FacetModuleCoreSupportDelegate.getAcceptableRootPaths(project);
- }
- catch (NoClassDefFoundError e) {
- if (_dump_NCDFE)
- e.printStackTrace();
- return new IPath[]{project.getFullPath()};
- }
- return paths;
- }
-
- /**
- * @param path
- * - the full path to a resource within the workspace
- * @return - the runtime path of the resource if one exists, an
- * approximation otherwise
- */
- public static IPath getRuntimePath(IPath path) {
- IPath result = null;
- try {
- result = FacetModuleCoreSupportDelegate.getRuntimePath(path);
- }
- catch (NoClassDefFoundError e) {
- if (_dump_NCDFE)
- e.printStackTrace();
- }
- if (result == null) {
- IPath root = getLocalRoot(path);
- result = path.removeFirstSegments(root.segmentCount()).makeAbsolute();
- }
- return result;
- }
-
- /**
- * @param project
- * @return whether this project has the jst.web facet installed on it
- * @throws CoreException
- */
- public static boolean isDynamicWebProject(IProject project) {
- if (project == null)
- return false;
-
- try {
- return FacetModuleCoreSupportDelegate.isDynamicWebProject(project);
- }
- catch (NoClassDefFoundError e) {
- if (_dump_NCDFE)
- e.printStackTrace();
- }
- return true;
- }
-
- /**
- * @param basePath -
- * the full path to a resource within the workspace
- * @param reference -
- * the reference string to resolve
- * @return - the full path within the workspace that corresponds to the
- * given reference according to the virtual pathing support
- */
- public static IPath resolve(IPath basePath, String reference) {
- IPath resolvedPath = null;
- try {
- resolvedPath = FacetModuleCoreSupportDelegate.resolve(basePath, reference);
- }
- catch (NoClassDefFoundError e) {
- if (_dump_NCDFE)
- e.printStackTrace();
- }
-
- if (resolvedPath == null) {
- IPath rootPath = getLocalRoot(basePath);
- if (reference.startsWith(Path.ROOT.toString())) {
- resolvedPath = rootPath.append(reference);
- }
- else {
- resolvedPath = basePath.removeLastSegments(1).append(reference);
- }
- }
-
- return resolvedPath;
- }
-
- /**
- * @param basePath
- * @return an approximation of the applicable Web context root path, if one could be found
- */
- private static IPath getLocalRoot(IPath basePath) {
- IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
-
- // existing workspace resources - this is the 93% case
- IResource file = FileBuffers.getWorkspaceFileAtLocation(basePath);
-
- // Try the base path as a folder first
- if (file == null && basePath.segmentCount() > 1) {
- file = workspaceRoot.getFolder(basePath);
- }
- // If not a folder, then try base path as a file
- if (file != null && !file.exists() && basePath.segmentCount() > 1) {
- file = workspaceRoot.getFile(basePath);
- }
-
- if (file == null && basePath.segmentCount() == 1) {
- file = workspaceRoot.getProject(basePath.segment(0));
- }
-
- if (file == null) {
- /*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=116529
- *
- * This method produces a less accurate result, but doesn't
- * require that the file exist yet.
- */
- IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(basePath);
- if (files.length > 0)
- file = files[0];
- }
-
- while (file != null) {
- /**
- * Treat any parent folder with a WEB-INF subfolder as a web-app
- * root
- */
- IContainer folder = null;
- if ((file.getType() & IResource.FOLDER) != 0) {
- folder = (IContainer) file;
- }
- else {
- folder = file.getParent();
- }
- // getFolder on a workspace root must use a full path, skip
- if (folder != null && (folder.getType() & IResource.ROOT) == 0) {
- IFolder webinf = folder.getFolder(WEB_INF_PATH);
- if (webinf != null && webinf.exists()) {
- return folder.getFullPath();
- }
- }
- file = file.getParent();
- }
-
- return basePath.uptoSegment(1);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupportDelegate.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupportDelegate.java
deleted file mode 100644
index 7c2087cc98..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FacetModuleCoreSupportDelegate.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2011 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse 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 org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-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.Path;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.wst.common.componentcore.ComponentCore;
-import org.eclipse.wst.common.componentcore.ModuleCoreNature;
-import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFile;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.componentcore.resources.IVirtualResource;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-
-/**
- * Wrapper class for all Facet-related calls. If the Facet or ModuleCore
- * bundles are not available, this class will not load, or if it does, its
- * methods will cause NoClassDefFoundErrors. This allows us to
- * compartmentalize the dependencies.
- *
- */
-final class FacetModuleCoreSupportDelegate {
- private static final String SLASH = "/";
-
- /**
- * Copied to avoid unneeded extra dependency (plus it's unclear why the
- * value is in that plug-in).
- *
- * @see org.eclipse.wst.common.componentcore.internal.util.IModuleConstants.JST_WEB_MODULE
- */
- private final static String JST_WEB_MODULE = "jst.web"; //$NON-NLS-1$
- /**
- * @param project
- * @return the version of the JST Web facet, a default otherwise
- * @throws CoreException
- */
- static float getDynamicWebProjectVersion(IProject project) {
- if (project == null)
- return FacetModuleCoreSupport.DEFAULT_SERVLET_VERSION;
-
- // In the absence of any facet information, assume the highest level
- float version = FacetModuleCoreSupport.DEFAULT_SERVLET_VERSION;
- try {
- IFacetedProject faceted = ProjectFacetsManager.create(project);
- if (faceted != null && ProjectFacetsManager.isProjectFacetDefined(JST_WEB_MODULE)) {
- IProjectFacet webModuleFacet = ProjectFacetsManager.getProjectFacet(JST_WEB_MODULE);
- if (faceted.hasProjectFacet(webModuleFacet)) {
- version = Float.parseFloat(faceted.getInstalledVersion(webModuleFacet).getVersionString());
- }
- }
- }
- catch (NumberFormatException e) {
- Logger.logException(e);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- return version;
- }
-
- /**
- * @param path -
- * the full path to a resource within the workspace
- * @return - the runtime path of the resource if one exists, null
- * otherwise
- */
- static IPath getRuntimePath(IPath path) {
- if (path == null)
- return null;
-
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
-
- if (!ModuleCoreNature.isFlexibleProject(project))
- return null;
-
- IVirtualResource[] virtualResources = ComponentCore.createResources(ResourcesPlugin.getWorkspace().getRoot().getFile(path));
- if (virtualResources != null && virtualResources.length > 0) {
- return virtualResources[0].getRuntimePath();
- }
- return null;
- }
-
- /**
- * @param project
- * @return the IPath to the "root" of the web contents
- */
- static IPath getWebContentRootPath(IProject project) {
- if (project == null)
- return null;
-
- if (!ModuleCoreNature.isFlexibleProject(project))
- return null;
-
- IPath path = null;
- IVirtualComponent component = ComponentCore.createComponent(project);
- if (component != null && component.exists()) {
- path = component.getRootFolder().getWorkspaceRelativePath();
- }
- return path;
- }
-
- /**
- * @param project
- * @return
- * @throws CoreException
- */
- static boolean isDynamicWebProject(IProject project) {
- if (project == null)
- return false;
-
- try {
- if (ProjectFacetsManager.isProjectFacetDefined(JST_WEB_MODULE)) {
- IFacetedProject faceted = ProjectFacetsManager.create(project);
- IProjectFacet webModuleFacet = ProjectFacetsManager.getProjectFacet(JST_WEB_MODULE);
- if (faceted != null && faceted.hasProjectFacet(webModuleFacet)) {
- return true;
- }
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- return false;
- }
-
- /**
- * @param basePath -
- * the full path to a resource within the workspace
- * @param reference -
- * the reference string to resolve
- * @return - the full path within the workspace that corresponds to the
- * given reference according to the virtual pathing support
- */
- static IPath resolve(IPath basePath, String reference) {
- if (reference == null || basePath == null || basePath.segmentCount() == 0)
- return null;
-
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(basePath.segment(0));
-
- if (!ModuleCoreNature.isFlexibleProject(project))
- return null;
-
- if (basePath.segmentCount() > 1) {
- IResource baseResource = ResourcesPlugin.getWorkspace().getRoot().findMember(basePath);
- if (baseResource != null) {
- IVirtualResource[] virtualResources = ComponentCore.createResources(baseResource);
- for (int i = 0; i < virtualResources.length; i++) {
- IPath referenceRuntimePath = null;
- if (reference.startsWith(SLASH)) {
- referenceRuntimePath = new Path(reference);
- }
- else {
- IPath baseRuntimePath = virtualResources[i].getRuntimePath();
- referenceRuntimePath = baseRuntimePath.removeLastSegments(1).append(reference);
- }
-
- IVirtualFile virtualFile = ComponentCore.createFile(project, referenceRuntimePath);
- if (virtualFile != null && virtualFile.exists()) {
- IFile[] underlyingFiles = virtualFile.getUnderlyingFiles();
- for (int j = 0; j < underlyingFiles.length; j++) {
- if (underlyingFiles[j].getProject().equals(project) && underlyingFiles[j].isAccessible()) {
- return underlyingFiles[j].getFullPath();
- }
-
- }
- }
- else {
- // http://bugs.eclipse.org/338751
- IVirtualFolder virtualFolder = ComponentCore.createFolder(project, referenceRuntimePath);
- if (virtualFolder != null && virtualFolder.exists()) {
- IContainer[] underlyingFolders = virtualFolder.getUnderlyingFolders();
- for (int j = 0; j < underlyingFolders.length; j++) {
- if (underlyingFolders[j].getProject().equals(project) && underlyingFolders[j].isAccessible()) {
- return underlyingFolders[j].getFullPath();
- }
- }
- }
- }
- }
- }
- }
- else {
- IVirtualFile virtualFile = ComponentCore.createFile(project, new Path(reference));
- if (virtualFile != null && virtualFile.exists()) {
- return virtualFile.getUnderlyingFile().getFullPath();
- }
- }
- return null;
- }
-
- static IPath[] getAcceptableRootPaths(IProject project) {
- if (!ModuleCoreNature.isFlexibleProject(project)) {
- return new IPath[]{project.getFullPath()};
- }
-
- IPath[] paths = null;
- IVirtualFolder componentFolder = ComponentCore.createFolder(project, Path.ROOT);
- if (componentFolder != null && componentFolder.exists()) {
- IContainer[] workspaceFolders = componentFolder.getUnderlyingFolders();
- paths = new IPath[workspaceFolders.length];
- for (int i = 0; i < workspaceFolders.length; i++) {
- paths[i] = workspaceFolders[i].getFullPath();
- }
- }
- else {
- paths = new IPath[]{project.getFullPath()};
- }
- return paths;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FileContentCache.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FileContentCache.java
deleted file mode 100644
index 2802c74ea8..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/FileContentCache.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.lang.ref.Reference;
-import java.lang.ref.SoftReference;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.filebuffers.LocationKind;
-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.NullProgressMonitor;
-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.wst.sse.core.internal.util.Debug;
-
-public class FileContentCache {
- private static class CacheEntry {
- String contents;
- long modificationStamp = IResource.NULL_STAMP;
- IPath path;
-
- CacheEntry(IPath path) {
- this.path = path;
- modificationStamp = getModificationStamp(path);
- contents = readContents(path);
- }
-
- private IFile getFile(IPath path) {
- if (path.segmentCount() > 1) {
- return ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- }
- return null;
- }
-
- boolean isStale() {
- if (modificationStamp == IResource.NULL_STAMP) {
- return true;
- }
- long newStamp = getModificationStamp(path);
- return newStamp > modificationStamp;
- }
-
- 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) {
- // out of sync
- }
- finally {
- if (contents != null) {
- try {
- contents.close();
- }
- catch (Exception e) {
- // not sure how to recover at this point
- }
- }
- }
- }
- return ResourcesPlugin.getEncoding();
- }
-
- private long getModificationStamp(IPath filePath) {
- IFile f = getFile(filePath);
- if (f != null && f.isAccessible()) {
- return f.getModificationStamp();
- }
- File file = filePath.toFile();
- if (file.exists())
- return file.lastModified();
- return IResource.NULL_STAMP;
- }
-
- private String readContents(IPath filePath) {
- if (DEBUG)
- System.out.println("readContents:" + filePath);
- StringBuffer s = new StringBuffer();
- InputStream is = null;
- try {
- IFile f = getFile(filePath);
- if (f != null && f.isAccessible()) {
- String charset = detectCharset(f);
- if (charset == null) {
- charset = ResourcesPlugin.getEncoding();
- }
- is = f.getContents();
- Reader reader = new InputStreamReader(is, charset);
- char[] readBuffer = new char[8092];
- int n = reader.read(readBuffer);
- while (n > 0) {
- s.append(readBuffer, 0, n);
- n = reader.read(readBuffer);
- }
- }
- }
- catch (CoreException e) {
- // out of sync
- }
- catch (Exception e) {
- if (Debug.debugStructuredDocument) {
- Logger.logException(e);
- }
- }
- finally {
- try {
- if (is != null) {
- is.close();
- }
- }
- catch (Exception e) {
- // nothing to do
- }
- }
- if (is == null) {
- try {
- FileBuffers.getTextFileBufferManager().connect(filePath, LocationKind.LOCATION, new NullProgressMonitor());
- ITextFileBuffer buffer = FileBuffers.getTextFileBufferManager().getTextFileBuffer(filePath, LocationKind.LOCATION);
- if (buffer != null) {
- s.append(buffer.getDocument().get());
- }
- }
- catch (CoreException e) {
- // nothing to do
- Logger.logException(e);
- }
- finally {
- try {
- FileBuffers.getTextFileBufferManager().disconnect(filePath, LocationKind.LOCATION, new NullProgressMonitor());
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- }
- return s.toString();
- }
-
- }
-
- static final boolean DEBUG = false;
-
- static FileContentCache instance = new FileContentCache();
-
- public static FileContentCache getInstance() {
- return instance;
- }
-
- private HashMap fContentMap;
-
- private FileContentCache() {
- super();
- fContentMap = new HashMap();
- }
-
- private void cleanup() {
- synchronized (fContentMap) {
- Iterator iterator = fContentMap.entrySet().iterator();
- while (iterator.hasNext()) {
- Map.Entry entry = (Map.Entry) iterator.next();
- if (entry.getValue() != null && ((Reference) entry.getValue()).get() == null) {
- iterator.remove();
- }
- }
- }
- }
-
- public String getContents(IPath filePath) {
- if (DEBUG)
- System.out.println("getContents:" + filePath);
- CacheEntry entry = null;
- Object o = fContentMap.get(filePath);
- if (o instanceof Reference) {
- entry = (CacheEntry) ((Reference) o).get();
- }
- if (entry == null || entry.isStale()) {
- if (DEBUG && entry != null && entry.isStale())
- System.out.println("stale contents:" + filePath);
- entry = new CacheEntry(filePath);
- synchronized (fContentMap) {
- fContentMap.put(filePath, new SoftReference(entry));
- }
- }
- cleanup();
- return entry.contents;
- }
-
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/ZeroStructuredDocumentRegion.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/ZeroStructuredDocumentRegion.java
deleted file mode 100644
index 0772450803..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/util/ZeroStructuredDocumentRegion.java
+++ /dev/null
@@ -1,290 +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.util;
-
-import org.eclipse.wst.sse.core.internal.provisional.events.StructuredDocumentEvent;
-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.TextRegionListImpl;
-
-
-public class ZeroStructuredDocumentRegion implements IStructuredDocumentRegion {
- private int length = 0;
-
- private int offset = 0;
- private IStructuredDocument fParentDocument;
-
- /**
- */
- public ZeroStructuredDocumentRegion(IStructuredDocument document, int start) {
- super();
- fParentDocument = document;
- offset = start;
- }
-
- public void addRegion(ITextRegion aRegion) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- public void adjust(int i) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
-
- }
-
- public void adjustLength(int i) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
-
- }
-
- public void adjustStart(int i) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
-
- }
-
- public void adjustTextLength(int i) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
-
- }
-
- public boolean containsOffset(int i) {
- return offset <= i && i < getEndOffset();
- }
-
- public boolean containsOffset(ITextRegion region, int i) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- public void equatePositions(ITextRegion region) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
-
- }
-
- public ITextRegion getDeepestRegionAtCharacterOffset(int offset) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- public int getEnd() {
- return offset + length;
- }
-
- public int getEndOffset() {
- return getEnd();
- }
-
- public int getEndOffset(ITextRegion containedRegion) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- public ITextRegion getFirstRegion() {
- return null;
- }
-
- public String getFullText() {
- return getText();
- }
-
- public String getFullText(ITextRegion aRegion) {
- return getText();
- }
-
- /**
- */
- public String getFullText(String context) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- public ITextRegion getLastRegion() {
- return null;
- }
-
- public int getLength() {
- return this.length;
- }
-
- public IStructuredDocumentRegion getNext() {
- return getParentDocument().getFirstStructuredDocumentRegion();
- }
-
- public int getNumberOfRegions() {
- return 0;
- }
-
- int getOffset() {
- return offset;
- }
-
- /**
- */
- public ITextRegionContainer getParent() {
- return null;
- }
-
- public IStructuredDocument getParentDocument() {
- return fParentDocument;
- }
-
- public IStructuredDocumentRegion getPrevious() {
- return null; //$NON-NLS-1$
- }
-
- /**
- */
- public ITextRegion getRegionAtCharacterOffset(int offset) {
- return null; //$NON-NLS-1$
- }
-
- /**
- */
- public ITextRegionList getRegions() {
- return new TextRegionListImpl(); //$NON-NLS-1$
- }
-
- /**
- */
- public int getStart() {
- return this.offset;
- }
-
- /**
- */
- public int getStartOffset() {
- return getStart();
- }
-
- public int getStartOffset(ITextRegion containedRegion) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- /**
- */
- public IStructuredDocument getStructuredDocument() {
- return getParentDocument();
- }
-
- /**
- */
- public String getText() {
- return new String();
- }
-
- /**
- */
- public String getText(ITextRegion aRegion) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- /**
- */
- public String getText(String context) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- /**
- */
- public int getTextEnd() {
- return getEnd();
- }
-
- /**
- */
- public int getTextEndOffset() {
- return getTextEnd();
- }
-
- public int getTextEndOffset(ITextRegion containedRegion) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- /**
- * The text length is equal to length if there is no white space at the
- * end of a region. Otherwise it is smaller than length.
- */
- public int getTextLength() {
- return getLength();
- }
-
- /**
- */
- public String getType() {
- return "ZeroStructuredDocumentRegion";//$NON-NLS-1$
- }
-
- public boolean isDeleted() {
- return false;
- }
-
- public boolean isEnded() {
- return true;
- }
-
- public boolean sameAs(IStructuredDocumentRegion region, int shift) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- /**
- */
- public boolean sameAs(ITextRegion region, int shift) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- public boolean sameAs(ITextRegion oldRegion, IStructuredDocumentRegion documentRegion, ITextRegion newRegion, int shift) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- public void setDeleted(boolean deleted) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- public void setEnded(boolean hasEnd) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- /**
- * had to make public, due to API transition.
- */
- public void setLength(int length) {
- this.length = length;
- }
-
- public void setNext(IStructuredDocumentRegion newNext) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- /**
- */
- void setOffset(int offset) {
- this.offset = offset;
- }
-
- public void setParentDocument(IStructuredDocument document) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- public void setPrevious(IStructuredDocumentRegion newPrevious) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- public void setRegions(ITextRegionList embeddedRegions) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- public void setStart(int newStart) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-
- public StructuredDocumentEvent updateRegion(Object requester, IStructuredDocumentRegion flatnode, String changes, int start, int end) {
- throw new Error("intentionally not implemented since should never be called"); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/FragmentValidationTools.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/FragmentValidationTools.java
deleted file mode 100644
index 83a95abb1e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/FragmentValidationTools.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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 org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
-
-
-/**
- * Utility class for reading fragment validation preferences/properties.
- * JSPFContentProperties does not respect the project override preference.
- *
- */
-class FragmentValidationTools {
- /**
- * @param resource
- * @return whether to perform validation on a fragment, returning the
- * project-specific preference only of project-specific values are
- * enabled
- */
- static boolean shouldValidateFragment(IResource resource) {
- String qualifier = JSPCorePlugin.getDefault().getBundle().getSymbolicName();
-
- IProject project = null;
- if (resource.getType() == IResource.PROJECT) {
- project = (IProject) resource;
- }
- else {
- project = resource.getProject();
- }
- if (project != null) {
- IEclipsePreferences node = new ProjectScope(project).getNode(qualifier);
- // first, check whether project specific settings are to be used
- boolean useProjectSettings = node.getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false);
- if (useProjectSettings) {
- // only if so, return that value
- return node.getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);
- }
- // if not, return the workspace value
- }
- return new InstanceScope().getNode(qualifier).getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/HTMLValidationReporter.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/HTMLValidationReporter.java
deleted file mode 100644
index 1c77c11008..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/HTMLValidationReporter.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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 org.eclipse.core.resources.IFile;
-import org.eclipse.wst.html.core.internal.validate.MessageFactory;
-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.validate.ErrorInfo;
-import org.eclipse.wst.sse.core.internal.validate.ValidationMessage;
-import org.eclipse.wst.sse.core.internal.validate.ValidationReporter;
-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.IValidator;
-
-/*
- * Copied from html.ui's HTMLValidationReporter with some minor cleanup
- * modifications
- */
-class HTMLValidationReporter implements ValidationReporter {
-
- private IValidator owner = null;
- private IReporter reporter = null;
- private IFile file = null;
- private IStructuredModel model = null;
- private MessageFactory fFactory = null;
-
- /**
- */
- public HTMLValidationReporter(IValidator owner, IReporter reporter, IFile file, IStructuredModel model) {
- super();
- this.owner = owner;
- this.reporter = reporter;
- this.file = file;
- this.model = model;
- fFactory = new MessageFactory(file != null ? file.getProject() : null);
- }
-
- /**
- */
- public void clear() {
- if (this.file == null)
- return;
-
-
- if (this.reporter != null) {
- this.reporter.removeAllMessages(this.owner, this.file);
- }
- }
-
-
-
- /**
- */
- public void report(ValidationMessage message) {
- if (message == null || this.file == null || message.getSeverity() == ValidationMessage.IGNORE)
- return;
- IMessage mes = translateMessage(message);
-
- if (this.reporter != null) {
- this.reporter.addMessage(this.owner, mes);
- }
- }
-
- /**
- * Translate ValidationMessage to IMessage and generate result log
- */
- private IMessage translateMessage(ValidationMessage message) {
- int severity = IMessage.LOW_SEVERITY;
- switch (message.getSeverity()) {
- case ValidationMessage.ERROR :
- severity = IMessage.HIGH_SEVERITY;
- break;
- case ValidationMessage.WARNING :
- severity = IMessage.NORMAL_SEVERITY;
- break;
- case ValidationMessage.INFORMATION :
- break;
- default :
- break;
- }
-
- IMessage mes = new LocalizedMessage(severity, message.getMessage(), this.file);
- mes.setOffset(message.getOffset());
- mes.setLength(message.getLength());
- if (this.model != null) {
- IStructuredDocument flatModel = this.model.getStructuredDocument();
- if (flatModel != null) {
- int line = flatModel.getLineOfOffset(message.getOffset());
- mes.setLineNo(line + 1);
- }
- }
-
- return mes;
- }
-
- public void report(ErrorInfo info) {
- report(fFactory.createMessage(info));
- }
-}
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 931becdd3e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPActionValidator.java
+++ /dev/null
@@ -1,488 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2011 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.core.resources.ProjectScope;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-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.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.JSP11TLDNames;
-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.contenttype.DeploymentDescriptorPropertyCache;
-import org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache.PropertyGroup;
-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.preferences.JSPCorePreferenceNames;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-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.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.sse.core.internal.validate.ValidationMessage;
-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.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.CMNode;
-import org.eclipse.wst.xml.core.internal.contentmodel.basic.CMNamedNodeMapImpl;
-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.provisional.document.IDOMAttr;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
-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 org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.NodeList;
-
-/**
- * Checks for: missing required attributes & undefined attributes in jsp
- * action tags such as jsp directives and jsp custom tags as well as non-empty
- * inline jsp action tags
- */
-public class JSPActionValidator extends JSPValidator {
- /**
- *
- */
- private static final String PREFERENCE_NODE_QUALIFIER = JSPCorePlugin.getDefault().getBundle().getSymbolicName();
- private IValidator fMessageOriginator;
- private IPreferencesService fPreferencesService = null;
- private IScopeContext[] fScopes = null;
- private int fSeverityMissingRequiredAttribute = IMessage.HIGH_SEVERITY;
- private int fSeverityNonEmptyInlineTag = IMessage.NORMAL_SEVERITY;
- private int fSeverityUnknownAttribute = IMessage.NORMAL_SEVERITY;
- private int fSeverityUnexpectedRuntimeExpression = IMessage.NORMAL_SEVERITY;
-
- private HashSet fTaglibPrefixes = new HashSet();
- private boolean fIsELIgnored = false;
-
- public JSPActionValidator() {
- this.fMessageOriginator = this;
- }
-
- public JSPActionValidator(IValidator validator) {
- this.fMessageOriginator = validator;
- }
-
- private void checkNonEmptyInlineTag(IDOMElement element, CMElementDeclaration cmElementDecl, IReporter reporter, IFile file, IStructuredDocument document) {
- if (cmElementDecl.getContentType() == CMElementDeclaration.EMPTY && element.getChildNodes().getLength() > 0) {
- String msgText = NLS.bind(JSPCoreMessages.JSPActionValidator_0, element.getNodeName());
- LocalizedMessage message = new LocalizedMessage(fSeverityNonEmptyInlineTag, 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);
- }
- }
-
- /**
- * Checks an attribute for runtime expressions
- * @param a The attribute to check for runtime expressions
- * @return true if the attribute contains a runtime expression, false otherwise
- */
- private boolean checkRuntimeValue(IDOMAttr a) {
- ITextRegion value = a.getValueRegion();
- if (value instanceof ITextRegionContainer) {
- Iterator it = ((ITextRegionContainer) value).getRegions().iterator();
- while (it.hasNext()) {
- String type = ((ITextRegion) it.next()).getType();
- if (type == DOMJSPRegionContexts.JSP_EL_OPEN)
- return true;
- }
- }
- return false;
- }
-
- /**
- * Determines if EL should be ignored. Checks
- * <ol>
- * <li>JSP version</li>
- * <li>Page directive isELIgnored</li>
- * <li>Deployment descriptor's el-ignored</li>
- * </ol>
- * @return true if EL should be ignored, false otherwise. If the JSP version is < 2.0, EL is ignored by default
- */
- private boolean isElIgnored(IPath path, IStructuredModel model) {
- if (DeploymentDescriptorPropertyCache.getInstance().getJSPVersion(path) < 2.0f)
- return true;
-
- PageDirectiveAdapter pdAdapter = ((PageDirectiveAdapter) (((IDOMModel) model).getDocument().getAdapterFor(PageDirectiveAdapter.class)));
- if (pdAdapter == null) {
- // double-check the factory (although there just might not be a page directive in the file)
- if (model.getFactoryRegistry().getFactoryFor(PageDirectiveAdapter.class) == null) {
- model.getFactoryRegistry().addFactory(new PageDirectiveAdapterFactory());
- pdAdapter = ((PageDirectiveAdapter) (((IDOMModel) model).getDocument().getAdapterFor(PageDirectiveAdapter.class)));
- }
- }
- if (pdAdapter != null) {
- String directiveIsELIgnored = pdAdapter.getElIgnored();
- // isELIgnored directive found
- if (directiveIsELIgnored != null)
- return Boolean.valueOf(directiveIsELIgnored).booleanValue();
- }
-
- // Check the deployment descriptor for el-ignored
- PropertyGroup[] groups = DeploymentDescriptorPropertyCache.getInstance().getPropertyGroups(path);
- if (groups.length > 0)
- return groups[0].isELignored();
- // JSP version >= 2.0 defaults to evaluating EL
- return false;
- }
-
- 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) {
- // Attribute may be defined using a jsp:attribute action
- if (!checkJSPAttributeAction(element, attr)) {
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_5, 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);
- }
- }
- }
- }
- }
-
- /**
- * Checks for jsp:attribute actions of <code>element</code> to see if they
- * satisfy the required attribute <code>attr</code>
- *
- * @param element The element with a required attribute
- * @param attr The required attribute
- * @return <code>true</code> if a jsp:attribute action has the name of
- * the required attribute <code>attr</code>; <code>false</code> otherwise.
- */
- private boolean checkJSPAttributeAction(IDOMElement element, CMAttributeDeclaration attr) {
- if (element != null && attr != null) {
- NodeList elements = element.getElementsByTagName("jsp:attribute"); //$NON-NLS-1$
- String neededAttrName = attr.getNodeName();
- for (int i = 0; i < elements.getLength(); i++) {
- Element childElement = (Element) elements.item(i);
- /*
- * Get the name attribute of jsp:attribute and compare its
- * value to the required attribute name
- */
- if (childElement.hasAttribute("name") && neededAttrName.equals(childElement.getAttribute("name"))) {//$NON-NLS-1$ //$NON-NLS-2$
- return true;
- }
- }
- }
- return false;
- }
-
- private boolean checkUnknownAttributes(IDOMElement element, CMElementDeclaration elementDecl, CMNamedNodeMap cmAttrs, IReporter reporter, IFile file, IStructuredDocument document, IStructuredDocumentRegion documentRegion) {
- boolean foundjspattribute = false;
- boolean dynamicAttributesAllowed = false;
- CMElementDeclaration decl = elementDecl;
- if (decl instanceof CMNodeWrapper)
- decl = (CMElementDeclaration) ((CMNodeWrapper) decl).getOriginNode();
- if (decl instanceof TLDElementDeclaration) {
- String dynamicAttributes = ((TLDElementDeclaration) decl).getDynamicAttributes();
- dynamicAttributesAllowed = dynamicAttributes != null ? Boolean.valueOf(dynamicAttributes).booleanValue() : 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. Disregard it includes JSP structure or this
- * element supports dynamic attributes
- */
- if (!hasJSPRegion(((IDOMNode) a).getNameRegion()) && fSeverityUnknownAttribute != ValidationMessage.IGNORE) {
- if (!dynamicAttributesAllowed) {
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_6, 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;
- }
- }
- else {
- if (fSeverityUnexpectedRuntimeExpression != ValidationMessage.IGNORE && adec instanceof TLDAttributeDeclaration) {
- // The attribute cannot have a runtime evaluation of an expression
- if (!isTrue(((TLDAttributeDeclaration) adec).getRtexprvalue())) {
- IDOMAttr attr = (IDOMAttr) a;
- if(checkRuntimeValue(attr) && !fIsELIgnored) {
- String msg = NLS.bind(JSPCoreMessages.JSPActionValidator_1, a.getName());
- LocalizedMessage message = new LocalizedMessage(fSeverityUnexpectedRuntimeExpression, msg, file);
- ITextRegion region = attr.getValueRegion();
- int start = attr.getValueRegionStartOffset();
- int length = region != null ? region.getTextLength() : 0;
- int lineNo = document.getLineOfOffset(start);
- message.setLineNo(lineNo);
- message.setOffset(start);
- message.setLength(length);
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- }
- }
- }
- return foundjspattribute;
- }
-
- private boolean isTrue(String value) {
- return JSP11TLDNames.TRUE.equalsIgnoreCase(value) || JSP11TLDNames.YES.equalsIgnoreCase(value);
- }
-
- public void cleanup(IReporter reporter) {
- super.cleanup(reporter);
- fTaglibPrefixes.clear();
- }
-
- int getMessageSeverity(String key) {
- int sev = fPreferencesService.getInt(PREFERENCE_NODE_QUALIFIER, key, IMessage.NORMAL_SEVERITY, fScopes);
- switch (sev) {
- case ValidationMessage.ERROR :
- return IMessage.HIGH_SEVERITY;
- case ValidationMessage.WARNING :
- return IMessage.NORMAL_SEVERITY;
- case ValidationMessage.INFORMATION :
- return IMessage.LOW_SEVERITY;
- case ValidationMessage.IGNORE :
- return ValidationMessage.IGNORE;
- }
- return IMessage.NORMAL_SEVERITY;
- }
-
- 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);
- if (manager != null) {
- List trackers = manager.getTaglibTrackers();
- for (Iterator it = trackers.iterator(); it.hasNext();) {
- TaglibTracker tracker = (TaglibTracker) it.next();
- if (tracker.getElements().getLength() == 0)
- continue;
- 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;
- }
-
- private void loadPreferences(IFile file) {
- fScopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};
-
- fPreferencesService = Platform.getPreferencesService();
- if (file != null && file.isAccessible()) {
- ProjectScope projectScope = new ProjectScope(file.getProject());
- if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
- fScopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
- }
- }
-
- fSeverityMissingRequiredAttribute = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_MISSING_REQUIRED_ATTRIBUTE);
- fSeverityNonEmptyInlineTag = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_NON_EMPTY_INLINE_TAG);
- fSeverityUnknownAttribute = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_UNKNOWN_ATTRIBUTE);
- fSeverityUnexpectedRuntimeExpression = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_UNEXPECTED_RTEXPRVALUE);
- }
-
- 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) {
- loadPreferences(f);
- IStructuredDocument sDoc = model.getStructuredDocument();
-
- fIsELIgnored = isElIgnored(f.getFullPath(), model);
- // 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();
- }
- unloadPreferences();
- }
-
- 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 = null;
-
- CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl();
- List nodes = query.getAvailableContent(element, cmElement, ModelQuery.INCLUDE_ATTRIBUTES);
- for (int k = 0; k < nodes.size(); k++) {
- CMNode cmnode = (CMNode) nodes.get(k);
- if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
- allAttributes.put(cmnode);
- }
- }
- cmAttributes = allAttributes;
-
- boolean foundjspattribute = checkUnknownAttributes(element, cmElement, 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 && fSeverityMissingRequiredAttribute != ValidationMessage.IGNORE)
- checkRequiredAttributes(element, cmAttributes, reporter, file, model.getStructuredDocument(), documentRegion);
-
- if (fSeverityNonEmptyInlineTag != ValidationMessage.IGNORE)
- checkNonEmptyInlineTag(element, cmElement, reporter, file, model.getStructuredDocument());
- }
- }
- }
- }
-
- private void unloadPreferences() {
- fPreferencesService = null;
- fScopes = null;
- }
-
- 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 9f9a319997..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPBatchValidator.java
+++ /dev/null
@@ -1,535 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2011 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.Collection;
-import java.util.HashSet;
-import java.util.List;
-
-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.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.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.contenttype.DeploymentDescriptorPropertyCache;
-import org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache.PropertyGroup;
-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.AbstractValidator;
-import org.eclipse.wst.validation.ValidationResult;
-import org.eclipse.wst.validation.ValidationState;
-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;
-
-/**
- * Performs JSP validation tasks for batch validation. The individual
- * validator classes will still be used for source validation.
- */
-public final class JSPBatchValidator extends AbstractValidator implements IValidatorJob, IExecutableExtension {
- class JSPFileVisitor implements IResourceProxyVisitor {
-
- private List fFiles = new ArrayList();
- private IReporter fReporter = null;
-
- public JSPFileVisitor(IReporter reporter) {
- fReporter = reporter;
- }
-
- final IFile[] getFiles() {
- return (IFile[]) fFiles.toArray(new IFile[fFiles.size()]);
- }
-
- public boolean visit(IResourceProxy proxy) throws CoreException {
-
- // check validation
- if (fReporter.isCancelled())
- return false;
-
- if (proxy.getType() == IResource.FILE) {
-
- if (isJSPType(proxy.getName()) && proxy.isAccessible()) {
- IFile file = (IFile) proxy.requestResource();
- 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;
- }
- }
-
- // for debugging
- static final boolean DEBUG = Boolean.valueOf(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspvalidator")).booleanValue(); //$NON-NLS-1$
-
- private static final String PLUGIN_ID_JSP_CORE = "org.eclipse.jst.jsp.core"; //$NON-NLS-1$
-
- /**
- * List of IResources that the currently validating file depends upon
- */
- private Collection fDependsOn;
-
- /**
- * 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;
- }
-
- /**
- * 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;
- }
-
- String fAdditionalContentTypesIDs[] = null;
-
- private IContentType[] fContentTypes = null;
-
- private JSPDirectiveValidator fJSPDirectiveValidator = new JSPDirectiveValidator(this);
-
- private JSPELValidator fJSPELValidator = new JSPELValidator(this);
-
- private IContentType fJSPFContentType = null;
-
- private JSPJavaValidator fJSPJavaValidator = new JSPJavaValidator(this);
-
- private JSPActionValidator fJSPActionValidator = new JSPActionValidator(this);
-
- void addDependsOn(IResource resource) {
- if(resource != null) {
- fDependsOn.add(resource);
- }
- }
-
- public void cleanup(IReporter reporter) {
- fJSPDirectiveValidator.cleanup(reporter);
- fJSPELValidator.cleanup(reporter);
- fJSPJavaValidator.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, currentFile.getFullPath().toString().substring(1));
- 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();
-
- Message message = new LocalizedMessage(IMessage.LOW_SEVERITY, NLS.bind(JSPCoreMessages.JSPBatchValidator_0, project.getFullPath()));
- reporter.displaySubtask(this, message);
-
- 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])) {
-
- message = new LocalizedMessage(IMessage.LOW_SEVERITY, files[i].getFullPath().toString().substring(1));
- 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 = FragmentValidationTools.shouldValidateFragment(file);
- /*
- * 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;
- }
-
- /**
- * 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;
- }
-
- /**
- * 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;
- }
-
- /**
- * 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;
- }
-
- private void performValidation(IFile f, IReporter reporter, IStructuredModel model) {
- if (!reporter.isCancelled())
- fJSPJavaValidator.performValidation(f, reporter, model);
- if (!reporter.isCancelled())
- fJSPDirectiveValidator.performValidation(f, reporter, model.getStructuredDocument());
- if (!reporter.isCancelled())
- fJSPELValidator.performValidation(f, reporter, model.getStructuredDocument());
- 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 on behalf of all JSP validators
- model = StructuredModelManager.getModelManager().getModelForRead(f);
- if (!reporter.isCancelled() && model != null) {
- 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 {
- Job currentJob = Job.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.OK_STATUS;
- }
-
- public ValidationResult validate(final IResource resource, int kind, ValidationState state, IProgressMonitor monitor) {
- if (resource.getType() != IResource.FILE)
- return null;
- if (!shouldValidate((IFile) resource))
- return null;
- final ValidationResult result = new ValidationResult();
- final IReporter reporter = result.getReporter(monitor);
-
- if(result.getDependsOn() != null) {
- fDependsOn = new HashSet(Arrays.asList(result.getDependsOn()));
- }
- else {
- fDependsOn = new HashSet();
- }
-
- // add web.xml as a dependency
- addDependsOn(DeploymentDescriptorPropertyCache.getInstance().getWebXML(resource.getFullPath()));
-
- // List relevant JSP 2.0 preludes/codas as dependencies
- IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
- PropertyGroup[] propertyGroups = DeploymentDescriptorPropertyCache.getInstance().getPropertyGroups(resource.getFullPath());
- for (int j = 0; j < propertyGroups.length; j++) {
- IPath[] preludes = propertyGroups[j].getIncludePrelude();
- for (int i = 0; i < preludes.length; i++) {
- addDependsOn(workspaceRoot.getFile(preludes[i]));
- }
- IPath[] codas = propertyGroups[j].getIncludeCoda();
- for (int i = 0; i < codas.length; i++) {
- addDependsOn(workspaceRoot.getFile(codas[i]));
- }
- }
-
- IWorkspaceRunnable validationRunnable = new IWorkspaceRunnable() {
- public void run(IProgressMonitor monitor) throws CoreException {
- if (fragmentCheck((IFile) resource)) {
- validateFile((IFile) resource, reporter);
- }
- IResource[] resources = (IResource[]) fDependsOn.toArray(new IResource[fDependsOn.size()]);
- result.setDependsOn(resources);
- fDependsOn.clear();
- }
- };
- Job currentJob = Job.getJobManager().currentJob();
- ISchedulingRule rule = null;
- if (currentJob != null) {
- rule = currentJob.getRule();
- }
- try {
- JavaCore.run(validationRunnable, rule, new NullProgressMonitor());
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- return result;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPContentValidator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPContentValidator.java
deleted file mode 100644
index 390d962de0..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPContentValidator.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2011 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 org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.wst.html.core.internal.document.HTMLDocumentTypeConstants;
-import org.eclipse.wst.html.core.internal.validate.HTMLValidationAdapterFactory;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.validate.ValidationAdapter;
-import org.eclipse.wst.validation.ValidationResult;
-import org.eclipse.wst.validation.ValidationState;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.xml.core.internal.document.DocumentTypeAdapter;
-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.validation.eclipse.Validator;
-import org.w3c.dom.Element;
-
-/**
- * This validator validates the contents of the content type of the JSP, like
- * the HTML regions in a JSP with content type="text/html"
- */
-public class JSPContentValidator extends JSPValidator {
- private static final String HTTP_JAVA_SUN_COM_JSP_PAGE = "http://java.sun.com/JSP/Page"; //$NON-NLS-1$
- private static final String XMLNS = "xmlns"; //$NON-NLS-1$
- private static final String XMLNS_JSP = "xmlns:jsp"; //$NON-NLS-1$
- private IContentType fJSPFContentType = null;
-
-
- /**
- * 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 = FragmentValidationTools.shouldValidateFragment(file);
- /*
- * 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;
- }
-
- /*
- * Copied from HTMLValidator
- */
- private HTMLValidationReporter getReporter(IReporter reporter, IFile file, IDOMModel model) {
- return new HTMLValidationReporter(this, reporter, file, model);
- }
-
- /*
- * Copied from HTMLValidator
- */
- private boolean hasHTMLFeature(IDOMDocument document) {
- DocumentTypeAdapter adapter = (DocumentTypeAdapter) document.getAdapterFor(DocumentTypeAdapter.class);
- if (adapter == null)
- return false;
- return adapter.hasFeature(HTMLDocumentTypeConstants.HTML);
- }
-
- /**
- * 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 boolean isXMLJSP(IDOMDocument document) {
- Element root = document.getDocumentElement();
- return root != null && (root.hasAttribute(XMLNS_JSP) || HTTP_JAVA_SUN_COM_JSP_PAGE.equals(root.getAttribute(XMLNS)));
- }
-
- private void validate(IFile file, int kind, ValidationState state, IProgressMonitor monitor, IDOMModel model, IReporter reporter) {
- IDOMDocument document = model.getDocument();
- if (document == null)
- return; // error
-
- boolean isXMLJSP = isXMLJSP(document);
- boolean hasHTMLFeature = hasHTMLFeature(document);
-
- if (hasHTMLFeature && !isXMLJSP) {
- INodeAdapterFactory factory = HTMLValidationAdapterFactory.getInstance();
- ValidationAdapter adapter = (ValidationAdapter) factory.adapt(document);
- if (adapter != null) {
- HTMLValidationReporter rep = getReporter(reporter, file, model);
- rep.clear();
- adapter.setReporter(rep);
- adapter.validate(document);
- }
- }
- if (!hasHTMLFeature && isXMLJSP) {
- Validator xmlValidator = new Validator();
- xmlValidator.validate(file, kind, state, monitor);
- }
- }
-
-
- /*
- * Mostly copied from HTMLValidator
- */
- private void validate(IReporter reporter, IFile file, IDOMModel model) {
- if (file == null || model == null)
- return; // error
- IDOMDocument document = model.getDocument();
- if (document == null)
- return; // error
-
- // This validator currently only handles validating HTML content in
- // JSP
- boolean hasXMLFeature = isXMLJSP(document);
- boolean hasHTMLFeature = hasHTMLFeature(document);
- if (hasHTMLFeature && !hasXMLFeature) {
- INodeAdapterFactory factory = HTMLValidationAdapterFactory.getInstance();
- ValidationAdapter adapter = (ValidationAdapter) factory.adapt(document);
- if (adapter == null)
- return; // error
-
- HTMLValidationReporter rep = getReporter(reporter, file, model);
- rep.clear();
- adapter.setReporter(rep);
- adapter.validate(document);
- }
- }
-
- private boolean shouldValidate(IResource resource) {
- 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 ValidationResult validate(final IResource resource, int kind, ValidationState state, IProgressMonitor monitor) {
- if (resource.getType() != IResource.FILE)
- return null;
- if (!shouldValidate(resource))
- return null;
- ValidationResult result = new ValidationResult();
- final IReporter reporter = result.getReporter(monitor);
-
- if (fragmentCheck((IFile) resource)) {
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getModelForRead((IFile) resource);
- if (!reporter.isCancelled() && model instanceof IDOMModel) {
- reporter.removeAllMessages(this, resource);
- validate((IFile) resource, kind, state, monitor, (IDOMModel) model, reporter);
- }
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- }
-
- return result;
- }
-
- protected void validateFile(IFile f, IReporter reporter) {
- IStructuredModel model = null;
- try {
- if (fragmentCheck(f) && !reporter.isCancelled()) {
- model = StructuredModelManager.getModelManager().getModelForRead(f);
- if (!reporter.isCancelled() && model instanceof IDOMModel) {
- reporter.removeAllMessages(this, f);
- validate(reporter, f, (IDOMModel) model);
- }
- }
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- }
-
-}
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 e45a923657..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPDirectiveValidator.java
+++ /dev/null
@@ -1,787 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2011 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.validation;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.ProjectScope;
-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.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-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.contenttype.DeploymentDescriptorPropertyCache;
-import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
-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.util.FacetModuleCoreSupport;
-import org.eclipse.jst.jsp.core.taglib.IJarRecord;
-import org.eclipse.jst.jsp.core.taglib.ITLDRecord;
-import org.eclipse.jst.jsp.core.taglib.ITagDirRecord;
-import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
-import org.eclipse.jst.jsp.core.taglib.IURLRecord;
-import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.wst.html.core.internal.contentmodel.JSP20Namespace;
-import org.eclipse.wst.html.core.internal.preferences.HTMLCorePreferenceNames;
-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.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.core.internal.text.IRegionComparible;
-import org.eclipse.wst.sse.core.internal.validate.ValidationMessage;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-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.IValidator;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-import com.ibm.icu.text.Collator;
-
-/**
- * Checks for: - duplicate taglib prefix values and reserved taglib prefix
- * values in the same file
- */
-public class JSPDirectiveValidator extends JSPValidator {
- /**
- *
- */
- private static final String PREFERENCE_NODE_QUALIFIER = JSPCorePlugin.getDefault().getBundle().getSymbolicName();
-
- private static Collator collator = Collator.getInstance(Locale.US);
-
- private static final boolean DEBUG = Boolean.valueOf(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspvalidator")).booleanValue(); //$NON-NLS-1$
-
- private IValidator fMessageOriginator;
- private IEclipsePreferences fPreferences = null;
-
- private IPreferencesService fPreferencesService = null;
- private HashMap fPrefixValueRegionToDocumentRegionMap = new HashMap();
- private IJavaProject fProject = null;
- private HashMap fReservedPrefixes = new HashMap();
- private IScopeContext[] fScopes = null;
- private int fSeverityIncludeFileMissing = -1;
- private int fSeverityIncludeFileNotSpecified = -1;
- private int fSeveritySuperClassNotFound = -1;
- private int fSeverityTagdirUnresolvableURI = -1;
- private int fSeverityTaglibDuplicatePrefixWithDifferentURIs = -1;
-
- private int fSeverityDuplicateAttributeName = -1;
-
- private int fSeverityTaglibDuplicatePrefixWithSameURIs = -1;
- private int fSeverityTaglibMissingPrefix = -1;
-
- private int fSeverityTaglibMissingURI = -1;
-
-
- private int fSeverityTaglibUnresolvableURI = -1;
-
- private HashMap fTaglibPrefixesInUse = new HashMap();
-
- private Map fAttributeNamesInUse = new HashMap(0);
-
- public JSPDirectiveValidator() {
- initReservedPrefixes();
- fMessageOriginator = this;
- }
-
- public JSPDirectiveValidator(IValidator validator) {
- initReservedPrefixes();
- this.fMessageOriginator = validator;
- }
-
- /**
- * Record that the currently validating resource depends on the given
- * file. Only possible during batch (not source) validation.
- *
- * @param file
- */
- void addDependsOn(IResource file) {
- if (fMessageOriginator instanceof JSPBatchValidator) {
- ((JSPBatchValidator) fMessageOriginator).addDependsOn(file);
- }
- }
-
- public void cleanup(IReporter reporter) {
- super.cleanup(reporter);
- fTaglibPrefixesInUse.clear();
- fPrefixValueRegionToDocumentRegionMap.clear();
- fAttributeNamesInUse.clear();
- }
-
- private void collectTaglibPrefix(ITextRegionCollection documentRegion, ITextRegion valueRegion, String taglibPrefix) {
- fPrefixValueRegionToDocumentRegionMap.put(valueRegion, documentRegion);
-
- Object o = fTaglibPrefixesInUse.get(taglibPrefix);
- if (o == null) {
- // prefix doesn't exist, remember it
- fTaglibPrefixesInUse.put(taglibPrefix, valueRegion);
- }
- else {
- List regionList = null;
- // already a List
- if (o instanceof List) {
- regionList = (List) o;
- }
- /*
- * a single value region, create a new List and add previous
- * valueRegion
- */
- else {
- regionList = new ArrayList();
- regionList.add(o);
- fTaglibPrefixesInUse.put(taglibPrefix, regionList);
- }
- regionList.add(valueRegion);
- }
- }
-
- int getMessageSeverity(String key) {
- int sev = fPreferencesService.getInt(PREFERENCE_NODE_QUALIFIER, key, IMessage.NORMAL_SEVERITY, fScopes);
- switch (sev) {
- case ValidationMessage.ERROR :
- return IMessage.HIGH_SEVERITY;
- case ValidationMessage.WARNING :
- return IMessage.NORMAL_SEVERITY;
- case ValidationMessage.INFORMATION :
- return IMessage.LOW_SEVERITY;
- case ValidationMessage.IGNORE :
- return ValidationMessage.IGNORE;
- }
- return IMessage.NORMAL_SEVERITY;
- }
- private void initReservedPrefixes() {
- 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$
- }
-
- private boolean isReservedTaglibPrefix(String name) {
- return fReservedPrefixes.get(name) != null;
- }
-
- private void loadPreferences(IFile file) {
- fScopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};
-
- fPreferencesService = Platform.getPreferencesService();
- if (file != null && file.isAccessible()) {
- ProjectScope projectScope = new ProjectScope(file.getProject());
- if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
- fScopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
- }
- }
-
- fSeverityIncludeFileMissing = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_INCLUDE_FILE_NOT_FOUND);
- fSeverityIncludeFileNotSpecified = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_INCLUDE_NO_FILE_SPECIFIED);
- fSeverityTaglibDuplicatePrefixWithDifferentURIs = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_DIFFERENT_URIS);
- fSeverityTaglibDuplicatePrefixWithSameURIs = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_SAME_URIS);
- fSeverityTaglibMissingPrefix = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_MISSING_PREFIX);
- fSeverityTaglibMissingURI = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_MISSING_URI_OR_TAGDIR);
- fSeverityTaglibUnresolvableURI = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_UNRESOLVABLE_URI_OR_TAGDIR);
- fSeverityTagdirUnresolvableURI = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_UNRESOLVABLE_URI_OR_TAGDIR);
- fSeveritySuperClassNotFound = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_PAGE_SUPERCLASS_NOT_FOUND);
- fSeverityDuplicateAttributeName = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_DIRECTIVE_ATTRIBUTE_DUPLICATE_NAME);
- }
-
- protected void performValidation(IFile f, IReporter reporter, IStructuredDocument sDoc) {
- loadPreferences(f);
-
-
- setProject(f.getProject());
- /*
- * when validating an entire file need to clear dupes or else you're
- * comparing between files
- */
- fPrefixValueRegionToDocumentRegionMap.clear();
- fTaglibPrefixesInUse.clear();
- fAttributeNamesInUse.clear();
-
- IRegionComparible comparer = null;
- if (sDoc instanceof IRegionComparible)
- comparer = (IRegionComparible) sDoc;
-
- // iterate all document regions
- IStructuredDocumentRegion region = sDoc.getFirstStructuredDocumentRegion();
- while (region != null && !reporter.isCancelled()) {
- // only checking directives
- if (region.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- processDirective(reporter, f, sDoc, region);
- }
- //To check directives inside script tag.
- else if (region.getType() == DOMRegionContext.BLOCK_TEXT) {
- Iterator it = region.getRegions().iterator();
- while (it.hasNext()) {
- Object blockRegion = it.next();
- if (blockRegion instanceof ITextRegionCollection) {
- processDirective(reporter, f, sDoc, (ITextRegionCollection)blockRegion);
- }
- }
- }
- // requires tag name, attribute, equals, and value
- else if (comparer != null && region.getNumberOfRegions() > 4) {
- ITextRegion nameRegion = region.getRegions().get(1);
- if (comparer.regionMatches(region.getStartOffset(nameRegion), nameRegion.getTextLength(), "jsp:include")) { //$NON-NLS-1$
- processInclude(reporter, f, sDoc, region, JSP11Namespace.ATTR_NAME_PAGE);
- }
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=295950
- else if (comparer.regionMatches(region.getStartOffset(nameRegion), 14, "jsp:directive.")) { //$NON-NLS-1$
- processDirective(reporter, f, sDoc, region);
- }
-
- }
- region = region.getNext();
- }
-
- if (!reporter.isCancelled()) {
- reportTaglibDuplicatePrefixes(f, reporter, sDoc);
- }
-
- fPrefixValueRegionToDocumentRegionMap.clear();
- fTaglibPrefixesInUse.clear();
- fAttributeNamesInUse.clear();
- setProject(null);
- unloadPreferences();
- }
-
- private void processDirective(IReporter reporter, IFile file, IStructuredDocument sDoc, ITextRegionCollection documentRegion) {
- String directiveName = getDirectiveName(documentRegion);
-
- if (directiveName.endsWith("taglib")) { //$NON-NLS-1$
- processTaglibDirective(reporter, file, sDoc, documentRegion);
- }
- else if (directiveName.equals("jsp:include")) { //$NON-NLS-1$
- processInclude(reporter, file, sDoc, documentRegion, JSP11Namespace.ATTR_NAME_PAGE);
- }
- else if (directiveName.endsWith("include")) { //$NON-NLS-1$
- processInclude(reporter, file, sDoc, documentRegion, JSP11Namespace.ATTR_NAME_FILE);
- }
- else if (directiveName.endsWith("page")) { //$NON-NLS-1$
- processPageDirective(reporter, file, sDoc, documentRegion);
- }
- else if (directiveName.endsWith("attribute")) { //$NON-NLS-1$
- processAttribute(reporter, file, sDoc, documentRegion);
- }
- }
-
- /**
- * Associates an ITextRegion with an IStructuredDocumentRegion
- */
- private static class RegionPair {
- ITextRegionCollection region;
- ITextRegion textRegion;
-
- RegionPair(ITextRegionCollection region, ITextRegion textRegion) {
- this.region = region;
- this.textRegion = textRegion;
- }
- }
-
- private void processAttribute(IReporter reporter, IFile file, IStructuredDocument sDoc, ITextRegionCollection documentRegion) {
- final ITextRegion nameValueRegion = getAttributeValueRegion(documentRegion, JSP11Namespace.ATTR_NAME_NAME);
- if (nameValueRegion != null && !hasNestedRegion(nameValueRegion)) {
- final String nameValue = StringUtils.stripQuotes(documentRegion.getText(nameValueRegion));
- if (nameValue.length() > 0 && fSeverityDuplicateAttributeName != ValidationMessage.IGNORE) {
- if (!fAttributeNamesInUse.containsKey(nameValue)) {
- // First occurrence of an attribute declaration with this name; map the regions to it
- fAttributeNamesInUse.put(nameValue, new RegionPair(documentRegion, nameValueRegion));
- }
- else {
- final RegionPair pair = (RegionPair) fAttributeNamesInUse.get(nameValue);
- if (pair != null) {
- // If a pair is associated with the name, add a message for the first occurrence
- reportUsedAttributeName(reporter, nameValue, file, pair.region, pair.textRegion, sDoc);
- fAttributeNamesInUse.put(nameValue, null); // Remove the pair since the message has been generated
- }
- reportUsedAttributeName(reporter, nameValue, file, documentRegion, nameValueRegion, sDoc);
- }
- }
- }
- }
-
- private void reportUsedAttributeName(IReporter reporter, String name, IFile file, ITextRegionCollection documentRegion, ITextRegion nameValueRegion, IStructuredDocument sDoc) {
- final String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_12, name);
- final LocalizedMessage message = new LocalizedMessage(fSeverityDuplicateAttributeName, msgText, file);
- final int start = documentRegion.getStartOffset(nameValueRegion);
- message.setLineNo(sDoc.getLineOfOffset(start) + 1);
- message.setOffset(start);
- message.setLength(nameValueRegion.getTextLength());
-
- reporter.addMessage(fMessageOriginator, message);
- }
-
- private void processInclude(IReporter reporter, IFile file, IStructuredDocument sDoc, ITextRegionCollection documentRegion, String attrName) {
- ITextRegion fileValueRegion = getAttributeValueRegion(documentRegion, attrName);
- // There is a file and it isn't a nested region which could contain a JSP expression
- if (fileValueRegion != null && !hasNestedRegion(fileValueRegion)) {
- // file specified
- String fileValue = documentRegion.getText(fileValueRegion);
- fileValue = StringUtils.stripQuotes(fileValue);
-
- if (fileValue.length() == 0 && fSeverityIncludeFileNotSpecified != ValidationMessage.IGNORE) {
- // file value is specified but empty
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_3, attrName);
- LocalizedMessage message = new LocalizedMessage(fSeverityIncludeFileNotSpecified, msgText, file);
- int start = documentRegion.getStartOffset(fileValueRegion);
- int length = fileValueRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- else if (DeploymentDescriptorPropertyCache.getInstance().getURLMapping(file.getFullPath(), fileValue) == null) {
- IPath testPath = FacetModuleCoreSupport.resolve(file.getFullPath(), fileValue);
- if (testPath.segmentCount() > 1) {
- IFile testFile = file.getWorkspace().getRoot().getFile(testPath);
- addDependsOn(testFile);
- if (!testFile.isAccessible()) {
- if (fSeverityIncludeFileMissing != ValidationMessage.IGNORE) {
- // File not found
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_4, new String[]{fileValue, testPath.toString()});
- LocalizedMessage message = new LocalizedMessage(fSeverityIncludeFileMissing, msgText, file);
- int start = documentRegion.getStartOffset(fileValueRegion);
- int length = fileValueRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- }
- }
- }
- else if (fileValueRegion == null && fSeverityIncludeFileNotSpecified != ValidationMessage.IGNORE) {
- // file is not specified at all
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_3, attrName);
- LocalizedMessage message = new LocalizedMessage(fSeverityIncludeFileNotSpecified, msgText, file);
- int start = documentRegion.getStartOffset();
- int length = documentRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
-
- /**
- * @param reporter
- * @param file
- * @param doc
- * @param documentRegion
- */
- private void processPageDirective(IReporter reporter, IFile file, IStructuredDocument doc, ITextRegionCollection documentRegion) {
- ITextRegion superclassValueRegion = getAttributeValueRegion(documentRegion, JSP11Namespace.ATTR_NAME_EXTENDS);
- if (superclassValueRegion != null) {
- // file specified
- String superclassName = documentRegion.getText(superclassValueRegion);
- superclassName = StringUtils.stripQuotes(superclassName);
-
- IType superClass = null;
- if (superclassName != null && superclassName.length() > 0 && fProject != null && fProject.exists()) {
- try {
- superClass = fProject.findType(superclassName.trim(), new NullProgressMonitor());
- }
- catch (JavaModelException e) {
- Logger.logException(e);
- }
- }
-
- if (superClass == null && fSeveritySuperClassNotFound != ValidationMessage.IGNORE) {
- // superclass not found
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_8, superclassName);
- LocalizedMessage message = new LocalizedMessage(fSeveritySuperClassNotFound, msgText, file);
- int start = documentRegion.getStartOffset(superclassValueRegion);
- int length = superclassValueRegion.getTextLength();
- int lineNo = doc.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- }
-
- private void processTaglibDirective(IReporter reporter, IFile file, IStructuredDocument sDoc, ITextRegionCollection documentRegion) {
- ITextRegion prefixValueRegion = null;
- ITextRegion uriValueRegion = getAttributeValueRegion(documentRegion, JSP11Namespace.ATTR_NAME_URI);
- ITextRegion tagdirValueRegion = getAttributeValueRegion(documentRegion, JSP20Namespace.ATTR_NAME_TAGDIR);
- if (uriValueRegion != null) {
- // URI is specified
- String uri = documentRegion.getText(uriValueRegion);
-
- if (file != null) {
- uri = StringUtils.stripQuotes(uri);
- if (uri.length() > 0) {
- ITaglibRecord reference = TaglibIndex.resolve(file.getFullPath().toString(), uri, false);
- if (reference != null) {
- switch (reference.getRecordType()) {
- case (ITaglibRecord.TLD) : {
- ITLDRecord record = (ITLDRecord) reference;
- IResource tldfile = ResourcesPlugin.getWorkspace().getRoot().getFile(record.getPath());
- addDependsOn(tldfile);
- }
- break;
- case (ITaglibRecord.JAR) : {
- IJarRecord record = (IJarRecord) reference;
- IFile[] foundFilesForLocation = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(record.getLocation());
- for (int i = 0; i < foundFilesForLocation.length; i++) {
- addDependsOn(foundFilesForLocation[i]);
- }
- }
- break;
- case (ITaglibRecord.TAGDIR) : {
- ITagDirRecord record = (ITagDirRecord) reference;
- IPath path = record.getPath();
- IResource found = ResourcesPlugin.getWorkspace().getRoot().findMember(path, false);
-
- try {
- found.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- addDependsOn(resource);
- }
- return true;
- }
- });
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- break;
- case (ITaglibRecord.URL) : {
- IURLRecord record = (IURLRecord) reference;
- String baseLocation = record.getBaseLocation();
- if (baseLocation != null && baseLocation.indexOf("://") < 0) { //$NON-NLS-1$
- IResource found = ResourcesPlugin.getWorkspace().getRoot().findMember(baseLocation, false);
- if (found != null) {
- try {
- found.accept(new IResourceVisitor() {
- public boolean visit(IResource resource) throws CoreException {
- if (resource.getType() == IResource.FILE) {
- addDependsOn(resource);
- }
- return true;
- }
- });
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- else {
- IFile externalJar = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(baseLocation));
- if (externalJar != null) {
- addDependsOn(externalJar);
- }
- }
- }
- }
- break;
- }
- }
- if (reference == null && fSeverityTaglibUnresolvableURI != ValidationMessage.IGNORE) {
- // URI specified but does not resolve
- String msgText = null;
- // provide better messages for typical "http:*" URIs
- final float version = DeploymentDescriptorPropertyCache.getInstance().getJSPVersion(file.getFullPath());
- if (uri.startsWith("http:") && version < 1.2) { //$NON-NLS-1$
- if (FacetModuleCoreSupport.isDynamicWebProject(file.getProject())) {
- msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_9, new Object[] { uri, new Float(version)} );
- }
- else {
- msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_10, uri);
- }
- }
- else {
- msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_1, uri);
- }
- LocalizedMessage message = new LocalizedMessage(fSeverityTaglibUnresolvableURI, msgText, file);
- int start = documentRegion.getStartOffset(uriValueRegion);
- int length = uriValueRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- message.setAttribute("PROBLEM_ID", new Integer(611)); //$NON-NLS-1$
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- else if (fSeverityTaglibMissingURI != ValidationMessage.IGNORE) {
- // URI specified but empty string
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_3, JSP11Namespace.ATTR_NAME_URI);
- LocalizedMessage message = new LocalizedMessage(fSeverityTaglibMissingURI, msgText, file);
- int start = documentRegion.getStartOffset(uriValueRegion);
- int length = uriValueRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- }
- else if (tagdirValueRegion != null) {
- // URI is specified
- String tagdir = documentRegion.getText(tagdirValueRegion);
-
- if (file != null) {
- tagdir = StringUtils.stripQuotes(tagdir);
- if (tagdir.length() <= 0 && fSeverityTaglibMissingURI != ValidationMessage.IGNORE) {
- // tagdir specified but empty string
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_3, JSP20Namespace.ATTR_NAME_TAGDIR);
- LocalizedMessage message = new LocalizedMessage(fSeverityTaglibMissingURI, msgText, file);
- int start = documentRegion.getStartOffset(tagdirValueRegion);
- int length = tagdirValueRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- else if (TaglibIndex.resolve(file.getFullPath().toString(), tagdir, false) == null && fSeverityTagdirUnresolvableURI != ValidationMessage.IGNORE) {
- // URI specified but does not resolve
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_11, tagdir);
- LocalizedMessage message = new LocalizedMessage(fSeverityTaglibUnresolvableURI, msgText, file);
- int start = documentRegion.getStartOffset(tagdirValueRegion);
- int length = tagdirValueRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- }
- else if (fSeverityTaglibMissingURI != ValidationMessage.IGNORE) {
- // URI not specified or empty string
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_7, new String[]{JSP20Namespace.ATTR_NAME_TAGDIR, JSP11Namespace.ATTR_NAME_URI});
- LocalizedMessage message = new LocalizedMessage(fSeverityTaglibMissingURI, msgText, file);
- int start = documentRegion.getStartOffset();
- int length = documentRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
-
- prefixValueRegion = getAttributeValueRegion(documentRegion, JSP11Namespace.ATTR_NAME_PREFIX);
- if (prefixValueRegion != null) {
- // prefix specified
- String taglibPrefix = documentRegion.getText(prefixValueRegion);
- taglibPrefix = StringUtils.stripQuotes(taglibPrefix);
-
- collectTaglibPrefix(documentRegion, prefixValueRegion, taglibPrefix);
-
- if (isReservedTaglibPrefix(taglibPrefix)) {
- // prefix is a reserved prefix
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_0, taglibPrefix);
- int sev = IMessage.HIGH_SEVERITY;
- LocalizedMessage message = (file == null ? new LocalizedMessage(sev, msgText) : new LocalizedMessage(sev, msgText, file));
- int start = documentRegion.getStartOffset(prefixValueRegion);
- int length = prefixValueRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- if (taglibPrefix.length() == 0 && fSeverityTaglibMissingPrefix != ValidationMessage.IGNORE) {
- // prefix is specified but empty
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_3, JSP11Namespace.ATTR_NAME_PREFIX);
- LocalizedMessage message = new LocalizedMessage(fSeverityTaglibMissingPrefix, msgText, file);
- int start = documentRegion.getStartOffset(prefixValueRegion);
- int length = prefixValueRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- else if (fSeverityTaglibMissingPrefix != ValidationMessage.IGNORE) {
- // prefix is not specified
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_3, JSP11Namespace.ATTR_NAME_PREFIX);
- LocalizedMessage message = new LocalizedMessage(fSeverityTaglibMissingPrefix, msgText, file);
- int start = documentRegion.getStartOffset();
- int length = documentRegion.getTextLength();
- int lineNo = sDoc.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
-
- private void reportTaglibDuplicatePrefixes(IFile file, IReporter reporter, IStructuredDocument document) {
- if (fSeverityTaglibDuplicatePrefixWithDifferentURIs == ValidationMessage.IGNORE && fSeverityTaglibDuplicatePrefixWithSameURIs == ValidationMessage.IGNORE)
- return;
-
- String[] prefixes = (String[]) fTaglibPrefixesInUse.keySet().toArray(new String[0]);
- for (int prefixNumber = 0; prefixNumber < prefixes.length; prefixNumber++) {
- int severity = fSeverityTaglibDuplicatePrefixWithSameURIs;
-
- Object o = fTaglibPrefixesInUse.get(prefixes[prefixNumber]);
- /*
- * Only care if it's a List (because there was more than one
- * directive with that prefix) and if we're supposed to report
- * duplicates
- */
- if (o instanceof List) {
- List valueRegions = (List) o;
- String uri = null;
- for (int regionNumber = 0; regionNumber < valueRegions.size(); regionNumber++) {
- ITextRegionCollection documentRegion = (ITextRegionCollection) fPrefixValueRegionToDocumentRegionMap.get(valueRegions.get(regionNumber));
- ITextRegion uriValueRegion = getAttributeValueRegion(documentRegion, JSP11Namespace.ATTR_NAME_URI);
- if (uriValueRegion == null) {
- uriValueRegion = getAttributeValueRegion(documentRegion, JSP20Namespace.ATTR_NAME_TAGDIR);
- }
- if (uriValueRegion != null) {
- String uri2 = StringUtils.stripQuotes(documentRegion.getText(uriValueRegion));
- if (uri == null) {
- uri = uri2;
- }
- else {
- if (collator.compare(uri, uri2) != 0) {
- severity = fSeverityTaglibDuplicatePrefixWithDifferentURIs;
- }
- }
- }
- }
-
- if (severity != ValidationMessage.IGNORE) {
- String msgText = NLS.bind(JSPCoreMessages.JSPDirectiveValidator_2, prefixes[prefixNumber]); //$NON-NLS-2$ //$NON-NLS-1$
-
- // Report an error in all directives using this prefix
- for (int regionNumber = 0; regionNumber < valueRegions.size(); regionNumber++) {
-
- ITextRegion valueRegion = (ITextRegion) valueRegions.get(regionNumber);
- ITextRegionCollection documentRegion = (ITextRegionCollection) fPrefixValueRegionToDocumentRegionMap.get(valueRegion);
- LocalizedMessage message = (file == null ? new LocalizedMessage(severity, msgText) : new LocalizedMessage(severity, msgText, file));
-
- // if there's a message, there was an error found
- int start = documentRegion.getStartOffset(valueRegion);
- int length = valueRegion.getTextLength();
- int lineNo = document.getLineOfOffset(start);
- message.setLineNo(lineNo + 1);
- message.setOffset(start);
- message.setLength(length);
-
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- }
- }
- }
-
- /**
- * @param project
- */
- private void setProject(IProject project) {
- boolean useProject = false;
- if (project != null) {
- fProject = JavaCore.create(project);
- fPreferences = new ProjectScope(fProject.getProject()).getNode(PREFERENCE_NODE_QUALIFIER);
- useProject = fPreferences.getBoolean(HTMLCorePreferenceNames.USE_PROJECT_SETTINGS, false);
- }
- else {
- fProject = null;
- }
-
- if (!useProject) {
- fPreferences = new InstanceScope().getNode(PREFERENCE_NODE_QUALIFIER);
- }
- }
-
- private void unloadPreferences() {
- fPreferencesService = null;
- fScopes = null;
- }
-
- /**
- * True if container has nested regions, meaning container is probably too
- * complicated (like JSP expressions or EL) to validate with this validator.
- */
- private boolean hasNestedRegion(ITextRegion container) {
- return (container instanceof ITextRegionContainer && ((ITextRegionContainer) container).getRegions() != null);
- }
-
- /**
- * batch validation call
- */
- 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.getStructuredDocument());
- }
- }
- 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/JSPELValidator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPELValidator.java
deleted file mode 100644
index cf84532243..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPELValidator.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*******************************************************************************
- Copyright (c) 2005, 2008 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.ProjectScope;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-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.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.preferences.JSPCorePreferenceNames;
-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.core.internal.validate.ValidationMessage;
-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.IValidator;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-
-public class JSPELValidator extends JSPValidator {
- private static final boolean DEBUG = Boolean.valueOf(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspvalidator")).booleanValue(); //$NON-NLS-1$
- private static final String PREFERENCE_NODE_QUALIFIER = JSPCorePlugin.getDefault().getBundle().getSymbolicName();
- private static final int MAX_REGIONS = 1000;
-
- private IValidator fMessageOriginator;
-
- public JSPELValidator() {
- this.fMessageOriginator = this;
- }
-
- public JSPELValidator(IValidator validator) {
- this.fMessageOriginator = validator;
- }
-
- protected void validateFile(IFile file, IReporter reporter) {
- if (DEBUG) {
- Logger.log(Logger.INFO, getClass().getName() + " validating: " + file); //$NON-NLS-1$
- }
-
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getModelForRead(file);
- if (!reporter.isCancelled() && model != null) {
- performValidation(file, reporter, model.getStructuredDocument());
- }
- }
- catch (Exception e) {
- Logger.logException(e);
- }
- finally {
- if (null != model)
- model.releaseFromRead();
- }
- }
-
- private IPreferencesService fPreferencesService = null;
- private IScopeContext[] fScopes = null;
-
- private void loadPreferences(IFile file) {
- fScopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};
-
- fPreferencesService = Platform.getPreferencesService();
- if (file != null && file.isAccessible()) {
- ProjectScope projectScope = new ProjectScope(file.getProject());
- if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
- fScopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
- }
- }
- }
-
- int getMessageSeverity(String key) {
- int sev = fPreferencesService.getInt(PREFERENCE_NODE_QUALIFIER, key, IMessage.NORMAL_SEVERITY, fScopes);
- switch (sev) {
- case ValidationMessage.ERROR :
- return IMessage.HIGH_SEVERITY;
- case ValidationMessage.WARNING :
- return IMessage.NORMAL_SEVERITY;
- case ValidationMessage.INFORMATION :
- return IMessage.LOW_SEVERITY;
- case ValidationMessage.IGNORE :
- return ValidationMessage.IGNORE;
- }
- return IMessage.NORMAL_SEVERITY;
- }
-
- private void unloadPreferences() {
- fPreferencesService = null;
- fScopes = null;
- }
-
- protected void performValidation(IFile file, IReporter reporter, IStructuredDocument structuredDoc) {
- loadPreferences(file);
- 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();
- }
- unloadPreferences();
- }
-
- 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();
- /* [136795] Validate everything in the EL container, not just JSP_EL_CONTENT */
- if (childRegion.getType() == DOMJSPRegionContexts.JSP_EL_OPEN)
- validateELContent(parentRegion, childRegion, childRegions, reporter, file);
- }
- }
- }
- }
-
- protected void validateELContent(ITextRegionCollection container, ITextRegion elOpenRegion, Iterator elRegions, IReporter reporter, IFile file) {
- int contentStart = elOpenRegion.getEnd();
- int contentDocStart = container.getEndOffset(elOpenRegion);
- int contentLength = container.getLength();
- int regionCount = 0;
- ITextRegion elRegion = null;
- /* Find the EL closing region, otherwise the last region will be used to calculate the EL content text */
- while (elRegions != null && elRegions.hasNext() && (regionCount++ < MAX_REGIONS)) {
- elRegion = (ITextRegion) elRegions.next();
- if (elRegion.getType() == DOMJSPRegionContexts.JSP_EL_CLOSE)
- break;
- }
-
- String elText = container.getFullText().substring(contentStart, (elRegion != null) ? elRegion.getStart() : (contentLength - 1));
- JSPELParser elParser = JSPELParser.createParser(elText);
- try {
- elParser.Expression();
- }
- catch (ParseException e) {
- int sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_EL_SYNTAX);
- if (sev != ValidationMessage.IGNORE) {
- Token curTok = e.currentToken;
- int problemStartOffset = contentDocStart + curTok.beginColumn;
- Message message = new LocalizedMessage(sev, JSPCoreMessages.JSPEL_Syntax);
- message.setOffset(problemStartOffset);
- message.setLength(curTok.endColumn - curTok.beginColumn + 1);
- message.setTargetObject(file);
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- catch (TokenMgrError te) {
- int sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_EL_LEXER);
- if (sev != ValidationMessage.IGNORE) {
- Message message = new LocalizedMessage(IMessage.NORMAL_SEVERITY, JSPCoreMessages.JSPEL_Token);
- message.setOffset(contentDocStart);
- message.setLength(contentLength);
- message.setTargetObject(file);
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- }
-
- protected void validateXMLNode(ITextRegionCollection container, ITextRegion region, IReporter reporter, IFile file) {
- String elText = container.getText(region);
- JSPELParser elParser = JSPELParser.createParser(elText);
- int contentStart = container.getStartOffset(region);
- int contentLength = container.getLength();
- try {
- elParser.Expression();
- }
- catch (ParseException e) {
- int sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_EL_SYNTAX);
- if (sev != ValidationMessage.IGNORE) {
- Token curTok = e.currentToken;
- int problemStartOffset = contentStart + curTok.beginColumn;
- Message message = new LocalizedMessage(sev, JSPCoreMessages.JSPEL_Syntax);
- message.setOffset(problemStartOffset);
- message.setLength(curTok.endColumn - curTok.beginColumn + 1);
- message.setTargetObject(file);
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- catch (TokenMgrError te) {
- int sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_EL_LEXER);
- if (sev != ValidationMessage.IGNORE) {
- Message message = new LocalizedMessage(IMessage.NORMAL_SEVERITY, JSPCoreMessages.JSPEL_Token);
- message.setOffset(contentStart);
- message.setLength(contentLength);
- message.setTargetObject(file);
- reporter.addMessage(fMessageOriginator, message);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPJavaValidator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPJavaValidator.java
deleted file mode 100644
index 9bd15ab912..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPJavaValidator.java
+++ /dev/null
@@ -1,445 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2011 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.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jdt.core.compiler.IProblem;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.java.IJSPProblem;
-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.JSPTranslationExtension;
-import org.eclipse.jst.jsp.core.internal.modelhandler.ModelHandlerForJSP;
-import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
-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.validate.ValidationMessage;
-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.IValidator;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-public class JSPJavaValidator extends JSPValidator {
- private static final boolean DEBUG = Boolean.valueOf(Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspvalidator")).booleanValue(); //$NON-NLS-1$
- private IValidator fMessageOriginator;
-
- private IPreferencesService fPreferencesService = Platform.getPreferencesService();
- private static final String PREFERENCE_NODE_QUALIFIER = JSPCorePlugin.getDefault().getBundle().getSymbolicName();
- private IScopeContext[] fScopes = null;
-
- private static final boolean UPDATE_JAVA_TASKS = true;
- private static final String JAVA_TASK_MARKER_TYPE = "org.eclipse.jdt.core.task"; //$NON-NLS-1$
- private static final String[] DEPEND_ONs = new String[]{".classpath", ".project", ".settings/org.eclipse.jdt.core.prefs", ".settings/org.eclipse.jst.jsp.core.prefs", ".settings/org.eclipse.wst.common.project.facet.core.xml", ".settings/org.eclipse.wst.common.component"};
-
- public JSPJavaValidator() {
- this.fMessageOriginator = this;
- }
-
- public JSPJavaValidator(IValidator validator) {
- this.fMessageOriginator = validator;
- }
-
- /**
- * Assumed the message offset is an indirect position. In other words, an
- * error from an included file.
- *
- * @param m
- * @param translation
- */
- private void adjustIndirectPosition(IMessage m, IJSPTranslation translation) {
-
- if (!(translation instanceof JSPTranslationExtension))
- return;
-
- IDocument jspDoc = ((JSPTranslationExtension) translation).getJspDocument();
- if (!(jspDoc instanceof IStructuredDocument))
- return;
-
- IStructuredDocument sDoc = (IStructuredDocument) jspDoc;
- IStructuredDocumentRegion[] regions = sDoc.getStructuredDocumentRegions(0, m.getOffset() + m.getLength());
- // iterate backwards until you hit the include directive
- for (int i = regions.length - 1; i >= 0; i--) {
- IStructuredDocumentRegion region = regions[i];
- if (region.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- if (getDirectiveName(region).equals("include")) { //$NON-NLS-1$
- ITextRegion fileValueRegion = getAttributeValueRegion(region, "file"); //$NON-NLS-1$
- if (fileValueRegion != null) {
- m.setOffset(region.getStartOffset(fileValueRegion));
- m.setLength(fileValueRegion.getTextLength());
- }
- else {
- m.setOffset(region.getStartOffset());
- m.setLength(region.getTextLength());
- }
- /**
- * Bug 219761 - Syntax error reported at wrong location
- * (don't forget to adjust the line number, too)
- */
- m.setLineNo(sDoc.getLineOfOffset(m.getOffset()) + 1);
- break;
- }
- }
- }
- }
-
- /**
- * Creates an IMessage from asn IProblem
- *
- * @param problem
- * @param f
- * @param translation
- * @param structuredDoc
- * @return message representation of the problem, or null if it could not
- * create one
- */
- private IMessage createMessageFromProblem(IProblem problem, IFile f, IJSPTranslation translation, IStructuredDocument structuredDoc) {
- int sev = -1;
- int sourceStart = -1;
- int sourceEnd = -1;
-
- if (problem instanceof IJSPProblem) {
- sourceStart = problem.getSourceStart();
- sourceEnd = problem.getSourceEnd();
- switch (((IJSPProblem) problem).getEID()) {
- case IJSPProblem.TEIClassNotFound :
- sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_NOT_FOUND);
- break;
- case IJSPProblem.TEIValidationMessage :
- sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_VALIDATION_MESSAGE);
- break;
- case IJSPProblem.TEIClassNotInstantiated :
- sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_NOT_INSTANTIATED);
- break;
- case IJSPProblem.TEIClassMisc :
- sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_RUNTIME_EXCEPTION);
- break;
- case IJSPProblem.TagClassNotFound :
- sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND);
- break;
- case IJSPProblem.UseBeanInvalidID :
- sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_TRANSLATION_USEBEAN_INVALID_ID);
- break;
- case IJSPProblem.UseBeanMissingTypeInfo :
- sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_TRANSLATION_USBEAN_MISSING_TYPE_INFO);
- break;
- case IJSPProblem.UseBeanAmbiguousType :
- sev = getMessageSeverity(JSPCorePreferenceNames.VALIDATION_TRANSLATION_USEBEAN_AMBIGUOUS_TYPE_INFO);
- break;
- default :
- sev = problem.isError() ? IMessage.HIGH_SEVERITY : (problem.isWarning() ? IMessage.NORMAL_SEVERITY : ValidationMessage.IGNORE);
-
- }
- }
- else {
- sourceStart = translation.getJspOffset(problem.getSourceStart());
- sourceEnd = translation.getJspOffset(problem.getSourceEnd());
- switch (problem.getID()) {
- case IProblem.LocalVariableIsNeverUsed : {
- sev = getSourceSeverity(JSPCorePreferenceNames.VALIDATION_JAVA_LOCAL_VARIABLE_NEVER_USED, sourceStart, sourceEnd);
- }
- break;
- case IProblem.NullLocalVariableReference : {
- sev = getSourceSeverity(JSPCorePreferenceNames.VALIDATION_JAVA_NULL_LOCAL_VARIABLE_REFERENCE, sourceStart, sourceEnd);
- }
- break;
- case IProblem.ArgumentIsNeverUsed : {
- sev = getSourceSeverity(JSPCorePreferenceNames.VALIDATION_JAVA_ARGUMENT_IS_NEVER_USED, sourceStart, sourceEnd);
- }
- break;
- case IProblem.PotentialNullLocalVariableReference : {
- sev = getSourceSeverity(JSPCorePreferenceNames.VALIDATION_JAVA_POTENTIAL_NULL_LOCAL_VARIABLE_REFERENCE, sourceStart, sourceEnd);
- }
- break;
- case IProblem.UnusedImport : {
- sev = getSourceSeverity(JSPCorePreferenceNames.VALIDATION_JAVA_UNUSED_IMPORT, sourceStart, sourceEnd);
- }
- break;
- case IProblem.UnusedPrivateField:
- case IProblem.MissingSerialVersion : {
- // JSP files don't get serialized...right?
- sev = ValidationMessage.IGNORE;
- }
- break;
-
- default : {
- if (problem.isError()) {
- sev = IMessage.HIGH_SEVERITY;
- }
- else if (problem.isWarning()) {
- sev = IMessage.NORMAL_SEVERITY;
- }
- else {
- sev = IMessage.LOW_SEVERITY;
- }
- }
- if (sev == ValidationMessage.IGNORE) {
- return null;
- }
-
- /* problems without JSP positions are in generated code */
- if (sourceStart == -1) {
- int problemID = problem.getID();
- /*
- * Quoting IProblem doc: "When a problem is tagged as
- * Internal, it means that no change other than a
- * local source code change can fix the corresponding
- * problem." Assuming that our generated code is
- * correct, that should reduce the reported problems
- * to those the user can correct.
- */
- if (((problemID & IProblem.Internal) != 0) && ((problemID & IProblem.Syntax) != 0) && translation instanceof JSPTranslation) {
- // Attach to the last code scripting section
- JSPTranslation jspTranslation = ((JSPTranslation) translation);
- Position[] jspPositions = (Position[]) jspTranslation.getJsp2JavaMap().keySet().toArray(new Position[jspTranslation.getJsp2JavaMap().size()]);
- for (int i = 0; i < jspPositions.length; i++) {
- sourceStart = Math.max(sourceStart, jspPositions[i].getOffset());
- }
- IMessage m = new LocalizedMessage(sev, problem.getMessage(), f);
- m.setOffset(sourceStart);
- m.setLength(1);
- return m;
- }
- else {
- return null;
- }
- }
- }
- }
- if (sev == ValidationMessage.IGNORE) {
- return null;
- }
-
- final boolean isIndirect = translation.isIndirect(problem.getSourceStart());
- if (isIndirect && !FragmentValidationTools.shouldValidateFragment(f)) {
- return null;
- }
-
- // line number for marker starts @ 1
- // line number from document starts @ 0
- int lineNo = structuredDoc.getLineOfOffset(sourceStart) + 1;
-
- IMessage m = new LocalizedMessage(sev, problem.getMessage(), f);
-
- m.setLineNo(lineNo);
- m.setOffset(sourceStart);
- m.setLength((sourceEnd >= sourceStart) ? (sourceEnd - sourceStart + 1) : 0);
-
- // need additional adjustment for problems from
- // indirect (included) files
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=119633
- if (isIndirect) {
- adjustIndirectPosition(m, translation);
- }
-
- return m;
- }
-
- /**
- * Provides the severity for the given message key only when it's within the source range of the JSP (i.e., not boilerplate code).
- * @param key the key to get the severity of
- * @param start start within the JSP source
- * @param end end wtihin the JSP source
- * @return The message severity for the key if it is part of the JSP's source. IGNORE if it's boilerplate code.
- */
- private int getSourceSeverity(String key, int start, int end) {
- return (start >= 0 && end >= 0 ) ? getMessageSeverity(key) : ValidationMessage.IGNORE;
- }
-
- int getMessageSeverity(String key) {
- int sev = fPreferencesService.getInt(PREFERENCE_NODE_QUALIFIER, key, IMessage.NORMAL_SEVERITY, fScopes);
- switch (sev) {
- case ValidationMessage.ERROR :
- return IMessage.HIGH_SEVERITY;
- case ValidationMessage.WARNING :
- return IMessage.NORMAL_SEVERITY;
- case ValidationMessage.INFORMATION :
- return IMessage.LOW_SEVERITY;
- case ValidationMessage.IGNORE :
- return ValidationMessage.IGNORE;
- }
- return IMessage.NORMAL_SEVERITY;
- }
-
- private void loadPreferences(IFile file) {
- fScopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};
-
- if (file != null && file.isAccessible()) {
- ProjectScope projectScope = new ProjectScope(file.getProject());
- if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
- fScopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
- }
- }
- }
-
- void performValidation(IFile f, IReporter reporter, IStructuredModel model) {
- for (int i = 0; i < DEPEND_ONs.length; i++) {
- addDependsOn(f.getProject().getFile(DEPEND_ONs[i]));
- }
- if (model instanceof IDOMModel) {
- IDOMModel domModel = (IDOMModel) model;
- ModelHandlerForJSP.ensureTranslationAdapterFactory(domModel);
-
- IDOMDocument xmlDoc = domModel.getDocument();
- JSPTranslationAdapter translationAdapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
- IJSPTranslation translation = translationAdapter.getJSPTranslation();
-
- if (!reporter.isCancelled()) {
- loadPreferences(f);
-
- // only update task markers if the model is the same as what's on disk
- boolean updateJavaTasks = UPDATE_JAVA_TASKS && !domModel.isDirty() && f != null && f.isAccessible();
- if (updateJavaTasks) {
- // remove old Java task markers
- try {
- IMarker[] foundMarkers = f.findMarkers(JAVA_TASK_MARKER_TYPE, true, IResource.DEPTH_ONE);
- for (int i = 0; i < foundMarkers.length; i++) {
- foundMarkers[i].delete();
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
-
- translation.setProblemCollectingActive(true);
- translation.reconcileCompilationUnit();
- List problems = translation.getProblems();
- // add new messages
- for (int i = 0; i < problems.size() && !reporter.isCancelled(); i++) {
- IProblem problem = (IProblem) problems.get(i);
- /*
- * Possible error in problem collection; EL translation is
- * extensible, so we must be paranoid about this.
- */
- if (problem == null)
- continue;
- IMessage m = createMessageFromProblem(problem, f, translation, domModel.getStructuredDocument());
- if (m != null) {
- if (problem.getID() == IProblem.Task) {
- if (updateJavaTasks) {
- // add new Java task marker
- try {
- IMarker task = f.createMarker(JAVA_TASK_MARKER_TYPE);
- task.setAttribute(IMarker.LINE_NUMBER, new Integer(m.getLineNumber()));
- task.setAttribute(IMarker.CHAR_START, new Integer(m.getOffset()));
- task.setAttribute(IMarker.CHAR_END, new Integer(m.getOffset() + m.getLength()));
- task.setAttribute(IMarker.MESSAGE, m.getText());
- task.setAttribute(IMarker.USER_EDITABLE, Boolean.FALSE);
-
- switch (m.getSeverity()) {
- case IMessage.HIGH_SEVERITY: {
- task.setAttribute(IMarker.PRIORITY, new Integer(IMarker.PRIORITY_HIGH));
- task.setAttribute(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));
- }
- break;
- case IMessage.LOW_SEVERITY : {
- task.setAttribute(IMarker.PRIORITY, new Integer(IMarker.PRIORITY_LOW));
- task.setAttribute(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_INFO));
- }
- break;
- default : {
- task.setAttribute(IMarker.PRIORITY, new Integer(IMarker.PRIORITY_NORMAL));
- task.setAttribute(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_WARNING));
- }
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- }
- else {
- reporter.addMessage(fMessageOriginator, m);
- }
- }
- }
- }
- }
- unloadPreferences();
- }
-
- private void unloadPreferences() {
- fScopes = null;
- }
-
- /**
- * Validate one file. It's assumed that the file has JSP content type.
- *
- * @param f
- * @param reporter
- */
- protected void validateFile(IFile f, IReporter reporter) {
- if (DEBUG) {
- Logger.log(Logger.INFO, getClass().getName() + " validating: " + f); //$NON-NLS-1$
- }
-
- IStructuredModel model = null;
- try {
- // get jsp model, get tranlsation
- model = StructuredModelManager.getModelManager().getModelForRead(f);
- if (!reporter.isCancelled() && model != null) {
- for (int i = 0; i < DEPEND_ONs.length; i++) {
- addDependsOn(f.getProject().getFile(DEPEND_ONs[i]));
- }
- // get jsp model, get translation
- if (model instanceof IDOMModel) {
- reporter.removeAllMessages(fMessageOriginator, f);
- performValidation(f, reporter, model);
- }
- }
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- }
-
- /**
- * Record that the currently validating resource depends on the given
- * file. Only possible during batch (not source) validation.
- *
- * @param file
- */
- private void addDependsOn(IFile file) {
- if (fMessageOriginator instanceof JSPBatchValidator) {
- ((JSPBatchValidator) fMessageOriginator).addDependsOn(file);
- }
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPValidator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPValidator.java
deleted file mode 100644
index a6b20c157e..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/JSPValidator.java
+++ /dev/null
@@ -1,420 +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.validation;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-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.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-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.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.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-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.validation.AbstractValidator;
-import org.eclipse.wst.validation.ValidationResult;
-import org.eclipse.wst.validation.ValidationState;
-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.regions.DOMRegionContext;
-
-/**
- * Performs some common JSP validation tasks
- */
-public class JSPValidator extends AbstractValidator implements IValidatorJob {
-
- private static final String PLUGIN_ID_JSP_CORE = "org.eclipse.jst.jsp.core"; //$NON-NLS-1$
- private IContentType fJSPFContentType = null;
-
- protected 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);
- }
-
- public void setLocalizedMessage(String message) {
- _message = message;
- }
-
- public String getLocalizedMessage() {
- return _message;
- }
-
- public String getText() {
- return getLocalizedMessage();
- }
-
- public String getText(ClassLoader cl) {
- return getLocalizedMessage();
- }
-
- public String getText(Locale l) {
- return getLocalizedMessage();
- }
-
- public String getText(Locale l, ClassLoader cl) {
- return getLocalizedMessage();
- }
- }
-
- protected class JSPFileVisitor implements IResourceProxyVisitor {
-
- private List fFiles = new ArrayList();
- private IContentType[] fContentTypes = null;
- private IReporter fReporter = null;
-
- public JSPFileVisitor(IReporter reporter) {
- fReporter = reporter;
- }
-
- 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;
- }
-
- public 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)};
- }
- 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 void cleanup(IReporter reporter) {
- // nothing to do
- }
-
- public void validate(IValidationContext helper, IReporter reporter) throws ValidationException {
- String[] uris = helper.getURIs();
- IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
- if (uris.length > 0) {
- IFile currentFile = null;
-
- for (int i = 0; i < uris.length && !reporter.isCancelled(); i++) {
- // might be called with just project path?
- currentFile = wsRoot.getFile(new Path(uris[i]));
- if (currentFile != null && currentFile.exists()) {
- if (shouldValidate(currentFile) && fragmentCheck(currentFile)) {
-
- Message message = new LocalizedMessage(IMessage.LOW_SEVERITY, uris[i]);
- 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])) {
- int percent = (i * 100) / files.length + 1;
- Message message = new LocalizedMessage(IMessage.LOW_SEVERITY, percent + "% " + 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$
- }
- }
- }
- }
-
- /**
- * Validate one file. It's assumed that the file has JSP content type.
- *
- * @param f
- * @param reporter
- */
- protected void validateFile(IFile f, IReporter reporter) {
- // subclasses should implement (for batch validation)
- }
-
- public ValidationResult validate(final IResource resource, int kind, ValidationState state, IProgressMonitor monitor) {
- if (resource.getType() != IResource.FILE)
- return null;
- ValidationResult result = new ValidationResult();
- final IReporter reporter = result.getReporter(monitor);
- validateFile((IFile) resource, reporter);
- return result;
- }
-
- /**
- *
- * @param collection
- * @return the jsp directive name
- */
- protected String getDirectiveName(ITextRegionCollection collection) {
- String name = ""; //$NON-NLS-1$
- ITextRegionList subRegions = collection.getRegions();
- for (int j = 0; j < subRegions.size(); j++) {
- ITextRegion subRegion = subRegions.get(j);
- if (subRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- name = collection.getText(subRegion);
- break;
- }
- }
- return name;
- }
-
- /**
- *
- * @param sdr
- * @param attrName
- * @return the ITextRegion for the attribute value of the given attribute
- * name, case sensitive, null if no matching attribute is found
- */
- protected ITextRegion getAttributeValueRegion(ITextRegionCollection sdr, String attrName) {
- ITextRegion valueRegion = null;
- ITextRegionList subRegions = sdr.getRegions();
- for (int i = 0; i < subRegions.size(); i++) {
- ITextRegion subRegion = subRegions.get(i);
- if (subRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME && sdr.getText(subRegion).equals(attrName)) {
- for (int j = i; j < subRegions.size(); j++) {
- subRegion = subRegions.get(j);
- if (subRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- valueRegion = subRegion;
- break;
- }
- }
- break;
- }
- }
- return valueRegion;
- }
-
- protected String getAttributeValue(ITextRegionCollection sdr, String attrName) {
- ITextRegion r = getAttributeValueRegion(sdr, attrName);
- if (r != null)
- return sdr.getText(r).trim();
- return ""; //$NON-NLS-1$
- }
-
- /**
- * 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
- if (is != null)
- try {
- is.close();
- }
- catch (Exception e) {
- // not sure how to recover at this point
- }
- }
- return isFragment;
- }
-
- 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;
- }
-
- // for debugging
- static final boolean DEBUG;
- static {
- String value = Platform.getDebugOption("org.eclipse.jst.jsp.core/debug/jspvalidator"); //$NON-NLS-1$
- DEBUG = value != null && value.equalsIgnoreCase("true"); //$NON-NLS-1$
- }
-
- /**
- * 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) {
- return null;
- }
-
- public IStatus validateInJob(IValidationContext helper, IReporter reporter) throws ValidationException {
- IStatus status = Status.OK_STATUS;
- try {
- validate(helper, reporter);
- }
- catch (ValidationException e) {
- Logger.logException(e);
- status = new Status(IStatus.ERROR, PLUGIN_ID_JSP_CORE, IStatus.ERROR, e.getLocalizedMessage(), e);
- }
- return status;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/LocalizedMessage.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/LocalizedMessage.java
deleted file mode 100644
index 7bd2f314ff..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/LocalizedMessage.java
+++ /dev/null
@@ -1,61 +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.Locale;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.wst.validation.internal.core.Message;
-
-/**
- * Simple implementation of Message all validators in package can use.
- */
-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);
- }
-
- public void setLocalizedMessage(String message) {
- _message = message;
- }
-
- public String getLocalizedMessage() {
- return _message;
- }
-
- public String getText() {
- return getLocalizedMessage();
- }
-
- public String getText(ClassLoader cl) {
- return getLocalizedMessage();
- }
-
- public String getText(Locale l) {
- return getLocalizedMessage();
- }
-
- public String getText(Locale l, ClassLoader cl) {
- return getLocalizedMessage();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/TLDValidator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/TLDValidator.java
deleted file mode 100644
index c1575a8204..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/validation/TLDValidator.java
+++ /dev/null
@@ -1,292 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2011 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.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.core.runtime.content.IContentTypeSettings;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.jsp.core.internal.Assert;
-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.contentmodel.tld.provisional.JSP11TLDNames;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP12TLDNames;
-import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
-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.internal.validate.ValidationMessage;
-import org.eclipse.wst.validation.AbstractValidator;
-import org.eclipse.wst.validation.ValidationResult;
-import org.eclipse.wst.validation.ValidationState;
-import org.eclipse.wst.validation.ValidatorMessage;
-import org.eclipse.wst.validation.internal.provisional.core.IMessage;
-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.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.validation.MarkupValidator;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * A miniature validator for .tld files. Checks for valid class names.
- */
-public class TLDValidator extends AbstractValidator {
- private static final String MARKER_TYPE = "org.eclipse.jst.jsp.core.validationMarker"; //$NON-NLS-1$
- private static final String PREFERENCE_NODE_QUALIFIER = JSPCorePlugin.getDefault().getBundle().getSymbolicName();
-
- private IPreferencesService fPreferencesService = Platform.getPreferencesService();
-
- private static final String[] classElementNames = new String[]{JSP11TLDNames.TAGCLASS, JSP12TLDNames.TAG_CLASS, JSP11TLDNames.TEICLASS, JSP12TLDNames.TEI_CLASS, JSP12TLDNames.VALIDATOR_CLASS, JSP12TLDNames.VARIABLE_CLASS, JSP12TLDNames.LISTENER_CLASS};
- private static final String[] missingClassMessages = new String[]{JSPCoreMessages.TaglibHelper_3, JSPCoreMessages.TaglibHelper_3, JSPCoreMessages.TaglibHelper_0, JSPCoreMessages.TaglibHelper_0, JSPCoreMessages.TLDValidator_MissingValidator, JSPCoreMessages.TLDValidator_MissingVariable, JSPCoreMessages.TLDValidator_MissingListener};
- private static final String[] missingClassSeverityPreferenceKeys = new String[]{JSPCorePreferenceNames.VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND, JSPCorePreferenceNames.VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND, JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_NOT_FOUND, JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_NOT_FOUND, JSPCorePreferenceNames.VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND, JSPCorePreferenceNames.VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND, JSPCorePreferenceNames.VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND};
-
- private static final String TAGX_CONTENT_TYPE_ID = "org.eclipse.jst.jsp.core.tagxsource"; //$NON-NLS-1$
- private List fTagXexts = null;
- private List fTagXnames = null;
-
- public TLDValidator() {
- super();
-
- Assert.isTrue(classElementNames.length == missingClassMessages.length, "mismanaged arrays"); //$NON-NLS-1$
- Assert.isTrue(classElementNames.length == missingClassSeverityPreferenceKeys.length, "mismanaged arrays"); //$NON-NLS-1$
- Assert.isTrue(missingClassMessages.length == missingClassSeverityPreferenceKeys.length, "mismanaged arrays"); //$NON-NLS-1$
-
- initContentTypes();
- }
-
- private void initContentTypes() {
- fTagXexts = new ArrayList(Arrays.asList(Platform.getContentTypeManager().getContentType(TAGX_CONTENT_TYPE_ID).getFileSpecs(IContentTypeSettings.FILE_EXTENSION_SPEC)));
- fTagXnames = new ArrayList(Arrays.asList(Platform.getContentTypeManager().getContentType(TAGX_CONTENT_TYPE_ID).getFileSpecs(IContentTypeSettings.FILE_NAME_SPEC)));
- }
-
- private Map checkClass(IJavaProject javaProject, Node classSpecifier, IScopeContext[] preferenceScopes, String preferenceKey, String errorMessage) {
- String className = getTextContents(classSpecifier);
- if (className != null && className.length() > 2) {
- IType type = null;
- try {
- type = javaProject.findType(className);
- }
- catch (JavaModelException e) {
- return null;
- }
-
- if (type == null || !type.exists()) {
- Object severity = getMessageSeverity(preferenceScopes, preferenceKey);
- if (severity == null)
- return null;
-
- IDOMNode classElement = (IDOMNode) classSpecifier;
- Map markerValues = new HashMap();
- markerValues.put(IMarker.SEVERITY, severity);
- int start = classElement.getStartOffset();
- if (classElement.getStartStructuredDocumentRegion() != null && classElement.getEndStructuredDocumentRegion() != null)
- start = classElement.getStartStructuredDocumentRegion().getEndOffset();
- markerValues.put(IMarker.CHAR_START, new Integer(start));
- int end = classElement.getEndOffset();
- if (classElement.getStartStructuredDocumentRegion() != null && classElement.getEndStructuredDocumentRegion() != null)
- end = classElement.getEndStructuredDocumentRegion().getStartOffset();
- markerValues.put(IMarker.CHAR_END, new Integer(end));
- int line = classElement.getStructuredDocument().getLineOfOffset(start);
- markerValues.put(IMarker.LINE_NUMBER, new Integer(line + 1));
- markerValues.put(IMarker.MESSAGE, NLS.bind(errorMessage, (errorMessage.indexOf("{1}") >= 0) ? new String[]{getTagName(classSpecifier), className} : new String[]{className})); //$NON-NLS-1$
- return markerValues;
- }
- }
- return null;
- }
-
- private Map[] detectProblems(IJavaProject javaProject, IFile tld, IScopeContext[] preferenceScopes) throws CoreException {
- List problems = new ArrayList();
-
- IStructuredModel m = null;
- try {
- m = StructuredModelManager.getModelManager().getModelForRead(tld);
- if (m != null && m instanceof IDOMModel) {
- IDOMDocument document = ((IDOMModel) m).getDocument();
-
- for (int i = 0; i < classElementNames.length; i++) {
- NodeList classes = document.getElementsByTagName(classElementNames[i]);
- for (int j = 0; j < classes.getLength(); j++) {
- Map problem = checkClass(javaProject, classes.item(j), preferenceScopes, missingClassSeverityPreferenceKeys[i], missingClassMessages[i]);
- if (problem != null)
- problems.add(problem);
- }
- }
-
- }
- }
- catch (IOException e) {
- Logger.logException(e);
- }
- finally {
- if (m != null)
- m.releaseFromRead();
- }
-
- return (Map[]) problems.toArray(new Map[problems.size()]);
- }
-
- Integer getMessageSeverity(IScopeContext[] preferenceScopes, String key) {
- int sev = fPreferencesService.getInt(PREFERENCE_NODE_QUALIFIER, key, IMessage.NORMAL_SEVERITY, preferenceScopes);
- switch (sev) {
- case ValidationMessage.ERROR :
- return new Integer(IMarker.SEVERITY_ERROR);
- case ValidationMessage.WARNING :
- return new Integer(IMarker.SEVERITY_WARNING);
- case ValidationMessage.INFORMATION :
- return new Integer(IMarker.SEVERITY_INFO);
- case ValidationMessage.IGNORE :
- return null;
- }
- return new Integer(IMarker.SEVERITY_WARNING);
- }
-
- private String getTagName(Node classSpecifier) {
- Node tagElement = classSpecifier.getParentNode();
- Node child = tagElement.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- String name = child.getNodeName();
- if (JSP11TLDNames.NAME.equals(name))
- return getTextContents(child);
- }
- child = child.getNextSibling();
- }
- return "";
- }
-
- private String getTextContents(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) {
- s.append(child.getNodeValue().trim());
- child = child.getNextSibling();
- }
- return s.toString().trim();
- }
-
- public ValidationResult validate(IResource resource, int kind, ValidationState state, IProgressMonitor monitor) {
- if (resource.getType() != IResource.FILE)
- return null;
- ValidationResult result = new ValidationResult();
-
- IFile file = (IFile) resource;
- if (file.isAccessible()) {
- // TAGX
- if (fTagXexts.contains(file.getFileExtension()) || fTagXnames.contains(file.getName())) {
- monitor.beginTask("", 4);
- org.eclipse.wst.xml.core.internal.validation.eclipse.Validator xmlValidator = new org.eclipse.wst.xml.core.internal.validation.eclipse.Validator();
- ValidationResult result3 = new MarkupValidator().validate(resource, kind, state, new SubProgressMonitor(monitor, 1));
- if(monitor.isCanceled()) return result;
- ValidationResult result2 = xmlValidator.validate(resource, kind, state, new SubProgressMonitor(monitor, 1));
- if(monitor.isCanceled()) return result;
- ValidationResult result1 = new JSPActionValidator().validate(resource, kind, state, new SubProgressMonitor(monitor, 1));
- List messages = new ArrayList(result1.getReporter(new NullProgressMonitor()).getMessages());
- messages.addAll(result2.getReporter(new NullProgressMonitor()).getMessages());
- messages.addAll(result3.getReporter(new NullProgressMonitor()).getMessages());
- messages.addAll(new JSPDirectiveValidator().validate(resource, kind, state, new SubProgressMonitor(monitor, 1)).getReporter(new NullProgressMonitor()).getMessages());
- for (int i = 0; i < messages.size(); i++) {
- IMessage message = (IMessage) messages.get(i);
- if (message.getText() != null && message.getText().length() > 0) {
- ValidatorMessage vmessage = ValidatorMessage.create(message.getText(), resource);
- if (message.getAttributes() != null) {
- Map attrs = message.getAttributes();
- Iterator it = attrs.entrySet().iterator();
- while (it.hasNext()) {
- Map.Entry entry = (Map.Entry) it.next();
- if (!(entry.getValue() instanceof String || entry.getValue() instanceof Integer || entry.getValue() instanceof Boolean)) {
- it.remove();
- }
- }
- vmessage.setAttributes(attrs);
- }
- vmessage.setAttribute(IMarker.LINE_NUMBER, message.getLineNumber());
- vmessage.setAttribute(IMarker.MESSAGE, message.getText());
- if (message.getOffset() > -1) {
- vmessage.setAttribute(IMarker.CHAR_START, message.getOffset());
- vmessage.setAttribute(IMarker.CHAR_END, message.getOffset() + message.getLength());
- }
- int severity = 0;
- switch (message.getSeverity()) {
- case IMessage.HIGH_SEVERITY :
- severity = IMarker.SEVERITY_ERROR;
- break;
- case IMessage.NORMAL_SEVERITY :
- severity = IMarker.SEVERITY_WARNING;
- break;
- case IMessage.LOW_SEVERITY :
- severity = IMarker.SEVERITY_INFO;
- break;
- }
- vmessage.setAttribute(IMarker.SEVERITY, severity);
- vmessage.setType(MARKER_TYPE);
- result.add(vmessage);
- }
- }
- monitor.done();
- }
- // TLD
- else {
- try {
- final IJavaProject javaProject = JavaCore.create(file.getProject());
- if (javaProject.exists()) {
- IScopeContext[] scopes = new IScopeContext[]{new InstanceScope(), new DefaultScope()};
- ProjectScope projectScope = new ProjectScope(file.getProject());
- if (projectScope.getNode(PREFERENCE_NODE_QUALIFIER).getBoolean(JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS, false)) {
- scopes = new IScopeContext[]{projectScope, new InstanceScope(), new DefaultScope()};
- }
- Map[] problems = detectProblems(javaProject, file, scopes);
- for (int i = 0; i < problems.length; i++) {
- ValidatorMessage message = ValidatorMessage.create(problems[i].get(IMarker.MESSAGE).toString(), resource);
- message.setType(MARKER_TYPE);
- message.setAttributes(problems[i]);
- result.add(message);
- }
- }
- }
- catch (Exception e) {
- Logger.logException(e);
- }
- }
- }
-
- return result;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/ELProblem.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/ELProblem.java
deleted file mode 100644
index 2188556816..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/ELProblem.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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
- * IBM Corporation - Bug 298304 User-configurable severities for EL problems
- *
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.core.jspel;
-
-import org.eclipse.jface.text.Position;
-import org.eclipse.jst.jsp.core.internal.java.IJSPProblem;
-import org.eclipse.wst.sse.core.internal.validate.ValidationMessage;
-
-/**
- * <p>Represents an EL problem in a JSP document</p>
- */
-public class ELProblem implements IJSPProblem {
- private Position fPos;
- private String fMessage;
- private int fId = IJSPProblem.ELProblem;
- private int fSeverity;
-
- /**
- * @param pos should be relative to the JSP document the error is to be reported on
- * @param message
- */
- public ELProblem(Position pos, String message) {
- this(pos, message, ValidationMessage.ERROR);
- }
-
- public ELProblem(Position pos, String message, int id) {
- this(pos, message, ValidationMessage.ERROR, id);
- }
-
- public ELProblem(int severity, Position pos, String message) {
- fPos = pos;
- fMessage = message;
- fSeverity = severity;
- }
-
- public ELProblem(Position pos, String message, int severity, int id) {
- fPos = pos;
- fMessage = message;
- fId = id;
- fSeverity = severity;
- }
-
- public String getMessage() {
- return fMessage;
- }
-
- public Position getPosition() {
- return fPos;
- }
-
- public String[] getArguments() {
- return null;
- }
-
- public int getID() {
- return fId;
- }
-
- public int getEID() {
- return fId;
- }
-
- public char[] getOriginatingFileName() {
- return null;
- }
-
- public int getSourceEnd() {
- return fPos.getOffset() + fPos.getLength();
- }
-
- public int getSourceLineNumber() {
- return 0;
- }
-
- public int getSourceStart() {
- return fPos.getOffset();
- }
-
- public boolean isError() {
- return fSeverity == ValidationMessage.ERROR;
- }
-
- public boolean isWarning() {
- return fSeverity == ValidationMessage.WARNING;
- }
-
- public void setSourceEnd(int sourceEnd) {}
-
- public void setSourceLineNumber(int lineNumber) {}
-
- public void setSourceStart(int sourceStart) {}
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/IJSPELTranslator.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/IJSPELTranslator.java
deleted file mode 100644
index 55e8460661..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/jspel/IJSPELTranslator.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2006 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.jspel;
-
-import java.util.List;
-import java.util.HashMap;
-
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-
-public interface IJSPELTranslator {
-
- /**
- * To override the EL translation, please see the extension point
- * org.eclipse.jst.jsp.core.eltranslator.
- *
- * @param elText The text to be translated.
- * @param delim The starting delimiter
- * @param currentNode The current IStructuredDocumentRegion
- * @param contentStart The starting offset of the EL to be translated
- * @param contentLength The length of the EL content to be translated
- * @param fUserELExpressions A string buffer to which generated code can be appended.
- * The text appended here will be inserted into the generated class at the top level
- * not at the point in the JSP translation where the EL was found.
- *
- * @param fUserELRanges Map of location ranges from JSP EL offsets to generated Java code.
- * @param document The structured document.
- * @return A list of ELProblems that describes any syntactic issues found.
- */
- public List translateEL(String elText,
- String delim,
- IStructuredDocumentRegion currentNode,
- int contentStart,
- int contentLength,
- StringBuffer userELExpressions,
- HashMap userELRanges,
- IStructuredDocument document);
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/IJarRecord.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/IJarRecord.java
deleted file mode 100644
index 64164736df..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/IJarRecord.java
+++ /dev/null
@@ -1,42 +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.taglib;
-
-import org.eclipse.core.runtime.IPath;
-
-/**
- * A record to a .jar file directly referencable as a tag library.
- *
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @since 1.0
- */
-
-public interface IJarRecord extends ITaglibRecord {
- /**
- * @return Returns the location of the .jar in the file-system.
- */
- public IPath getLocation();
-
- /**
- * @return Returns the recommended/default prefix if one was given.
- */
- public String getShortName();
-
- /**
- * @deprecated - use the descriptor's URI value
- * @return Returns the uri.
- */
- String getURI();
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITLDRecord.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITLDRecord.java
deleted file mode 100644
index 395d3b1e14..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITLDRecord.java
+++ /dev/null
@@ -1,42 +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.taglib;
-
-import org.eclipse.core.runtime.IPath;
-
-/**
- * A record representing a standalone .tld file.
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @since 1.0
- */
-public interface ITLDRecord extends ITaglibRecord {
-
- /**
- * @return Returns the path within the workspace.
- */
- IPath getPath();
-
- /**
- * @return Returns the recommended/default prefix if one was given.
- */
- String getShortName();
-
- /**
- * @deprecated - use the descriptor's URI value
- * @return Returns the uri.
- */
- String getURI();
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITagDirRecord.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITagDirRecord.java
deleted file mode 100644
index af20861558..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITagDirRecord.java
+++ /dev/null
@@ -1,29 +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.taglib;
-
-import org.eclipse.core.runtime.IPath;
-
-/**
- * A record representing a folder of .tag/.tagx files
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @since 1.0
- */
-public interface ITagDirRecord extends ITaglibRecord {
- /**
- * @return Returns the path within the workspace to this directory.
- */
- IPath getPath();
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibDescriptor.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibDescriptor.java
deleted file mode 100644
index dfba477d0a..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibDescriptor.java
+++ /dev/null
@@ -1,56 +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.taglib;
-
-/**
- * A representation of information within a tag library descriptor. Provides
- * much of the high-level information expressed by the descriptor.
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @since 1.2
- */
-public interface ITaglibDescriptor {
- /**
- * @return the description value of this tag library
- */
- String getDescription();
- /**
- * @return the display name value of this tag library
- */
- String getDisplayName();
- /**
- * @return the stated required JSP version of this tag library
- */
- String getJSPVersion();
- /**
- * @return a URL string to the large icon for this tag library
- */
- String getLargeIcon();
- /**
- * @return the stated short name for this tag library
- */
- String getShortName();
- /**
- * @return a URL string to the small icon for this tag library
- */
- String getSmallIcon();
- /**
- * @return the stated version of this tag library if specified
- */
- String getTlibVersion();
- /**
- * @return a URI pointing to this tag library's descriptor, or null
- */
- String getURI();
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibIndexDelta.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibIndexDelta.java
deleted file mode 100644
index c1a611bfb4..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibIndexDelta.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2009 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.taglib;
-
-import org.eclipse.core.resources.IProject;
-
-/**
- * Describes changes to the known records within the TaglibIndex.
- * <p>
- * @noimplement This interface is not intended to be implemented by clients.
- * </p>
- *
- * @since 1.2
- */
-public interface ITaglibIndexDelta {
-
- /**
- * Status constant indicating that the record has been added. Note that an
- * added taglib record delta has no children, as they are all implicitely
- * added.
- */
- public int ADDED = 1;
- /**
- * Status constant indicating that the record has been changed, as
- * described by the change flags.
- */
- public int CHANGED = 4;
- /**
- * Status constant indicating that the record has been removed. Note that
- * a removed taglib element delta has no children, as they are all
- * implicitely removed.
- */
- public int REMOVED = 2;
-
-
- /**
- * Returns deltas for the affected (added, removed, or changed) records.
- *
- * @return
- */
- ITaglibIndexDelta[] getAffectedChildren();
-
- /**
- * @return the type of change, one of ADDED, CHANGED, or REMOVED
- */
- int getKind();
-
- /**
- * @return the IProject in which this delta originated
- */
- IProject getProject();
-
-
- /**
- * @return the record that was changed
- */
- ITaglibRecord getTaglibRecord();
-
- /**
- * Accepts the given visitor. The only kinds of index deltas visited are
- * <code>ADDED</code>, <code>REMOVED</code>, and
- * <code>CHANGED</code>. The visitor's <code>visit</code> method is
- * called with this index delta if applicable. If the visitor returns
- * <code>true</code>, the resource delta's children are also visited.
- *
- * @param visitor
- * the visitor
- * @exception CoreException
- * if the visitor failed with this exception.
- * @see IResourceDeltaVisitor#visit(ITaglibIndexDeltaVisitor)
- */
- // public void accept(ITaglibIndexDeltaVisitor visitor);
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibIndexListener.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibIndexListener.java
deleted file mode 100644
index e4e404c269..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibIndexListener.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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.taglib;
-
-/**
- * A listener for changes in the index's records.
- */
-public interface ITaglibIndexListener {
-
- /**
- * Notifies this listener that a change in the TaglibIndex, described by
- * an ITaglibIndexDelta, has occurred
- *
- * @param delta
- * the delta of changes
- */
- void indexChanged(ITaglibIndexDelta delta);
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibRecord.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibRecord.java
deleted file mode 100644
index 5cb64625bf..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibRecord.java
+++ /dev/null
@@ -1,77 +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.taglib;
-
-/**
- * A representation of information about a single tag library descriptor. This
- * interface is common to all record types.
- *
- *
- * @see IJarRecord
- * @see ITagDirRecord
- * @see ITLDRecord
- * @see IURLRecord
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @since 1.0
- */
-public interface ITaglibRecord {
- /**
- * A record to a .jar file referrable directly, 1.1 style, or mentioned in
- * a web.xml file.
- */
- int JAR = 1 << 1;
-
- /**
- * A record representing a folder of .tag/.tagx files
- */
- int TAGDIR = 1 << 3;
-
- /**
- * A record representing a standalone .tld file
- */
- int TLD = 1;
-
- /**
- * A record representing a .tld that is not a standalone file
- */
- int URL = 1 << 2;
-
- /**
- * Returns the type of this record. The returned value will be one of
- * <code>URL</code>, <code>TAGDIR</code>, <code>TLD</code>, or
- * <code>JAR</code>.
- * <p>
- * <ul>
- * <li> All records of type <code>JAR</code> implement
- * <code>IJarRecord</code>.</li>
- * <li> All records of type <code>TAGDIR</code> implement
- * <code>ITagDirRecord</code>.</li>
- * <li> All records of type <code>TLD</code> implement
- * <code>ITLDRecord</code>.</li>
- * <li> All records of type <code>URL</code> implement
- * <code>IURLRecord</code>.</li>
- * </ul>
- * </p>
- *
- * @return the type of this resource
- * @see #JAR
- * @see #TAGDIR
- * @see #TLD
- * @see #URL
- */
- int getRecordType();
-
- ITaglibDescriptor getDescriptor();
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibRecordEvent.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibRecordEvent.java
deleted file mode 100644
index b316511495..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ITaglibRecordEvent.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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.taglib;
-
-import org.eclipse.core.resources.IResourceDelta;
-
-/**
- * Describes changes to the known records within the TaglibIndex.
- *
- * <p>
- * @noimplement This interface is not intended to be implemented by clients.
- * </p>
- */
-public interface ITaglibRecordEvent {
-
- /**
- * @return the record that was changed
- */
- ITaglibRecord getTaglibRecord();
-
- /**
- * @return the type of change, one of ADDED, CHANGED, or REMOVED
- */
- int getType();
-
- int ADDED = IResourceDelta.ADDED;
- int CHANGED = IResourceDelta.CHANGED;
- int REMOVED = IResourceDelta.REMOVED;
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/IURLRecord.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/IURLRecord.java
deleted file mode 100644
index e974d362c2..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/IURLRecord.java
+++ /dev/null
@@ -1,49 +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.taglib;
-
-import java.net.URL;
-
-/**
- * A record representing a .tld that is not a standalone file
- * <p>
- * This interface is not intended to be implemented by clients.
- * </p>
- *
- * @since 1.0
- */
-public interface IURLRecord extends ITaglibRecord {
-
- /**
- * @return the base location to use for further resolution of resources
- * from the TLD
- */
- String getBaseLocation();
-
- /**
- * @return Returns the short-name (normally treated as the
- * recommended/default prefix), if one was specified within this
- * TLD's contents.
- */
- String getShortName();
-
- /**
- * @deprecated - use the descriptor's URI value
- * @return Returns the uri specified within this TLD's contents.
- */
- String getURI();
-
- /**
- * @return Returns the URL to this TLD's contents.
- */
- URL getURL();
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java
deleted file mode 100644
index b0ab049ac2..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/ProjectDescription.java
+++ /dev/null
@@ -1,2656 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2011 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.taglib;
-
-import java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.Reader;
-import java.io.Writer;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipException;
-import java.util.zip.ZipFile;
-import java.util.zip.ZipInputStream;
-
-import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IResourceDelta;
-import org.eclipse.core.resources.IResourceDeltaVisitor;
-import org.eclipse.core.resources.IResourceProxy;
-import org.eclipse.core.resources.IResourceProxyVisitor;
-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.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.ILock;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.core.IClasspathContainer;
-import org.eclipse.jdt.core.IClasspathEntry;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaElementDelta;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jst.jsp.core.internal.Logger;
-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.contenttype.DeploymentDescriptorPropertyCache;
-import org.eclipse.jst.jsp.core.internal.java.ArrayMap;
-import org.eclipse.jst.jsp.core.internal.util.DocumentProvider;
-import org.eclipse.jst.jsp.core.internal.util.FacetModuleCoreSupport;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.sse.core.internal.util.JarUtilities;
-import org.eclipse.wst.sse.core.internal.util.Sorter;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.XMLCorePlugin;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalog;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.ICatalogEntry;
-import org.eclipse.wst.xml.core.internal.catalog.provisional.INextCatalog;
-import org.w3c.dom.Document;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import com.ibm.icu.text.Collator;
-import com.ibm.icu.util.StringTokenizer;
-
-/**
- * Contains the tag library information for a single project.
- *
- * * <p>
- * This class is neither intended to be instantiated nor accessed by clients.
- * </p>
- *
- */
-class ProjectDescription {
- static final String EMPTY_STRING = ""; //$NON-NLS-1$
- class BuildPathJob extends Job {
- public BuildPathJob() {
- super("Updating Tag Library Index");
- setSystem(true);
- setUser(false);
- }
-
- protected IStatus run(IProgressMonitor monitor) {
- try {
- LOCK.acquire();
-
- PackageFragmentRootDelta[] removes = (PackageFragmentRootDelta[]) fPackageFragmentRootsRemoved.values().toArray(new PackageFragmentRootDelta[fPackageFragmentRootsRemoved.size()]);
- for (int i = 0; i < removes.length; i++) {
- handleElementChanged(removes[i].elementPath, removes[i].deltaKind, removes[i].isExported);
- }
- fPackageFragmentRootsRemoved.clear();
- if (monitor.isCanceled())
- return Status.OK_STATUS;
-
- PackageFragmentRootDelta[] changes = (PackageFragmentRootDelta[]) fPackageFragmentRootsChanged.values().toArray(new PackageFragmentRootDelta[fPackageFragmentRootsChanged.size()]);
- for (int i = 0; i < changes.length; i++) {
- handleElementChanged(changes[i].elementPath, changes[i].deltaKind, changes[i].isExported);
- }
- fPackageFragmentRootsChanged.clear();
- if (monitor.isCanceled())
- return Status.OK_STATUS;
-
- PackageFragmentRootDelta[] adds = (PackageFragmentRootDelta[]) fPackageFragmentRootsAdded.values().toArray(new PackageFragmentRootDelta[fPackageFragmentRootsAdded.size()]);
- for (int i = 0; i < adds.length; i++) {
- handleElementChanged(adds[i].elementPath, adds[i].deltaKind, adds[i].isExported);
- }
- fPackageFragmentRootsAdded.clear();
- }
- finally {
- LOCK.release();
- }
- TaglibIndex.getInstance().fireCurrentDelta(BuildPathJob.this);
- return Status.OK_STATUS;
- }
- }
-
- class PackageFragmentRootDelta {
- PackageFragmentRootDelta(IPath path, int kind, boolean exported) {
- super();
- elementPath = path;
- deltaKind = kind;
- isExported = exported;
- }
-
- /*
- IJavaElementDelta.F_ADDED_TO_CLASSPATH
- IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED
- IJavaElementDelta.F_REMOVED_FROM_CLASSPATH
- */
- int deltaKind;
- IPath elementPath;
- boolean isExported;
- }
-
- class DeltaVisitor implements IResourceDeltaVisitor {
- public boolean visit(IResourceDelta delta) throws CoreException {
- IResource resource = delta.getResource();
- if (resource.getType() == IResource.FILE) {
- if (delta.getKind() == IResourceDelta.CHANGED && (delta.getFlags() == IResourceDelta.ENCODING || delta.getFlags() == IResourceDelta.MARKERS))
- return true;
- if (resource.getName().endsWith(".tld")) { //$NON-NLS-1$
- if (delta.getKind() == IResourceDelta.REMOVED) {
- removeTLD(resource);
- }
- else {
- updateTLD(resource, delta.getKind());
- }
- }
- else if (resource.getName().endsWith(".jar")) { //$NON-NLS-1$
- if (delta.getKind() == IResourceDelta.REMOVED) {
- removeJAR(resource);
- }
- else {
- updateJAR(resource, delta.getKind());
- }
- }
- else if ("tag".equalsIgnoreCase(resource.getFileExtension()) || "tagx".equalsIgnoreCase(resource.getFileExtension())) { //$NON-NLS-1$ //$NON-NLS-2$
- if (delta.getKind() == IResourceDelta.REMOVED) {
- removeTag(resource);
- }
- else {
- updateTag(resource, delta.getKind());
- }
- }
- else if (resource.getName().equals(WEB_XML) && resource.getParent().getName().equals(WEB_INF)) {
- if (delta.getKind() == IResourceDelta.REMOVED) {
- removeWebXML(resource);
- }
- else {
- updateWebXML(resource, delta.getKind());
- }
- }
- }
- return resource.getName().length() != 0 && resource.getName().charAt(0) != '.';
- }
- }
-
- class Indexer implements IResourceProxyVisitor {
- public boolean visit(IResourceProxy proxy) throws CoreException {
- boolean visitMembers = true;
- if (proxy.getType() == IResource.FILE && !proxy.isDerived()) {
- if (proxy.getName().endsWith(".tld")) { //$NON-NLS-1$
- updateTLD(proxy.requestResource(), ITaglibIndexDelta.ADDED);
- }
- else if (proxy.getName().endsWith(".jar")) { //$NON-NLS-1$
- updateJAR(proxy.requestResource(), ITaglibIndexDelta.ADDED);
- }
- else if (proxy.getName().endsWith(".tag") || proxy.getName().endsWith(".tagx")) { //$NON-NLS-1$ //$NON-NLS-2$
- updateTagDir(proxy.requestResource().getParent(), ITaglibIndexDelta.ADDED);
- // any folder with these files will create a record for
- // that folder in one pass
- visitMembers = false;
- }
- else if (proxy.getName().equals(WEB_XML) && proxy.requestResource().getParent().getName().equals(WEB_INF)) {
- updateWebXML(proxy.requestResource(), ITaglibIndexDelta.ADDED);
- }
- }
- String name = proxy.getName();
- return name.length() != 0 && name.charAt(0) != '.' && visitMembers && !proxy.isDerived();
- }
- }
-
- static class JarRecord implements IJarRecord {
- /**
- * Whether this jar includes an entry name "META-INF/taglib.tld"
- */
- boolean has11TLD;
- TaglibInfo info;
-
- /**
- * Whether this record is in a library that was "exported" on the Java
- * Build Path. May no longer be accurate since the library may be used
- * in multiple projects.
- *
- * @deprecated - no current use, might not be worth preserving
- */
- boolean isExported = true;
-
- /**
- * Whether this record was created based on a mapping within a
- * deployment descriptor. May also be innaccurate if the jar is used
- * in multiple projects.
- */
- boolean isMappedInWebXML;
- boolean isConsistent = false;
- IPath location;
- Collection urlRecords;
-
- public boolean equals(Object obj) {
- if (!(obj instanceof JarRecord))
- return false;
- return ((JarRecord) obj).location.equals(location) && ((JarRecord) obj).has11TLD == has11TLD && ((JarRecord) obj).info.equals(info);
- }
-
- public ITaglibDescriptor getDescriptor() {
- return info != null ? info : new TaglibInfo();
- }
-
- /**
- * @return Returns the location.
- */
- public IPath getLocation() {
- return location;
- }
-
- public int getRecordType() {
- return ITaglibRecord.JAR;
- }
-
- /**
- * @return Returns the recommended/default prefix if one was given.
- */
- public String getShortName() {
- if (info == null)
- return null;
- return info.shortName;
- }
-
- /**
- * @return Returns the uri.
- */
- public String getURI() {
- if (info == null)
- return null;
- return info.uri;
- }
-
- public Collection getURLRecords() {
- return urlRecords;
- }
-
- public String toString() {
- StringBuffer s = new StringBuffer("JarRecord: ");//$NON-NLS-1$
- s.append(location);
- if (urlRecords.size() > 0) {
- s.append('\n');//$NON-NLS-1$
- for (Iterator it = urlRecords.iterator(); it.hasNext();) {
- s.append(it.next());
- s.append('\n');//$NON-NLS-1$
- }
- }
- return s.toString();
- }
- }
-
- static class TagDirRecord implements ITagDirRecord {
- TaglibInfo info;
- IPath path;
- // a List holding Strings of .tag and .tagx filenames relative to the
- // tagdir's location
- List tags = new ArrayList(0);
-
- public boolean equals(Object obj) {
- if (!(obj instanceof TagDirRecord))
- return false;
- return ((TagDirRecord) obj).path.equals(path) && ((TagDirRecord) obj).info.equals(info);
- }
-
- public ITaglibDescriptor getDescriptor() {
- return info != null ? info : (info = new TaglibInfo());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.jsp.core.taglib.ITagDirRecord#getPath()
- */
- public IPath getPath() {
- return path;
- }
-
- public int getRecordType() {
- return ITaglibRecord.TAGDIR;
- }
-
- /**
- * @return Returns the tags.
- */
- public String[] getTagFilenames() {
- return (String[]) tags.toArray(new String[tags.size()]);
- }
-
- public String toString() {
- return "TagdirRecord: " + path + " <-> " + info.shortName; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * A brief representation of the information in a TLD.
- */
- static class TaglibInfo implements ITaglibDescriptor {
- // extract only when asked?
- String description = EMPTY_STRING;
- String displayName = EMPTY_STRING;
- String jspVersion = EMPTY_STRING;
- String largeIcon = EMPTY_STRING;
- String shortName = EMPTY_STRING;
- String smallIcon = EMPTY_STRING;
- String tlibVersion = EMPTY_STRING;
- String uri = EMPTY_STRING;
-
- public TaglibInfo() {
- super();
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof TaglibInfo))
- return false;
- return ((TaglibInfo) obj).jspVersion.equals(jspVersion) && ((TaglibInfo) obj).description.equals(description) && ((TaglibInfo) obj).largeIcon.equals(largeIcon) && ((TaglibInfo) obj).shortName.equals(shortName) && ((TaglibInfo) obj).smallIcon.equals(smallIcon) && ((TaglibInfo) obj).tlibVersion.equals(tlibVersion) && ((TaglibInfo) obj).uri.equals(uri);
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getDisplayName() {
- return displayName;
- }
-
- public String getJSPVersion() {
- return jspVersion;
- }
-
- public String getLargeIcon() {
- return largeIcon;
- }
-
- public String getShortName() {
- return shortName;
- }
-
- public String getSmallIcon() {
- return smallIcon;
- }
-
- public String getTlibVersion() {
- return tlibVersion;
- }
-
- public String getURI() {
- return uri;
- }
-
- public String toString() {
- return "TaglibInfo|" + uri + "|" + shortName + "|" + tlibVersion + "|" + smallIcon + "|" + largeIcon + "|" + jspVersion + "|" + description; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
- }
- }
-
- static class TLDRecord implements ITLDRecord {
- TaglibInfo info;
- IPath path;
-
- public boolean equals(Object obj) {
- if (!(obj instanceof TLDRecord))
- return false;
- return ((TLDRecord) obj).path.equals(path) && ((TLDRecord) obj).getURI().equals(getURI()) && ((((TLDRecord) obj).info == null && info == null) || ((TLDRecord) obj).info.equals(info));
- }
-
- public ITaglibDescriptor getDescriptor() {
- return info != null ? info : new TaglibInfo();
- }
-
- public IPath getPath() {
- return path;
- }
-
- public int getRecordType() {
- return ITaglibRecord.TLD;
- }
-
- public String getShortName() {
- if (info == null)
- return null;
- return info.shortName;
- }
-
- /**
- * @return Returns the uri.
- */
- public String getURI() {
- if (info == null)
- return null;
- return info.uri;
- }
-
- public String toString() {
- return "TLDRecord: " + getURI() + " <-> " + path; //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- static class URLRecord implements IURLRecord {
- String baseLocation;
- TaglibInfo info;
- /**
- * XXX: Possibly a problem if the owning jar is shared across
- * projects--this value helps determine visibility during enumeration
- * and resolution and may not be correct.
- */
- boolean isExported = true;
- URL url;
-
- public URLRecord() {
- super();
- }
-
- public boolean equals(Object obj) {
- if (!(obj instanceof URLRecord))
- return false;
- return ((URLRecord) obj).baseLocation.equals(baseLocation) && ((URLRecord) obj).url.equals(url) && ((URLRecord) obj).info.equals(info);
- }
-
- public int hashCode() {
- return baseLocation.hashCode() + url.hashCode() + (isExported ? 1 : 0);
- }
-
- public String getBaseLocation() {
- return baseLocation;
- }
-
- public ITaglibDescriptor getDescriptor() {
- return info != null ? info : new TaglibInfo();
- }
-
- public int getRecordType() {
- return ITaglibRecord.URL;
- }
-
- /**
- * @return Returns the recommended/default prefix if one was given.
- */
- public String getShortName() {
- if (info == null)
- return null;
- return info.shortName;
- }
-
- /**
- * @return Returns the uri.
- */
- public String getURI() {
- if (info == null)
- return EMPTY_STRING; //$NON-NLS-1$
- return info.uri;
- }
-
- /**
- * @return Returns the URL.
- */
- public URL getURL() {
- return url;
- }
-
- public String toString() {
- return "URLRecord: (exported=" + isExported + ") " + baseLocation + " <-> " + getURI(); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- static class WebXMLRecord {
- TaglibInfo info;
- IPath path;
- List tldRecords = new ArrayList(0);
-
- public boolean equals(Object obj) {
- if (!(obj instanceof WebXMLRecord))
- return false;
- return ((WebXMLRecord) obj).path.equals(path) && ((WebXMLRecord) obj).info.equals(info);
- }
-
- /**
- * @return Returns the recommended/default prefix if one was given.
- */
- public String getPrefix() {
- if (info == null)
- return null;
- return info.shortName;
- }
-
- /**
- *
- */
- public List getTLDRecords() {
- return tldRecords;
- }
-
- /**
- * @return Returns the webxml.
- */
- public IPath getWebXML() {
- return path;
- }
-
- public String toString() {
- StringBuffer s = new StringBuffer("WebXMLRecord: ");//$NON-NLS-1$
- s.append(path);
- if (tldRecords.size() > 0) {
- s.append('\n');//$NON-NLS-1$
- for (int i = 0; i < tldRecords.size(); i++) {
- s.append(tldRecords.get(i));
- s.append('\n');//$NON-NLS-1$
- }
- }
- return s.toString();
- }
- }
-
- private class TaglibSorter extends Sorter {
- TaglibSorter() {
- super();
- }
-
- Collator collator = Collator.getInstance();
-
- public boolean compare(Object elementOne, Object elementTwo) {
- /**
- * Returns true if elementTwo is 'greater than' elementOne This is
- * the 'ordering' method of the sort operation. Each subclass
- * overides this method with the particular implementation of the
- * 'greater than' concept for the objects being sorted.
- */
-
- return (collator.compare(getTaglibPath((ITaglibRecord) elementOne), getTaglibPath((ITaglibRecord) elementTwo))) < 0;
- }
-
- private String getTaglibPath(ITaglibRecord record) {
- switch(record.getRecordType()) {
- case ITaglibRecord.JAR:
- return ((JarRecord) record).getLocation().toString();
- case ITaglibRecord.TAGDIR:
- return ((TagDirRecord) record).getPath().toString();
- case ITaglibRecord.TLD:
- return ((TLDRecord) record).getPath().toString();
- case ITaglibRecord.URL:
- return ((URLRecord) record).getBaseLocation();
- default:
- return EMPTY_STRING; //$NON-NLS-1$
- }
- }
- }
-
- static boolean _debugIndexCreation = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/taglib/indexcreation")); //$NON-NLS-1$ //$NON-NLS-2$
- static boolean _debugIndexTime = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/taglib/indextime")); //$NON-NLS-1$ //$NON-NLS-2$
-
- private static final String BUILDPATH_DIRTY = "BUILDPATH_DIRTY"; //$NON-NLS-1$
- private static final String BUILDPATH_ENTRIES = "BUILDPATH_ENTRIES"; //$NON-NLS-1$
- private static final String BUILDPATH_PROJECT = "BUILDPATH_PROJECT"; //$NON-NLS-1$
- private static final String SAVE_FORMAT_VERSION = "Tag Library Index 1.1.0"; //$NON-NLS-1$
- private static final String WEB_INF = "WEB-INF"; //$NON-NLS-1$
- private static final IPath WEB_INF_PATH = new Path(WEB_INF);
- private static final String WEB_XML = "web.xml"; //$NON-NLS-1$
- private static final char[] TLD = { 't', 'T', 'l', 'L', 'd', 'D'} ;
-
- /**
- * Notes that the build path information is stale. Some operations can now
- * be skipped until a resolve/getAvailable call is made.
- */
- boolean fBuildPathIsDirty = false;
-
- /**
- * Count of entries on the build path. Primary use case is for classpath
- * containers that add an entry. Without notification (3.3), we can only
- * check after-the-fact.
- */
- int fBuildPathEntryCount = 0;
-
- /**
- * A cached copy of all of the records createable from the XMLCatalog.
- */
- private Collection fCatalogRecords;
-
- /*
- * Records active JARs on the classpath. Taglib descriptors should be
- * usable, but the jars by themselves are not.
- */
- Hashtable fClasspathJars;
-
- /**
- * A set of the projects that are in this project's build path.
- * Lookups/enumerations will be redirected to the corresponding
- * ProjectDescription instances
- */
- Set fClasspathProjects = null;
-
- // holds references by URI to JARs
- Hashtable fClasspathReferences;
-
- /*
- * this table is special in that it holds tables of references according
- * to local roots
- */
- Hashtable fImplicitReferences;
-
- Hashtable fJARReferences;
-
- IProject fProject;
-
- private String fSaveStateFilename;
-
- /**
- * String->ITaglibRecord
- */
- Hashtable fTagDirReferences;
-
- Hashtable fTLDReferences;
-
- IResourceDeltaVisitor fVisitor;
- Hashtable fWebXMLReferences;
-
- Map fPackageFragmentRootsAdded = new HashMap();
- Map fPackageFragmentRootsChanged = new HashMap();
- Map fPackageFragmentRootsRemoved = new HashMap();
-
- ILock LOCK = Job.getJobManager().newLock();
-
- private long time0;
-
- private TaglibSorter fTaglibSorter = new TaglibSorter();
- private BuildPathJob fBuildPathJob = new BuildPathJob();
-
- /** Shared JAR records between projects */
- private static final Map fSharedJarRecords = new Hashtable();
-
- ProjectDescription(IProject project, String saveStateFile) {
- super();
- fProject = project;
- fSaveStateFilename = saveStateFile;
-
- fClasspathJars = new Hashtable(0);
- fJARReferences = new Hashtable(0);
- fTagDirReferences = new Hashtable(0);
- fTLDReferences = new Hashtable(0);
- fWebXMLReferences = new Hashtable(0);
- fImplicitReferences = new Hashtable(0);
- fClasspathReferences = new Hashtable(0);
- fClasspathProjects = new HashSet();
-
- restoreReferences();
- }
-
- private Collection _getJSP11AndWebXMLJarReferences(Collection allJARs) {
- List collection = new ArrayList(allJARs.size());
- Iterator i = allJARs.iterator();
- while (i.hasNext()) {
- JarRecord record = (JarRecord) i.next();
- if (record.has11TLD || record.isMappedInWebXML) {
- collection.add(record);
- }
- }
- return collection;
- }
-
- /**
- * Adds the list of known references from this project's build path to the
- * map, appending any processed projects into the list to avoid
- * build-path-cycles.
- *
- * @see https://bugs.eclipse.org/bugs/show_bug.cgi?id=142408
- *
- * @param references -
- * the map of references to ITaglibRecords
- * @param projectsProcessed -
- * the list of projects already considered
- * @param exportedOnly -
- * Whether to only add references derived from exported build
- * path containers. This method calls itself recursively with
- * this parameter as false.
- */
- void addBuildPathReferences(Map references, List projectsProcessed, boolean exportedOnly) {
- ensureUpTodate();
-
- // Add the build path references that are exported from this project
- Enumeration keys = fClasspathReferences.keys();
- while (keys.hasMoreElements()) {
- Object key = keys.nextElement();
- URLRecord urlRecord = (URLRecord) fClasspathReferences.get(key);
- if (exportedOnly) {
- if (urlRecord.isExported) {
- references.put(key, urlRecord);
- }
- }
- else {
- references.put(key, urlRecord);
- }
- }
- IProject[] buildpathProjects = (IProject[]) fClasspathProjects.toArray(new IProject[fClasspathProjects.size()]);
- for (int i = 0; i < buildpathProjects.length; i++) {
- if (!projectsProcessed.contains(buildpathProjects[i]) && buildpathProjects[i].isAccessible()) {
- projectsProcessed.add(buildpathProjects[i]);
- ProjectDescription description = TaglibIndex.getInstance().createDescription(buildpathProjects[i]);
- description.addBuildPathReferences(references, projectsProcessed, true);
-
- /*
- * 199843 (183756) - JSP Validation Cannot Find Tag Library
- * Descriptor in Referenced Projects
- *
- * Add any TLD records having URI values from projects on the
- * build path
- */
- Map[] rootReferences = (Map[]) description.fImplicitReferences.values().toArray(new Map[description.fImplicitReferences.size()]);
- for (int j = 0; j < rootReferences.length; j++) {
- Iterator implicitRecords = rootReferences[j].values().iterator();
- while (implicitRecords.hasNext()) {
- ITaglibRecord record = (ITaglibRecord) implicitRecords.next();
- if (record.getRecordType() == ITaglibRecord.TLD && ((ITLDRecord) record).getURI() != null && ((ITLDRecord) record).getURI().length() > 0) {
- references.put(((ITLDRecord) record).getURI(), record);
- }
- }
- }
- }
- }
- }
-
- /**
- * Erases all known tables
- */
- void clear() {
- fClasspathJars = new Hashtable(0);
- fJARReferences = new Hashtable(0);
- fTagDirReferences = new Hashtable(0);
- fTLDReferences = new Hashtable(0);
- fWebXMLReferences = new Hashtable(0);
- fImplicitReferences = new Hashtable(0);
- fClasspathReferences = new Hashtable(0);
- }
-
- private void closeJarFile(ZipFile file) {
- if (file == null)
- return;
- try {
- file.close();
- }
- catch (IOException ioe) {
- // no cleanup can be done
- Logger.logException("TaglibIndex: Could not close zip file " + file.getName(), ioe); //$NON-NLS-1$
- }
- }
-
- /**
- * @param catalogEntry
- * a XML catalog entry pointing to a .jar or .tld file
- * @return a ITaglibRecord describing a TLD contributed to the XMLCatalog
- * if one was found at the given location, null otherwise
- */
- private ITaglibRecord createCatalogRecord(ICatalogEntry catalogEntry) {
- return createCatalogRecord(catalogEntry.getKey(), catalogEntry.getURI());
- }
-
- /**
- * @param uri -
- * the key value that will become the returned record's "URI"
- * @param urlString -
- * the string indicating where the TLD really is
- * @return a ITaglibRecord describing a TLD contributed to the XMLCatalog
- * if one was found at the given location, null otherwise
- */
- private ITaglibRecord createCatalogRecord(String uri, String urlString) {
- ITaglibRecord record = null;
- // handle "file:" URLs that point to a .jar file on disk (1.1 mode)
- if (urlString.toLowerCase(Locale.US).endsWith((".jar")) && urlString.startsWith("file:")) { //$NON-NLS-1$ //$NON-NLS-2$
- String fileLocation = null;
- try {
- URL url = new URL(urlString);
- fileLocation = url.getFile();
- }
- catch (MalformedURLException e) {
- // not worth reporting
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- if (fileLocation != null) {
- JarRecord jarRecord = createJARRecord(fileLocation);
- String[] entries = JarUtilities.getEntryNames(fileLocation);
- for (int jEntry = 0; jEntry < entries.length; jEntry++) {
- if (entries[jEntry].endsWith(".tld")) { //$NON-NLS-1$
- if (entries[jEntry].equals(JarUtilities.JSP11_TAGLIB)) {
- jarRecord.has11TLD = true;
- InputStream contents = JarUtilities.getInputStream(fileLocation, entries[jEntry]);
- if (contents != null) {
- TaglibInfo info = extractInfo(fileLocation, contents);
- /*
- * the record's reported URI should match the
- * catalog entry's "key" so replace the
- * detected value
- */
- info.uri = uri;
- jarRecord.info = info;
- try {
- contents.close();
- }
- catch (IOException e) {
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- }
- }
- }
- }
- if (jarRecord.has11TLD) {
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "created catalog record for " + urlString + "@" + jarRecord.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
- record = jarRecord;
- }
-
- }
- }
- // The rest are URLs into a plug-in...somewhere
- else {
- URL url = null;
- InputStream tldStream = null;
- try {
- url = new URL(urlString);
- tldStream = JarUtilities.getInputStream(url);
- }
- catch (Exception e1) {
- Logger.logException("Exception reading TLD contributed to the XML Catalog", e1);
- }
-
- if (tldStream != null) {
- URLRecord urlRecord = null;
- TaglibInfo info = extractInfo(urlString, tldStream);
- if (info != null) {
- /*
- * the record's reported URI should match the catalog
- * entry's "key" so replace the detected value
- */
- info.uri = uri;
- urlRecord = new URLRecord();
- urlRecord.info = info;
- urlRecord.baseLocation = urlString;
- urlRecord.url = url; //$NON-NLS-1$ //$NON-NLS-2$
- }
- try {
- tldStream.close();
- }
- catch (IOException e) {
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- record = urlRecord;
- }
- }
- return record;
- }
-
- /**
- * @param resource
- * @return
- */
- private JarRecord createJARRecord(IResource jar) {
- IPath location = jar.getLocation();
- JarRecord jarRecord = null;
- if (location != null) {
- jarRecord = createJARRecord(location.toString());
- }
- else if (jar.getLocationURI() != null) {
- jarRecord = createJARRecord(jar.getLocationURI().toString());
- }
- return jarRecord;
- }
-
- private JarRecord createJARRecord(String fileLocation) {
- synchronized (fSharedJarRecords) {
- JarRecord record = (JarRecord) fSharedJarRecords.get(fileLocation);
- if (record == null) {
- record = new JarRecord();
- record.info = new TaglibInfo();
- record.location = new Path(fileLocation);
- record.urlRecords = new HashSet(0);
- fSharedJarRecords.put(fileLocation, record);
- }
- return record;
- }
- }
-
- /**
- * @return
- */
- private TagDirRecord createTagdirRecord(IFolder tagdir) {
- IPath tagdirPath = tagdir.getFullPath();
- TagDirRecord record = new TagDirRecord();
- record.path = tagdir.getFullPath();
- record.info = new TaglibInfo();
- // 8.4.3
- if (tagdir.getName().equals("tags")) //$NON-NLS-1$
- record.info.shortName = "tags"; //$NON-NLS-1$
- else {
- boolean determined = false;
- IPath path = tagdirPath;
- String[] segments = path.segments();
- for (int i = 1; i < segments.length; i++) {
- if (segments[i - 1].equals("WEB-INF") && segments[i].equals("tags")) { //$NON-NLS-1$ //$NON-NLS-2$
- IPath tagdirLocalPath = path.removeFirstSegments(i + 1);
- record.info.shortName = StringUtils.replace(tagdirLocalPath.toString(), "/", "-");
- determined = true;
- }
- }
- if (!determined) {
- record.info.shortName = StringUtils.replace(tagdirPath.toString(), "/", "-");
- }
- }
- // 8.4.3
- record.info.tlibVersion = "1.0";
- record.info.description = EMPTY_STRING;
- record.info.displayName = EMPTY_STRING;
- record.info.smallIcon = EMPTY_STRING;
- record.info.largeIcon = EMPTY_STRING;
-
- try {
- IResource[] tagfiles = tagdir.members();
- for (int i = 0; i < tagfiles.length; i++) {
- if (tagfiles[i].getType() != IResource.FILE)
- continue;
- String extension = tagfiles[i].getFileExtension();
- if (extension != null && (extension.equals("tag") || extension.equals("tagx"))) {
- record.tags.add(tagfiles[i].getName());
- }
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
-
- return record;
- }
-
- /**
- * @param resource
- * @return
- */
- private TLDRecord createTLDRecord(IResource tld) {
- TLDRecord record = new TLDRecord();
- record.path = tld.getFullPath();
- InputStream contents = null;
- try {
- if (tld.isAccessible()) {
- contents = ((IFile) tld).getContents();
- String basePath = tld.getFullPath().toString();
- TaglibInfo info = extractInfo(basePath, contents);
- if (info != null) {
- record.info = info;
- }
- }
- }
- catch (CoreException e) {
- // out of sync
- }
- finally {
- try {
- if (contents != null) {
- contents.close();
- }
- }
- catch (IOException e) {
- // ignore
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- }
- return record;
- }
-
- /**
- * Creates a TLDRecord from a File.
- *
- * @param tld the tld File
- * @return
- */
- private TLDRecord createTLDRecord(File tld) {
- TLDRecord record = new TLDRecord();
- record.path = new Path(tld.getAbsolutePath());
- InputStream contents = null;
- try {
- if (tld.exists()) {
- contents = new FileInputStream(tld);
- String basePath = tld.getAbsolutePath();
- TaglibInfo info = extractInfo(basePath, contents);
- if (info != null) {
- record.info = info;
- }
- }
- }
- catch (FileNotFoundException e) {
- }
- finally {
- try {
- if (contents != null) {
- contents.close();
- }
- }
- catch (IOException e) {
- // ignore
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- }
- return record;
- }
-
- private void ensureUpTodate() {
- IClasspathEntry[] entries = null;
- try {
- /*
- * If the Java nature isn't present (or something else is
- * wrong), don't check the build path.
- */
- IJavaProject jproject = JavaCore.create(fProject);
- if (jproject != null && jproject.exists()) {
- entries = jproject.getResolvedClasspath(true);
- }
- }
- catch (JavaModelException e) {
- Logger.logException(e);
- }
- if (entries != null) {
- try {
- LOCK.acquire();
- /*
- * Double-check that the number of build path entries has not
- * changed. This should cover most cases such as when a
- * library is added into or removed from a container.
- */
- fBuildPathIsDirty = fBuildPathIsDirty || (fBuildPathEntryCount != entries.length);
-
- if (fBuildPathIsDirty) {
- indexClasspath(entries);
- fBuildPathIsDirty = false;
- }
- else {
- PackageFragmentRootDelta[] removes = (PackageFragmentRootDelta[]) fPackageFragmentRootsRemoved.values().toArray(new PackageFragmentRootDelta[fPackageFragmentRootsRemoved.size()]);
- for (int i = 0; i < removes.length; i++) {
- handleElementChanged(removes[i].elementPath, removes[i].deltaKind, removes[i].isExported);
- }
- PackageFragmentRootDelta[] changes = (PackageFragmentRootDelta[]) fPackageFragmentRootsChanged.values().toArray(new PackageFragmentRootDelta[fPackageFragmentRootsChanged.size()]);
- for (int i = 0; i < changes.length; i++) {
- handleElementChanged(changes[i].elementPath, changes[i].deltaKind, changes[i].isExported);
- }
- PackageFragmentRootDelta[] adds = (PackageFragmentRootDelta[]) fPackageFragmentRootsAdded.values().toArray(new PackageFragmentRootDelta[fPackageFragmentRootsAdded.size()]);
- for (int i = 0; i < adds.length; i++) {
- handleElementChanged(adds[i].elementPath, adds[i].deltaKind, adds[i].isExported);
- }
- fPackageFragmentRootsRemoved.clear();
- fPackageFragmentRootsChanged.clear();
- fPackageFragmentRootsAdded.clear();
- }
- }
- finally {
- LOCK.release();
- }
- }
- }
-
- private TaglibInfo extractInfo(String basePath, InputStream tldContents) {
- TaglibInfo info = new TaglibInfo();
- if (tldContents != null) {
- DocumentProvider provider = new DocumentProvider();
- provider.setInputStream(tldContents);
- provider.setValidating(false);
- provider.setRootElementName(JSP12TLDNames.TAGLIB);
- provider.setBaseReference(basePath);
- Node child = provider.getRootElement();
- if (child == null || child.getNodeType() != Node.ELEMENT_NODE || !child.getNodeName().equals(JSP12TLDNames.TAGLIB)) {
- return null;
- }
- child = child.getFirstChild();
- while (child != null) {
- if (child.getNodeType() == Node.ELEMENT_NODE) {
- if (child.getNodeName().equals(JSP12TLDNames.URI)) {
- info.uri = getTextContents(child);
- }
- else if (child.getNodeName().equals(JSP12TLDNames.SHORT_NAME) || child.getNodeName().equals(JSP11TLDNames.SHORTNAME)) {
- info.shortName = getTextContents(child);
- }
- else if (child.getNodeName().equals(JSP12TLDNames.DESCRIPTION) || child.getNodeName().equals(JSP11TLDNames.INFO)) {
- info.description = getTextContents(child);
- }
- else if (child.getNodeName().equals(JSP12TLDNames.DISPLAY_NAME)) {
- info.displayName = getTextContents(child);
- }
- else if (child.getNodeName().equals(JSP12TLDNames.JSP_VERSION) || child.getNodeName().equals(JSP11TLDNames.JSPVERSION)) {
- info.jspVersion = getTextContents(child);
- }
- else if (child.getNodeName().equals(JSP12TLDNames.TLIB_VERSION) || child.getNodeName().equals(JSP11TLDNames.TLIBVERSION)) {
- info.tlibVersion = getTextContents(child);
- }
- else if (child.getNodeName().equals(JSP12TLDNames.SMALL_ICON)) {
- info.smallIcon = getTextContents(child);
- }
- else if (child.getNodeName().equals(JSP12TLDNames.LARGE_ICON)) {
- info.largeIcon = getTextContents(child);
- }
- }
- child = child.getNextSibling();
- }
- }
- return info;
- }
-
- List getAvailableTaglibRecords(IPath path) {
- ensureUpTodate();
- Collection records = null;
- try {
- float jspVersion = DeploymentDescriptorPropertyCache.getInstance().getJSPVersion(path);
- LOCK.acquire();
-
- Collection implicitReferences = new HashSet(getImplicitReferences(path.toString()).values());
- records = new HashSet(fTLDReferences.size() + fTagDirReferences.size() + fJARReferences.size() + fWebXMLReferences.size());
- records.addAll(fTLDReferences.values());
- if (jspVersion >= 1.1) {
- records.addAll(_getJSP11AndWebXMLJarReferences(fJARReferences.values()));
- }
-
- if (jspVersion >= 1.2) {
- records.addAll(implicitReferences);
-
- Map buildPathReferences = new HashMap();
- List projectsProcessed = new ArrayList(fClasspathProjects.size() + 1);
- projectsProcessed.add(fProject);
- addBuildPathReferences(buildPathReferences, projectsProcessed, false);
- records.addAll(buildPathReferences.values());
-
- if(path.segmentCount() > 1) {
- records.addAll(new HashSet(getImplicitReferences(fProject.getFullPath().toString()).values()));
- }
- }
- if (jspVersion >= 2.0) {
- records.addAll(fTagDirReferences.values());
- }
-
- IPath localWebXML = new Path(getLocalRoot(path.toString())).append("/WEB-INF/web.xml"); //$NON-NLS-1$
- WebXMLRecord webxmlRecord = (WebXMLRecord) fWebXMLReferences.get(localWebXML.toString());
- if(webxmlRecord != null)
- records.addAll(webxmlRecord.getTLDRecords());
-
- records.addAll(getCatalogRecords());
- }
- finally {
- LOCK.release();
- }
- return new ArrayList(records);
- }
-
- /**
- * Provides a stream to a local copy of the input or null if not possible
- */
- private InputStream getCachedInputStream(ZipFile zipFile, ZipEntry zipEntry) {
- InputStream cache = null;
- if (zipFile != null) {
- if (zipEntry != null) {
- InputStream entryInputStream = null;
- try {
- entryInputStream = zipFile.getInputStream(zipEntry);
- }
- catch (IOException ioExc) {
- Logger.logException("Taglib Index: " + zipFile.getName(), ioExc); //$NON-NLS-1$
- }
-
- if (entryInputStream != null) {
- int c;
- ByteArrayOutputStream buffer = null;
- if (zipEntry.getSize() > 0) {
- buffer = new ByteArrayOutputStream((int) zipEntry.getSize());
- }
- else {
- buffer = new ByteArrayOutputStream();
- }
- // array dim restriction?
- byte bytes[] = new byte[2048];
- try {
- while ((c = entryInputStream.read(bytes)) >= 0) {
- buffer.write(bytes, 0, c);
- }
- cache = new ByteArrayInputStream(buffer.toByteArray());
- }
- catch (IOException ioe) {
- // no cleanup can be done
- Logger.log(Logger.ERROR_DEBUG, null, ioe);
- }
- finally {
- try {
- entryInputStream.close();
- }
- catch (IOException e) {
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- }
- }
- }
- }
-
- return cache;
- }
-
- private Collection getCatalogRecords() {
- if (fCatalogRecords == null) {
- List records = new ArrayList();
- ICatalog defaultCatalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
- if (defaultCatalog != null) {
- // Process default catalog
- ICatalogEntry[] entries = defaultCatalog.getCatalogEntries();
- for (int entry = 0; entry < entries.length; entry++) {
- ITaglibRecord record = createCatalogRecord(entries[entry]);
- records.add(record);
- }
-
- // Process declared OASIS nextCatalogs catalog
- INextCatalog[] nextCatalogs = defaultCatalog.getNextCatalogs();
- for (int nextCatalog = 0; nextCatalog < nextCatalogs.length; nextCatalog++) {
- ICatalog catalog = nextCatalogs[nextCatalog].getReferencedCatalog();
- ICatalogEntry[] entries2 = catalog.getCatalogEntries();
- for (int entry = 0; entry < entries2.length; entry++) {
- String uri = entries2[entry].getURI();
- if (uri != null) {
- uri = uri.toLowerCase(Locale.US);
- if (uri.endsWith((".jar")) || uri.endsWith((".tld"))) {
- ITaglibRecord record = createCatalogRecord(entries2[entry]);
- if (record != null) {
- records.add(record);
- }
- }
- }
- }
- }
- }
- fCatalogRecords = records;
- }
- return fCatalogRecords;
- }
-
- /**
- * @return Returns the implicitReferences for the given path
- */
- Hashtable getImplicitReferences(String path) {
- String localRoot = getLocalRoot(path);
- Hashtable implicitReferences = (Hashtable) fImplicitReferences.get(localRoot);
- if (implicitReferences == null) {
- implicitReferences = new ArrayMap(1);
- fImplicitReferences.put(localRoot, implicitReferences);
- }
- return implicitReferences;
- }
-
- /**
- * @param basePath
- * @return the applicable Web context root path, if one exists
- * @deprecated - does not support flexible project layouts
- */
- IPath getLocalRoot(IPath basePath) {
- IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
-
- // existing workspace resources - this is the 93% case
- IResource file = FileBuffers.getWorkspaceFileAtLocation(basePath);
-
- // Try the base path as a folder first
- if (file == null && basePath.segmentCount() > 1) {
- file = workspaceRoot.getFolder(basePath);
- }
- // If not a folder, then try base path as a file
- if (file != null && !file.exists() && basePath.segmentCount() > 1) {
- file = workspaceRoot.getFile(basePath);
- }
-
- if (file == null && basePath.segmentCount() == 1) {
- file = workspaceRoot.getProject(basePath.segment(0));
- }
-
- if (file == null) {
- /*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=116529
- *
- * This method produces a less accurate result, but doesn't
- * require that the file exist yet.
- */
- IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(basePath);
- if (files.length > 0)
- file = files[0];
- }
-
- while (file != null) {
- /**
- * Treat any parent folder with a WEB-INF subfolder as a web-app
- * root
- */
- IContainer folder = null;
- if ((file.getType() & IResource.FOLDER) != 0) {
- folder = (IContainer) file;
- }
- else {
- folder = file.getParent();
- }
- // getFolder on a workspace root must use a full path, skip
- if (folder != null && (folder.getType() & IResource.ROOT) == 0) {
- IFolder webinf = folder.getFolder(WEB_INF_PATH);
- if (webinf != null && webinf.exists()) {
- return folder.getFullPath();
- }
- }
- file = file.getParent();
- }
-
- return fProject.getFullPath();
- }
-
- /**
- * @param basePath
- * @return
- */
- private String getLocalRoot(String basePath) {
- return getLocalRoot(new Path(basePath)).toString();
- }
-
- private String getTextContents(Node parent) {
- NodeList children = parent.getChildNodes();
- if (children.getLength() == 1) {
- Node child = children.item(0);
- if (child.getNodeValue() != null)
- return child.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 if (child.getNodeValue() != null) {
- s.append(child.getNodeValue().trim());
- }
- child = child.getNextSibling();
- }
- return s.toString().trim();
- }
-
- /**
- * @return Returns the visitor.
- */
- IResourceDeltaVisitor getVisitor() {
- if (fVisitor == null) {
- fVisitor = new DeltaVisitor();
- }
- return fVisitor;
- }
-
- void handleElementChanged(IPath libraryPath, int deltaKind, boolean exported) {
- IFile file = libraryPath.segmentCount() > 1 ? ResourcesPlugin.getWorkspace().getRoot().getFile(libraryPath) : null;
- String libraryLocation = null;
- if (file != null && file.isAccessible() && file.getLocation() != null)
- libraryLocation = file.getLocation().toString();
- else
- libraryLocation = libraryPath.toString();
- updateClasspathLibrary(libraryLocation, deltaKind, exported);
- }
-
- void handleElementChanged(IJavaElementDelta delta) {
- if (fBuildPathIsDirty) {
- return;
- }
-
- // Logger.log(Logger.INFO_DEBUG, "IJavaElementDelta: " + delta);
- IJavaElement element = delta.getElement();
- if (element.getElementType() == IJavaElement.JAVA_PROJECT) {
- IJavaElementDelta[] affectedChildren = delta.getAffectedChildren();
- for (int i = 0; i < affectedChildren.length; i++) {
- handleElementChanged(affectedChildren[i]);
- }
- }
- if (element.getElementType() == IJavaElement.PACKAGE_FRAGMENT_ROOT && ((IPackageFragmentRoot) element).isArchive()) {
- time0 = System.currentTimeMillis();
- if (element.getElementType() == IJavaElement.PACKAGE_FRAGMENT_ROOT && ((IPackageFragmentRoot) element).isExternal()) {
- }
- String libLocation = null;
- int taglibRecordEventKind = -1;
- if ((delta.getFlags() & IJavaElementDelta.F_ADDED_TO_CLASSPATH) > 0 || (delta.getFlags() & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) > 0 || (delta.getFlags() & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) > 0) {
- taglibRecordEventKind = ITaglibIndexDelta.CHANGED;
- if ((delta.getFlags() & IJavaElementDelta.F_ADDED_TO_CLASSPATH) > 0) {
- taglibRecordEventKind = ITaglibIndexDelta.ADDED;
- }
- else if ((delta.getFlags() & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) > 0) {
- taglibRecordEventKind = ITaglibIndexDelta.CHANGED;
- }
- else if ((delta.getFlags() & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) > 0) {
- taglibRecordEventKind = ITaglibIndexDelta.REMOVED;
- }
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(element.getPath());
- if (file.isAccessible() && file.getLocation() != null)
- libLocation = file.getLocation().toString();
- else
- libLocation = element.getPath().toString();
- }
- if (libLocation != null) {
- boolean fragmentisExported = true;
- try {
- IClasspathEntry rawClasspathEntry = ((IPackageFragmentRoot) element).getRawClasspathEntry();
- /*
- * null may also be returned for deletions depending on
- * resource/build path notification order. If it's null,
- * it's been deleted and whether it's exported won't
- * really matter
- */
- if (rawClasspathEntry != null) {
- fragmentisExported = rawClasspathEntry.isExported();
- }
- }
- catch (JavaModelException e) {
- // IPackageFragmentRoot not part of the build path
- }
- if ((delta.getFlags() & IJavaElementDelta.F_ADDED_TO_CLASSPATH) > 0) {
- fBuildPathEntryCount++;
- }
- else if ((delta.getFlags() & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) > 0) {
- fBuildPathEntryCount--;
- }
- updateClasspathLibrary(libLocation, taglibRecordEventKind, fragmentisExported);
- }
- if (_debugIndexTime)
- Logger.log(Logger.INFO, "processed build path delta for " + fProject.getName() + "(" + element.getPath() + ") in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
-
- void index() {
- time0 = System.currentTimeMillis();
-
- fTLDReferences.clear();
- fJARReferences.clear();
- fTagDirReferences.clear();
- fWebXMLReferences.clear();
-
- try {
- fProject.accept(new Indexer(), IResource.NONE);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
-
- if (_debugIndexTime)
- Logger.log(Logger.INFO, "indexed " + fProject.getName() + " contents in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- void indexClasspath(IClasspathEntry[] entries) {
- if (_debugIndexTime)
- time0 = System.currentTimeMillis();
- fClasspathProjects.clear();
- fClasspathReferences.clear();
- fClasspathJars.clear();
-
- fBuildPathEntryCount = entries.length;
- for (int i = 0; i < entries.length; i++) {
- indexClasspath(entries[i]);
- }
-
- if (_debugIndexTime)
- Logger.log(Logger.INFO, "indexed " + fProject.getName() + " classpath in " + (System.currentTimeMillis() - time0) + "ms"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
-
- /**
- * Index a directory looking for TLDs.
- * @param file
- * @param isExported
- */
- private void indexDirectory(File file, boolean isExported) {
- if (file.exists()) {
- if (file.isDirectory()) {
- final File[] files = file.listFiles();
- for (int i = 0; i < files.length; i++) {
- indexDirectory(files[i], isExported);
- }
- }
- else {
- if (file.getName().endsWith(".tld")) { //$NON-NLS-1$
- updateTLD(file.getAbsolutePath(), createTLDRecord(file), ITaglibIndexDelta.ADDED);
- }
- }
- }
- }
-
- /**
- * @param entry
- */
- private void indexClasspath(IClasspathEntry entry) {
- switch (entry.getEntryKind()) {
- case IClasspathEntry.CPE_CONTAINER : {
- IClasspathContainer container = (IClasspathContainer) entry;
- IClasspathEntry[] containedEntries = container.getClasspathEntries();
- for (int i = 0; i < containedEntries.length; i++) {
- indexClasspath(containedEntries[i]);
- }
- }
- break;
- case IClasspathEntry.CPE_LIBRARY : {
- /*
- * Ignore libs in required projects that are not exported
- */
- IPath libPath = entry.getPath();
- if (!fClasspathJars.containsKey(libPath.toString())) {
- final File file = libPath.toFile();
- if (file.exists()) {
- if (file.isDirectory()) {
- indexDirectory(file, entry.isExported());
- }
- else {
- updateClasspathLibrary(libPath.toString(), ITaglibIndexDelta.ADDED, entry.isExported());
- }
- }
- else {
- /*
- * Note: .jars on the classpath inside of the project
- * will have duplicate entries in the JAR references
- * table that will e returned to
- * getAvailableTaglibRecords().
- */
- IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(libPath);
- if (resource != null && resource.isAccessible()) {
- if (resource.getType() == IResource.FILE) {
- if (resource.getLocation() != null) {
- updateClasspathLibrary(resource.getLocation().toString(), ITaglibIndexDelta.ADDED, entry.isExported());
- }
- }
- else if (resource.getType() == IResource.FOLDER) {
- try {
- resource.accept(new Indexer(), 0);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- }
- }
- }
- }
- break;
- case IClasspathEntry.CPE_PROJECT : {
- /*
- * We're currently ignoring whether the project exports all of
- * its build path
- */
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(entry.getPath().lastSegment());
- if (project != null) {
- fClasspathProjects.add(project);
- }
- }
- break;
- case IClasspathEntry.CPE_SOURCE : {
- IPath path = entry.getPath();
- try {
- IResource sourceFolder = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
- // could be a bad .classpath file
- if(sourceFolder != null) {
- sourceFolder.accept(new Indexer(), 0);
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- break;
- case IClasspathEntry.CPE_VARIABLE : {
- IPath libPath = JavaCore.getResolvedVariablePath(entry.getPath());
- if (libPath != null) {
- File file = libPath.toFile();
-
- // file in filesystem
- if (file.exists() && !file.isDirectory()) {
- updateClasspathLibrary(libPath.toString(), ITaglibRecordEvent.ADDED, entry.isExported());
- }
- else {
- // workspace file
- IFile jarFile = ResourcesPlugin.getWorkspace().getRoot().getFile(libPath);
- if (jarFile.isAccessible() && jarFile.getType() == IResource.FILE && jarFile.getLocation() != null) {
- String jarPathString = jarFile.getLocation().toString();
- updateClasspathLibrary(jarPathString, ITaglibRecordEvent.ADDED, entry.isExported());
- }
- }
- }
- }
- break;
- }
- }
-
- /*
- * private void removeClasspathLibrary(String libraryLocation) { JarRecord
- * record = (JarRecord) fClasspathJars.remove(libraryLocation); if (record !=
- * null) { URLRecord[] records = (URLRecord[])
- * record.getURLRecords().toArray(new URLRecord[0]); for (int i = 0; i <
- * records.length; i++) {
- * fClasspathReferences.remove(records[i].getURI()); }
- * TaglibIndex.fireTaglibRecordEvent(new TaglibRecordEvent(record,
- * ITaglibIndexDelta.REMOVED)); } }
- */
-
- void queueElementChanged(IJavaElementDelta delta) {
- try {
- LOCK.acquire();
- IJavaElement element = delta.getElement();
- if (element.getElementType() == IJavaElement.JAVA_PROJECT) {
- IJavaElementDelta[] affectedChildren = delta.getAffectedChildren();
- for (int i = 0; i < affectedChildren.length; i++) {
- queueElementChanged(affectedChildren[i]);
- }
- }
- if (element.getElementType() == IJavaElement.PACKAGE_FRAGMENT_ROOT && ((IPackageFragmentRoot) element).isArchive()) {
- IPath path = element.getPath();
- boolean fragmentisExported = true;
- try {
- IClasspathEntry rawClasspathEntry = ((IPackageFragmentRoot) element).getRawClasspathEntry();
- /*
- * null may also be returned for deletions depending on
- * resource/build path notification order. If it's null,
- * it's been deleted and whether it's exported won't
- * really matter
- */
- if (rawClasspathEntry != null) {
- fragmentisExported = rawClasspathEntry.isExported();
- }
- }
- catch (JavaModelException e) {
- // IPackageFragmentRoot not part of the build path
- }
- String key = path.toString();
- if ((delta.getFlags() & IJavaElementDelta.F_ADDED_TO_CLASSPATH) > 0) {
- fPackageFragmentRootsAdded.put(key, new PackageFragmentRootDelta(path, ITaglibIndexDelta.ADDED, fragmentisExported));
- fPackageFragmentRootsChanged.remove(key);
- fPackageFragmentRootsRemoved.remove(key);
- fBuildPathEntryCount++;
- }
- else if ((delta.getFlags() & IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED) > 0) {
- fPackageFragmentRootsChanged.put(key, new PackageFragmentRootDelta(path, ITaglibIndexDelta.CHANGED, fragmentisExported));
- }
- else if ((delta.getFlags() & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) > 0) {
- fPackageFragmentRootsAdded.remove(key);
- fPackageFragmentRootsChanged.remove(key);
- fPackageFragmentRootsRemoved.put(key, new PackageFragmentRootDelta(path, ITaglibIndexDelta.REMOVED, fragmentisExported));
- fBuildPathEntryCount--;
- }
- }
- }
- finally {
- LOCK.release();
- }
-
- fBuildPathJob.cancel();
- fBuildPathJob.schedule(2000);
- }
-
-
- private String readTextofChild(Node node, String childName) {
- NodeList children = node.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- if (child.getNodeType() == Node.ELEMENT_NODE && child.getNodeName().equals(childName)) {
- return getTextContents(child);
- }
- }
- return EMPTY_STRING; //$NON-NLS-1$
- }
-
- void removeJAR(IResource jar) {
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "removing records for JAR " + jar.getFullPath()); //$NON-NLS-1$
- JarRecord record = (JarRecord) fJARReferences.remove(jar.getFullPath().toString());
- if (record != null) {
- URLRecord[] records = (URLRecord[]) record.getURLRecords().toArray(new URLRecord[0]);
- for (int i = 0; i < records.length; i++) {
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, records[i], ITaglibIndexDelta.REMOVED));
- ((ArrayMap) getImplicitReferences(jar.getFullPath().toString())).remove(records[i].getURI(), records[i]);
- }
- if (record.has11TLD) {
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, ITaglibIndexDelta.REMOVED));
- }
- }
- }
-
- void removeTag(IResource resource) {
- TagDirRecord record = (TagDirRecord) fTagDirReferences.get(resource.getParent().getFullPath().toString());
- if (record != null) {
- record.tags.remove(resource.getName());
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, ITaglibIndexDelta.CHANGED));
- }
- }
-
- void removeTagDir(IResource tagdir) {
- IPath tagdirPath = tagdir.getFullPath();
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "removing record for " + tagdirPath); //$NON-NLS-1$
- ITaglibRecord record = (ITaglibRecord) fTagDirReferences.remove(tagdirPath.toString());
- if (record != null) {
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, ITaglibIndexDelta.REMOVED));
- }
- }
-
- void removeTLD(IResource tld) {
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "removing record for " + tld.getFullPath()); //$NON-NLS-1$
- TLDRecord record = (TLDRecord) fTLDReferences.remove(tld.getFullPath().toString());
- if (record != null) {
- if (record.getURI() != null) {
- ((ArrayMap) getImplicitReferences(tld.getFullPath().toString())).remove(record.getURI(), record);
- }
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, ITaglibIndexDelta.REMOVED));
- }
- }
-
- void removeWebXML(IResource webxml) {
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "removing records for " + webxml.getFullPath()); //$NON-NLS-1$
- WebXMLRecord record = (WebXMLRecord) fWebXMLReferences.remove(webxml.getFullPath().toString());
- if (record != null) {
- TLDRecord[] records = (TLDRecord[]) record.getTLDRecords().toArray(new TLDRecord[0]);
- for (int i = 0; i < records.length; i++) {
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "removed record for " + records[i].getURI() + "@" + records[i].path); //$NON-NLS-1$ //$NON-NLS-2$
- ((ArrayMap) getImplicitReferences(webxml.getFullPath().toString())).remove(records[i].getURI(), records[i]);
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, records[i], ITaglibIndexDelta.REMOVED));
- }
- }
- }
-
- private boolean requestedRefresh() {
- boolean requested = false;
- String[] commandLineArgs = Platform.getCommandLineArgs();
- for (int i = 0; i < commandLineArgs.length; i++) {
- requested = requested || "-refresh".equals(commandLineArgs[i]); //$NON-NLS-1$
- }
- return requested;
- }
-
- /**
- * @param basePath
- * @param reference
- * @return
- */
- ITaglibRecord resolve(String basePath, String reference) {
- ensureUpTodate();
-
- ITaglibRecord record = null;
- String path = null;
- try {
- float jspVersion = DeploymentDescriptorPropertyCache.getInstance().getJSPVersion(new Path(basePath));
-
- /**
- * http://bugs.eclipse.org/196177 - Support resolution in flexible
- * projects
- */
- IPath resourcePath = FacetModuleCoreSupport.resolve(new Path(basePath), reference);
- if (resourcePath.segmentCount() > 1) {
- String fileExtension = resourcePath.getFileExtension();
- if (fileExtension != null && fileExtension.toLowerCase(Locale.US).equals("tld")) { //$NON-NLS-1$
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(resourcePath);
- if (file.isAccessible()) {
- path = resourcePath.toString();
- }
- }
- else if (fileExtension != null && fileExtension.toLowerCase(Locale.US).equals("jar")) { //$NON-NLS-1$
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(resourcePath);
- if (file.isAccessible()) {
- path = resourcePath.toString();
- }
- }
- else {
- IFolder folder = ResourcesPlugin.getWorkspace().getRoot().getFolder(resourcePath);
- if (folder.isAccessible()) {
- path = resourcePath.toString();
- }
- }
- }
-
- LOCK.acquire();
-
- String localRoot = getLocalRoot(basePath);
- /**
- * Workaround for problem in URIHelper; uris starting with '/' are
- * returned as-is.
- */
- if (path == null) {
- if (reference.startsWith("/")) { //$NON-NLS-1$
- path = localRoot + reference;
- }
- else {
- path = URIHelper.normalize(reference, basePath, localRoot);
- }
- }
-
- IPath localWebXML = new Path(localRoot).append("/WEB-INF/web.xml"); //$NON-NLS-1$
- WebXMLRecord webxmlRecord = (WebXMLRecord) fWebXMLReferences.get(localWebXML.toString());
- if (webxmlRecord != null) {
- for (int i = 0; i < webxmlRecord.tldRecords.size(); i++) {
- ITaglibRecord record2 = (ITaglibRecord) webxmlRecord.tldRecords.get(i);
- ITaglibDescriptor descriptor = record2.getDescriptor();
- if (reference.equals(descriptor.getURI())) {
- record = record2;
- }
- }
- }
-
- if (record == null) {
- // order dictated by JSP spec 2.0 section 7.2.3
- record = (ITaglibRecord) fJARReferences.get(path);
-
- // only if 1.1 TLD was found
- if (jspVersion < 1.1 || (record instanceof JarRecord && !((JarRecord) record).has11TLD)) {
- record = null;
- }
- }
-
- if (record == null) {
- record = (ITaglibRecord) fTLDReferences.get(path);
- }
- if (record == null && jspVersion >= 1.2) {
- Object[] records = (Object[]) getImplicitReferences(basePath).get(reference);
- if (records != null && records.length > 0) {
- if (records.length > 1)
- records = fTaglibSorter.sort(records);
- record = (ITaglibRecord) records[records.length - 1];
- }
- }
-
-
- if (record == null && jspVersion >= 2.0) {
- record = (ITaglibRecord) fTagDirReferences.get(path);
- }
-
- if (record == null && jspVersion >= 1.2) {
- record = (ITaglibRecord) fClasspathReferences.get(reference);
- }
- if (record == null && jspVersion >= 1.2) {
- Map buildPathReferences = new HashMap();
- List projectsProcessed = new ArrayList(fClasspathProjects.size() + 1);
- projectsProcessed.add(fProject);
- addBuildPathReferences(buildPathReferences, projectsProcessed, false);
- record = (ITaglibRecord) buildPathReferences.get(reference);
- }
-
- // Check the XML Catalog
- if (record == null) {
- ICatalog catalog = XMLCorePlugin.getDefault().getDefaultXMLCatalog();
- if (catalog != null) {
- String resolvedString = null;
- try {
- // Check as system reference first
- resolvedString = catalog.resolveSystem(reference);
- // Check as URI
- if (resolvedString == null || resolvedString.trim().length() == 0) {
- resolvedString = catalog.resolveURI(reference);
- }
- // Check as public ID
- if (resolvedString == null || resolvedString.trim().length() == 0) {
- resolvedString = catalog.resolvePublic(reference, basePath);
- }
- }
- catch (Exception e) {
- Logger.logException(e);
- }
- if (resolvedString != null && resolvedString.trim().length() > 0) {
- record = createCatalogRecord(reference, resolvedString);
- }
- }
- }
-
- /*
- * If no records were found and no local-root applies, check ALL
- * of the web.xml files as a fallback
- */
- if (record == null && fProject.getFullPath().toString().equals(localRoot)) {
- WebXMLRecord[] webxmls = (WebXMLRecord[]) fWebXMLReferences.values().toArray(new WebXMLRecord[0]);
- for (int i = 0; i < webxmls.length; i++) {
- if (record != null)
- continue;
- Object[] records = (Object[]) getImplicitReferences(webxmls[i].path.toString()).get(reference);
- if (records != null && records.length > 0) {
- if (records.length > 1)
- records = fTaglibSorter.sort(records);
- record = (ITaglibRecord) records[records.length - 1];
- }
- }
- }
- /*
- * If no records were found, check the implicit references on the project itself as a fallback
- */
- if (record == null && jspVersion >= 1.2) {
- Object[] records = (Object[]) getImplicitReferences(fProject.getFullPath().toString()).get(reference);
- if (records != null && records.length > 0) {
- if (records.length > 1)
- records = fTaglibSorter.sort(records);
- record = (ITaglibRecord) records[records.length - 1];
- }
- }
-
- }
- finally {
- LOCK.release();
- }
-
- return record;
- }
-
- /**
- * Restores any saved reference tables
- */
- private void restoreReferences() {
- final boolean notifyOnRestoration = true;
- if (TaglibIndex.ENABLED) {
- // resources first
- index();
- // now build path
-
- // ================ test reload time ========================
- boolean restored = false;
- File savedState = new File(fSaveStateFilename);
- if (savedState.exists() && !requestedRefresh()) {
- Reader reader = null;
- try {
- time0 = System.currentTimeMillis();
- reader = new InputStreamReader(new BufferedInputStream(new FileInputStream(savedState)), "UTF-16"); //$NON-NLS-1$
- // use a string buffer temporarily to reduce string
- // creation
- StringBuffer buffer = new StringBuffer();
- char array[] = new char[2048];
- int charsRead = 0;
- while ((charsRead = reader.read(array)) != -1) {
- if (charsRead > 0) {
- buffer.append(array, 0, charsRead);
- }
- }
-
- IDocument doc = new org.eclipse.jface.text.Document();
- doc.set(buffer.toString());
- int lines = doc.getNumberOfLines();
- if (lines > 0) {
- IRegion line = doc.getLineInformation(0);
- String lineText = doc.get(line.getOffset(), line.getLength());
- JarRecord libraryRecord = null;
- if (SAVE_FORMAT_VERSION.equals(lineText.trim())) {
- IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
-
- for (int i = 1; i < lines && !fBuildPathIsDirty; i++) {
- line = doc.getLineInformation(i);
- lineText = doc.get(line.getOffset(), line.getLength());
- StringTokenizer toker = new StringTokenizer(lineText, "|"); //$NON-NLS-1$
- if (toker.hasMoreTokens()) {
- String tokenType = toker.nextToken();
- if ("JAR".equalsIgnoreCase(tokenType)) { //$NON-NLS-1$ //$NON-NLS-2$
- boolean has11TLD = Boolean.valueOf(toker.nextToken()).booleanValue();
- boolean exported = Boolean.valueOf(toker.nextToken()).booleanValue();
- // make the rest the libraryLocation
- String libraryLocation = toker.nextToken();
- while (toker.hasMoreTokens()) {
- libraryLocation = libraryLocation + "|" + toker.nextToken(); //$NON-NLS-1$ //$NON-NLS-2$
- }
- libraryLocation = libraryLocation.trim();
- if (libraryRecord != null && notifyOnRestoration) {
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, libraryRecord, ITaglibIndexDelta.ADDED));
- }
- // Create a new JarRecord
- libraryRecord = createJARRecord(libraryLocation);
- libraryRecord.has11TLD = has11TLD;
- libraryRecord.isExported = exported;
-
- // Add a URLRecord for the 1.1 TLD
- if (has11TLD) {
- InputStream contents = JarUtilities.getInputStream(libraryLocation, JarUtilities.JSP11_TAGLIB);
- if (contents != null) {
- TaglibInfo info = extractInfo(libraryLocation, contents);
-
- if (info != null && info.uri != null && info.uri.length() > 0) {
- URLRecord urlRecord = new URLRecord();
- urlRecord.info = info;
- urlRecord.isExported = exported;
- urlRecord.baseLocation = libraryLocation;
- try {
- urlRecord.url = new URL("jar:file:" + libraryLocation + "!/" + JarUtilities.JSP11_TAGLIB); //$NON-NLS-1$ //$NON-NLS-2$
- libraryRecord.urlRecords.add(urlRecord);
- fClasspathReferences.put(urlRecord.getURI(), urlRecord);
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "created record for " + urlRecord.getURI() + "@" + urlRecord.getURL()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (MalformedURLException e) {
- /*
- * don't record this
- * URI
- */
- Logger.logException(e);
- }
- }
- try {
- contents.close();
- }
- catch (IOException e) {
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- }
- }
-
- fClasspathJars.put(libraryLocation, libraryRecord);
- }
- else if ("URL".equalsIgnoreCase(tokenType) && libraryRecord != null) { //$NON-NLS-1$
- // relies on a previously declared JAR record
- boolean exported = Boolean.valueOf(toker.nextToken()).booleanValue();
- // make the rest the URL
- String urlString = toker.nextToken();
- while (toker.hasMoreTokens()) {
- urlString = urlString + "|" + toker.nextToken(); //$NON-NLS-1$ //$NON-NLS-2$
- }
- urlString = urlString.trim();
- // Append a URLrecord
- URLRecord urlRecord = new URLRecord();
- urlRecord.url = new URL(urlString);
- urlRecord.isExported = exported;
- urlRecord.baseLocation = libraryRecord.location.toString();
-
- InputStream tldStream = JarUtilities.getInputStream(urlRecord.url);
- if(tldStream != null) {
- TaglibInfo info = extractInfo(urlRecord.url.toString(), tldStream);
- if (info != null) {
- urlRecord.info = info;
- }
- libraryRecord.urlRecords.add(urlRecord);
- try {
- tldStream.close();
- }
- catch (IOException e) {
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- if (urlRecord.getURI() != null && urlRecord.getURI().length() > 0) {
- fClasspathReferences.put(urlRecord.getURI(), urlRecord);
- }
- }
- }
- else if (BUILDPATH_PROJECT.equalsIgnoreCase(tokenType)) {
- String projectName = toker.nextToken();
- if (Path.ROOT.isValidSegment(projectName)) {
- IProject project = workspaceRoot.getProject(projectName);
- /* do not check if "open" here */
- if (project != null) {
- fClasspathProjects.add(project);
- }
- }
- }
- // last since they occur once
- else if (BUILDPATH_DIRTY.equalsIgnoreCase(tokenType)) {
- fBuildPathIsDirty = Boolean.valueOf(toker.nextToken()).booleanValue();
- }
- else if (BUILDPATH_ENTRIES.equalsIgnoreCase(tokenType)) {
- fBuildPathEntryCount = Integer.valueOf(toker.nextToken()).intValue();
- }
- }
- if (libraryRecord != null && notifyOnRestoration) {
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, libraryRecord, ITaglibIndexDelta.ADDED));
- }
- }
- restored = true;
- }
- else {
- Logger.log(Logger.INFO_DEBUG, "Tag Library Index: different cache format found, was \"" + lineText + "\", supports \"" + SAVE_FORMAT_VERSION + "\", reindexing build path"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- if (_debugIndexTime)
- Logger.log(Logger.INFO, "time spent reloading " + fProject.getName() + " build path: " + (System.currentTimeMillis() - time0)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (Exception e) {
- restored = false;
- if (_debugIndexTime)
- Logger.log(Logger.INFO, "failure reloading " + fProject.getName() + " build path index", e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- finally {
- if (reader != null) {
- try {
- reader.close();
- }
- catch (IOException e) {
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- }
- }
- }
-
- // ================ test reload time (end) ==================
-
-
- if (!restored) {
- setBuildPathIsDirty();
- }
- }
- }
-
- /**
- * Saves any storable references to disk. This is only called when the
- * description is being cleared and not after every update.
- */
- void saveReferences() {
- // the build path information is out of date, remember that
- time0 = System.currentTimeMillis();
- Writer writer = null;
-
- /**
- * <pre>
- * 1.1.0
- * Save classpath information (| is field delimiter)
- * Jars are saved as &quot;JAR:&quot;+ has11TLD + jar path
- * URLRecords as &quot;URL:&quot;+URL
- * </pre>
- */
- try {
- writer = new OutputStreamWriter(new FileOutputStream(fSaveStateFilename), "UTF-16"); //$NON-NLS-1$
- writer.write(SAVE_FORMAT_VERSION);
- writer.write('\n'); //$NON-NLS-1$
- writer.write(BUILDPATH_DIRTY + "|" + fBuildPathIsDirty); //$NON-NLS-1$
- writer.write('\n'); //$NON-NLS-1$
- writer.write(BUILDPATH_ENTRIES + "|" + fBuildPathEntryCount); //$NON-NLS-1$
- writer.write('\n'); //$NON-NLS-1$
-
- IProject[] projects = (IProject[]) fClasspathProjects.toArray(new IProject[0]);
- for (int i = 0; i < projects.length; i++) {
- writer.write(BUILDPATH_PROJECT);
- writer.write("|"); //$NON-NLS-1$
- writer.write(projects[i].getName());
- writer.write('\n'); //$NON-NLS-1$
- }
-
- Enumeration jars = fClasspathJars.keys();
- while (jars.hasMoreElements()) {
- String jarPath = jars.nextElement().toString();
- JarRecord jarRecord = (JarRecord) fClasspathJars.get(jarPath);
- writer.write("JAR|"); //$NON-NLS-1$
- writer.write(Boolean.toString(jarRecord.has11TLD));
- writer.write('|'); //$NON-NLS-1$
- writer.write(Boolean.toString(jarRecord.isExported));
- writer.write('|'); //$NON-NLS-1$
- writer.write(jarPath);
- writer.write('\n'); //$NON-NLS-1$
- Iterator i = jarRecord.urlRecords.iterator();
- while (i.hasNext()) {
- URLRecord urlRecord = (URLRecord) i.next();
- writer.write("URL|"); //$NON-NLS-1$
- writer.write(String.valueOf(urlRecord.isExported));
- writer.write("|"); //$NON-NLS-1$
- writer.write(urlRecord.getURL().toExternalForm());
- writer.write('\n'); //$NON-NLS-1$
- }
- }
- }
- catch (IOException e) {
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- finally {
- try {
- if (writer != null) {
- writer.close();
- }
- }
- catch (Exception e) {
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- }
-
- if (_debugIndexTime)
- Logger.log(Logger.INFO, "time spent saving index for " + fProject.getName() + ": " + (System.currentTimeMillis() - time0)); //$NON-NLS-1$
- }
-
- void setBuildPathIsDirty() {
- fBuildPathIsDirty = true;
- if (_debugIndexTime)
- Logger.log(Logger.INFO, "marking build path information for " + fProject.getName() + " as dirty"); //$NON-NLS-1$
- }
-
- /**
- * Update records for a library on the project build path
- * @param libraryLocation
- * @param deltaKind
- * @param isExported
- */
- void updateClasspathLibrary(String libraryLocation, int deltaKind, boolean isExported) {
- JarRecord libraryRecord = null;
- if (deltaKind == ITaglibIndexDelta.REMOVED || deltaKind == ITaglibIndexDelta.CHANGED) {
- libraryRecord = (JarRecord) fClasspathJars.remove(libraryLocation);
- synchronized (fSharedJarRecords) {
- fSharedJarRecords.remove(libraryLocation);
- }
- if (libraryRecord != null) {
- IURLRecord[] urlRecords = (IURLRecord[]) libraryRecord.urlRecords.toArray(new IURLRecord[0]);
- for (int i = 0; i < urlRecords.length; i++) {
- ITaglibRecord record = (ITaglibRecord) fClasspathReferences.remove(urlRecords[i].getURI());
- if (record != null) {
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, ITaglibIndexDelta.REMOVED));
- }
- }
- }
- }
- if (deltaKind == ITaglibIndexDelta.ADDED || deltaKind == ITaglibIndexDelta.CHANGED) {
- // XXX: runs on folders as well?!
- libraryRecord = createJARRecord(libraryLocation);
- synchronized (libraryRecord) {
- if (libraryRecord.isConsistent) {
- // Library loaded by another Project Description, initialize our references from the existing
- fClasspathJars.put(libraryLocation, libraryRecord);
- Iterator records = libraryRecord.urlRecords.iterator();
- while (records.hasNext()) {
- URLRecord record = (URLRecord)records.next();
- int urlDeltaKind = ITaglibIndexDelta.ADDED;
- if (fClasspathReferences.containsKey(record.getURI())) {
- urlDeltaKind = ITaglibIndexDelta.CHANGED;
- }
- fClasspathReferences.put(record.getURI(), record);
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, urlDeltaKind));
- fClasspathReferences.put(record.info.uri, record);
- }
- return;
- }
- libraryRecord.isExported = isExported;
- fClasspathJars.put(libraryLocation, libraryRecord);
-
- ZipFile jarfile = null;
- try {
- jarfile = new ZipFile(libraryLocation);
- Enumeration entries = jarfile.entries();
- while (entries.hasMoreElements()) {
- ZipEntry z = (ZipEntry) entries.nextElement();
- if (!z.isDirectory()) {
- if (isTLD(z.getName())) {
- if (z.getName().equals(JarUtilities.JSP11_TAGLIB)) {
- libraryRecord.has11TLD = true;
- }
- InputStream contents = getCachedInputStream(jarfile, z);
- if (contents != null) {
- TaglibInfo info = extractInfo(libraryLocation, contents);
-
- if (info != null && info.uri != null && info.uri.length() > 0) {
- URLRecord urlRecord = new URLRecord();
- urlRecord.info = info;
- urlRecord.baseLocation = libraryLocation;
- try {
- urlRecord.isExported = isExported;
- urlRecord.url = new URL("jar:file:" + libraryLocation + "!/" + z.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- libraryRecord.urlRecords.add(urlRecord);
- int urlDeltaKind = ITaglibIndexDelta.ADDED;
- if (fClasspathReferences.containsKey(urlRecord.getURI())) {
- // TODO: not minimized enough
- urlDeltaKind = ITaglibIndexDelta.CHANGED;
- }
- fClasspathReferences.put(urlRecord.getURI(), urlRecord);
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, urlRecord, urlDeltaKind));
- fClasspathReferences.put(info.uri, urlRecord);
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "created record for " + urlRecord.getURI() + "@" + urlRecord.getURL()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (MalformedURLException e) {
- // don't record this URI
- Logger.logException(e);
- }
- }
- try {
- contents.close();
- }
- catch (IOException e) {
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- }
- }
- }
- }
- }
- catch (ZipException zExc) {
- Logger.log(Logger.WARNING, "Taglib Index ZipException: " + libraryLocation + " " + zExc.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (IOException ioExc) {
- Logger.log(Logger.WARNING, "Taglib Index IOException: " + libraryLocation + " " + ioExc.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- finally {
- closeJarFile(jarfile);
- }
- libraryRecord.isConsistent = true;
- }
- }
- if (libraryRecord != null) {
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, libraryRecord, deltaKind));
- }
- }
-
- private boolean isTLD(String name) {
- if (name == null)
- return false;
-
- final int length = name.length();
-
- if (length < 4)
- return false;
- if (name.charAt(length - 4) != '.')
- return false;
-
- for (int i = length - 3, j = 0; i < length; i++, j++) {
- final char c = name.charAt(i);
- if (c != TLD[2*j] && c != TLD[2*j + 1])
- return false;
- }
- return true;
- }
-
- void updateJAR(IResource jar, int deltaKind) {
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "creating records for JAR " + jar.getFullPath()); //$NON-NLS-1$
-
- String jarLocationString = null;
- if (jar.getLocation() != null)
- jarLocationString = jar.getLocation().toString();
- else
- jarLocationString = jar.getLocationURI().toString();
- JarRecord jarRecord = createJARRecord(jar);
- fJARReferences.put(jar.getFullPath().toString(), jarRecord);
- ZipInputStream zip = getZipInputStream(jar);
- if(zip != null) {
- try {
- ZipEntry entry;
- while ((entry = zip.getNextEntry()) != null) {
- if (isTLD(entry.getName())) { //$NON-NLS-1$
- if (entry.getName().equals(JarUtilities.JSP11_TAGLIB)) {
- jarRecord.has11TLD = true;
- }
- InputStream contents = copyZipEntry(zip);
- if (contents != null) {
- TaglibInfo info = extractInfo(jarLocationString, contents);
-
- if (info != null && info.uri != null && info.uri.length() > 0) {
- URLRecord record = new URLRecord();
- record.info = info;
- record.baseLocation = jarLocationString;
- try {
- record.url = new URL("jar:file:" + jarLocationString + "!/" + entry.getName()); //$NON-NLS-1$ //$NON-NLS-2$
- jarRecord.urlRecords.add(record);
-
- int taglibDeltaKind = ITaglibIndexDelta.ADDED;
- Hashtable table = getImplicitReferences(jar.getFullPath().toString());
- if (table != null && table.get(record.getURI()) != null) {
- taglibDeltaKind = ITaglibIndexDelta.CHANGED;
- }
-
- getImplicitReferences(jar.getFullPath().toString()).put(info.uri, record);
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, taglibDeltaKind));
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "created record for " + record.getURI() + "@" + record.getURL()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- catch (MalformedURLException e) {
- // don't record this URI
- Logger.logException(e);
- }
- }
- try {
- contents.close();
- }
- catch (IOException e) {
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- }
- else {
- Logger.log(Logger.ERROR_DEBUG, getClass().getName() + "could not read resource " + jar.getFullPath()); //$NON-NLS-1$
- }
- }
- }
- } catch (IOException e) { }
- finally {
- closeInputStream(zip);
- }
- }
- if (jarRecord.has11TLD) {
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, jarRecord, deltaKind));
- }
- }
-
- private InputStream copyZipEntry(ZipInputStream stream) {
- ByteArrayOutputStream buffer = new ByteArrayOutputStream();
- InputStream copy = null;
-
- if (stream != null) {
- int c;
- // array dim restriction?
- byte bytes[] = new byte[2048];
- try {
- while ((c = stream.read(bytes)) >= 0) {
- buffer.write(bytes, 0, c);
- }
- copy = new ByteArrayInputStream(buffer.toByteArray());
- closeZipEntry(stream);
- }
- catch (IOException ioe) {
- // no cleanup can be done
- }
- }
- return copy;
- }
-
- private ZipInputStream getZipInputStream(IResource jar) {
- if (jar == null || jar.getType() != IResource.FILE || !jar.isAccessible())
- return null;
-
- try {
- InputStream zipStream = ((IFile) jar).getContents();
- return new ZipInputStream(zipStream);
- } catch (CoreException e) { }
- return null;
- }
-
- private void closeInputStream(InputStream stream) {
- if (stream != null) {
- try {
- stream.close();
- } catch (IOException e) { }
- }
-
- }
-
- private void closeZipEntry(ZipInputStream zis) {
- if (zis != null) {
- try {
- zis.closeEntry();
- } catch (IOException e) {
- System.out.println("Error");
- }
- }
-
- }
-
- void updateTag(IResource resource, int kind) {
- TagDirRecord record = (TagDirRecord) fTagDirReferences.get(resource.getParent().getFullPath().toString());
- if (record == null) {
- record = createTagdirRecord((IFolder) resource.getParent());
- fTagDirReferences.put(resource.getParent().getFullPath().toString(), record);
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, ITaglibIndexDelta.ADDED));
- }
- else {
- if (!record.tags.contains(resource.getName())) {
- record.tags.add(resource.getName());
- }
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, ITaglibIndexDelta.CHANGED));
- }
- }
-
- void updateTagDir(IResource tagdirResource, int deltaKind) {
- /**
- * 8.4.1: tag files are loose files under /WEB-INF/tags
- */
- if ((tagdirResource.getType() & IResource.FOLDER) != 0) {
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "creating record for directory " + tagdirResource.getFullPath()); //$NON-NLS-1$
- TagDirRecord record = (TagDirRecord) fTagDirReferences.get(tagdirResource.getFullPath().toString());
- if (record == null) {
- record = createTagdirRecord((IFolder) tagdirResource);
- fTagDirReferences.put(tagdirResource.getFullPath().toString(), record);
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, deltaKind));
- }
- else {
-
- }
- }
- /**
- * 8.4.1: tag files can also be packaged in the /META-INF/tags folder
- * of a jar in /WEB-INF/lib/ (8.4.2: but must be mentioned in a .tld)
- */
- else {
- // these tags are merely surfaced when the TLD is modelled
- }
- }
-
- void updateTLD(String fullpath, TLDRecord record, int deltaKind) {
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "creating record for " + fullpath); //$NON-NLS-1$
- fTLDReferences.put(fullpath, record);
- if (record.getURI() != null && record.getURI().length() > 0) {
- getImplicitReferences(fullpath).put(record.getURI(), record);
- }
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, deltaKind));
- }
-
- /**
- *
- * @param tld
- * @param deltaKind
- */
- void updateTLD(IResource tld, int deltaKind) {
- updateTLD(tld.getFullPath().toString(), createTLDRecord(tld), deltaKind);
- }
-
- void updateWebXML(IResource webxml, int deltaKind) {
- if (webxml.getType() != IResource.FILE)
- return;
- InputStream webxmlContents = null;
- Document document = null;
- try {
- webxmlContents = ((IFile) webxml).getContents(false);
- DocumentProvider provider = new DocumentProvider();
- provider.setInputStream(webxmlContents);
- provider.setValidating(false);
- provider.setRootElementName("web-app"); //$NON-NLS-1$
- provider.setBaseReference(webxml.getParent().getFullPath().toString());
- document = provider.getDocument(false);
- }
- catch (CoreException e) {
- Logger.log(Logger.ERROR_DEBUG, EMPTY_STRING, e); //$NON-NLS-1$
- }
- finally {
- if (webxmlContents != null)
- try {
- webxmlContents.close();
- }
- catch (IOException e1) {
- // ignore
- Logger.log(Logger.ERROR_DEBUG, null, e1);
- }
- }
- if (document == null)
- return;
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "creating records for " + webxml.getFullPath()); //$NON-NLS-1$
-
- WebXMLRecord webxmlRecord = new WebXMLRecord();
- webxmlRecord.path = webxml.getFullPath();
- fWebXMLReferences.put(webxmlRecord.getWebXML().toString(), webxmlRecord);
- NodeList taglibs = document.getElementsByTagName(JSP12TLDNames.TAGLIB);
- for (int iTaglib = 0; iTaglib < taglibs.getLength(); iTaglib++) {
- String taglibUri = readTextofChild(taglibs.item(iTaglib), "taglib-uri").trim(); //$NON-NLS-1$
- // specified location is relative to root of the web-app
- String taglibLocation = readTextofChild(taglibs.item(iTaglib), "taglib-location").trim(); //$NON-NLS-1$
- IPath path = null;
- if (taglibLocation.startsWith("/")) { //$NON-NLS-1$
- path = FacetModuleCoreSupport.resolve(new Path(webxml.getFullPath().toString()), taglibLocation);
- }
- else {
- path = new Path(URIHelper.normalize(taglibLocation, webxml.getFullPath().toString(), getLocalRoot(webxml.getFullPath().toString())));
- }
- if (path.segmentCount() > 1) {
- IFile resource = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- if (resource.isAccessible()) {
- ITaglibRecord record = null;
- /*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=125960
- *
- * Also support mappings to .jar files
- */
- if ("jar".equalsIgnoreCase(resource.getFileExtension())) { //$NON-NLS-1$
- JarRecord jarRecord = createJARRecord(resource);
- String[] entries = JarUtilities.getEntryNames(resource);
- for (int jEntry = 0; jEntry < entries.length; jEntry++) {
- if (entries[jEntry].endsWith(".tld")) { //$NON-NLS-1$
- if (entries[jEntry].equals(JarUtilities.JSP11_TAGLIB)) {
- jarRecord.has11TLD = true;
- InputStream contents = JarUtilities.getInputStream(resource, entries[jEntry]);
- if (contents != null) {
- TaglibInfo info = extractInfo(resource.getFullPath().toString(), contents);
- jarRecord.info = info;
- try {
- contents.close();
- }
- catch (IOException e) {
- Logger.log(Logger.ERROR_DEBUG, null, e);
- }
- }
- }
- }
- }
- record = jarRecord;
- // the stored URI should reflect the web.xml's value
- if (jarRecord.info == null) {
- jarRecord.info = new TaglibInfo();
- }
- jarRecord.info.uri = taglibUri;
- jarRecord.isMappedInWebXML = true;
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "created web.xml record for " + taglibUri + "@" + jarRecord.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- TLDRecord tldRecord = createTLDRecord(resource);
- record = tldRecord;
- // the stored URI should reflect the web.xml's value
- if (tldRecord.info != null) {
- tldRecord.info.uri = taglibUri;
- }
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "created web.xml record for " + taglibUri + "@" + tldRecord.getPath()); //$NON-NLS-1$ //$NON-NLS-2$
- }
- if (record != null) {
- webxmlRecord.tldRecords.add(record);
- getImplicitReferences(webxml.getFullPath().toString()).put(taglibUri, record);
- TaglibIndex.getInstance().addDelta(new TaglibIndexDelta(fProject, record, deltaKind));
- }
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java
deleted file mode 100644
index 8ff14e5ac8..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndex.java
+++ /dev/null
@@ -1,1027 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2011 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.taglib;
-
-import java.io.File;
-import java.lang.ref.Reference;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.zip.CRC32;
-
-import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-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.IWorkspaceRoot;
-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.core.runtime.jobs.ILock;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jdt.core.ElementChangedEvent;
-import org.eclipse.jdt.core.IElementChangedListener;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaElementDelta;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
-import org.eclipse.wst.sse.core.internal.util.AbstractMemoryListener;
-import org.osgi.framework.Bundle;
-import org.osgi.service.event.Event;
-
-/**
- * A non-extendable index manager for taglibs similar to the previous J2EE
- * ITaglibRegistry but lacking any ties to project natures. Each record
- * returned from the index represents a single tag library descriptor.
- *
- * Indexing is only persisted between sessions for entries on the Java Build
- * Path. New ADD events will be sent to ITaglibIndexListeners during each
- * workbench session for both cached and newly found records. REMOVE events
- * are not fired on workbench shutdown. The record's contents should be
- * examined for any further information.
- *
- * @since 1.0
- */
-public final class TaglibIndex {
- class ClasspathChangeListener implements IElementChangedListener {
- List projectsIndexed = new ArrayList(1);
-
- public void elementChanged(ElementChangedEvent event) {
- if (!isIndexAvailable())
- return;
- try {
- LOCK.acquire();
- if (_debugEvents) {
- Logger.log(Logger.INFO, "TaglibIndex responding to:" + event); //$NON-NLS-1$
- }
- projectsIndexed.clear();
- elementChanged(event.getDelta(), true);
- fireCurrentDelta(event);
- }
- finally {
- LOCK.release();
- }
- }
-
- private void elementChanged(IJavaElementDelta delta, boolean forceUpdate) {
- if (frameworkIsShuttingDown())
- return;
-
- IJavaElement element = delta.getElement();
- if (element.getElementType() == IJavaElement.JAVA_MODEL) {
- IJavaElementDelta[] changed = delta.getAffectedChildren();
- for (int i = 0; i < changed.length; i++) {
- elementChanged(changed[i], forceUpdate);
- }
- }
- // Handle any changes at the project level
- else if (element.getElementType() == IJavaElement.JAVA_PROJECT) {
- if ((delta.getFlags() & IJavaElementDelta.F_CLASSPATH_CHANGED) != 0) {
- IJavaElement proj = element;
- handleClasspathChange((IJavaProject) proj, delta, forceUpdate);
- }
- else {
- IJavaElementDelta[] deltas = delta.getAffectedChildren();
- if (deltas.length == 0) {
- if (delta.getKind() == IJavaElementDelta.REMOVED || (delta.getFlags() & IJavaElementDelta.F_CLOSED) != 0) {
- /*
- * If the project is being deleted or closed, just
- * remove the description
- */
- IJavaProject proj = (IJavaProject) element;
- ProjectDescription description = (ProjectDescription) fProjectDescriptions.remove(proj.getProject());
- if (description != null) {
- if (_debugIndexCreation) {
- Logger.log(Logger.INFO, "removing index of " + description.fProject.getName()); //$NON-NLS-1$
- }
- // removing the index file ensures that we
- // don't get stale data if the project is
- // reopened
- removeIndexFile(proj.getProject());
- }
- }
- }
- /*
- * (else) Without the classpath changing, there's nothing
- * else to do
- */
- else {
- for (int i = 0; i < deltas.length; i++) {
- elementChanged(deltas[i], false);
- }
- }
- }
- }
- /*
- * Other modification to the classpath (such as within a classpath
- * container like "Web App Libraries") go to the description
- * itself
- */
- else if ((delta.getFlags() & IJavaElementDelta.F_ADDED_TO_CLASSPATH) != 0 || (delta.getFlags() & IJavaElementDelta.F_REMOVED_FROM_CLASSPATH) != 0) {
- IJavaProject affectedProject = element.getJavaProject();
- if (affectedProject != null) {
- /*
- * If the affected project has an index on-disk, it's
- * going to be invalid--we need to create/load the
- * description so it will be up to date [loading now and
- * updating is usually faster than regenerating the entire
- * index]. If there is no index on disk, do nothing more.
- */
- File indexFile = new File(computeIndexLocation(affectedProject.getProject().getFullPath()));
- if (indexFile.exists()) {
- ProjectDescription affectedDescription = createDescription(affectedProject.getProject());
- if (affectedDescription != null) {
- affectedDescription.handleElementChanged(delta);
- }
- }
- projectsIndexed.add(affectedProject.getProject());
- }
- }
- }
-
- private void handleClasspathChange(IJavaProject project, IJavaElementDelta delta, boolean forceUpdate) {
- if (frameworkIsShuttingDown())
- return;
-
- try {
- /* Handle large changes to this project's build path */
- IResource resource = project.getCorrespondingResource();
- if (resource.getType() == IResource.PROJECT && !projectsIndexed.contains(resource)) {
- /*
- * Use get instead of create since the downstream
- * (upstream?) project wasn't itself modified.
- */
- ProjectDescription description = null;
- if (forceUpdate) {
- description = createDescription((IProject) resource);
- }
- else {
- description = getDescription((IProject) resource);
- }
- if (description != null && !frameworkIsShuttingDown()) {
- projectsIndexed.add(resource);
- description.queueElementChanged(delta);
- }
- }
- }
- catch (JavaModelException e) {
- Logger.logException(e);
- }
- }
- }
-
- class ResourceChangeListener implements IResourceChangeListener {
- public void resourceChanged(IResourceChangeEvent event) {
- if (!isIndexAvailable())
- return;
- try {
- LOCK.acquire();
- if (_debugEvents) {
- Logger.log(Logger.INFO, "TaglibIndex responding to:" + event + "\n" + event.getDelta()); //$NON-NLS-2$ //$NON-NLS-1$
- }
- switch (event.getType()) {
- case IResourceChangeEvent.PRE_CLOSE :
- case IResourceChangeEvent.PRE_DELETE : {
- try {
- // pair deltas with projects
- IResourceDelta[] deltas = new IResourceDelta[]{event.getDelta()};
- IProject[] projects = null;
-
- if (deltas.length > 0) {
- IResource resource = null;
- if (deltas[0] != null) {
- resource = deltas[0].getResource();
- }
- else {
- resource = event.getResource();
- }
-
- if (resource != null) {
- if (resource.getType() == IResource.ROOT) {
- deltas = deltas[0].getAffectedChildren();
- projects = new IProject[deltas.length];
- for (int i = 0; i < deltas.length; i++) {
- if (deltas[i].getResource().getType() == IResource.PROJECT) {
- projects[i] = (IProject) deltas[i].getResource();
- }
- }
- }
- else {
- projects = new IProject[1];
- if (resource.getType() != IResource.PROJECT) {
- projects[0] = resource.getProject();
- }
- else {
- projects[0] = (IProject) resource;
- }
- }
- }
- if (projects != null) {
- for (int i = 0; i < projects.length; i++) {
- if (_debugIndexCreation) {
- Logger.log(Logger.INFO, "TaglibIndex noticed " + projects[i].getName() + " is about to be deleted/closed"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- ProjectDescription description = (ProjectDescription) fProjectDescriptions.remove(projects[i]);
- if (description != null) {
- if (_debugIndexCreation) {
- Logger.log(Logger.INFO, "removing index of " + description.fProject.getName()); //$NON-NLS-1$
- }
- description.clear();
- }
- }
- }
- }
- }
- catch (Exception e) {
- Logger.logException("Exception while processing resource deletion", e); //$NON-NLS-1$
- }
- }
- case IResourceChangeEvent.POST_CHANGE : {
- try {
- // pair deltas with projects
- IResourceDelta[] deltas = new IResourceDelta[]{event.getDelta()};
- IProject[] projects = null;
-
- if (deltas.length > 0) {
- IResource resource = null;
- if (deltas[0] != null) {
- resource = deltas[0].getResource();
- }
- else {
- resource = event.getResource();
- }
-
- if (resource != null) {
- if (resource.getType() == IResource.ROOT) {
- deltas = deltas[0].getAffectedChildren();
- projects = new IProject[deltas.length];
- for (int i = 0; i < deltas.length; i++) {
- if (deltas[i].getResource().getType() == IResource.PROJECT) {
- projects[i] = (IProject) deltas[i].getResource();
- }
- }
- }
- else {
- projects = new IProject[1];
- if (resource.getType() != IResource.PROJECT) {
- projects[0] = resource.getProject();
- }
- else {
- projects[0] = (IProject) resource;
- }
- }
- }
- if (projects != null) {
- for (int i = 0; i < projects.length; i++) {
- try {
- if (deltas[i] != null && deltas[i].getKind() != IResourceDelta.REMOVED && projects[i].isAccessible()) {
- ProjectDescription description = getDescription(projects[i]);
- if (description != null && !frameworkIsShuttingDown()) {
- deltas[i].accept(description.getVisitor());
- }
- }
- if (!projects[i].isAccessible() || (deltas[i] != null && deltas[i].getKind() == IResourceDelta.REMOVED)) {
- if (_debugIndexCreation) {
- Logger.log(Logger.INFO, "TaglibIndex noticed " + projects[i].getName() + " was removed or is no longer accessible"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- ProjectDescription description = (ProjectDescription) fProjectDescriptions.remove(projects[i]);
- if (description != null) {
- if (_debugIndexCreation) {
- Logger.log(Logger.INFO, "removing index of " + description.fProject.getName()); //$NON-NLS-1$
- }
- description.clear();
- }
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- }
- }
- }
- catch (Exception e) {
- Logger.logException("Exception while processing resource change", e); //$NON-NLS-1$
- }
- }
- }
-
- fireCurrentDelta(event);
- }
- finally {
- LOCK.release();
- }
- }
- }
-
- /**
- * <p>A {@link AbstractMemoryListener} that clears the {@link ProjectDescription} cache
- * whenever specific memory events are received.</p>
- *
- * <p>Events:
- * <ul>
- * <li>{@link AbstractMemoryListener#SEV_SERIOUS}</li>
- * <li>{@link AbstractMemoryListener#SEV_CRITICAL}</li>
- * </ul>
- * </p>
- */
- private class MemoryListener extends AbstractMemoryListener {
- /**
- * <p>Constructor causes this listener to listen for specific memory events.</p>
- * <p>Events:
- * <ul>
- * <li>{@link AbstractMemoryListener#SEV_SERIOUS}</li>
- * <li>{@link AbstractMemoryListener#SEV_CRITICAL}</li>
- * </ul>
- * </p>
- */
- MemoryListener() {
- super(new String[] { SEV_SERIOUS, SEV_CRITICAL });
- }
-
- /**
- * On any memory event we handle clear out the project descriptions
- *
- * @see org.eclipse.jst.jsp.core.internal.util.AbstractMemoryListener#handleMemoryEvent(org.osgi.service.event.Event)
- */
- protected void handleMemoryEvent(Event event) {
- clearProjectDescriptions();
- }
-
- }
-
- static final boolean _debugChangeListener = false;
-
- static boolean _debugEvents = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/taglib/events")); //$NON-NLS-1$ //$NON-NLS-2$
-
- static boolean _debugIndexCreation = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.jst.jsp.core/taglib/indexcreation")); //$NON-NLS-1$ //$NON-NLS-2$
-
- static final boolean _debugResolution = "true".equals(Platform.getDebugOption("org.eclipse.jst.jsp.core/taglib/resolve")); //$NON-NLS-1$ //$NON-NLS-2$
-
- static TaglibIndex _instance = new TaglibIndex();
-
- private boolean initialized;
-
- private static final CRC32 checksumCalculator = new CRC32();
-
- private static final String CLEAN = "CLEAN";
- private static final String DIRTY = "DIRTY";
- static boolean ENABLED = false;
-
- static final ILock LOCK = Job.getJobManager().newLock();
-
- /**
- * NOT API.
- *
- * @param listener
- * the listener to be added
- */
- public static void addTaglibIndexListener(ITaglibIndexListener listener) {
- if (getInstance().isInitialized())
- getInstance().internalAddTaglibIndexListener(listener);
- }
-
- static void fireTaglibDelta(ITaglibIndexDelta delta) {
- if (_debugEvents) {
- Logger.log(Logger.INFO, "TaglibIndex fired delta:" + delta + " [" + delta.getAffectedChildren().length + "]\n" + ((TaglibIndexDelta) delta).trigger); //$NON-NLS-1$
- }
- /*
- * Flush any shared cache entries, the TaglibControllers should handle
- * updating their documents as needed.
- */
- ITaglibIndexDelta[] deltas = delta.getAffectedChildren();
- for (int i = 0; i < deltas.length; i++) {
- ITaglibRecord taglibRecord = deltas[i].getTaglibRecord();
- if (taglibRecord != null) {
- Object uniqueIdentifier = TLDCMDocumentManager.getUniqueIdentifier(taglibRecord);
- if (uniqueIdentifier != null) {
- TLDCMDocumentManager.getSharedDocumentCache().remove(uniqueIdentifier);
- }
- else {
- Logger.log(Logger.ERROR, "identifier for " + taglibRecord + " was null");
- }
- }
- }
- synchronized (TLDCMDocumentManager.getSharedDocumentCache()) {
- Iterator values = TLDCMDocumentManager.getSharedDocumentCache().values().iterator();
- while (values.hasNext()) {
- Object o = values.next();
- if (o instanceof Reference) {
- values.remove();
- }
- }
- }
-
- if (_instance.isInitialized()) {
- ITaglibIndexListener[] listeners = _instance.fTaglibIndexListeners;
- if (listeners != null) {
- for (int j = 0; j < listeners.length; j++) {
- try {
- listeners[j].indexChanged(delta);
- }
- catch (Exception e) {
- Logger.log(Logger.WARNING, e.getMessage());
- }
- }
- }
- }
- }
-
-
- /**
- * Finds all of the visible ITaglibRecords for the given path in the
- * workspace. Taglib mappings from web.xml files are only visible to paths
- * within the web.xml's corresponding web content folder.
- * This method will almost certainly require a workspace lock to complete.
- *
- * @param fullPath -
- * a path within the workspace
- * @return All of the visible ITaglibRecords from the given path.
- */
- public static ITaglibRecord[] getAvailableTaglibRecords(IPath fullPath) {
- if (!_instance.isInitialized()) {
- return new ITaglibRecord[0];
- }
- ITaglibRecord[] records = null;
- if (getInstance().isInitialized()) {
- records = getInstance().internalGetAvailableTaglibRecords(fullPath);
- }
- else {
- records = new ITaglibRecord[0];
- }
- getInstance().fireCurrentDelta("enumerate: " + fullPath); //$NON-NLS-1$
- return records;
- }
-
- /**
- * Returns the IPath considered to be the web-app root for the given path.
- * All resolution from the given path beginning with '/' will be relative
- * to the computed web-app root.
- *
- * @deprecated - is not correct in flexible projects, use the {@link org.eclipse.jst.jsp.core.internal.util.FacetModuleCoreSupport} class instead
- * @param path -
- * a path under the web-app root
- * @return the IPath considered to be the web-app's root for the given
- * path or null if one could not be determined
- */
- public static IPath getContextRoot(IPath path) {
- try {
- LOCK.acquire();
- if (getInstance().isInitialized()) {
- return getInstance().internalGetContextRoot(path);
- }
- }
- finally {
- LOCK.release();
- }
- return null;
- }
-
- public static TaglibIndex getInstance() {
- return _instance;
- }
-
- /**
- * NOT API.
- *
- * @param listener
- * the listener to be removed
- */
- public static void removeTaglibIndexListener(ITaglibIndexListener listener) {
- if (!getInstance().isInitialized())
- return;
- if (getInstance().isInitialized())
- getInstance().internalRemoveTaglibIndexListener(listener);
- }
-
- /**
- * Finds a matching ITaglibRecord given the reference. Typically the
- * result will have to be cast to a subinterface of ITaglibRecord. This
- * method will almost certainly require a workspace lock to complete.
- *
- * @param basePath
- * - the workspace-relative path for IResources, full
- * filesystem path otherwise
- * @param reference
- * - the URI to lookup, for example the uri value from a taglib
- * directive
- * @param crossProjects
- * - whether to search across projects (currently ignored)
- *
- * @return a visible ITaglibRecord or null if the reference points to no
- * known tag library descriptor
- *
- * @See ITaglibRecord
- */
- public static ITaglibRecord resolve(String basePath, String reference, boolean crossProjects) {
- ITaglibRecord result = null;
- if (getInstance().isInitialized()) {
- result = getInstance().internalResolve(basePath, reference, crossProjects);
- }
- getInstance().fireCurrentDelta("resolve: " + reference); //$NON-NLS-1$
- if (_debugResolution) {
- if (result == null) {
- Logger.log(Logger.INFO, "TaglibIndex could not resolve \"" + reference + "\" from " + basePath); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- switch (result.getRecordType()) {
- case (ITaglibRecord.TLD) : {
- ITLDRecord record = (ITLDRecord) result;
- Logger.log(Logger.INFO, "TaglibIndex resolved " + basePath + ":" + reference + " = " + record.getPath()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- break;
- case (ITaglibRecord.JAR) : {
- IJarRecord record = (IJarRecord) result;
- Logger.log(Logger.INFO, "TaglibIndex resolved " + basePath + ":" + reference + " = " + record.getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- break;
- case (ITaglibRecord.TAGDIR) : {
- ITagDirRecord record = (ITagDirRecord) result;
- Logger.log(Logger.INFO, "TaglibIndex resolved " + basePath + ":" + reference + " = " + record.getPath()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- break;
- case (ITaglibRecord.URL) : {
- IURLRecord record = (IURLRecord) result;
- Logger.log(Logger.INFO, "TaglibIndex resolved " + basePath + ":" + reference + " = " + record.getURL()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- break;
- }
- }
- }
- return result;
- }
-
- /**
- * Instructs the index to stop listening for resource and classpath
- * changes, and to forget all information about the workspace.
- */
- public static void shutdown() {
- try {
- LOCK.acquire();
- if (getInstance().isInitialized()) {
- getInstance().stop();
- }
- }
- finally {
- LOCK.release();
- }
- }
-
- /**
- * Instructs the index to begin listening for resource and classpath
- * changes.
- */
- public static void startup() {
- boolean shuttingDown = !Platform.isRunning() || Platform.getBundle(OSGI_FRAMEWORK_ID).getState() == Bundle.STOPPING;
- if (!shuttingDown) {
- try {
- LOCK.acquire();
- ENABLED = !"false".equalsIgnoreCase(System.getProperty(TaglibIndex.class.getName())); //$NON-NLS-1$
- getInstance().initializeInstance();
- }
- finally {
- LOCK.release();
- }
- }
- }
-
- private ClasspathChangeListener fClasspathChangeListener = null;
-
- private TaglibIndexDelta fCurrentTopLevelDelta = null;
-
- Map fProjectDescriptions = null;
-
- private ResourceChangeListener fResourceChangeListener;
-
- private ITaglibIndexListener[] fTaglibIndexListeners = null;
-
- /**
- * Used to keep the {@link ProjectDescription} cache clean when memory is low
- */
- private MemoryListener fMemoryListener;
-
- /** symbolic name for OSGI framework */
- private final static String OSGI_FRAMEWORK_ID = "org.eclipse.osgi"; //$NON-NLS-1$
-
- private TaglibIndex() {
- super();
- }
-
- private void initializeInstance() {
-
- if (isInitialized())
- return;
- try {
- LOCK.acquire();
- /*
- * check again, just incase it was initialized on another thread,
- * while we were waiting for the lock
- */
- if (!isInitialized()) {
- getWorkingLocation();
- /*
- * Only consider a crash if a value exists and is DIRTY (not a
- * new workspace)
- */
- if (DIRTY.equalsIgnoreCase(getState())) {
- Logger.log(Logger.ERROR, "A workspace crash was detected. The previous session did not exit normally. Not using saved taglib indexes."); //$NON-NLS-3$
- removeIndexes(false);
- }
-
- fProjectDescriptions = new Hashtable();
- fResourceChangeListener = new ResourceChangeListener();
- fClasspathChangeListener = new ClasspathChangeListener();
- fMemoryListener = new MemoryListener();
-
- if (ENABLED) {
- ResourcesPlugin.getWorkspace().addResourceChangeListener(fResourceChangeListener, IResourceChangeEvent.POST_CHANGE);
- JavaCore.addElementChangedListener(fClasspathChangeListener);
- //register the memory listener
- fMemoryListener.connect();
- }
- setIntialized(true);
- }
- }
- finally {
- LOCK.release();
- }
- }
-
- /**
- * Adds the given delta as a child to an overall delta
- *
- * @param delta
- */
- synchronized void addDelta(ITaglibIndexDelta delta) {
- ensureDelta(delta.getProject()).addChildDelta(delta);
- }
-
- /**
- * Based on org.eclipse.jdt.internal.core.search.indexing.IndexManager
- *
- * @param containerPath
- * @return the index file location for the given workspace path
- */
- String computeIndexLocation(IPath containerPath) {
- String fileName = computeIndexName(containerPath);
- if (_debugIndexCreation)
- Logger.log(Logger.INFO, "-> index name for " + containerPath + " is " + fileName); //$NON-NLS-1$ //$NON-NLS-2$
- String indexLocation = getTaglibIndexStateLocation().append(fileName).toOSString();
- return indexLocation;
- }
-
- String computeIndexName(IPath containerPath) {
- checksumCalculator.reset();
- checksumCalculator.update(containerPath.toOSString().getBytes());
- // use ".dat" so we're not confused with JDT indexes
- String fileName = Long.toString(checksumCalculator.getValue()) + ".dat"; //$NON-NLS-1$
- return fileName;
- }
-
- /**
- * @param project
- * @return the ProjectDescription representing the given project
- */
- ProjectDescription createDescription(IProject project) {
- if (fProjectDescriptions == null)
- return null;
-
- ProjectDescription description = null;
- try {
- LOCK.acquire();
- description = (ProjectDescription) fProjectDescriptions.get(project);
- if (description == null) {
- // Once we've started indexing, we're dirty again
- if (fProjectDescriptions.isEmpty()) {
- setState(DIRTY);
- }
- description = new ProjectDescription(project, computeIndexLocation(project.getFullPath()));
- fProjectDescriptions.put(project, description);
- }
- }
- finally {
- LOCK.release();
- }
- return description;
- }
-
- /**
- * Ensures that a delta exists for holding index change information
- */
- private TaglibIndexDelta ensureDelta(IProject project) {
- /*
- * The first delta to be added will determine which project the
- * top-level delta will contain.
- */
- if (fCurrentTopLevelDelta == null) {
- fCurrentTopLevelDelta = new TaglibIndexDelta(project, null, ITaglibIndexDelta.CHANGED);
- }
- return fCurrentTopLevelDelta;
- }
-
- synchronized void fireCurrentDelta(Object trigger) {
- if (fCurrentTopLevelDelta != null) {
- fCurrentTopLevelDelta.trigger = trigger;
- ITaglibIndexDelta delta = fCurrentTopLevelDelta;
- fCurrentTopLevelDelta = null;
- fireTaglibDelta(delta);
- }
- }
-
- /**
- * 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.isRunning() || Platform.getBundle(OSGI_FRAMEWORK_ID).getState() == Bundle.STOPPING;
- return shuttingDown;
- }
-
- ProjectDescription getDescription(IProject project) {
- ProjectDescription description = null;
- if (isInitialized()) {
- description = (ProjectDescription) fProjectDescriptions.get(project);
- }
- return description;
- }
-
- private String getState() {
- String state = JSPCorePlugin.getDefault().getPluginPreferences().getString(TaglibIndex.class.getName());
- return state;
- }
-
- private IPath getTaglibIndexStateLocation() {
- return JSPCorePlugin.getDefault().getStateLocation().append("taglibindex/");
- }
-
- private void internalAddTaglibIndexListener(ITaglibIndexListener listener) {
- try {
- LOCK.acquire();
- if (fTaglibIndexListeners == null) {
- fTaglibIndexListeners = new ITaglibIndexListener[]{listener};
- }
- else {
- List listeners = new ArrayList(Arrays.asList(fTaglibIndexListeners));
- if (!listeners.contains(listener)) {
- listeners.add(listener);
- }
- fTaglibIndexListeners = (ITaglibIndexListener[]) listeners.toArray(new ITaglibIndexListener[0]);
- }
- }
- finally {
- LOCK.release();
- }
- }
-
- private ITaglibRecord[] internalGetAvailableTaglibRecords(IPath path) {
- ITaglibRecord[] records = new ITaglibRecord[0];
- if (path.segmentCount() > 0) {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(path.segment(0));
- if (project.isAccessible()) {
- ProjectDescription description = createDescription(project);
- List availableRecords = description.getAvailableTaglibRecords(path);
-
- // ICatalog catalog =
- // XMLCorePlugin.getDefault().getDefaultXMLCatalog();
- // while (catalog != null) {
- // ICatalogEntry[] entries = catalog.getCatalogEntries();
- // for (int i = 0; i < entries.length; i++) {
- // // System.out.println(entries[i].getURI());
- // }
- // INextCatalog[] nextCatalogs = catalog.getNextCatalogs();
- // for (int i = 0; i < nextCatalogs.length; i++) {
- // ICatalogEntry[] entries2 =
- // nextCatalogs[i].getReferencedCatalog().getCatalogEntries();
- // for (int j = 0; j < entries2.length; j++) {
- // // System.out.println(entries2[j].getURI());
- // }
- // }
- // }
-
- records = (ITaglibRecord[]) availableRecords.toArray(records);
- }
- }
- return records;
- }
-
- private IPath internalGetContextRoot(IPath path) {
- IFile baseResource = FileBuffers.getWorkspaceFileAtLocation(path);
- if (baseResource != null && baseResource.getProject().isAccessible()) {
- IProject project = baseResource.getProject();
- ProjectDescription description = getInstance().createDescription(project);
- IPath rootPath = description.getLocalRoot(baseResource.getFullPath());
- return rootPath;
- }
- // try to handle out-of-workspace paths
- IPath root = path.makeAbsolute();
- while (root.segmentCount() > 0 && !root.isRoot())
- root = root.removeLastSegments(1);
- return root;
- }
-
- private void internalRemoveTaglibIndexListener(ITaglibIndexListener listener) {
- try {
- LOCK.acquire();
- if (fTaglibIndexListeners != null) {
- List listeners = new ArrayList(Arrays.asList(fTaglibIndexListeners));
- listeners.remove(listener);
- fTaglibIndexListeners = (ITaglibIndexListener[]) listeners.toArray(new ITaglibIndexListener[0]);
- }
- }
- finally {
- LOCK.release();
- }
- }
-
- private ITaglibRecord internalResolve(String basePath, final String reference, boolean crossProjects) {
- IProject project = null;
- ITaglibRecord resolved = null;
-
- Path baseIPath = new Path(basePath);
- IResource baseResource = FileBuffers.getWorkspaceFileAtLocation(baseIPath);
-
- if (baseResource == null) {
- IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
- // Try the base path as a folder first
- if (baseIPath.segmentCount() > 1) {
- baseResource = workspaceRoot.getFolder(baseIPath);
- }
- // If not a folder, then try base path as a file
- if (baseResource != null && !baseResource.exists() && baseIPath.segmentCount() > 1) {
- baseResource = workspaceRoot.getFile(baseIPath);
- }
- if (baseResource == null && baseIPath.segmentCount() == 1) {
- baseResource = workspaceRoot.getProject(baseIPath.segment(0));
- }
- }
-
- if (baseResource == null) {
- /*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=116529
- *
- * This method produces a less accurate result, but doesn't
- * require that the file exist yet.
- */
- IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(baseIPath);
- if (files.length > 0)
- baseResource = files[0];
- }
- if (baseResource != null) {
- project = ResourcesPlugin.getWorkspace().getRoot().getProject(baseIPath.segment(0));
- if (project.isAccessible()) {
- ProjectDescription description = createDescription(project);
- resolved = description.resolve(basePath, reference);
- }
- }
-
- return resolved;
- }
-
- boolean isIndexAvailable() {
- return _instance.isInitialized() && ENABLED;
- }
-
- /**
- * Removes index file for the given project.
- */
- void removeIndexFile(IProject project) {
- File indexFile = new File(computeIndexLocation(project.getFullPath()));
- if (indexFile.exists()) {
- indexFile.delete();
- }
- }
-
- /**
- * Removes index files. Used for maintenance and keeping the index folder
- * a manageable size.
- *
- * @param staleOnly -
- * if <b>true</b>, removes only the indexes for projects not
- * open in the workspace, if <b>false</b>, removes all of the
- * indexes
- */
- private void removeIndexes(boolean staleOnly) {
- File folder = getWorkingLocation();
-
- // remove any extraneous index files
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- List indexNames = new ArrayList(projects.length);
- if (staleOnly) {
- for (int i = 0; i < projects.length; i++) {
- if (projects[i].isAccessible()) {
- indexNames.add(computeIndexName(projects[i].getFullPath()));
- }
- }
- }
-
- if (folder.isDirectory()) {
- File[] files = folder.listFiles();
- for (int i = 0; files != null && i < files.length; i++) {
- if (!indexNames.contains(files[i].getName()))
- files[i].delete();
- }
- }
- }
-
- private void setState(String state) {
- if (!state.equals(getState())) {
- JSPCorePlugin.getDefault().getPluginPreferences().setValue(TaglibIndex.class.getName(), state);
- JSPCorePlugin.getDefault().savePluginPreferences();
- }
- }
-
- private void stop() {
- if (isInitialized()) {
- setIntialized(false);
-
- ResourcesPlugin.getWorkspace().removeResourceChangeListener(fResourceChangeListener);
- JavaCore.removeElementChangedListener(fClasspathChangeListener);
- //unregister the memory listener
- fMemoryListener.disconnect();
-
- /*
- * Clearing the existing saved states helps prune dead data from
- * the index folder.
- */
- removeIndexes(true);
-
- clearProjectDescriptions();
-
- setState(CLEAN);
- fProjectDescriptions = null;
- fResourceChangeListener = null;
- fClasspathChangeListener = null;
- fMemoryListener = null;
- }
- }
-
- /**
- * Get the working location for the taglib index
- * @return The File representing the taglib index's working location
- */
- private File getWorkingLocation() {
- File folder = new File(getTaglibIndexStateLocation().toOSString());
- if (!folder.isDirectory()) {
- try {
- folder.mkdir();
- }
- catch (SecurityException e) {
- }
- }
- return folder;
- }
-
- /**
- * Have all of the ProjectDescriptions write their information to disk and
- * then clear our map of them
- */
- void clearProjectDescriptions() {
- try {
- LOCK.acquire();
- Iterator i = fProjectDescriptions.values().iterator();
- while (i.hasNext()) {
- ProjectDescription description = (ProjectDescription) i.next();
- description.saveReferences();
- }
-
- fProjectDescriptions.clear();
- } finally {
- LOCK.release();
- }
- }
-
- private boolean isInitialized() {
- return initialized;
- }
-
- private void setIntialized(boolean intialized) {
- this.initialized = intialized;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndexDelta.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndexDelta.java
deleted file mode 100644
index fc14d8bdb4..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/taglib/TaglibIndexDelta.java
+++ /dev/null
@@ -1,148 +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.taglib;
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.core.resources.IProject;
-
-public class TaglibIndexDelta implements ITaglibIndexDelta {
- private Collection fChildren;
- private int fExplicitKind = -1;
- private int fImplicitKind = -1;
- private IProject fProject;
- private ITaglibRecord fTaglibRecord = null;
- long time;
- Object trigger = null;
-
- TaglibIndexDelta(IProject project, ITaglibRecord record, int kind) {
- fProject = project;
- fTaglibRecord = record;
- fExplicitKind = kind;
- time = System.currentTimeMillis();
- }
-
- void addChildDelta(ITaglibIndexDelta delta) {
- if (fChildren == null)
- fChildren = new ArrayList();
- fChildren.add(delta);
- fImplicitKind = -1;
- }
-
- private int computeKind() {
- int added = 0;
- int removed = 0;
-
- ITaglibIndexDelta[] children = (ITaglibIndexDelta[]) fChildren.toArray(new ITaglibIndexDelta[fChildren.size()]);
- for (int i = 0; i < children.length; i++) {
- int kind = children[i].getKind();
- if (kind == ITaglibIndexDelta.ADDED)
- added++;
- if (kind == ITaglibIndexDelta.REMOVED)
- removed++;
- if (added > 0 && removed > 0)
- break;
- }
- if (added > 0 && removed > 0) {
- return ITaglibIndexDelta.CHANGED;
- }
- else if (added > 0) {
- return ITaglibIndexDelta.ADDED;
- }
- else if (removed > 0) {
- return ITaglibIndexDelta.REMOVED;
- }
- else {
- return ITaglibIndexDelta.CHANGED;
- }
- }
-
- public ITaglibIndexDelta[] getAffectedChildren() {
- if (fChildren == null) {
- return new ITaglibIndexDelta[0];
- }
- return (ITaglibIndexDelta[]) fChildren.toArray(new ITaglibIndexDelta[fChildren.size()]);
- }
-
- public int getKind() {
- if (fChildren == null) {
- return fExplicitKind;
- }
- if (fImplicitKind == -1) {
- fImplicitKind = computeKind();
- }
- return fImplicitKind;
- }
-
- public IProject getProject() {
- return fProject;
- }
-
- public ITaglibRecord getTaglibRecord() {
- return fTaglibRecord;
- }
-
- public long getTime() {
- return time;
- }
-
- public Object getTrigger() {
- return trigger;
- }
-
- public String toString() {
- if (fTaglibRecord != null) {
- String string = fTaglibRecord.toString();
- int kind = getKind();
- switch (kind) {
- case ITaglibIndexDelta.ADDED :
- string = " ADDED (" + string + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- break;
- case ITaglibIndexDelta.CHANGED :
- string = " CHANGED (" + string + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- break;
- case ITaglibIndexDelta.REMOVED :
- string = " REMOVED (" + string + ")"; //$NON-NLS-1$ //$NON-NLS-2$
- break;
- default :
- string = " other:" + kind + " (" + string + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- break;
- }
- return string;
- }
- else {
- StringBuffer buffer = new StringBuffer();
- int kind = getKind();
- switch (kind) {
- case ITaglibIndexDelta.ADDED :
- buffer.append("TaglibIndexDelta(" + fProject + "):ADDED\n"); //$NON-NLS-1$
- break;
- case ITaglibIndexDelta.CHANGED :
- buffer.append("TaglibIndexDelta(" + fProject + "):CHANGED\n"); //$NON-NLS-1$
- break;
- case ITaglibIndexDelta.REMOVED :
- buffer.append("TaglibIndexDelta(" + fProject + "):REMOVED\n"); //$NON-NLS-1$
- break;
- }
- ITaglibIndexDelta[] children = getAffectedChildren();
- for (int i = 0; i < children.length; i++) {
- buffer.append('\t');
- buffer.append(children[i].toString());
- if (i < children.length - 1) {
- buffer.append('\n');
- }
- }
- return buffer.toString();
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/text/IJSPPartitions.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/text/IJSPPartitions.java
deleted file mode 100644
index dae4c3d2c2..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/text/IJSPPartitions.java
+++ /dev/null
@@ -1,34 +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.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.
- *
- * @since 1.1
- */
-public interface IJSPPartitions {
-
- 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/css/core/internal/contentmodel/JSPedCSSTaglibController.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/contentmodel/JSPedCSSTaglibController.java
deleted file mode 100644
index e84a5ffaf3..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/contentmodel/JSPedCSSTaglibController.java
+++ /dev/null
@@ -1,24 +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.contentmodel;
-
-import org.eclipse.core.filebuffers.IDocumentSetupParticipant;
-import org.eclipse.jface.text.IDocument;
-
-public class JSPedCSSTaglibController implements IDocumentSetupParticipant {
-
- public void setup(IDocument document) {
- // ignore TLD in content type css jsp
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/contenttype/ContentDescriberForJSPedCSS.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/contenttype/ContentDescriberForJSPedCSS.java
deleted file mode 100644
index 58afa6e7cb..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/contenttype/ContentDescriberForJSPedCSS.java
+++ /dev/null
@@ -1,236 +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.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.contenttype.JSPResourceEncodingDetector;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.IContentDescriptionForJSP;
-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 class ContentDescriberForJSPedCSS 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};
-
- /*
- * (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;
- }
-
-
-
- /*
- * (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;
- }
-
-
- 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);
- }
- String contentTypeAttribute = jspDetector.getContentType();
- if (contentTypeAttribute != null && contentTypeAttribute.length() > 0) {
- description.setProperty(IContentDescriptionForJSP.CONTENT_TYPE_ATTRIBUTE, contentTypeAttribute);
- }
- }
- }
-
- 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;
- return result;
- }
-
- private int determineValidity(InputStream inputStream) {
- return IContentDescriber.INDETERMINATE;
- }
-
- private int determineValidity(Reader reader) {
- return IContentDescriber.INDETERMINATE;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/IJSPCSSImportRule.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/IJSPCSSImportRule.java
deleted file mode 100644
index 7f74b8862a..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/IJSPCSSImportRule.java
+++ /dev/null
@@ -1,18 +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.document;
-
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSImportRule;
-
-public interface IJSPCSSImportRule extends ICSSImportRule, IJSPCSSNode {
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/IJSPCSSNode.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/IJSPCSSNode.java
deleted file mode 100644
index af2675552f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/IJSPCSSNode.java
+++ /dev/null
@@ -1,19 +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.document;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-
-
-public interface IJSPCSSNode extends ICSSNode {
- short JSP_NODE = 16;
- String getCssText();
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPCSSImportRuleImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPCSSImportRuleImpl.java
deleted file mode 100644
index 9e9dd13719..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPCSSImportRuleImpl.java
+++ /dev/null
@@ -1,47 +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.document;
-
-import org.eclipse.wst.css.core.internal.document.CSSImportRuleImpl;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.core.internal.util.CSSUtil;
-
-public class JSPCSSImportRuleImpl extends CSSImportRuleImpl implements IJSPCSSImportRule {
-
- JSPCSSImportRuleImpl() {
- super();
- }
-
- JSPCSSImportRuleImpl(JSPCSSImportRuleImpl that) {
- super(that);
- }
-
-
- public ICSSNode cloneNode(boolean deep) {
- JSPCSSImportRuleImpl cloned = new JSPCSSImportRuleImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
- public String getHref() {
- return getAttribute(HREF);
- }
-
- public void setAttribute(String name, String value) {
- if (HREF.equals(name)){
- value = CSSUtil.extractUriContents(value);
- }
- super.setAttribute(name, value);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPCSSNodeImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPCSSNodeImpl.java
deleted file mode 100644
index d2ba70cb26..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPCSSNodeImpl.java
+++ /dev/null
@@ -1,51 +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.document;
-
-
-import org.eclipse.wst.css.core.internal.document.CSSStructuredDocumentRegionContainer;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-
-
-class JSPCSSNodeImpl extends CSSStructuredDocumentRegionContainer implements IJSPCSSNode {
-
-
- private String fText;
-
- JSPCSSNodeImpl(JSPCSSNodeImpl that) {
- super(that);
-
- }
-
- JSPCSSNodeImpl(String text) {
- super();
- fText = text;
- }
-
- public ICSSNode cloneNode(boolean deep) {
- JSPCSSNodeImpl cloned = new JSPCSSNodeImpl(this);
-
- if (deep)
- cloneChildNodes(cloned, deep);
-
- return cloned;
- }
-
- public short getNodeType() {
- return JSP_NODE;
- }
-
- public String getCssText() {
- return fText;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPedCSSModelImpl.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPedCSSModelImpl.java
deleted file mode 100644
index e4da0fef65..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPedCSSModelImpl.java
+++ /dev/null
@@ -1,29 +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.document;
-
-import org.eclipse.wst.css.core.internal.document.CSSModelImpl;
-import org.eclipse.wst.css.core.internal.document.CSSModelParser;
-
-public class JSPedCSSModelImpl extends CSSModelImpl {
- private JSPedCSSModelParser fParser;
-
- protected CSSModelParser getParser() {
- if (fParser == null) {
- if (getDocument() != null) {
- fParser = new JSPedCSSModelParser(getDocument());
- }
- }
- return fParser;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPedCSSModelParser.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPedCSSModelParser.java
deleted file mode 100644
index 0aa723fadb..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/document/JSPedCSSModelParser.java
+++ /dev/null
@@ -1,162 +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.document;
-
-import java.util.regex.Pattern;
-
-import org.eclipse.jst.jsp.css.core.internal.parserz.JSPedCSSRegionContexts;
-import org.eclipse.wst.css.core.internal.document.CSSModelCreationContext;
-import org.eclipse.wst.css.core.internal.document.CSSModelParser;
-import org.eclipse.wst.css.core.internal.document.CSSNodeImpl;
-import org.eclipse.wst.css.core.internal.document.CSSStructuredDocumentRegionContainer;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSDocument;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSRuleContainer;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.text.BasicStructuredDocumentRegion;
-
-
-/**
- *
- */
-class JSPedCSSModelParser extends CSSModelParser {
-
- public JSPedCSSModelParser(ICSSDocument doc) {
- super(doc);
- }
- /**
- *
- */
- protected CSSNodeImpl insertStructuredDocumentRegion(IStructuredDocumentRegion region) {
- CSSModelCreationContext creationContext = getCreationContext();
- if (creationContext == null || region == null) {
- return null;
- }
-
- String type = ((BasicStructuredDocumentRegion) region).getType();
- CSSNodeImpl modified = null;
-
- //ICSSNode target = fCreationContext.getTargetNode();
-
- if (type == JSPedCSSRegionContexts.CSS_JSP_DIRECTIVE){
-
- boolean isInclude = region.getText().indexOf("include") != -1;
- if (isInclude){
- modified = insertUnknownImport(region);
- } else {
- modified = insertUnknownRule(region);
- }
- }
-
- // post process
- if (modified != null) {
- if (modified instanceof CSSStructuredDocumentRegionContainer) {
- ((CSSStructuredDocumentRegionContainer) modified).propagateRangeStructuredDocumentRegion();
- }
- }
-
- return modified != null ? modified : super.insertStructuredDocumentRegion(region);
- }
-
- private CSSNodeImpl insertUnknownImport(IStructuredDocumentRegion region) {
- CSSModelCreationContext creationContext = getCreationContext();
- CSSNodeImpl parent = creationContext.getTargetNode();
- ICSSDocument sheet = parent.getOwnerDocument();
-
- String text = region.getText();
- Pattern pattern = Pattern.compile(" ");
- String[] strs = pattern.split(text);
- String hrefValue = null;
- for (int i=0;i<strs.length;i++) {
- String hrefStr = "file=\"";
- if (strs[i].startsWith(hrefStr)){
- int hrefStr_length = hrefStr.length();
- // minus 1 to avoid quote?
- int hrefValue_length = strs[i].length() - 1;
- if (hrefValue_length > hrefStr_length) {
- hrefValue = strs[i].substring(hrefStr_length, hrefValue_length);
- }
- else {
- /*
- * ISSUE: this handles cases where, e.g. "file=" has no
- * subsequent 'value' ... and from code in insertStructuredDocumentRegion
- * I believe should return null, rather than empty string, but, this may
- * need some fine tuning eventually.
- */
- hrefValue = null;
- }
- break;
- }
- }
-
- if (hrefValue == null) {
- return null;
- }
-
- JSPCSSImportRuleImpl rule = new JSPCSSImportRuleImpl();
- rule.setOwnerDocument(sheet);
- rule.appendChild((CSSNodeImpl)sheet.createMediaList());
- rule.setRangeStructuredDocumentRegion(region, region);
-
-
- if (!isUpdateContextActive()) {
- rule.setHref(hrefValue);//Attribute(ICSSImportRule.HREF, hrefValue);
- }
-
-
- // insert to tree
- if (!isUpdateContextActive() && parent != null) {
- //propagateRangePreInsert(sheet, rule);
- CSSNodeImpl next = creationContext.getNextNode();
- if (next != null) {
- ((CSSNodeImpl)sheet).insertBefore(rule, next);
- }
- else {
- ((CSSNodeImpl)sheet).appendChild(rule);
- }
- }
- //creationContext.setTargetNode(rule);
- return rule;
- }
-
- private CSSNodeImpl insertUnknownRule(IStructuredDocumentRegion flatNode) {
- CSSModelCreationContext creationContext = getCreationContext();
- CSSNodeImpl parent = creationContext.getTargetNode();
- if (!isParseFloating() && !(parent instanceof ICSSRuleContainer)) {
- return null;
- }
-
- JSPCSSNodeImpl rule = new JSPCSSNodeImpl(flatNode.getText());
- rule.setOwnerDocument(parent.getOwnerDocument());
-
- // setup flat container
- rule.setRangeStructuredDocumentRegion(flatNode, flatNode);
-
-
- // insert to tree
- if (!isUpdateContextActive() && parent != null) {
- propagateRangePreInsert(parent, rule);
- CSSNodeImpl next = creationContext.getNextNode();
- if (next != null) {
- parent.insertBefore(rule, next);
- }
- else {
- parent.appendChild(rule);
- }
- }
-
- //creationContext.setTargetNode(parent.getOwnerDocument());
- // TargetNext is set to null automatically
-
- return rule;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/encoding/JSPedCSSDocumentLoader.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/encoding/JSPedCSSDocumentLoader.java
deleted file mode 100644
index b87ca7ae21..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/encoding/JSPedCSSDocumentLoader.java
+++ /dev/null
@@ -1,26 +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.encoding;
-
-import org.eclipse.jst.jsp.css.core.internal.parser.JSPedCSSSourceParser;
-import org.eclipse.wst.css.core.internal.encoding.CSSDocumentLoader;
-import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-
-public class JSPedCSSDocumentLoader extends CSSDocumentLoader {
-public RegionParser getParser() {
- return new JSPedCSSSourceParser();
-}
-public IDocumentLoader newInstance() {
- return new JSPedCSSDocumentLoader();
-}
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/modelhandler/JSPedCSSModelLoader.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/modelhandler/JSPedCSSModelLoader.java
deleted file mode 100644
index 60914b503b..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/modelhandler/JSPedCSSModelLoader.java
+++ /dev/null
@@ -1,38 +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.modelhandler;
-
-import org.eclipse.jst.jsp.css.core.internal.document.JSPedCSSModelImpl;
-import org.eclipse.jst.jsp.css.core.internal.encoding.JSPedCSSDocumentLoader;
-import org.eclipse.wst.css.core.internal.modelhandler.CSSModelLoader;
-import org.eclipse.wst.sse.core.internal.document.IDocumentLoader;
-import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-
-
-public class JSPedCSSModelLoader extends CSSModelLoader {
-public IStructuredModel newModel() {
- IStructuredModel model = new JSPedCSSModelImpl();
- return model;
-}
-public IModelLoader newInstance() {
- return new JSPedCSSModelLoader();
-}
-public IDocumentLoader getDocumentLoader() {
- if (documentLoaderInstance == null) {
- documentLoaderInstance = new JSPedCSSDocumentLoader();
- }
- return documentLoaderInstance;
-}
-
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/modelhandler/ModelHandlerForJSPedCSS.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/modelhandler/ModelHandlerForJSPedCSS.java
deleted file mode 100644
index 67d1c2bc2f..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/modelhandler/ModelHandlerForJSPedCSS.java
+++ /dev/null
@@ -1,44 +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.modelhandler;
-
-import org.eclipse.jst.jsp.css.core.internal.encoding.JSPedCSSDocumentLoader;
-import org.eclipse.wst.css.core.internal.encoding.CSSDocumentCharsetDetector;
-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.modelhandler.IModelHandler;
-import org.eclipse.wst.sse.core.internal.provisional.IModelLoader;
-
-
-public class ModelHandlerForJSPedCSS extends AbstractModelHandler implements IModelHandler {
- static String AssociatedContentTypeID = "org.eclipse.jst.jsp.core.cssjspsource"; //$NON-NLS-1$
-
- private static String ModelHandlerID = "org.eclipse.jst.jsp.css.core.modelhandler"; //$NON-NLS-1$
- public ModelHandlerForJSPedCSS(){
- super();
- setId(ModelHandlerID);
- setAssociatedContentTypeId(AssociatedContentTypeID);
- }
-
- public IModelLoader getModelLoader() {
- return new JSPedCSSModelLoader();
- }
-
- public IDocumentCharsetDetector getEncodingDetector() {
- return new CSSDocumentCharsetDetector();
- }
-
- public IDocumentLoader getDocumentLoader() {
- return new JSPedCSSDocumentLoader();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSSourceParser.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSSourceParser.java
deleted file mode 100644
index 762a8a4ab7..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSSourceParser.java
+++ /dev/null
@@ -1,43 +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.css.core.internal.parser;
-
-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.CSSSourceParser;
-import org.eclipse.wst.css.core.internal.parser.ICSSTokenizer;
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-import org.eclipse.wst.sse.core.internal.ltk.parser.RegionParser;
-
-
-public class JSPedCSSSourceParser extends CSSSourceParser {
-
- private JSPedCSSTokenizer fTokenizer;
- protected boolean mustBeStart(String type, String docRegionType) {
- return ((type == JSPedCSSRegionContexts.CSS_JSP_COMMENT || type == JSPedCSSRegionContexts.CSS_JSP_DIRECTIVE || type == JSPedCSSRegionContexts.CSS_JSP_END || type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_LBRACE || type == CSSRegionContexts.CSS_RBRACE || type == CSSRegionContexts.CSS_IMPORT || type == CSSRegionContexts.CSS_PAGE || type == CSSRegionContexts.CSS_MEDIA || type == CSSRegionContexts.CSS_FONT_FACE || type == CSSRegionContexts.CSS_CHARSET || type == CSSRegionContexts.CSS_ATKEYWORD || type == CSSRegionContexts.CSS_DECLARATION_PROPERTY || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER) || (docRegionType == CSSRegionContexts.CSS_DECLARATION_PROPERTY && type == CSSRegionContexts.CSS_S) || (!CSSRegionUtil.isSelectorBegginingType(docRegionType) && (type == CSSRegionContexts.CSS_SELECTOR_ELEMENT_NAME || type == CSSRegionContexts.CSS_SELECTOR_UNIVERSAL || type == CSSRegionContexts.CSS_SELECTOR_PSEUDO || type == CSSRegionContexts.CSS_SELECTOR_CLASS || type == CSSRegionContexts.CSS_SELECTOR_ID || type == CSSRegionContexts.CSS_SELECTOR_ATTRIBUTE_START)));
- }
-
- protected boolean mustBeEnd(String type) {
- return (type == JSPedCSSRegionContexts.CSS_JSP_COMMENT || type == JSPedCSSRegionContexts.CSS_JSP_DIRECTIVE || type == JSPedCSSRegionContexts.CSS_JSP_END || type == CSSRegionContexts.CSS_DELIMITER || type == CSSRegionContexts.CSS_LBRACE || type == CSSRegionContexts.CSS_RBRACE || type == CSSRegionContexts.CSS_DECLARATION_DELIMITER);
- }
-
- public ICSSTokenizer getTokenizer() {
- if (fTokenizer == null) {
- fTokenizer = new JSPedCSSTokenizer();
- }
- return fTokenizer;
- }
-
- public RegionParser newInstance() {
- return new JSPedCSSSourceParser();
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSTokenizer.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSTokenizer.java
deleted file mode 100644
index 429e7422de..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parser/JSPedCSSTokenizer.java
+++ /dev/null
@@ -1,2030 +0,0 @@
-/* The following code was generated by JFlex 1.4.1 on 10/29/10 4:57 PM */
-
-/*******************************************************************************
- * Copyright (c) 2006, 2010 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;
-
-
-/**
- * This class is a scanner generated by
- * <a href="http://www.jflex.de/">JFlex</a> 1.4.1
- * on 10/29/10 4:57 PM from the specification file
- * <tt>C:/dev/workspaces/indigo/org.eclipse.jst.jsp.core/DevTimeSupport/CSSJSPParser/JSPedCSSTokenizer.flex</tt>
- */
-public class JSPedCSSTokenizer implements JSPedCSSRegionContexts, ICSSTokenizer {
-
- /** 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 = 16384;
-
- /** lexical states */
- public static final int ST_JSP_EXP = 21;
- public static final int ST_JSP_DIRECTIVE = 21;
- public static final int ST_SELECTOR_ATTRIBUTE_NAME = 12;
- public static final int ST_IMPORT_DELIMITER = 5;
- public static final int ST_DECLARATION_PRE_VALUE = 18;
- public static final int ST_SELECTOR = 10;
- public static final int ST_CHARSET_DELIMITER = 2;
- public static final int ST_DECLARATION_VALUE = 19;
- public static final int ST_PAGE_PSEUDO_PAGE = 8;
- public static final int ST_IMPORT_URI = 3;
- public static final int ST_SELECTOR_ATTRIBUTE_END = 15;
- public static final int ST_JSP_EL = 22;
- public static final int ST_SELECTOR_ATTRIBUTE_OPERATOR = 13;
- public static final int ST_JSP_DECLARATION = 21;
- public static final int ST_DECLARATION = 16;
- public static final int ST_PAGE_DELIMITER = 9;
- public static final int ST_SELECTOR_ATTRIBUTE_VALUE = 14;
- public static final int ST_MEDIA_MEDIUM = 6;
- public static final int ST_JSP_SCRIPTLET = 20;
- public static final int ST_CHARSET_NAME = 1;
- public static final int ST_JSP_COMMENT = 23;
- public static final int ST_IMPORT_MEDIUM = 4;
- public static final int ST_DECLARATION_SEPARATOR = 17;
- public static final int ST_FONT_FACE_DELIMITER = 9;
- public static final int ST_MEDIA_DELIMITER = 7;
- public static final int ST_SELECTOR_MODIFIER = 11;
- public static final int YYINITIAL = 0;
-
- /**
- * Translates characters to character classes
- */
- private static final String ZZ_CMAP_PACKED =
- "\11\0\1\11\1\17\1\0\1\4\1\20\22\0\1\6\1\40\1\10"+
- "\1\22\1\33\1\31\1\16\1\5\1\26\1\12\1\42\1\14\1\61"+
- "\1\13\1\15\1\41\12\1\1\65\1\54\1\30\1\37\1\32\1\21"+
- "\1\36\1\47\1\27\1\44\1\63\1\52\1\67\1\64\1\45\1\55"+
- "\2\2\1\25\1\56\1\70\1\60\1\57\1\2\1\24\1\50\1\53"+
- "\1\23\5\2\1\71\1\3\1\73\1\16\1\2\1\16\1\46\1\7"+
- "\1\43\1\62\1\51\1\66\1\64\1\45\1\55\2\2\1\25\1\56"+
- "\1\70\1\60\1\57\1\2\1\24\1\50\1\53\1\23\5\2\1\34"+
- "\1\72\1\35\1\72\1\0\uff80\2";
-
- /**
- * 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 =
- "\30\0\1\1\1\2\1\1\1\3\1\2\4\1\1\4"+
- "\2\1\1\5\1\1\1\6\4\1\1\7\3\1\1\10"+
- "\1\1\1\10\1\11\1\12\1\1\1\12\1\13\1\14"+
- "\1\15\1\1\1\15\1\16\1\1\1\3\1\17\1\20"+
- "\1\21\1\1\1\21\1\22\1\1\1\23\1\24\3\1"+
- "\1\24\1\25\1\1\1\25\1\26\1\27\1\30\1\31"+
- "\3\1\1\32\1\31\3\1\1\31\1\1\2\33\1\3"+
- "\2\1\1\34\1\35\1\36\1\37\1\1\1\0\2\2"+
- "\1\40\1\0\1\41\2\0\1\42\2\0\1\43\6\0"+
- "\1\44\3\0\1\45\5\0\1\46\4\0\2\10\1\0"+
- "\2\12\1\0\2\15\1\17\1\0\2\21\1\0\1\24"+
- "\2\0\1\24\2\0\1\24\1\0\2\25\1\47\2\0"+
- "\1\50\1\0\1\51\1\31\2\0\1\52\2\0\2\31"+
- "\1\30\1\53\2\0\1\31\2\0\1\54\1\55\1\0"+
- "\1\56\1\0\1\2\1\57\1\40\1\41\10\0\1\44"+
- "\1\0\1\45\2\0\1\45\2\0\1\46\2\0\1\46"+
- "\2\0\1\10\1\12\1\15\1\21\1\24\1\0\1\24"+
- "\2\0\1\24\1\0\1\25\1\47\1\31\1\0\1\52"+
- "\2\0\1\52\1\0\1\53\1\60\1\31\3\0\1\2"+
- "\1\40\1\41\1\61\5\0\1\62\2\0\1\44\5\0"+
- "\1\10\1\12\1\15\1\21\1\24\2\0\1\25\1\47"+
- "\1\31\2\0\1\53\1\60\1\0\1\51\1\0\1\63"+
- "\1\2\1\40\1\41\3\0\1\64\2\0\1\44\1\0"+
- "\1\44\10\0\1\65\1\10\1\12\1\15\1\21\1\24"+
- "\2\0\1\25\1\47\1\31\2\0\1\53\2\60\5\0"+
- "\1\66\1\0\1\2\1\40\1\41\2\0\1\67\2\0"+
- "\1\44\6\0\1\65\2\0\1\10\1\12\1\15\1\21"+
- "\1\24\2\0\1\25\1\47\1\31\2\0\1\53\2\60"+
- "\2\0\1\66\3\0\1\2\1\40\1\41\1\0\1\70"+
- "\2\0\1\44\13\0\1\10\1\12\1\15\1\21\1\24"+
- "\2\0\1\25\1\47\1\31\2\0\1\53\2\60\10\0"+
- "\1\40\1\41\1\71\2\0\1\44\6\0\1\65\1\0"+
- "\1\65\2\0\1\47\2\0\1\53\2\60\2\0\1\66"+
- "\1\0\1\66\6\0\1\60\4\0\1\72\4\0\1\60"+
- "\3\0\1\73\12\0";
-
- private static int [] zzUnpackAction() {
- int [] result = new int[455];
- 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;
- }
-
-
- /**
- * Translates a state to a row index in the transition table
- */
- private static final int [] ZZ_ROWMAP = zzUnpackRowMap();
-
- private static final String ZZ_ROWMAP_PACKED_0 =
- "\0\0\0\74\0\170\0\264\0\360\0\u012c\0\u0168\0\u01a4"+
- "\0\u01e0\0\u021c\0\u0258\0\u0294\0\u02d0\0\u030c\0\u0348\0\u0384"+
- "\0\u03c0\0\u03fc\0\u0438\0\u0474\0\u04b0\0\u04ec\0\u0528\0\u0564"+
- "\0\u05a0\0\u05dc\0\u0618\0\u0654\0\u0690\0\u06cc\0\u0708\0\u0744"+
- "\0\u0780\0\u05a0\0\u07bc\0\u07f8\0\u05a0\0\u0834\0\u05a0\0\u0870"+
- "\0\u08ac\0\u08e8\0\u0924\0\u05a0\0\u0960\0\u099c\0\u09d8\0\u0a14"+
- "\0\u0a50\0\u0a8c\0\u05a0\0\u0ac8\0\u0b04\0\u0b40\0\u05a0\0\u05a0"+
- "\0\u0b7c\0\u0bb8\0\u0bf4\0\u05a0\0\u0c30\0\u0c6c\0\u05a0\0\u05a0"+
- "\0\u0ca8\0\u0ce4\0\u0d20\0\u05a0\0\u0d5c\0\u05a0\0\u0d98\0\u0dd4"+
- "\0\u0e10\0\u0e4c\0\u0e88\0\u0ec4\0\u0f00\0\u0f3c\0\u05a0\0\u05a0"+
- "\0\u0f78\0\u0fb4\0\u0ff0\0\u102c\0\u1068\0\u05a0\0\u10a4\0\u10e0"+
- "\0\u111c\0\u1158\0\u1194\0\u11d0\0\u07f8\0\u05a0\0\u120c\0\u1248"+
- "\0\u1284\0\u07bc\0\u05a0\0\u05a0\0\u05a0\0\u12c0\0\u0618\0\u12fc"+
- "\0\u1338\0\u06cc\0\u1374\0\u0708\0\u13b0\0\u13ec\0\u1428\0\u1464"+
- "\0\u0780\0\u05a0\0\u14a0\0\u14dc\0\u1518\0\u1554\0\u1590\0\u15cc"+
- "\0\u1608\0\u1644\0\u0870\0\u1680\0\u05a0\0\u08ac\0\u16bc\0\u16f8"+
- "\0\u0960\0\u1734\0\u05a0\0\u099c\0\u1770\0\u17ac\0\u0a50\0\u17e8"+
- "\0\u1824\0\u0b04\0\u1860\0\u189c\0\u0bb8\0\u18d8\0\u1914\0\u05a0"+
- "\0\u0ce4\0\u1950\0\u198c\0\u0dd4\0\u19c8\0\u0e10\0\u1a04\0\u05a0"+
- "\0\u0e4c\0\u1a40\0\u1a7c\0\u0f00\0\u1ab8\0\u1af4\0\u1b30\0\u1b6c"+
- "\0\u111c\0\u05a0\0\u0ff0\0\u05a0\0\u1ba8\0\u102c\0\u1be4\0\u05a0"+
- "\0\u1068\0\u1c20\0\u1c5c\0\u1c98\0\u1cd4\0\u1158\0\u1d10\0\u1d4c"+
- "\0\u1d88\0\u11d0\0\u1dc4\0\u05a0\0\u16f8\0\u1284\0\u05a0\0\u1e00"+
- "\0\u1e3c\0\u05a0\0\u1e78\0\u1eb4\0\u1ef0\0\u1f2c\0\u1f68\0\u1fa4"+
- "\0\u1fe0\0\u201c\0\u2058\0\u2094\0\u20d0\0\u210c\0\u0870\0\u2148"+
- "\0\u2184\0\u08ac\0\u21c0\0\u21fc\0\u0960\0\u2238\0\u2274\0\u099c"+
- "\0\u22b0\0\u22ec\0\u2328\0\u2364\0\u23a0\0\u23dc\0\u2418\0\u2454"+
- "\0\u0e10\0\u2490\0\u24cc\0\u0e4c\0\u2508\0\u2544\0\u2580\0\u25bc"+
- "\0\u25f8\0\u102c\0\u2634\0\u2670\0\u1068\0\u26ac\0\u26e8\0\u2724"+
- "\0\u2760\0\u279c\0\u27d8\0\u2814\0\u2850\0\u288c\0\u28c8\0\u05a0"+
- "\0\u2904\0\u2940\0\u297c\0\u29b8\0\u29f4\0\u05a0\0\u2a30\0\u2a6c"+
- "\0\u2aa8\0\u2ae4\0\u2b20\0\u2b5c\0\u2b98\0\u2bd4\0\u2c10\0\u2c4c"+
- "\0\u2c88\0\u2cc4\0\u2d00\0\u2d3c\0\u2d78\0\u2db4\0\u2df0\0\u2e2c"+
- "\0\u2e68\0\u2ea4\0\u2ee0\0\u2f1c\0\u2f58\0\u2f94\0\u2fd0\0\u05a0"+
- "\0\u300c\0\u3048\0\u3084\0\u30c0\0\u30fc\0\u3138\0\u05a0\0\u3174"+
- "\0\u31b0\0\u05a0\0\u31ec\0\u3228\0\u3264\0\u32a0\0\u32dc\0\u3318"+
- "\0\u3354\0\u3390\0\u33cc\0\u3408\0\u05a0\0\u3444\0\u3480\0\u34bc"+
- "\0\u34f8\0\u3534\0\u3570\0\u35ac\0\u35e8\0\u3624\0\u3660\0\u369c"+
- "\0\u36d8\0\u3714\0\u3750\0\u378c\0\u37c8\0\u3804\0\u2f94\0\u3840"+
- "\0\u387c\0\u05a0\0\u38b8\0\u38f4\0\u3930\0\u396c\0\u39a8\0\u39e4"+
- "\0\u05a0\0\u3a20\0\u3a5c\0\u3a98\0\u3ad4\0\u3b10\0\u3b4c\0\u3b88"+
- "\0\u3bc4\0\u3c00\0\u3354\0\u3c3c\0\u3c78\0\u3cb4\0\u3cf0\0\u3d2c"+
- "\0\u3d68\0\u3da4\0\u3de0\0\u3e1c\0\u3e58\0\u3e94\0\u3ed0\0\u3f0c"+
- "\0\u3f48\0\u3f84\0\u3fc0\0\u3ffc\0\u4038\0\u4074\0\u37c8\0\u40b0"+
- "\0\u40ec\0\u4128\0\u4164\0\u41a0\0\u41dc\0\u4218\0\u05a0\0\u4254"+
- "\0\u4290\0\u42cc\0\u4308\0\u4344\0\u4380\0\u43bc\0\u43f8\0\u4434"+
- "\0\u4470\0\u44ac\0\u44e8\0\u4524\0\u4560\0\u459c\0\u45d8\0\u4614"+
- "\0\u4650\0\u468c\0\u46c8\0\u4704\0\u4740\0\u477c\0\u47b8\0\u47f4"+
- "\0\u4830\0\u486c\0\u48a8\0\u48e4\0\u4920\0\u495c\0\u4998\0\u49d4"+
- "\0\u4a10\0\u4a4c\0\u4a88\0\u4ac4\0\u4b00\0\u4b3c\0\u05a0\0\u4b78"+
- "\0\u4bb4\0\u4bf0\0\u4c2c\0\u4c68\0\u4ca4\0\u4ce0\0\u4d1c\0\u4d58"+
- "\0\u33cc\0\u4d94\0\u3408\0\u4dd0\0\u4e0c\0\u4e48\0\u4e84\0\u4ec0"+
- "\0\u4efc\0\u4f38\0\u4f74\0\u4fb0\0\u4fec\0\u3840\0\u5028\0\u387c"+
- "\0\u5064\0\u50a0\0\u50dc\0\u5118\0\u5154\0\u5190\0\u51cc\0\u5208"+
- "\0\u5244\0\u5280\0\u52bc\0\u05a0\0\u52f8\0\u5334\0\u5370\0\u53ac"+
- "\0\u05a0\0\u53e8\0\u5424\0\u5460\0\u05a0\0\u549c\0\u54d8\0\u5514"+
- "\0\u5550\0\u558c\0\u55c8\0\u5604\0\u5640\0\u567c\0\u56b8";
-
- private static int [] zzUnpackRowMap() {
- int [] result = new int[455];
- int offset = 0;
- offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackRowMap(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 high = packed.charAt(i++) << 16;
- result[j++] = high | packed.charAt(i++);
- }
- return j;
- }
-
- /**
- * The transition table of the DFA
- */
- private static final int [] ZZ_TRANS = zzUnpackTrans();
-
- private static final String ZZ_TRANS_PACKED_0 =
- "\2\31\1\32\1\33\1\34\1\31\1\34\1\32\1\31"+
- "\1\34\1\31\1\35\1\31\1\36\1\31\2\34\1\31"+
- "\1\37\3\32\1\31\1\32\1\40\2\31\1\41\1\31"+
- "\1\42\1\43\2\31\1\44\1\45\11\32\1\31\4\32"+
- "\1\31\3\32\1\46\3\32\1\47\6\31\1\34\1\50"+
- "\1\34\1\31\1\51\1\34\1\31\1\52\3\31\2\34"+
- "\7\31\1\53\4\31\1\42\1\43\2\31\1\44\36\31"+
- "\1\34\1\31\1\34\2\31\1\34\1\31\1\52\3\31"+
- "\2\34\7\31\1\53\4\31\1\42\1\43\2\31\1\44"+
- "\12\31\1\54\23\31\1\34\1\55\1\34\1\31\1\56"+
- "\1\34\1\31\1\52\3\31\2\34\2\31\1\57\4\31"+
- "\1\53\4\31\1\42\1\43\2\31\1\44\12\31\1\54"+
- "\21\31\1\60\1\61\1\34\1\31\1\34\1\60\1\31"+
- "\1\34\1\31\1\62\3\31\2\34\2\31\3\60\1\31"+
- "\1\60\1\53\4\31\1\42\1\43\2\31\1\44\1\31"+
- "\11\60\1\54\4\60\1\31\3\60\1\31\3\60\7\31"+
- "\1\34\1\31\1\34\2\31\1\34\1\31\1\52\3\31"+
- "\2\34\7\31\1\53\4\31\1\42\1\43\2\31\1\44"+
- "\12\31\1\54\4\31\1\63\14\31\1\64\1\65\1\34"+
- "\1\31\1\34\1\64\1\31\1\34\1\31\1\66\3\31"+
- "\2\34\2\31\3\64\1\31\1\64\1\53\4\31\1\42"+
- "\1\43\2\31\1\44\1\31\11\64\1\31\4\64\1\31"+
- "\3\64\1\31\3\64\7\31\1\34\1\31\1\34\2\31"+
- "\1\34\1\31\1\52\3\31\2\34\7\31\1\53\3\31"+
- "\1\67\1\42\1\43\2\31\1\44\17\31\1\70\14\31"+
- "\1\71\1\72\1\34\1\31\1\34\1\71\1\31\1\34"+
- "\1\31\1\73\3\31\2\34\2\31\3\71\1\31\1\71"+
- "\1\53\3\31\1\74\1\42\1\43\2\31\1\44\1\31"+
- "\11\71\1\31\4\71\1\31\3\71\1\75\3\71\7\31"+
- "\1\34\1\31\1\34\2\31\1\34\1\31\1\52\3\31"+
- "\2\34\7\31\1\53\3\31\1\74\1\42\1\43\2\31"+
- "\1\44\34\31\1\32\1\33\1\34\1\31\1\34\1\32"+
- "\1\31\1\34\1\31\1\35\1\31\1\36\1\31\2\34"+
- "\1\31\1\37\3\32\1\31\1\32\1\53\4\31\1\42"+
- "\1\43\2\31\1\44\1\45\11\32\1\31\4\32\1\31"+
- "\3\32\1\46\3\32\1\47\6\31\1\76\1\31\1\76"+
- "\2\31\1\76\1\31\1\52\1\77\1\36\1\31\2\76"+
- "\1\31\1\37\5\31\1\53\1\31\1\77\1\31\1\74"+
- "\1\42\1\43\2\31\1\44\1\45\16\31\1\100\3\31"+
- "\1\46\3\31\1\47\4\31\1\101\1\102\1\34\1\31"+
- "\1\34\1\101\1\31\1\34\1\31\1\103\3\31\2\34"+
- "\2\31\3\101\1\31\1\101\1\53\4\31\1\42\1\43"+
- "\2\31\1\44\1\31\11\101\1\31\4\101\1\31\3\101"+
- "\1\31\3\101\7\31\1\34\1\31\1\34\2\31\1\34"+
- "\1\31\1\52\3\31\2\34\7\31\1\53\4\31\1\42"+
- "\1\43\1\104\1\31\1\44\30\31\1\105\1\106\2\31"+
- "\1\107\1\110\1\34\1\111\1\34\1\107\1\112\1\34"+
- "\1\31\1\113\3\31\2\34\2\31\3\107\1\31\1\107"+
- "\1\53\4\31\1\42\1\43\2\31\1\44\1\31\11\107"+
- "\1\31\4\107\1\31\3\107\1\31\3\107\7\31\1\34"+
- "\1\31\1\34\2\31\1\34\1\31\1\52\3\31\2\34"+
- "\7\31\1\53\4\31\1\42\1\43\2\31\1\44\31\31"+
- "\1\106\2\31\1\114\1\115\1\34\1\31\1\34\1\114"+
- "\1\31\1\34\1\31\1\116\3\31\2\34\2\31\3\114"+
- "\1\31\1\114\1\40\2\31\1\41\1\31\1\42\1\43"+
- "\2\31\1\44\1\31\11\114\1\117\4\114\1\31\3\114"+
- "\1\31\3\114\7\31\1\34\1\31\1\34\2\31\1\34"+
- "\1\31\1\52\3\31\2\34\7\31\1\40\2\31\1\41"+
- "\1\31\1\42\1\43\2\31\1\44\12\31\1\117\10\31"+
- "\1\120\7\31\1\121\1\122\1\123\1\34\1\124\1\34"+
- "\1\122\1\125\1\34\1\126\1\127\1\130\1\131\1\31"+
- "\2\34\1\31\1\132\1\133\2\122\1\31\1\122\1\40"+
- "\2\31\1\41\1\31\1\42\1\43\1\31\1\134\1\135"+
- "\1\31\11\122\1\117\4\122\1\136\3\122\1\31\3\122"+
- "\4\31\1\121\1\122\1\123\1\137\1\124\1\137\1\122"+
- "\1\125\1\137\1\126\1\127\1\130\1\131\1\31\2\137"+
- "\1\31\1\132\1\133\2\122\1\31\1\122\1\40\2\31"+
- "\1\41\1\31\1\42\1\43\1\31\1\134\1\135\1\31"+
- "\11\122\1\117\4\122\1\136\3\122\1\31\3\122\7\31"+
- "\1\34\1\31\1\34\2\31\1\34\1\31\1\140\3\31"+
- "\2\34\7\31\1\53\1\141\3\31\1\42\1\142\1\143"+
- "\1\144\1\44\36\31\1\34\1\31\1\34\2\31\1\34"+
- "\1\31\1\52\3\31\2\34\7\31\1\53\1\141\3\31"+
- "\1\42\1\43\2\31\1\44\36\31\1\34\1\31\1\34"+
- "\2\31\1\34\1\31\1\52\3\31\2\34\7\31\1\53"+
- "\4\31\1\145\1\43\2\31\1\44\36\31\1\34\1\31"+
- "\1\34\2\31\1\34\1\31\1\146\3\31\2\34\7\31"+
- "\1\53\5\31\1\43\2\31\1\44\32\31\75\0\2\32"+
- "\1\147\3\0\1\32\3\0\1\32\7\0\3\32\1\0"+
- "\1\32\13\0\11\32\1\0\4\32\1\0\3\32\1\0"+
- "\3\32\4\0\1\150\2\32\1\0\2\32\1\150\1\32"+
- "\1\0\5\32\2\0\22\32\1\150\2\32\1\150\2\32"+
- "\1\150\10\32\1\150\3\32\1\150\5\32\4\0\1\34"+
- "\1\0\1\34\2\0\1\34\5\0\2\34\54\0\2\32"+
- "\1\147\3\0\1\32\3\0\1\151\7\0\3\32\1\0"+
- "\1\32\13\0\11\32\1\0\4\32\1\0\3\32\1\0"+
- "\3\32\4\0\2\152\1\153\3\0\1\152\3\0\1\152"+
- "\7\0\3\152\1\0\1\152\13\0\11\152\1\0\4\152"+
- "\1\0\3\152\1\0\3\152\4\0\2\154\1\155\3\0"+
- "\1\154\3\0\1\154\7\0\3\154\1\0\1\154\13\0"+
- "\11\154\1\0\4\154\1\0\3\154\1\0\3\154\11\0"+
- "\1\156\2\0\1\156\5\0\2\156\10\0\1\157\6\0"+
- "\1\160\41\0\1\161\2\0\1\161\5\0\2\161\13\0"+
- "\1\162\102\0\2\163\10\0\1\164\1\165\1\166\6\0"+
- "\2\167\46\0\1\170\33\0\1\171\1\172\3\0\1\171"+
- "\3\0\1\171\7\0\3\171\1\0\1\171\13\0\11\171"+
- "\1\0\4\171\1\0\3\171\1\0\3\171\4\0\2\173"+
- "\1\174\1\0\1\175\11\173\2\0\53\173\1\0\2\176"+
- "\1\177\1\0\3\176\1\175\6\176\2\0\53\176\13\0"+
- "\1\200\120\0\1\160\34\0\2\201\1\202\1\0\1\203"+
- "\11\201\2\0\53\201\1\0\2\204\1\205\1\0\3\204"+
- "\1\203\6\204\2\0\53\204\24\0\1\206\50\0\2\60"+
- "\1\207\3\0\1\60\3\0\1\60\7\0\3\60\1\0"+
- "\1\60\13\0\11\60\1\0\4\60\1\0\3\60\1\0"+
- "\3\60\4\0\1\210\2\60\1\0\2\60\1\210\1\60"+
- "\1\0\5\60\2\0\22\60\1\210\2\60\1\210\2\60"+
- "\1\210\10\60\1\210\3\60\1\210\5\60\1\0\2\60"+
- "\1\207\3\0\1\60\3\0\1\211\7\0\3\60\1\0"+
- "\1\60\13\0\11\60\1\0\4\60\1\0\3\60\1\0"+
- "\3\60\4\0\2\64\1\212\3\0\1\64\3\0\1\64"+
- "\7\0\3\64\1\0\1\64\13\0\11\64\1\0\4\64"+
- "\1\0\3\64\1\0\3\64\4\0\1\213\2\64\1\0"+
- "\2\64\1\213\1\64\1\0\5\64\2\0\22\64\1\213"+
- "\2\64\1\213\2\64\1\213\10\64\1\213\3\64\1\213"+
- "\5\64\1\0\2\64\1\212\3\0\1\64\3\0\1\214"+
- "\7\0\3\64\1\0\1\64\13\0\11\64\1\0\4\64"+
- "\1\0\3\64\1\0\3\64\4\0\2\71\1\215\3\0"+
- "\1\71\3\0\1\71\7\0\3\71\1\0\1\71\13\0"+
- "\11\71\1\0\4\71\1\0\3\71\1\0\3\71\4\0"+
- "\1\216\2\71\1\0\2\71\1\216\1\71\1\0\5\71"+
- "\2\0\22\71\1\216\2\71\1\216\2\71\1\216\10\71"+
- "\1\216\3\71\1\216\5\71\1\0\2\71\1\215\3\0"+
- "\1\71\3\0\1\217\7\0\3\71\1\0\1\71\13\0"+
- "\11\71\1\0\4\71\1\0\3\71\1\0\3\71\5\0"+
- "\1\71\1\215\3\0\1\71\3\0\1\71\7\0\3\71"+
- "\1\0\1\71\13\0\11\71\1\0\4\71\1\0\3\71"+
- "\1\0\3\71\3\0\4\220\1\76\1\220\1\76\2\220"+
- "\1\76\2\220\1\0\2\220\2\76\11\220\1\0\1\220"+
- "\1\0\37\220\1\0\2\101\1\221\3\0\1\101\3\0"+
- "\1\101\7\0\3\101\1\0\1\101\13\0\11\101\1\0"+
- "\4\101\1\0\3\101\1\0\3\101\4\0\1\222\2\101"+
- "\1\0\2\101\1\222\1\101\1\0\5\101\2\0\22\101"+
- "\1\222\2\101\1\222\2\101\1\222\10\101\1\222\3\101"+
- "\1\222\5\101\1\0\2\101\1\221\3\0\1\101\3\0"+
- "\1\223\7\0\3\101\1\0\1\101\13\0\11\101\1\0"+
- "\4\101\1\0\3\101\1\0\3\101\42\0\1\104\35\0"+
- "\2\107\1\224\3\0\1\107\3\0\1\107\7\0\3\107"+
- "\1\0\1\107\13\0\11\107\1\0\4\107\1\0\3\107"+
- "\1\0\3\107\4\0\1\225\2\107\1\0\2\107\1\225"+
- "\1\107\1\0\5\107\2\0\22\107\1\225\2\107\1\225"+
- "\2\107\1\225\10\107\1\225\3\107\1\225\5\107\1\0"+
- "\2\226\1\227\1\0\1\230\11\226\2\0\53\226\1\0"+
- "\2\231\1\232\1\0\3\231\1\230\6\231\2\0\53\231"+
- "\1\0\2\107\1\224\3\0\1\107\3\0\1\233\7\0"+
- "\3\107\1\0\1\107\13\0\11\107\1\0\4\107\1\0"+
- "\3\107\1\0\3\107\4\0\2\114\1\234\3\0\1\114"+
- "\3\0\1\114\7\0\3\114\1\0\1\114\13\0\11\114"+
- "\1\0\4\114\1\0\3\114\1\0\3\114\4\0\1\235"+
- "\2\114\1\0\2\114\1\235\1\114\1\0\5\114\2\0"+
- "\22\114\1\235\2\114\1\235\2\114\1\235\10\114\1\235"+
- "\3\114\1\235\5\114\1\0\2\114\1\234\3\0\1\114"+
- "\3\0\1\236\7\0\3\114\1\0\1\114\13\0\11\114"+
- "\1\0\4\114\1\0\3\114\1\0\3\114\4\0\1\121"+
- "\1\237\1\240\3\0\1\237\3\0\1\237\1\0\1\241"+
- "\5\0\3\237\1\0\1\237\1\0\1\242\11\0\11\237"+
- "\1\0\4\237\1\0\3\237\1\0\3\237\4\0\2\122"+
- "\1\243\3\0\1\122\3\0\1\122\7\0\3\122\1\244"+
- "\1\122\13\0\11\122\1\0\4\122\1\0\3\122\1\0"+
- "\3\122\4\0\1\245\2\122\1\0\2\122\1\245\1\122"+
- "\1\0\5\122\2\0\22\122\1\245\2\122\1\245\2\122"+
- "\1\245\10\122\1\245\3\122\1\245\5\122\1\0\2\246"+
- "\1\247\1\0\1\250\11\246\2\0\53\246\1\0\2\251"+
- "\1\252\1\0\3\251\1\250\6\251\2\0\53\251\1\0"+
- "\1\253\1\122\1\243\3\0\1\122\3\0\1\254\1\0"+
- "\1\241\5\0\3\122\1\244\1\122\13\0\11\122\1\0"+
- "\4\122\1\0\3\122\1\0\3\122\4\0\1\121\13\0"+
- "\1\241\57\0\1\255\73\0\2\256\1\257\3\0\1\256"+
- "\3\0\1\256\7\0\3\256\1\0\1\256\13\0\11\256"+
- "\1\0\4\256\1\0\3\256\1\0\3\256\4\0\2\122"+
- "\1\243\3\0\1\122\3\0\1\122\1\260\6\0\1\122"+
- "\1\261\1\122\1\244\1\122\13\0\11\122\1\0\4\122"+
- "\1\0\3\122\1\0\3\122\7\0\1\262\1\0\1\262"+
- "\2\0\1\262\5\0\2\262\34\0\1\263\16\0\4\264"+
- "\1\137\1\264\1\137\2\264\1\137\5\264\2\137\14\264"+
- "\1\0\16\264\1\0\17\264\13\0\1\265\66\0\1\266"+
- "\2\0\1\266\5\0\2\266\11\0\1\267\54\0\1\270"+
- "\61\0\1\271\1\32\1\147\1\32\1\0\1\32\1\271"+
- "\1\0\1\32\1\0\1\32\3\0\2\32\2\0\3\32"+
- "\1\0\1\32\13\0\1\271\2\32\1\271\2\32\1\271"+
- "\2\32\1\0\4\32\1\0\1\271\2\32\1\0\1\271"+
- "\2\32\4\0\2\32\1\147\3\0\1\32\3\0\1\32"+
- "\7\0\3\32\1\0\1\32\2\0\1\272\10\0\11\32"+
- "\1\0\4\32\1\0\3\32\1\0\3\32\4\0\1\273"+
- "\2\152\1\0\2\152\1\273\1\152\1\0\5\152\2\0"+
- "\22\152\1\273\2\152\1\273\2\152\1\273\10\152\1\273"+
- "\3\152\1\273\5\152\1\0\1\274\2\154\1\0\2\154"+
- "\1\274\1\154\1\0\5\154\2\0\22\154\1\274\2\154"+
- "\1\274\2\154\1\274\10\154\1\274\3\154\1\274\5\154"+
- "\6\0\1\156\2\0\1\156\5\0\2\156\10\0\1\157"+
- "\50\0\1\157\2\0\1\157\5\0\2\157\66\0\1\275"+
- "\125\0\1\276\104\0\1\277\66\0\2\300\67\0\2\301"+
- "\104\0\1\302\13\0\42\170\1\303\31\170\1\0\2\171"+
- "\1\172\3\0\1\171\3\0\1\171\7\0\3\171\1\304"+
- "\1\171\13\0\11\171\1\0\4\171\1\0\3\171\1\0"+
- "\3\171\4\0\1\305\2\171\1\0\2\171\1\305\1\171"+
- "\1\0\5\171\2\0\22\171\1\305\2\171\1\305\2\171"+
- "\1\305\10\171\1\305\3\171\1\305\5\171\1\0\1\306"+
- "\1\173\1\174\1\173\1\307\1\173\1\306\10\173\1\310"+
- "\22\173\1\306\2\173\1\306\2\173\1\306\10\173\1\306"+
- "\3\173\1\306\5\173\1\0\1\311\1\176\1\177\3\176"+
- "\1\311\1\312\7\176\1\313\22\176\1\311\2\176\1\311"+
- "\2\176\1\311\10\176\1\311\3\176\1\311\5\176\32\0"+
- "\1\272\42\0\1\314\1\201\1\202\1\201\1\315\1\201"+
- "\1\314\10\201\1\316\22\201\1\314\2\201\1\314\2\201"+
- "\1\314\10\201\1\314\3\201\1\314\5\201\1\0\1\317"+
- "\1\204\1\205\3\204\1\317\1\320\7\204\1\321\22\204"+
- "\1\317\2\204\1\317\2\204\1\317\10\204\1\317\3\204"+
- "\1\317\5\204\25\0\1\322\47\0\1\323\1\60\1\207"+
- "\1\60\1\0\1\60\1\323\1\0\1\60\1\0\1\60"+
- "\3\0\2\60\2\0\3\60\1\0\1\60\13\0\1\323"+
- "\2\60\1\323\2\60\1\323\2\60\1\0\4\60\1\0"+
- "\1\323\2\60\1\0\1\323\2\60\4\0\2\60\1\207"+
- "\3\0\1\60\3\0\1\60\7\0\3\60\1\0\1\60"+
- "\2\0\1\272\10\0\11\60\1\0\4\60\1\0\3\60"+
- "\1\0\3\60\4\0\1\324\1\64\1\212\1\64\1\0"+
- "\1\64\1\324\1\0\1\64\1\0\1\64\3\0\2\64"+
- "\2\0\3\64\1\0\1\64\13\0\1\324\2\64\1\324"+
- "\2\64\1\324\2\64\1\0\4\64\1\0\1\324\2\64"+
- "\1\0\1\324\2\64\4\0\2\64\1\212\3\0\1\64"+
- "\3\0\1\64\7\0\3\64\1\0\1\64\2\0\1\272"+
- "\10\0\11\64\1\0\4\64\1\0\3\64\1\0\3\64"+
- "\4\0\1\325\1\71\1\215\1\71\1\0\1\71\1\325"+
- "\1\0\1\71\1\0\1\71\3\0\2\71\2\0\3\71"+
- "\1\0\1\71\13\0\1\325\2\71\1\325\2\71\1\325"+
- "\2\71\1\0\4\71\1\0\1\325\2\71\1\0\1\325"+
- "\2\71\4\0\2\71\1\215\3\0\1\71\3\0\1\71"+
- "\7\0\3\71\1\0\1\71\2\0\1\272\10\0\11\71"+
- "\1\0\4\71\1\0\3\71\1\0\3\71\4\0\1\326"+
- "\1\101\1\221\1\101\1\0\1\101\1\326\1\0\1\101"+
- "\1\0\1\101\3\0\2\101\2\0\3\101\1\0\1\101"+
- "\13\0\1\326\2\101\1\326\2\101\1\326\2\101\1\0"+
- "\4\101\1\0\1\326\2\101\1\0\1\326\2\101\4\0"+
- "\2\101\1\221\3\0\1\101\3\0\1\101\7\0\3\101"+
- "\1\0\1\101\2\0\1\272\10\0\11\101\1\0\4\101"+
- "\1\0\3\101\1\0\3\101\4\0\1\327\1\107\1\224"+
- "\1\107\1\0\1\107\1\327\1\0\1\107\1\0\1\107"+
- "\3\0\2\107\2\0\3\107\1\0\1\107\13\0\1\327"+
- "\2\107\1\327\2\107\1\327\2\107\1\0\4\107\1\0"+
- "\1\327\2\107\1\0\1\327\2\107\4\0\1\330\1\226"+
- "\1\227\1\226\1\331\1\226\1\330\10\226\1\332\22\226"+
- "\1\330\2\226\1\330\2\226\1\330\10\226\1\330\3\226"+
- "\1\330\5\226\1\0\1\333\1\231\1\232\3\231\1\333"+
- "\1\334\7\231\1\335\22\231\1\333\2\231\1\333\2\231"+
- "\1\333\10\231\1\333\3\231\1\333\5\231\1\0\2\107"+
- "\1\224\3\0\1\107\3\0\1\107\7\0\3\107\1\0"+
- "\1\107\2\0\1\272\10\0\11\107\1\0\4\107\1\0"+
- "\3\107\1\0\3\107\4\0\1\336\1\114\1\234\1\114"+
- "\1\0\1\114\1\336\1\0\1\114\1\0\1\114\3\0"+
- "\2\114\2\0\3\114\1\0\1\114\13\0\1\336\2\114"+
- "\1\336\2\114\1\336\2\114\1\0\4\114\1\0\1\336"+
- "\2\114\1\0\1\336\2\114\4\0\2\114\1\234\3\0"+
- "\1\114\3\0\1\114\7\0\3\114\1\0\1\114\2\0"+
- "\1\272\10\0\11\114\1\0\4\114\1\0\3\114\1\0"+
- "\3\114\4\0\2\237\1\240\3\0\1\237\3\0\1\237"+
- "\7\0\3\237\1\0\1\237\13\0\11\237\1\0\4\237"+
- "\1\0\3\237\1\0\3\237\4\0\1\337\2\237\1\0"+
- "\2\237\1\337\1\237\1\0\5\237\2\0\22\237\1\337"+
- "\2\237\1\337\2\237\1\337\10\237\1\337\3\237\1\337"+
- "\5\237\1\0\1\340\1\122\1\243\1\122\1\0\1\122"+
- "\1\340\1\0\1\122\1\0\1\122\3\0\2\122\2\0"+
- "\3\122\1\244\1\122\13\0\1\340\2\122\1\340\2\122"+
- "\1\340\2\122\1\0\4\122\1\0\1\340\2\122\1\0"+
- "\1\340\2\122\4\0\1\341\1\246\1\247\1\246\1\342"+
- "\1\246\1\341\10\246\1\343\22\246\1\341\2\246\1\341"+
- "\2\246\1\341\10\246\1\341\3\246\1\341\5\246\1\0"+
- "\1\344\1\251\1\252\3\251\1\344\1\345\7\251\1\346"+
- "\22\251\1\344\2\251\1\344\2\251\1\344\10\251\1\344"+
- "\3\251\1\344\5\251\1\0\1\253\1\122\1\243\3\0"+
- "\1\122\3\0\1\122\1\0\1\241\5\0\3\122\1\244"+
- "\1\122\1\0\1\242\11\0\11\122\1\0\4\122\1\0"+
- "\3\122\1\0\3\122\4\0\2\122\1\243\3\0\1\122"+
- "\3\0\1\122\7\0\3\122\1\244\1\122\2\0\1\272"+
- "\10\0\11\122\1\0\4\122\1\0\3\122\1\0\3\122"+
- "\4\0\1\255\1\237\1\240\3\0\1\237\3\0\1\237"+
- "\7\0\3\237\1\0\1\237\1\0\1\242\11\0\11\237"+
- "\1\0\4\237\1\0\3\237\1\0\3\237\4\0\1\347"+
- "\2\256\1\0\2\256\1\347\1\256\1\0\5\256\2\0"+
- "\22\256\1\347\2\256\1\347\2\256\1\347\10\256\1\347"+
- "\3\256\1\347\5\256\1\0\1\350\5\0\1\350\11\0"+
- "\1\350\5\0\1\350\13\0\2\350\1\0\2\350\1\0"+
- "\2\350\7\0\2\350\2\0\2\350\5\0\2\122\1\243"+
- "\3\0\1\122\3\0\1\122\7\0\2\122\1\351\1\244"+
- "\1\122\13\0\11\122\1\0\4\122\1\0\3\122\1\0"+
- "\3\122\61\0\1\352\30\0\1\353\15\0\1\354\1\272"+
- "\42\0\1\355\1\32\1\147\1\32\1\0\1\32\1\355"+
- "\1\0\1\32\1\0\1\32\3\0\2\32\2\0\3\32"+
- "\1\0\1\32\13\0\1\355\2\32\1\355\2\32\1\355"+
- "\2\32\1\0\4\32\1\0\1\355\2\32\1\0\1\355"+
- "\2\32\4\0\1\356\1\152\1\153\1\152\1\0\1\152"+
- "\1\356\1\0\1\152\1\0\1\152\3\0\2\152\2\0"+
- "\3\152\1\0\1\152\13\0\1\356\2\152\1\356\2\152"+
- "\1\356\2\152\1\0\4\152\1\0\1\356\2\152\1\0"+
- "\1\356\2\152\4\0\1\357\1\154\1\155\1\154\1\0"+
- "\1\154\1\357\1\0\1\154\1\0\1\154\3\0\2\154"+
- "\2\0\3\154\1\0\1\154\13\0\1\357\2\154\1\357"+
- "\2\154\1\357\2\154\1\0\4\154\1\0\1\357\2\154"+
- "\1\0\1\357\2\154\16\0\1\360\126\0\2\361\103\0"+
- "\1\362\76\0\2\363\74\0\1\364\77\0\1\365\3\0"+
- "\41\170\1\366\1\303\31\170\2\0\1\367\1\370\1\304"+
- "\1\0\1\304\1\367\1\0\1\304\1\0\1\367\3\0"+
- "\2\304\2\0\3\367\1\0\1\367\13\0\11\367\1\0"+
- "\4\367\1\0\3\367\1\0\3\367\4\0\1\371\1\171"+
- "\1\172\1\171\1\0\1\171\1\371\1\0\1\171\1\0"+
- "\1\171\3\0\2\171\2\0\3\171\1\304\1\171\13\0"+
- "\1\371\2\171\1\371\2\171\1\371\2\171\1\0\4\171"+
- "\1\0\1\371\2\171\1\0\1\371\2\171\4\0\1\372"+
- "\1\173\1\174\1\173\1\175\1\173\1\372\33\173\1\372"+
- "\2\173\1\372\2\173\1\372\10\173\1\372\3\173\1\372"+
- "\5\173\1\0\2\173\1\174\1\0\1\175\12\173\1\0"+
- "\53\173\1\0\1\373\1\176\1\177\3\176\1\373\1\175"+
- "\32\176\1\373\2\176\1\373\2\176\1\373\10\176\1\373"+
- "\3\176\1\373\5\176\1\0\2\176\1\177\1\0\3\176"+
- "\1\175\7\176\1\0\53\176\1\0\1\374\1\201\1\202"+
- "\1\201\1\203\1\201\1\374\33\201\1\374\2\201\1\374"+
- "\2\201\1\374\10\201\1\374\3\201\1\374\5\201\1\0"+
- "\2\201\1\202\1\0\1\203\12\201\1\0\53\201\1\0"+
- "\1\375\1\204\1\205\3\204\1\375\1\203\32\204\1\375"+
- "\2\204\1\375\2\204\1\375\10\204\1\375\3\204\1\375"+
- "\5\204\1\0\2\204\1\205\1\0\3\204\1\203\7\204"+
- "\1\0\53\204\26\0\1\376\46\0\1\377\1\60\1\207"+
- "\1\60\1\0\1\60\1\377\1\0\1\60\1\0\1\60"+
- "\3\0\2\60\2\0\3\60\1\0\1\60\13\0\1\377"+
- "\2\60\1\377\2\60\1\377\2\60\1\0\4\60\1\0"+
- "\1\377\2\60\1\0\1\377\2\60\4\0\1\u0100\1\64"+
- "\1\212\1\64\1\0\1\64\1\u0100\1\0\1\64\1\0"+
- "\1\64\3\0\2\64\2\0\3\64\1\0\1\64\13\0"+
- "\1\u0100\2\64\1\u0100\2\64\1\u0100\2\64\1\0\4\64"+
- "\1\0\1\u0100\2\64\1\0\1\u0100\2\64\4\0\1\u0101"+
- "\1\71\1\215\1\71\1\0\1\71\1\u0101\1\0\1\71"+
- "\1\0\1\71\3\0\2\71\2\0\3\71\1\0\1\71"+
- "\13\0\1\u0101\2\71\1\u0101\2\71\1\u0101\2\71\1\0"+
- "\4\71\1\0\1\u0101\2\71\1\0\1\u0101\2\71\4\0"+
- "\1\u0102\1\101\1\221\1\101\1\0\1\101\1\u0102\1\0"+
- "\1\101\1\0\1\101\3\0\2\101\2\0\3\101\1\0"+
- "\1\101\13\0\1\u0102\2\101\1\u0102\2\101\1\u0102\2\101"+
- "\1\0\4\101\1\0\1\u0102\2\101\1\0\1\u0102\2\101"+
- "\4\0\1\u0103\1\107\1\224\1\107\1\0\1\107\1\u0103"+
- "\1\0\1\107\1\0\1\107\3\0\2\107\2\0\3\107"+
- "\1\0\1\107\13\0\1\u0103\2\107\1\u0103\2\107\1\u0103"+
- "\2\107\1\0\4\107\1\0\1\u0103\2\107\1\0\1\u0103"+
- "\2\107\4\0\1\u0104\1\226\1\227\1\226\1\230\1\226"+
- "\1\u0104\33\226\1\u0104\2\226\1\u0104\2\226\1\u0104\10\226"+
- "\1\u0104\3\226\1\u0104\5\226\1\0\2\226\1\227\1\0"+
- "\1\230\12\226\1\0\53\226\1\0\1\u0105\1\231\1\232"+
- "\3\231\1\u0105\1\230\32\231\1\u0105\2\231\1\u0105\2\231"+
- "\1\u0105\10\231\1\u0105\3\231\1\u0105\5\231\1\0\2\231"+
- "\1\232\1\0\3\231\1\230\7\231\1\0\53\231\1\0"+
- "\1\u0106\1\114\1\234\1\114\1\0\1\114\1\u0106\1\0"+
- "\1\114\1\0\1\114\3\0\2\114\2\0\3\114\1\0"+
- "\1\114\13\0\1\u0106\2\114\1\u0106\2\114\1\u0106\2\114"+
- "\1\0\4\114\1\0\1\u0106\2\114\1\0\1\u0106\2\114"+
- "\4\0\1\u0107\1\237\1\240\1\237\1\0\1\237\1\u0107"+
- "\1\0\1\237\1\0\1\237\3\0\2\237\2\0\3\237"+
- "\1\0\1\237\13\0\1\u0107\2\237\1\u0107\2\237\1\u0107"+
- "\2\237\1\0\4\237\1\0\1\u0107\2\237\1\0\1\u0107"+
- "\2\237\4\0\1\u0108\1\122\1\243\1\122\1\0\1\122"+
- "\1\u0108\1\0\1\122\1\0\1\122\3\0\2\122\2\0"+
- "\3\122\1\244\1\122\13\0\1\u0108\2\122\1\u0108\2\122"+
- "\1\u0108\2\122\1\0\4\122\1\0\1\u0108\2\122\1\0"+
- "\1\u0108\2\122\4\0\1\u0109\1\246\1\247\1\246\1\250"+
- "\1\246\1\u0109\33\246\1\u0109\2\246\1\u0109\2\246\1\u0109"+
- "\10\246\1\u0109\3\246\1\u0109\5\246\1\0\2\246\1\247"+
- "\1\0\1\250\12\246\1\0\53\246\1\0\1\u010a\1\251"+
- "\1\252\3\251\1\u010a\1\250\32\251\1\u010a\2\251\1\u010a"+
- "\2\251\1\u010a\10\251\1\u010a\3\251\1\u010a\5\251\1\0"+
- "\2\251\1\252\1\0\3\251\1\250\7\251\1\0\53\251"+
- "\1\0\1\u010b\1\256\1\257\1\256\1\0\1\256\1\u010b"+
- "\1\0\1\256\1\0\1\256\3\0\2\256\2\0\3\256"+
- "\1\0\1\256\13\0\1\u010b\2\256\1\u010b\2\256\1\u010b"+
- "\2\256\1\0\4\256\1\0\1\u010b\2\256\1\0\1\u010b"+
- "\2\256\4\0\1\u010c\5\0\1\u010c\3\0\1\u010d\5\0"+
- "\1\u010c\5\0\1\u010c\13\0\2\u010c\1\0\2\u010c\1\0"+
- "\2\u010c\7\0\2\u010c\2\0\2\u010c\5\0\2\122\1\243"+
- "\3\0\1\122\3\0\1\122\7\0\3\122\1\u010e\1\122"+
- "\13\0\11\122\1\0\4\122\1\0\3\122\1\0\3\122"+
- "\62\0\1\u010f\27\0\1\353\15\0\1\354\50\0\1\354"+
- "\2\0\1\354\5\0\2\354\11\0\1\u0110\42\0\1\u0111"+
- "\1\32\1\147\1\32\1\0\1\32\1\u0111\1\0\1\32"+
- "\1\0\1\32\3\0\2\32\2\0\3\32\1\0\1\32"+
- "\13\0\1\u0111\2\32\1\u0111\2\32\1\u0111\2\32\1\0"+
- "\4\32\1\0\1\u0111\2\32\1\0\1\u0111\2\32\4\0"+
- "\1\u0112\1\152\1\153\1\152\1\0\1\152\1\u0112\1\0"+
- "\1\152\1\0\1\152\3\0\2\152\2\0\3\152\1\0"+
- "\1\152\13\0\1\u0112\2\152\1\u0112\2\152\1\u0112\2\152"+
- "\1\0\4\152\1\0\1\u0112\2\152\1\0\1\u0112\2\152"+
- "\4\0\1\u0113\1\154\1\155\1\154\1\0\1\154\1\u0113"+
- "\1\0\1\154\1\0\1\154\3\0\2\154\2\0\3\154"+
- "\1\0\1\154\13\0\1\u0113\2\154\1\u0113\2\154\1\u0113"+
- "\2\154\1\0\4\154\1\0\1\u0113\2\154\1\0\1\u0113"+
- "\2\154\27\0\1\u0114\127\0\1\u0115\70\0\1\u0116\67\0"+
- "\2\u0117\74\0\1\u0118\21\0\2\367\1\370\1\u0119\1\0"+
- "\1\u0119\1\367\1\0\1\u0119\1\u011a\1\367\3\0\2\u0119"+
- "\2\0\3\367\1\0\1\367\13\0\11\367\1\0\4\367"+
- "\1\0\3\367\1\0\3\367\4\0\1\u011b\2\367\1\0"+
- "\2\367\1\u011b\1\367\1\0\5\367\2\0\22\367\1\u011b"+
- "\2\367\1\u011b\2\367\1\u011b\10\367\1\u011b\3\367\1\u011b"+
- "\5\367\1\0\1\u011c\1\171\1\172\1\171\1\0\1\171"+
- "\1\u011c\1\0\1\171\1\0\1\171\3\0\2\171\2\0"+
- "\3\171\1\304\1\171\13\0\1\u011c\2\171\1\u011c\2\171"+
- "\1\u011c\2\171\1\0\4\171\1\0\1\u011c\2\171\1\0"+
- "\1\u011c\2\171\4\0\1\u011d\1\173\1\174\1\173\1\175"+
- "\1\173\1\u011d\33\173\1\u011d\2\173\1\u011d\2\173\1\u011d"+
- "\10\173\1\u011d\3\173\1\u011d\5\173\1\0\1\u011e\1\176"+
- "\1\177\3\176\1\u011e\1\175\32\176\1\u011e\2\176\1\u011e"+
- "\2\176\1\u011e\10\176\1\u011e\3\176\1\u011e\5\176\1\0"+
- "\1\u011f\1\201\1\202\1\201\1\203\1\201\1\u011f\33\201"+
- "\1\u011f\2\201\1\u011f\2\201\1\u011f\10\201\1\u011f\3\201"+
- "\1\u011f\5\201\1\0\1\u0120\1\204\1\205\3\204\1\u0120"+
- "\1\203\32\204\1\u0120\2\204\1\u0120\2\204\1\u0120\10\204"+
- "\1\u0120\3\204\1\u0120\5\204\1\0\2\u0121\1\u0122\1\376"+
- "\1\u0123\1\376\1\u0121\1\u0124\1\376\1\u0125\4\u0121\2\376"+
- "\5\u0121\1\0\45\u0121\1\0\1\u0126\1\60\1\207\1\60"+
- "\1\0\1\60\1\u0126\1\0\1\60\1\0\1\60\3\0"+
- "\2\60\2\0\3\60\1\0\1\60\13\0\1\u0126\2\60"+
- "\1\u0126\2\60\1\u0126\2\60\1\0\4\60\1\0\1\u0126"+
- "\2\60\1\0\1\u0126\2\60\4\0\1\u0127\1\64\1\212"+
- "\1\64\1\0\1\64\1\u0127\1\0\1\64\1\0\1\64"+
- "\3\0\2\64\2\0\3\64\1\0\1\64\13\0\1\u0127"+
- "\2\64\1\u0127\2\64\1\u0127\2\64\1\0\4\64\1\0"+
- "\1\u0127\2\64\1\0\1\u0127\2\64\4\0\1\u0128\1\71"+
- "\1\215\1\71\1\0\1\71\1\u0128\1\0\1\71\1\0"+
- "\1\71\3\0\2\71\2\0\3\71\1\0\1\71\13\0"+
- "\1\u0128\2\71\1\u0128\2\71\1\u0128\2\71\1\0\4\71"+
- "\1\0\1\u0128\2\71\1\0\1\u0128\2\71\4\0\1\u0129"+
- "\1\101\1\221\1\101\1\0\1\101\1\u0129\1\0\1\101"+
- "\1\0\1\101\3\0\2\101\2\0\3\101\1\0\1\101"+
- "\13\0\1\u0129\2\101\1\u0129\2\101\1\u0129\2\101\1\0"+
- "\4\101\1\0\1\u0129\2\101\1\0\1\u0129\2\101\4\0"+
- "\1\u012a\1\107\1\224\1\107\1\0\1\107\1\u012a\1\0"+
- "\1\107\1\0\1\107\3\0\2\107\2\0\3\107\1\0"+
- "\1\107\13\0\1\u012a\2\107\1\u012a\2\107\1\u012a\2\107"+
- "\1\0\4\107\1\0\1\u012a\2\107\1\0\1\u012a\2\107"+
- "\4\0\1\u012b\1\226\1\227\1\226\1\230\1\226\1\u012b"+
- "\33\226\1\u012b\2\226\1\u012b\2\226\1\u012b\10\226\1\u012b"+
- "\3\226\1\u012b\5\226\1\0\1\u012c\1\231\1\232\3\231"+
- "\1\u012c\1\230\32\231\1\u012c\2\231\1\u012c\2\231\1\u012c"+
- "\10\231\1\u012c\3\231\1\u012c\5\231\1\0\1\u012d\1\114"+
- "\1\234\1\114\1\0\1\114\1\u012d\1\0\1\114\1\0"+
- "\1\114\3\0\2\114\2\0\3\114\1\0\1\114\13\0"+
- "\1\u012d\2\114\1\u012d\2\114\1\u012d\2\114\1\0\4\114"+
- "\1\0\1\u012d\2\114\1\0\1\u012d\2\114\4\0\1\u012e"+
- "\1\237\1\240\1\237\1\0\1\237\1\u012e\1\0\1\237"+
- "\1\0\1\237\3\0\2\237\2\0\3\237\1\0\1\237"+
- "\13\0\1\u012e\2\237\1\u012e\2\237\1\u012e\2\237\1\0"+
- "\4\237\1\0\1\u012e\2\237\1\0\1\u012e\2\237\4\0"+
- "\1\u012f\1\122\1\243\1\122\1\0\1\122\1\u012f\1\0"+
- "\1\122\1\0\1\122\3\0\2\122\2\0\3\122\1\244"+
- "\1\122\13\0\1\u012f\2\122\1\u012f\2\122\1\u012f\2\122"+
- "\1\0\4\122\1\0\1\u012f\2\122\1\0\1\u012f\2\122"+
- "\4\0\1\u0130\1\246\1\247\1\246\1\250\1\246\1\u0130"+
- "\33\246\1\u0130\2\246\1\u0130\2\246\1\u0130\10\246\1\u0130"+
- "\3\246\1\u0130\5\246\1\0\1\u0131\1\251\1\252\3\251"+
- "\1\u0131\1\250\32\251\1\u0131\2\251\1\u0131\2\251\1\u0131"+
- "\10\251\1\u0131\3\251\1\u0131\5\251\1\0\1\u0132\1\256"+
- "\1\257\1\256\1\0\1\256\1\u0132\1\0\1\256\1\0"+
- "\1\256\3\0\2\256\2\0\3\256\1\0\1\256\13\0"+
- "\1\u0132\2\256\1\u0132\2\256\1\u0132\2\256\1\0\4\256"+
- "\1\0\1\u0132\2\256\1\0\1\u0132\2\256\4\0\1\u0133"+
- "\5\0\1\u0133\3\0\1\u010d\5\0\1\u0133\5\0\1\u0133"+
- "\13\0\2\u0133\1\0\2\u0133\1\0\2\u0133\7\0\2\u0133"+
- "\2\0\2\u0133\5\0\1\u0134\5\0\1\u0134\11\0\1\u0134"+
- "\5\0\1\u0134\13\0\2\u0134\1\0\2\u0134\1\0\2\u0134"+
- "\7\0\2\u0134\2\0\2\u0134\5\0\2\u0135\1\u0136\1\u0137"+
- "\1\u0138\1\u0137\1\u0135\1\u0139\1\u0137\1\u013a\4\u0135\2\u0137"+
- "\5\u0135\1\0\45\u0135\60\0\1\u013b\14\0\1\u013c\1\32"+
- "\1\147\1\32\1\0\1\32\1\u013c\1\0\1\32\1\0"+
- "\1\32\3\0\2\32\2\0\3\32\1\0\1\32\13\0"+
- "\1\u013c\2\32\1\u013c\2\32\1\u013c\2\32\1\0\4\32"+
- "\1\0\1\u013c\2\32\1\0\1\u013c\2\32\4\0\1\u013d"+
- "\1\152\1\153\1\152\1\0\1\152\1\u013d\1\0\1\152"+
- "\1\0\1\152\3\0\2\152\2\0\3\152\1\0\1\152"+
- "\13\0\1\u013d\2\152\1\u013d\2\152\1\u013d\2\152\1\0"+
- "\4\152\1\0\1\u013d\2\152\1\0\1\u013d\2\152\4\0"+
- "\1\u013e\1\154\1\155\1\154\1\0\1\154\1\u013e\1\0"+
- "\1\154\1\0\1\154\3\0\2\154\2\0\3\154\1\0"+
- "\1\154\13\0\1\u013e\2\154\1\u013e\2\154\1\u013e\2\154"+
- "\1\0\4\154\1\0\1\u013e\2\154\1\0\1\u013e\2\154"+
- "\53\0\1\u013f\47\0\1\u0140\115\0\2\u0141\37\0\1\u0142"+
- "\64\0\1\u0119\1\0\1\u0119\2\0\1\u0119\1\u011a\4\0"+
- "\2\u0119\54\0\1\u0143\1\367\1\370\1\367\1\0\1\367"+
- "\1\u0143\1\0\1\367\1\u011a\1\367\3\0\2\367\2\0"+
- "\3\367\1\0\1\367\13\0\1\u0143\2\367\1\u0143\2\367"+
- "\1\u0143\2\367\1\0\4\367\1\0\1\u0143\2\367\1\0"+
- "\1\u0143\2\367\4\0\1\u0144\1\171\1\172\1\171\1\0"+
- "\1\171\1\u0144\1\0\1\171\1\0\1\171\3\0\2\171"+
- "\2\0\3\171\1\304\1\171\13\0\1\u0144\2\171\1\u0144"+
- "\2\171\1\u0144\2\171\1\0\4\171\1\0\1\u0144\2\171"+
- "\1\0\1\u0144\2\171\4\0\1\u0145\1\173\1\174\1\173"+
- "\1\175\1\173\1\u0145\33\173\1\u0145\2\173\1\u0145\2\173"+
- "\1\u0145\10\173\1\u0145\3\173\1\u0145\5\173\1\0\1\u0146"+
- "\1\176\1\177\3\176\1\u0146\1\175\32\176\1\u0146\2\176"+
- "\1\u0146\2\176\1\u0146\10\176\1\u0146\3\176\1\u0146\5\176"+
- "\1\0\1\u0147\1\201\1\202\1\201\1\203\1\201\1\u0147"+
- "\33\201\1\u0147\2\201\1\u0147\2\201\1\u0147\10\201\1\u0147"+
- "\3\201\1\u0147\5\201\1\0\1\u0148\1\204\1\205\3\204"+
- "\1\u0148\1\203\32\204\1\u0148\2\204\1\u0148\2\204\1\u0148"+
- "\10\204\1\u0148\3\204\1\u0148\5\204\1\0\2\u0121\1\u0122"+
- "\1\u0149\1\0\2\u0121\1\0\1\u0149\1\u0125\4\u0121\2\u0149"+
- "\5\u0121\1\0\45\u0121\1\0\1\u014a\1\u0121\1\u0122\1\u0149"+
- "\2\u0121\1\u014a\1\u0121\1\u0149\1\u014b\4\u0121\2\u0149\22\u0121"+
- "\1\u014a\2\u0121\1\u014a\2\u0121\1\u014a\10\u0121\1\u014a\3\u0121"+
- "\1\u014a\5\u0121\1\0\2\u0123\1\u014c\1\0\1\u0149\11\u0123"+
- "\2\0\53\u0123\1\0\2\u0124\1\u014d\1\0\3\u0124\1\u0149"+
- "\6\u0124\2\0\53\u0124\1\0\1\u014e\1\60\1\207\1\60"+
- "\1\0\1\60\1\u014e\1\0\1\60\1\0\1\60\3\0"+
- "\2\60\2\0\3\60\1\0\1\60\13\0\1\u014e\2\60"+
- "\1\u014e\2\60\1\u014e\2\60\1\0\4\60\1\0\1\u014e"+
- "\2\60\1\0\1\u014e\2\60\4\0\1\u014f\1\64\1\212"+
- "\1\64\1\0\1\64\1\u014f\1\0\1\64\1\0\1\64"+
- "\3\0\2\64\2\0\3\64\1\0\1\64\13\0\1\u014f"+
- "\2\64\1\u014f\2\64\1\u014f\2\64\1\0\4\64\1\0"+
- "\1\u014f\2\64\1\0\1\u014f\2\64\4\0\1\u0150\1\71"+
- "\1\215\1\71\1\0\1\71\1\u0150\1\0\1\71\1\0"+
- "\1\71\3\0\2\71\2\0\3\71\1\0\1\71\13\0"+
- "\1\u0150\2\71\1\u0150\2\71\1\u0150\2\71\1\0\4\71"+
- "\1\0\1\u0150\2\71\1\0\1\u0150\2\71\4\0\1\u0151"+
- "\1\101\1\221\1\101\1\0\1\101\1\u0151\1\0\1\101"+
- "\1\0\1\101\3\0\2\101\2\0\3\101\1\0\1\101"+
- "\13\0\1\u0151\2\101\1\u0151\2\101\1\u0151\2\101\1\0"+
- "\4\101\1\0\1\u0151\2\101\1\0\1\u0151\2\101\4\0"+
- "\1\u0152\1\107\1\224\1\107\1\0\1\107\1\u0152\1\0"+
- "\1\107\1\0\1\107\3\0\2\107\2\0\3\107\1\0"+
- "\1\107\13\0\1\u0152\2\107\1\u0152\2\107\1\u0152\2\107"+
- "\1\0\4\107\1\0\1\u0152\2\107\1\0\1\u0152\2\107"+
- "\4\0\1\u0153\1\226\1\227\1\226\1\230\1\226\1\u0153"+
- "\33\226\1\u0153\2\226\1\u0153\2\226\1\u0153\10\226\1\u0153"+
- "\3\226\1\u0153\5\226\1\0\1\u0154\1\231\1\232\3\231"+
- "\1\u0154\1\230\32\231\1\u0154\2\231\1\u0154\2\231\1\u0154"+
- "\10\231\1\u0154\3\231\1\u0154\5\231\1\0\1\u0155\1\114"+
- "\1\234\1\114\1\0\1\114\1\u0155\1\0\1\114\1\0"+
- "\1\114\3\0\2\114\2\0\3\114\1\0\1\114\13\0"+
- "\1\u0155\2\114\1\u0155\2\114\1\u0155\2\114\1\0\4\114"+
- "\1\0\1\u0155\2\114\1\0\1\u0155\2\114\4\0\1\u0156"+
- "\1\237\1\240\1\237\1\0\1\237\1\u0156\1\0\1\237"+
- "\1\0\1\237\3\0\2\237\2\0\3\237\1\0\1\237"+
- "\13\0\1\u0156\2\237\1\u0156\2\237\1\u0156\2\237\1\0"+
- "\4\237\1\0\1\u0156\2\237\1\0\1\u0156\2\237\4\0"+
- "\1\u0157\1\122\1\243\1\122\1\0\1\122\1\u0157\1\0"+
- "\1\122\1\0\1\122\3\0\2\122\2\0\3\122\1\244"+
- "\1\122\13\0\1\u0157\2\122\1\u0157\2\122\1\u0157\2\122"+
- "\1\0\4\122\1\0\1\u0157\2\122\1\0\1\u0157\2\122"+
- "\4\0\1\u0158\1\246\1\247\1\246\1\250\1\246\1\u0158"+
- "\33\246\1\u0158\2\246\1\u0158\2\246\1\u0158\10\246\1\u0158"+
- "\3\246\1\u0158\5\246\1\0\1\u0159\1\251\1\252\3\251"+
- "\1\u0159\1\250\32\251\1\u0159\2\251\1\u0159\2\251\1\u0159"+
- "\10\251\1\u0159\3\251\1\u0159\5\251\1\0\1\u015a\1\256"+
- "\1\257\1\256\1\0\1\256\1\u015a\1\0\1\256\1\0"+
- "\1\256\3\0\2\256\2\0\3\256\1\0\1\256\13\0"+
- "\1\u015a\2\256\1\u015a\2\256\1\u015a\2\256\1\0\4\256"+
- "\1\0\1\u015a\2\256\1\0\1\u015a\2\256\4\0\1\u015b"+
- "\5\0\1\u015b\3\0\1\u010d\5\0\1\u015b\5\0\1\u015b"+
- "\13\0\2\u015b\1\0\2\u015b\1\0\2\u015b\7\0\2\u015b"+
- "\2\0\2\u015b\5\0\1\u015c\5\0\1\u015c\11\0\1\u015c"+
- "\5\0\1\u015c\13\0\2\u015c\1\0\2\u015c\1\0\2\u015c"+
- "\7\0\2\u015c\2\0\2\u015c\5\0\2\u0135\1\u0136\1\u015d"+
- "\1\0\2\u0135\1\0\1\u015d\1\u013a\4\u0135\2\u015d\5\u0135"+
- "\1\0\45\u0135\1\0\1\u015e\1\u0135\1\u0136\1\u015d\2\u0135"+
- "\1\u015e\1\u0135\1\u015d\1\u015f\4\u0135\2\u015d\22\u0135\1\u015e"+
- "\2\u0135\1\u015e\2\u0135\1\u015e\10\u0135\1\u015e\3\u0135\1\u015e"+
- "\5\u0135\1\0\2\u0138\1\u0160\1\0\1\u015d\11\u0138\2\0"+
- "\53\u0138\1\0\2\u0139\1\u0161\1\0\3\u0139\1\u015d\6\u0139"+
- "\2\0\53\u0139\24\0\1\u0162\50\0\1\u0163\1\32\1\147"+
- "\1\32\1\0\1\32\1\u0163\1\0\1\32\1\0\1\32"+
- "\3\0\2\32\2\0\3\32\1\0\1\32\13\0\1\u0163"+
- "\2\32\1\u0163\2\32\1\u0163\2\32\1\0\4\32\1\0"+
- "\1\u0163\2\32\1\0\1\u0163\2\32\4\0\1\u0164\1\152"+
- "\1\153\1\152\1\0\1\152\1\u0164\1\0\1\152\1\0"+
- "\1\152\3\0\2\152\2\0\3\152\1\0\1\152\13\0"+
- "\1\u0164\2\152\1\u0164\2\152\1\u0164\2\152\1\0\4\152"+
- "\1\0\1\u0164\2\152\1\0\1\u0164\2\152\4\0\1\u0165"+
- "\1\154\1\155\1\154\1\0\1\154\1\u0165\1\0\1\154"+
- "\1\0\1\154\3\0\2\154\2\0\3\154\1\0\1\154"+
- "\13\0\1\u0165\2\154\1\u0165\2\154\1\u0165\2\154\1\0"+
- "\4\154\1\0\1\u0165\2\154\1\0\1\u0165\2\154\54\0"+
- "\2\u0166\74\0\1\u0167\106\0\2\u0168\5\0\1\u0169\1\367"+
- "\1\370\1\367\1\0\1\367\1\u0169\1\0\1\367\1\u011a"+
- "\1\367\3\0\2\367\2\0\3\367\1\0\1\367\13\0"+
- "\1\u0169\2\367\1\u0169\2\367\1\u0169\2\367\1\0\4\367"+
- "\1\0\1\u0169\2\367\1\0\1\u0169\2\367\4\0\1\u016a"+
- "\1\171\1\172\1\171\1\0\1\171\1\u016a\1\0\1\171"+
- "\1\0\1\171\3\0\2\171\2\0\3\171\1\304\1\171"+
- "\13\0\1\u016a\2\171\1\u016a\2\171\1\u016a\2\171\1\0"+
- "\4\171\1\0\1\u016a\2\171\1\0\1\u016a\2\171\4\0"+
- "\1\u016b\1\173\1\174\1\173\1\175\1\173\1\u016b\33\173"+
- "\1\u016b\2\173\1\u016b\2\173\1\u016b\10\173\1\u016b\3\173"+
- "\1\u016b\5\173\1\0\1\u016c\1\176\1\177\3\176\1\u016c"+
- "\1\175\32\176\1\u016c\2\176\1\u016c\2\176\1\u016c\10\176"+
- "\1\u016c\3\176\1\u016c\5\176\1\0\1\u016d\1\201\1\202"+
- "\1\201\1\203\1\201\1\u016d\33\201\1\u016d\2\201\1\u016d"+
- "\2\201\1\u016d\10\201\1\u016d\3\201\1\u016d\5\201\1\0"+
- "\1\u016e\1\204\1\205\3\204\1\u016e\1\203\32\204\1\u016e"+
- "\2\204\1\u016e\2\204\1\u016e\10\204\1\u016e\3\204\1\u016e"+
- "\5\204\4\0\1\u0149\1\0\1\u0149\2\0\1\u0149\1\u0125"+
- "\4\0\2\u0149\54\0\1\u016f\1\u0121\1\u0122\1\u0121\1\0"+
- "\1\u0121\1\u016f\1\0\1\u0121\1\u0125\13\u0121\1\0\14\u0121"+
- "\1\u016f\2\u0121\1\u016f\2\u0121\1\u016f\10\u0121\1\u016f\3\u0121"+
- "\1\u016f\5\u0121\1\0\1\u0170\1\u0123\1\u014c\1\u0123\1\u0171"+
- "\1\u0123\1\u0170\10\u0123\1\u0172\22\u0123\1\u0170\2\u0123\1\u0170"+
- "\2\u0123\1\u0170\10\u0123\1\u0170\3\u0123\1\u0170\5\u0123\1\0"+
- "\1\u0173\1\u0124\1\u014d\3\u0124\1\u0173\1\u0174\7\u0124\1\u0175"+
- "\22\u0124\1\u0173\2\u0124\1\u0173\2\u0124\1\u0173\10\u0124\1\u0173"+
- "\3\u0124\1\u0173\5\u0124\1\0\1\u0176\1\60\1\207\1\60"+
- "\1\0\1\60\1\u0176\1\0\1\60\1\0\1\60\3\0"+
- "\2\60\2\0\3\60\1\0\1\60\13\0\1\u0176\2\60"+
- "\1\u0176\2\60\1\u0176\2\60\1\0\4\60\1\0\1\u0176"+
- "\2\60\1\0\1\u0176\2\60\4\0\1\u0177\1\64\1\212"+
- "\1\64\1\0\1\64\1\u0177\1\0\1\64\1\0\1\64"+
- "\3\0\2\64\2\0\3\64\1\0\1\64\13\0\1\u0177"+
- "\2\64\1\u0177\2\64\1\u0177\2\64\1\0\4\64\1\0"+
- "\1\u0177\2\64\1\0\1\u0177\2\64\4\0\1\u0178\1\71"+
- "\1\215\1\71\1\0\1\71\1\u0178\1\0\1\71\1\0"+
- "\1\71\3\0\2\71\2\0\3\71\1\0\1\71\13\0"+
- "\1\u0178\2\71\1\u0178\2\71\1\u0178\2\71\1\0\4\71"+
- "\1\0\1\u0178\2\71\1\0\1\u0178\2\71\4\0\1\u0179"+
- "\1\101\1\221\1\101\1\0\1\101\1\u0179\1\0\1\101"+
- "\1\0\1\101\3\0\2\101\2\0\3\101\1\0\1\101"+
- "\13\0\1\u0179\2\101\1\u0179\2\101\1\u0179\2\101\1\0"+
- "\4\101\1\0\1\u0179\2\101\1\0\1\u0179\2\101\4\0"+
- "\1\u017a\1\107\1\224\1\107\1\0\1\107\1\u017a\1\0"+
- "\1\107\1\0\1\107\3\0\2\107\2\0\3\107\1\0"+
- "\1\107\13\0\1\u017a\2\107\1\u017a\2\107\1\u017a\2\107"+
- "\1\0\4\107\1\0\1\u017a\2\107\1\0\1\u017a\2\107"+
- "\4\0\1\u017b\1\226\1\227\1\226\1\230\1\226\1\u017b"+
- "\33\226\1\u017b\2\226\1\u017b\2\226\1\u017b\10\226\1\u017b"+
- "\3\226\1\u017b\5\226\1\0\1\u017c\1\231\1\232\3\231"+
- "\1\u017c\1\230\32\231\1\u017c\2\231\1\u017c\2\231\1\u017c"+
- "\10\231\1\u017c\3\231\1\u017c\5\231\1\0\1\u017d\1\114"+
- "\1\234\1\114\1\0\1\114\1\u017d\1\0\1\114\1\0"+
- "\1\114\3\0\2\114\2\0\3\114\1\0\1\114\13\0"+
- "\1\u017d\2\114\1\u017d\2\114\1\u017d\2\114\1\0\4\114"+
- "\1\0\1\u017d\2\114\1\0\1\u017d\2\114\4\0\1\u017e"+
- "\1\237\1\240\1\237\1\0\1\237\1\u017e\1\0\1\237"+
- "\1\0\1\237\3\0\2\237\2\0\3\237\1\0\1\237"+
- "\13\0\1\u017e\2\237\1\u017e\2\237\1\u017e\2\237\1\0"+
- "\4\237\1\0\1\u017e\2\237\1\0\1\u017e\2\237\4\0"+
- "\1\u017f\1\122\1\243\1\122\1\0\1\122\1\u017f\1\0"+
- "\1\122\1\0\1\122\3\0\2\122\2\0\3\122\1\244"+
- "\1\122\13\0\1\u017f\2\122\1\u017f\2\122\1\u017f\2\122"+
- "\1\0\4\122\1\0\1\u017f\2\122\1\0\1\u017f\2\122"+
- "\4\0\1\u0180\1\246\1\247\1\246\1\250\1\246\1\u0180"+
- "\33\246\1\u0180\2\246\1\u0180\2\246\1\u0180\10\246\1\u0180"+
- "\3\246\1\u0180\5\246\1\0\1\u0181\1\251\1\252\3\251"+
- "\1\u0181\1\250\32\251\1\u0181\2\251\1\u0181\2\251\1\u0181"+
- "\10\251\1\u0181\3\251\1\u0181\5\251\1\0\1\u0182\1\256"+
- "\1\257\1\256\1\0\1\256\1\u0182\1\0\1\256\1\0"+
- "\1\256\3\0\2\256\2\0\3\256\1\0\1\256\13\0"+
- "\1\u0182\2\256\1\u0182\2\256\1\u0182\2\256\1\0\4\256"+
- "\1\0\1\u0182\2\256\1\0\1\u0182\2\256\4\0\1\u0183"+
- "\5\0\1\u0183\3\0\1\u010d\5\0\1\u0183\5\0\1\u0183"+
- "\13\0\2\u0183\1\0\2\u0183\1\0\2\u0183\7\0\2\u0183"+
- "\2\0\2\u0183\5\0\1\u0184\5\0\1\u0184\11\0\1\u0184"+
- "\5\0\1\u0184\13\0\2\u0184\1\0\2\u0184\1\0\2\u0184"+
- "\7\0\2\u0184\2\0\2\u0184\10\0\1\u015d\1\0\1\u015d"+
- "\2\0\1\u015d\1\u013a\4\0\2\u015d\54\0\1\u0185\1\u0135"+
- "\1\u0136\1\u0135\1\0\1\u0135\1\u0185\1\0\1\u0135\1\u013a"+
- "\13\u0135\1\0\14\u0135\1\u0185\2\u0135\1\u0185\2\u0135\1\u0185"+
- "\10\u0135\1\u0185\3\u0135\1\u0185\5\u0135\1\0\1\u0186\1\u0138"+
- "\1\u0160\1\u0138\1\u0187\1\u0138\1\u0186\10\u0138\1\u0188\22\u0138"+
- "\1\u0186\2\u0138\1\u0186\2\u0138\1\u0186\10\u0138\1\u0186\3\u0138"+
- "\1\u0186\5\u0138\1\0\1\u0189\1\u0139\1\u0161\3\u0139\1\u0189"+
- "\1\u018a\7\u0139\1\u018b\22\u0139\1\u0189\2\u0139\1\u0189\2\u0139"+
- "\1\u0189\10\u0139\1\u0189\3\u0139\1\u0189\5\u0139\53\0\1\u018c"+
- "\21\0\2\32\1\147\1\32\1\0\2\32\1\0\1\32"+
- "\1\0\1\32\3\0\2\32\2\0\3\32\1\0\1\32"+
- "\13\0\11\32\1\0\4\32\1\0\3\32\1\0\3\32"+
- "\4\0\1\u018d\1\152\1\153\1\152\1\0\1\152\1\u018d"+
- "\1\0\1\152\1\0\1\152\3\0\2\152\2\0\3\152"+
- "\1\0\1\152\13\0\1\u018d\2\152\1\u018d\2\152\1\u018d"+
- "\2\152\1\0\4\152\1\0\1\u018d\2\152\1\0\1\u018d"+
- "\2\152\4\0\1\u018e\1\154\1\155\1\154\1\0\1\154"+
- "\1\u018e\1\0\1\154\1\0\1\154\3\0\2\154\2\0"+
- "\3\154\1\0\1\154\13\0\1\u018e\2\154\1\u018e\2\154"+
- "\1\u018e\2\154\1\0\4\154\1\0\1\u018e\2\154\1\0"+
- "\1\u018e\2\154\56\0\1\u018f\66\0\2\u0190\25\0\1\u0191"+
- "\1\367\1\370\1\367\1\0\1\367\1\u0191\1\0\1\367"+
- "\1\u011a\1\367\3\0\2\367\2\0\3\367\1\0\1\367"+
- "\13\0\1\u0191\2\367\1\u0191\2\367\1\u0191\2\367\1\0"+
- "\4\367\1\0\1\u0191\2\367\1\0\1\u0191\2\367\4\0"+
- "\1\u0192\1\171\1\172\1\171\1\0\1\171\1\u0192\1\0"+
- "\1\171\1\0\1\171\3\0\2\171\2\0\3\171\1\304"+
- "\1\171\13\0\1\u0192\2\171\1\u0192\2\171\1\u0192\2\171"+
- "\1\0\4\171\1\0\1\u0192\2\171\1\0\1\u0192\2\171"+
- "\4\0\1\u0193\1\173\1\174\1\173\1\175\1\173\1\u0193"+
- "\33\173\1\u0193\2\173\1\u0193\2\173\1\u0193\10\173\1\u0193"+
- "\3\173\1\u0193\5\173\1\0\1\u0194\1\176\1\177\3\176"+
- "\1\u0194\1\175\32\176\1\u0194\2\176\1\u0194\2\176\1\u0194"+
- "\10\176\1\u0194\3\176\1\u0194\5\176\1\0\1\u0195\1\201"+
- "\1\202\1\201\1\203\1\201\1\u0195\33\201\1\u0195\2\201"+
- "\1\u0195\2\201\1\u0195\10\201\1\u0195\3\201\1\u0195\5\201"+
- "\1\0\1\u0196\1\204\1\205\3\204\1\u0196\1\203\32\204"+
- "\1\u0196\2\204\1\u0196\2\204\1\u0196\10\204\1\u0196\3\204"+
- "\1\u0196\5\204\1\0\1\u0197\1\u0121\1\u0122\1\u0121\1\0"+
- "\1\u0121\1\u0197\1\0\1\u0121\1\u0125\13\u0121\1\0\14\u0121"+
- "\1\u0197\2\u0121\1\u0197\2\u0121\1\u0197\10\u0121\1\u0197\3\u0121"+
- "\1\u0197\5\u0121\1\0\1\u0198\1\u0123\1\u014c\1\u0123\1\u0149"+
- "\1\u0123\1\u0198\33\u0123\1\u0198\2\u0123\1\u0198\2\u0123\1\u0198"+
- "\10\u0123\1\u0198\3\u0123\1\u0198\5\u0123\1\0\2\u0123\1\u014c"+
- "\2\u0149\1\u0171\2\u0123\1\u0171\1\u0199\4\u0123\2\u0149\53\u0123"+
- "\1\0\2\u0123\1\u014c\1\0\1\u0149\12\u0123\1\0\53\u0123"+
- "\1\0\1\u019a\1\u0124\1\u014d\3\u0124\1\u019a\1\u0149\32\u0124"+
- "\1\u019a\2\u0124\1\u019a\2\u0124\1\u019a\10\u0124\1\u019a\3\u0124"+
- "\1\u019a\5\u0124\1\0\2\u0124\1\u014d\1\u0149\1\u0124\1\u0174"+
- "\1\u0124\1\u0149\1\u0174\1\u019b\4\u0124\2\u0149\53\u0124\1\0"+
- "\2\u0124\1\u014d\1\0\3\u0124\1\u0149\7\u0124\1\0\53\u0124"+
- "\1\0\2\60\1\207\1\60\1\0\2\60\1\0\1\60"+
- "\1\0\1\60\3\0\2\60\2\0\3\60\1\0\1\60"+
- "\13\0\11\60\1\0\4\60\1\0\3\60\1\0\3\60"+
- "\4\0\2\64\1\212\1\64\1\0\2\64\1\0\1\64"+
- "\1\0\1\64\3\0\2\64\2\0\3\64\1\0\1\64"+
- "\13\0\11\64\1\0\4\64\1\0\3\64\1\0\3\64"+
- "\4\0\2\71\1\215\1\71\1\0\2\71\1\0\1\71"+
- "\1\0\1\71\3\0\2\71\2\0\3\71\1\0\1\71"+
- "\13\0\11\71\1\0\4\71\1\0\3\71\1\0\3\71"+
- "\4\0\2\101\1\221\1\101\1\0\2\101\1\0\1\101"+
- "\1\0\1\101\3\0\2\101\2\0\3\101\1\0\1\101"+
- "\13\0\11\101\1\0\4\101\1\0\3\101\1\0\3\101"+
- "\4\0\2\107\1\224\1\107\1\0\2\107\1\0\1\107"+
- "\1\0\1\107\3\0\2\107\2\0\3\107\1\0\1\107"+
- "\13\0\11\107\1\0\4\107\1\0\3\107\1\0\3\107"+
- "\4\0\1\u019c\1\226\1\227\1\226\1\230\1\226\1\u019c"+
- "\33\226\1\u019c\2\226\1\u019c\2\226\1\u019c\10\226\1\u019c"+
- "\3\226\1\u019c\5\226\1\0\1\u019d\1\231\1\232\3\231"+
- "\1\u019d\1\230\32\231\1\u019d\2\231\1\u019d\2\231\1\u019d"+
- "\10\231\1\u019d\3\231\1\u019d\5\231\1\0\2\114\1\234"+
- "\1\114\1\0\2\114\1\0\1\114\1\0\1\114\3\0"+
- "\2\114\2\0\3\114\1\0\1\114\13\0\11\114\1\0"+
- "\4\114\1\0\3\114\1\0\3\114\4\0\1\u019e\1\237"+
- "\1\240\1\237\1\0\1\237\1\u019e\1\0\1\237\1\0"+
- "\1\237\3\0\2\237\2\0\3\237\1\0\1\237\13\0"+
- "\1\u019e\2\237\1\u019e\2\237\1\u019e\2\237\1\0\4\237"+
- "\1\0\1\u019e\2\237\1\0\1\u019e\2\237\4\0\2\122"+
- "\1\243\1\122\1\0\2\122\1\0\1\122\1\0\1\122"+
- "\3\0\2\122\2\0\3\122\1\244\1\122\13\0\11\122"+
- "\1\0\4\122\1\0\3\122\1\0\3\122\4\0\1\u019f"+
- "\1\246\1\247\1\246\1\250\1\246\1\u019f\33\246\1\u019f"+
- "\2\246\1\u019f\2\246\1\u019f\10\246\1\u019f\3\246\1\u019f"+
- "\5\246\1\0\1\u01a0\1\251\1\252\3\251\1\u01a0\1\250"+
- "\32\251\1\u01a0\2\251\1\u01a0\2\251\1\u01a0\10\251\1\u01a0"+
- "\3\251\1\u01a0\5\251\1\0\1\u01a1\1\256\1\257\1\256"+
- "\1\0\1\256\1\u01a1\1\0\1\256\1\0\1\256\3\0"+
- "\2\256\2\0\3\256\1\0\1\256\13\0\1\u01a1\2\256"+
- "\1\u01a1\2\256\1\u01a1\2\256\1\0\4\256\1\0\1\u01a1"+
- "\2\256\1\0\1\u01a1\2\256\4\0\1\u01a2\5\0\1\u01a2"+
- "\3\0\1\u010d\5\0\1\u01a2\5\0\1\u01a2\13\0\2\u01a2"+
- "\1\0\2\u01a2\1\0\2\u01a2\7\0\2\u01a2\2\0\2\u01a2"+
- "\5\0\1\u01a3\5\0\1\u01a3\11\0\1\u01a3\5\0\1\u01a3"+
- "\13\0\2\u01a3\1\0\2\u01a3\1\0\2\u01a3\7\0\2\u01a3"+
- "\2\0\2\u01a3\5\0\1\u01a4\1\u0135\1\u0136\1\u0135\1\0"+
- "\1\u0135\1\u01a4\1\0\1\u0135\1\u013a\13\u0135\1\0\14\u0135"+
- "\1\u01a4\2\u0135\1\u01a4\2\u0135\1\u01a4\10\u0135\1\u01a4\3\u0135"+
- "\1\u01a4\5\u0135\1\0\1\u01a5\1\u0138\1\u0160\1\u0138\1\u015d"+
- "\1\u0138\1\u01a5\33\u0138\1\u01a5\2\u0138\1\u01a5\2\u0138\1\u01a5"+
- "\10\u0138\1\u01a5\3\u0138\1\u01a5\5\u0138\1\0\2\u0138\1\u0160"+
- "\2\u015d\1\u0187\2\u0138\1\u0187\1\u01a6\4\u0138\2\u015d\53\u0138"+
- "\1\0\2\u0138\1\u0160\1\0\1\u015d\12\u0138\1\0\53\u0138"+
- "\1\0\1\u01a7\1\u0139\1\u0161\3\u0139\1\u01a7\1\u015d\32\u0139"+
- "\1\u01a7\2\u0139\1\u01a7\2\u0139\1\u01a7\10\u0139\1\u01a7\3\u0139"+
- "\1\u01a7\5\u0139\1\0\2\u0139\1\u0161\1\u015d\1\u0139\1\u018a"+
- "\1\u0139\1\u015d\1\u018a\1\u01a8\4\u0139\2\u015d\53\u0139\1\0"+
- "\2\u0139\1\u0161\1\0\3\u0139\1\u015d\7\u0139\1\0\53\u0139"+
- "\46\0\2\u01a9\25\0\2\152\1\153\1\152\1\0\2\152"+
- "\1\0\1\152\1\0\1\152\3\0\2\152\2\0\3\152"+
- "\1\0\1\152\13\0\11\152\1\0\4\152\1\0\3\152"+
- "\1\0\3\152\4\0\2\154\1\155\1\154\1\0\2\154"+
- "\1\0\1\154\1\0\1\154\3\0\2\154\2\0\3\154"+
- "\1\0\1\154\13\0\11\154\1\0\4\154\1\0\3\154"+
- "\1\0\3\154\46\0\2\u01aa\30\0\1\u01ab\1\367\1\370"+
- "\1\367\1\0\1\367\1\u01ab\1\0\1\367\1\u011a\1\367"+
- "\3\0\2\367\2\0\3\367\1\0\1\367\13\0\1\u01ab"+
- "\2\367\1\u01ab\2\367\1\u01ab\2\367\1\0\4\367\1\0"+
- "\1\u01ab\2\367\1\0\1\u01ab\2\367\4\0\2\171\1\172"+
- "\1\171\1\0\2\171\1\0\1\171\1\0\1\171\3\0"+
- "\2\171\2\0\3\171\1\304\1\171\13\0\11\171\1\0"+
- "\4\171\1\0\3\171\1\0\3\171\4\0\2\173\1\174"+
- "\1\173\1\175\66\173\1\0\2\176\1\177\4\176\1\175"+
- "\63\176\1\0\2\201\1\202\1\201\1\203\66\201\1\0"+
- "\2\204\1\205\4\204\1\203\63\204\1\0\1\u01ac\1\u0121"+
- "\1\u0122\1\u0121\1\0\1\u0121\1\u01ac\1\0\1\u0121\1\u0125"+
- "\13\u0121\1\0\14\u0121\1\u01ac\2\u0121\1\u01ac\2\u0121\1\u01ac"+
- "\10\u0121\1\u01ac\3\u0121\1\u01ac\5\u0121\1\0\1\u01ad\1\u0123"+
- "\1\u014c\1\u0123\1\u0149\1\u0123\1\u01ad\33\u0123\1\u01ad\2\u0123"+
- "\1\u01ad\2\u0123\1\u01ad\10\u0123\1\u01ad\3\u0123\1\u01ad\5\u0123"+
- "\1\0\1\u01ae\1\u0124\1\u014d\3\u0124\1\u01ae\1\u0149\32\u0124"+
- "\1\u01ae\2\u0124\1\u01ae\2\u0124\1\u01ae\10\u0124\1\u01ae\3\u0124"+
- "\1\u01ae\5\u0124\1\0\2\226\1\227\1\226\1\230\66\226"+
- "\1\0\2\231\1\232\4\231\1\230\63\231\1\0\2\237"+
- "\1\240\1\237\1\0\2\237\1\0\1\237\1\0\1\237"+
- "\3\0\2\237\2\0\3\237\1\0\1\237\13\0\11\237"+
- "\1\0\4\237\1\0\3\237\1\0\3\237\4\0\2\246"+
- "\1\247\1\246\1\250\66\246\1\0\2\251\1\252\4\251"+
- "\1\250\63\251\1\0\2\256\1\257\1\256\1\0\2\256"+
- "\1\0\1\256\1\0\1\256\3\0\2\256\2\0\3\256"+
- "\1\0\1\256\13\0\11\256\1\0\4\256\1\0\3\256"+
- "\1\0\3\256\16\0\1\u010d\61\0\1\u01af\5\0\1\u01af"+
- "\11\0\1\u01af\5\0\1\u01af\13\0\2\u01af\1\0\2\u01af"+
- "\1\0\2\u01af\7\0\2\u01af\2\0\2\u01af\5\0\1\u01b0"+
- "\1\u0135\1\u0136\1\u0135\1\0\1\u0135\1\u01b0\1\0\1\u0135"+
- "\1\u013a\13\u0135\1\0\14\u0135\1\u01b0\2\u0135\1\u01b0\2\u0135"+
- "\1\u01b0\10\u0135\1\u01b0\3\u0135\1\u01b0\5\u0135\1\0\1\u01b1"+
- "\1\u0138\1\u0160\1\u0138\1\u015d\1\u0138\1\u01b1\33\u0138\1\u01b1"+
- "\2\u0138\1\u01b1\2\u0138\1\u01b1\10\u0138\1\u01b1\3\u0138\1\u01b1"+
- "\5\u0138\1\0\1\u01b2\1\u0139\1\u0161\3\u0139\1\u01b2\1\u015d"+
- "\32\u0139\1\u01b2\2\u0139\1\u01b2\2\u0139\1\u01b2\10\u0139\1\u01b2"+
- "\3\u0139\1\u01b2\5\u0139\70\0\1\u01b3\54\0\2\u01b4\22\0"+
- "\1\u01b5\1\367\1\370\1\367\1\0\1\367\1\u01b5\1\0"+
- "\1\367\1\u011a\1\367\3\0\2\367\2\0\3\367\1\0"+
- "\1\367\13\0\1\u01b5\2\367\1\u01b5\2\367\1\u01b5\2\367"+
- "\1\0\4\367\1\0\1\u01b5\2\367\1\0\1\u01b5\2\367"+
- "\4\0\1\u01b6\1\u0121\1\u0122\1\u0121\1\0\1\u0121\1\u01b6"+
- "\1\0\1\u0121\1\u0125\13\u0121\1\0\14\u0121\1\u01b6\2\u0121"+
- "\1\u01b6\2\u0121\1\u01b6\10\u0121\1\u01b6\3\u0121\1\u01b6\5\u0121"+
- "\1\0\1\u01b7\1\u0123\1\u014c\1\u0123\1\u0149\1\u0123\1\u01b7"+
- "\33\u0123\1\u01b7\2\u0123\1\u01b7\2\u0123\1\u01b7\10\u0123\1\u01b7"+
- "\3\u0123\1\u01b7\5\u0123\1\0\1\u01b8\1\u0124\1\u014d\3\u0124"+
- "\1\u01b8\1\u0149\32\u0124\1\u01b8\2\u0124\1\u01b8\2\u0124\1\u01b8"+
- "\10\u0124\1\u01b8\3\u0124\1\u01b8\5\u0124\1\0\1\u01b9\5\0"+
- "\1\u01b9\11\0\1\u01b9\5\0\1\u01b9\13\0\2\u01b9\1\0"+
- "\2\u01b9\1\0\2\u01b9\7\0\2\u01b9\2\0\2\u01b9\5\0"+
- "\1\u01ba\1\u0135\1\u0136\1\u0135\1\0\1\u0135\1\u01ba\1\0"+
- "\1\u0135\1\u013a\13\u0135\1\0\14\u0135\1\u01ba\2\u0135\1\u01ba"+
- "\2\u0135\1\u01ba\10\u0135\1\u01ba\3\u0135\1\u01ba\5\u0135\1\0"+
- "\1\u01bb\1\u0138\1\u0160\1\u0138\1\u015d\1\u0138\1\u01bb\33\u0138"+
- "\1\u01bb\2\u0138\1\u01bb\2\u0138\1\u01bb\10\u0138\1\u01bb\3\u0138"+
- "\1\u01bb\5\u0138\1\0\1\u01bc\1\u0139\1\u0161\3\u0139\1\u01bc"+
- "\1\u015d\32\u0139\1\u01bc\2\u0139\1\u01bc\2\u0139\1\u01bc\10\u0139"+
- "\1\u01bc\3\u0139\1\u01bc\5\u0139\53\0\1\u01bd\21\0\2\367"+
- "\1\370\1\367\1\0\2\367\1\0\1\367\1\u011a\1\367"+
- "\3\0\2\367\2\0\3\367\1\0\1\367\13\0\11\367"+
- "\1\0\4\367\1\0\3\367\1\0\3\367\4\0\1\u01be"+
- "\1\u0121\1\u0122\1\u0121\1\0\1\u0121\1\u01be\1\0\1\u0121"+
- "\1\u0125\13\u0121\1\0\14\u0121\1\u01be\2\u0121\1\u01be\2\u0121"+
- "\1\u01be\10\u0121\1\u01be\3\u0121\1\u01be\5\u0121\1\0\1\u01bf"+
- "\1\u0123\1\u014c\1\u0123\1\u0149\1\u0123\1\u01bf\33\u0123\1\u01bf"+
- "\2\u0123\1\u01bf\2\u0123\1\u01bf\10\u0123\1\u01bf\3\u0123\1\u01bf"+
- "\5\u0123\1\0\1\u01c0\1\u0124\1\u014d\3\u0124\1\u01c0\1\u0149"+
- "\32\u0124\1\u01c0\2\u0124\1\u01c0\2\u0124\1\u01c0\10\u0124\1\u01c0"+
- "\3\u0124\1\u01c0\5\u0124\1\0\1\u01c1\1\u0135\1\u0136\1\u0135"+
- "\1\0\1\u0135\1\u01c1\1\0\1\u0135\1\u013a\13\u0135\1\0"+
- "\14\u0135\1\u01c1\2\u0135\1\u01c1\2\u0135\1\u01c1\10\u0135\1\u01c1"+
- "\3\u0135\1\u01c1\5\u0135\1\0\1\u01c2\1\u0138\1\u0160\1\u0138"+
- "\1\u015d\1\u0138\1\u01c2\33\u0138\1\u01c2\2\u0138\1\u01c2\2\u0138"+
- "\1\u01c2\10\u0138\1\u01c2\3\u0138\1\u01c2\5\u0138\1\0\1\u01c3"+
- "\1\u0139\1\u0161\3\u0139\1\u01c3\1\u015d\32\u0139\1\u01c3\2\u0139"+
- "\1\u01c3\2\u0139\1\u01c3\10\u0139\1\u01c3\3\u0139\1\u01c3\5\u0139"+
- "\1\0\2\u0121\1\u0122\1\u0121\1\0\2\u0121\1\0\1\u0121"+
- "\1\u0125\13\u0121\1\0\45\u0121\1\0\1\u01c4\1\u0123\1\u014c"+
- "\1\u0123\1\u0149\1\u0123\1\u01c4\33\u0123\1\u01c4\2\u0123\1\u01c4"+
- "\2\u0123\1\u01c4\10\u0123\1\u01c4\3\u0123\1\u01c4\5\u0123\1\0"+
- "\1\u01c5\1\u0124\1\u014d\3\u0124\1\u01c5\1\u0149\32\u0124\1\u01c5"+
- "\2\u0124\1\u01c5\2\u0124\1\u01c5\10\u0124\1\u01c5\3\u0124\1\u01c5"+
- "\5\u0124\1\0\2\u0135\1\u0136\1\u0135\1\0\2\u0135\1\0"+
- "\1\u0135\1\u013a\13\u0135\1\0\45\u0135\1\0\1\u01c6\1\u0138"+
- "\1\u0160\1\u0138\1\u015d\1\u0138\1\u01c6\33\u0138\1\u01c6\2\u0138"+
- "\1\u01c6\2\u0138\1\u01c6\10\u0138\1\u01c6\3\u0138\1\u01c6\5\u0138"+
- "\1\0\1\u01c7\1\u0139\1\u0161\3\u0139\1\u01c7\1\u015d\32\u0139"+
- "\1\u01c7\2\u0139\1\u01c7\2\u0139\1\u01c7\10\u0139\1\u01c7\3\u0139"+
- "\1\u01c7\5\u0139\1\0\2\u0123\1\u014c\1\u0123\1\u0149\66\u0123"+
- "\1\0\2\u0124\1\u014d\4\u0124\1\u0149\63\u0124\1\0\2\u0138"+
- "\1\u0160\1\u0138\1\u015d\66\u0138\1\0\2\u0139\1\u0161\4\u0139"+
- "\1\u015d\63\u0139";
-
- private static int [] zzUnpackTrans() {
- int [] result = new int[22260];
- int offset = 0;
- offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackTrans(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++);
- value--;
- 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"
- };
-
- /**
- * ZZ_ATTRIBUTE[aState] contains the attributes of state <code>aState</code>
- */
- private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute();
-
- private static final String ZZ_ATTRIBUTE_PACKED_0 =
- "\30\0\1\11\10\1\1\11\2\1\1\11\1\1\1\11"+
- "\4\1\1\11\6\1\1\11\3\1\2\11\3\1\1\11"+
- "\1\1\1\3\2\11\3\1\1\11\1\1\1\11\10\1"+
- "\2\11\5\1\1\11\7\1\1\11\1\3\3\1\3\11"+
- "\1\1\1\0\3\1\1\0\1\1\2\0\1\1\2\0"+
- "\1\11\6\0\1\1\3\0\1\11\5\0\1\11\4\0"+
- "\2\1\1\0\2\1\1\0\2\1\1\15\1\0\2\1"+
- "\1\0\1\1\2\0\1\11\2\0\1\1\1\0\3\1"+
- "\2\0\1\11\1\0\1\11\1\1\2\0\1\11\2\0"+
- "\4\1\2\0\1\1\2\0\1\15\1\1\1\0\1\11"+
- "\1\0\1\1\1\11\2\1\10\0\1\1\1\0\1\1"+
- "\2\0\1\1\2\0\1\1\2\0\1\1\2\0\5\1"+
- "\1\0\1\1\2\0\1\1\1\0\3\1\1\0\1\1"+
- "\2\0\1\1\1\0\3\1\3\0\3\1\1\11\5\0"+
- "\1\11\2\0\1\1\5\0\5\1\2\0\3\1\2\0"+
- "\2\1\1\0\1\1\1\0\1\11\3\1\3\0\1\11"+
- "\2\0\1\11\1\0\1\1\10\0\1\11\5\1\2\0"+
- "\3\1\2\0\3\1\5\0\1\11\1\0\3\1\2\0"+
- "\1\11\2\0\1\1\6\0\1\1\2\0\5\1\2\0"+
- "\3\1\2\0\3\1\2\0\1\1\3\0\3\1\1\0"+
- "\1\11\2\0\1\1\13\0\5\1\2\0\3\1\2\0"+
- "\3\1\10\0\2\1\1\11\2\0\1\1\6\0\1\1"+
- "\1\0\1\1\2\0\1\1\2\0\3\1\2\0\1\1"+
- "\1\0\1\1\6\0\1\1\4\0\1\11\4\0\1\11"+
- "\3\0\1\11\12\0";
-
- private static int [] zzUnpackAttribute() {
- int [] result = new int[455];
- int offset = 0;
- offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result);
- return result;
- }
-
- private static int zzUnpackAttribute(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;
- }
-
- /** 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;
-
- /* user code: */
- 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;
- }
- }
- // [236008] - Should not try and consider the token a
- // comment unless a comment was started
- if (context == CSS_JSP_SCRIPTLET && nextTokenType == CSS_JSP_COMMENT){
- 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);
- }
-
-
- /**
- * 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 JSPedCSSTokenizer(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 JSPedCSSTokenizer(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 < 170) {
- 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;
- yychar = 0;//yyline = yychar = 0;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;
- }
-
-
- /**
- * 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;
-
- int [] zzTransL = ZZ_TRANS;
- int [] zzRowMapL = ZZ_ROWMAP;
- int [] zzAttrL = ZZ_ATTRIBUTE;
- int zzPushbackPosL = zzPushbackPos = -1;
- boolean zzWasPushback;
-
- while (true) {
- zzMarkedPosL = zzMarkedPos;
-
- yychar+= zzMarkedPosL-zzStartRead;
-
- zzAction = -1;
-
- zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL;
-
- zzState = zzLexicalState;
-
- zzWasPushback = false;
-
- 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;
- zzPushbackPos = zzPushbackPosL;
- boolean eof = zzRefill();
- // get translated positions and possibly new buffer
- zzCurrentPosL = zzCurrentPos;
- zzMarkedPosL = zzMarkedPos;
- zzBufferL = zzBuffer;
- zzEndReadL = zzEndRead;
- zzPushbackPosL = zzPushbackPos;
- if (eof) {
- zzInput = YYEOF;
- break zzForAction;
- }
- else {
- zzInput = zzBufferL[zzCurrentPosL++];
- }
- }
- int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ];
- if (zzNext == -1) break zzForAction;
- zzState = zzNext;
-
- int zzAttributes = zzAttrL[zzState];
- if ( (zzAttributes & 2) == 2 )
- zzPushbackPosL = zzCurrentPosL;
-
- if ( (zzAttributes & 1) == 1 ) {
- zzWasPushback = (zzAttributes & 4) == 4;
- zzAction = zzState;
- zzMarkedPosL = zzCurrentPosL;
- if ( (zzAttributes & 8) == 8 ) break zzForAction;
- }
-
- }
- }
-
- // store back cached position
- zzMarkedPos = zzMarkedPosL;
- if (zzWasPushback)
- zzMarkedPos = zzPushbackPosL;
-
- switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) {
- case 38:
- { yybegin(ST_IMPORT_MEDIUM); return CSS_STRING;
- }
- case 60: break;
- case 39:
- { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_DIMENSION;
- }
- case 61: break;
- case 44:
- { return CSS_DECLARATION_VALUE_S;
- }
- case 62: break;
- case 41:
- { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_FUNCTION;
- }
- case 63: break;
- case 19:
- { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ATTRIBUTE_END;
- }
- case 64: break;
- case 1:
- { return UNDEFINED;
- }
- case 65: break;
- case 8:
- { yybegin(ST_IMPORT_DELIMITER); return CSS_MEDIUM;
- }
- case 66: break;
- case 42:
- { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_STRING;
- }
- case 67: break;
- case 32:
- { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_CLASS;
- }
- case 68: break;
- case 11:
- { yybegin(YYINITIAL); return CSS_LBRACE;
- }
- case 69: break;
- case 4:
- { yybegin(YYINITIAL); return CSS_RBRACE;
- }
- case 70: break;
- case 10:
- { yybegin(ST_MEDIA_DELIMITER); return CSS_MEDIUM;
- }
- case 71: break;
- case 9:
- { yybegin(ST_IMPORT_MEDIUM); return CSS_MEDIA_SEPARATOR;
- }
- case 72: break;
- case 23:
- { yybegin(ST_DECLARATION_PRE_VALUE); return CSS_DECLARATION_SEPARATOR;
- }
- case 73: break;
- case 58:
- { yybegin(ST_FONT_FACE_DELIMITER); return CSS_FONT_FACE;
- }
- case 74: break;
- case 57:
- { yybegin(ST_CHARSET_NAME); return CSS_CHARSET;
- }
- case 75: break;
- case 31:
- { yyJspEnd(); return CSS_EL_END;
- }
- case 76: break;
- case 46:
- { yyJspEnd(); return CSS_JSP_END;
- }
- case 77: break;
- case 53:
- { yybegin(ST_IMPORT_MEDIUM); return CSS_URI;
- }
- case 78: break;
- case 18:
- { yybegin(ST_SELECTOR_ATTRIBUTE_VALUE); return CSS_SELECTOR_ATTRIBUTE_OPERATOR;
- }
- case 79: break;
- case 47:
- { return CSS_CDC;
- }
- case 80: break;
- case 14:
- { yybegin(ST_DECLARATION); return CSS_LBRACE;
- }
- case 81: break;
- case 5:
- { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_UNIVERSAL;
- }
- case 82: break;
- case 6:
- { yybegin(ST_SELECTOR_ATTRIBUTE_NAME); return CSS_SELECTOR_ATTRIBUTE_START;
- }
- case 83: break;
- case 49:
- { return CSS_CDO;
- }
- case 84: break;
- case 7:
- { yybegin(YYINITIAL); return CSS_DELIMITER;
- }
- case 85: break;
- case 17:
- { yybegin(ST_SELECTOR_ATTRIBUTE_OPERATOR); return CSS_SELECTOR_ATTRIBUTE_NAME;
- }
- case 86: break;
- case 43:
- { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_HASH;
- }
- case 87: break;
- case 52:
- { yybegin(ST_PAGE_PSEUDO_PAGE); return CSS_PAGE;
- }
- case 88: break;
- case 2:
- { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ELEMENT_NAME;
- }
- case 89: break;
- case 37:
- { yybegin(ST_CHARSET_DELIMITER); return CSS_STRING;
- }
- case 90: break;
- case 35:
- { yyJspBegin(ST_JSP_EL); return CSS_JSP_EL;
- }
- case 91: break;
- case 24:
- { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_NUMBER;
- }
- case 92: break;
- case 15:
- { yybegin(ST_SELECTOR); return CSS_SELECTOR_COMBINATOR;
- }
- case 93: break;
- case 48:
- { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_UNICODE_RANGE;
- }
- case 94: break;
- case 40:
- { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_PERCENTAGE;
- }
- case 95: break;
- case 12:
- { yybegin(ST_MEDIA_MEDIUM); return CSS_MEDIA_SEPARATOR;
- }
- case 96: break;
- case 25:
- { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_IDENT;
- }
- case 97: break;
- case 13:
- { yybegin(ST_PAGE_DELIMITER); return CSS_PAGE_SELECTOR;
- }
- case 98: break;
- case 27:
- { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_OPERATOR;
- }
- case 99: break;
- case 50:
- { return CSS_COMMENT;
- }
- case 100: break;
- case 59:
- { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_IMPORTANT;
- }
- case 101: break;
- case 20:
- { yybegin(ST_SELECTOR_ATTRIBUTE_END); return CSS_SELECTOR_ATTRIBUTE_VALUE;
- }
- case 102: break;
- case 16:
- { yybegin(ST_SELECTOR); return CSS_SELECTOR_SEPARATOR;
- }
- case 103: break;
- case 3:
- { return CSS_S;
- }
- case 104: break;
- case 51:
- { yyJspEnd(); return CSS_JSP_COMMENT_END;
- }
- case 105: break;
- case 33:
- { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_ID;
- }
- case 106: break;
- case 30:
- { yybegin(ST_JSP_DECLARATION); return CSS_JSP_DECL;
- }
- case 107: break;
- case 56:
- { yybegin(ST_IMPORT_URI); return CSS_IMPORT;
- }
- case 108: break;
- case 26:
- { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_PARENTHESIS_CLOSE;
- }
- case 109: break;
- case 55:
- { yybegin(ST_MEDIA_MEDIUM); return CSS_MEDIA;
- }
- case 110: break;
- case 29:
- { yybegin(ST_JSP_EXP); return CSS_JSP_EXP;
- }
- case 111: break;
- case 22:
- { yybegin(ST_DECLARATION); return CSS_DECLARATION_DELIMITER;
- }
- case 112: break;
- case 36:
- { yybegin(ST_SELECTOR_MODIFIER); return CSS_SELECTOR_PSEUDO;
- }
- case 113: break;
- case 21:
- { yybegin(ST_DECLARATION_SEPARATOR); return CSS_DECLARATION_PROPERTY;
- }
- case 114: break;
- case 45:
- { yybegin(ST_JSP_COMMENT); return CSS_JSP_COMMENT;
- }
- case 115: break;
- case 34:
- { yyJspBegin(ST_JSP_SCRIPTLET); return CSS_JSP_SCRIPTLET;
- }
- case 116: break;
- case 54:
- { yybegin(ST_DECLARATION_VALUE); return CSS_DECLARATION_VALUE_URI;
- }
- case 117: break;
- case 28:
- { yybegin(ST_JSP_DIRECTIVE); return CSS_JSP_DIRECTIVE;
- }
- case 118: break;
- default:
- if (zzInput == YYEOF && zzStartRead == zzCurrentPos) {
- zzAtEOF = true;
- return null;
- }
- else {
- zzScanError(ZZ_NO_MATCH);
- }
- }
- }
- }
-
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parserz/JSPedCSSRegionContexts.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parserz/JSPedCSSRegionContexts.java
deleted file mode 100644
index 9e1b16e223..0000000000
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/css/core/internal/parserz/JSPedCSSRegionContexts.java
+++ /dev/null
@@ -1,26 +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.parserz;
-
-import org.eclipse.wst.css.core.internal.parserz.CSSRegionContexts;
-
-public interface JSPedCSSRegionContexts extends CSSRegionContexts {
- public static final String CSS_JSP_EXP = "CSS_JSP_EXP"; //$NON-NLS-1$
- public static final String CSS_JSP_EL = CSSRegionContexts.CSS_FOREIGN_ELEMENT; //$NON-NLS-1$
- public static final String CSS_JSP_SCRIPTLET = "CSS_JSP_SCRIPTLET"; //$NON-NLS-1$
- public static final String CSS_JSP_DIRECTIVE = "CSS_JSP_DIRECTIVE"; //$NON-NLS-1$
- public static final String CSS_JSP_DECL = "CSS_JSP_DECL"; //$NON-NLS-1$
- public static final String CSS_JSP_END = "CSS_JSP_END"; //$NON-NLS-1$
- public static final String CSS_EL_END = "CSS_EL_END"; //$NON-NLS-1$
- public static final String CSS_JSP_COMMENT_END = "CSS_JSP_COMMENT_END"; //$NON-NLS-1$
- public static final String CSS_JSP_COMMENT = "CSS_JSP_COMMENT"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/.classpath b/bundles/org.eclipse.jst.jsp.ui/.classpath
deleted file mode 100644
index 176e21df45..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/.classpath
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src" />
- <classpathentry kind="con"
- path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4" />
- <classpathentry kind="con"
- path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/sse/core/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/xml/core/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/css/core/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/html/core/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/sse/ui/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/xml/ui/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/css/ui/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/html/ui/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/javascript/ui/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/validation/**" />
- <accessrule kind="accessible"
- pattern="org/eclipse/wst/common/componentcore/internal/util/IModuleConstants" />
- </accessrules>
- </classpathentry>
- <classpathentry kind="output" path="bin" />
-</classpath>
diff --git a/bundles/org.eclipse.jst.jsp.ui/.cvsignore b/bundles/org.eclipse.jst.jsp.ui/.cvsignore
deleted file mode 100644
index d00c268006..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-bin
-jspeditor.jar
-temp.folder
-org.eclipse.jst.jsp.ui_6.0.0.jar
-build.xml
-@dot
-src.zip
-javaCompiler...args
diff --git a/bundles/org.eclipse.jst.jsp.ui/.options b/bundles/org.eclipse.jst.jsp.ui/.options
deleted file mode 100644
index 7174d6096c..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/.options
+++ /dev/null
@@ -1,2 +0,0 @@
-org.eclipse.jst.jsp.ui/debug/jspcontentassist=false
-org.eclipse.jst.jsp.ui/projectionperf=false \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/.project b/bundles/org.eclipse.jst.jsp.ui/.project
deleted file mode 100644
index 34bc2e6bca..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.jsp.ui</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>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index afa5c91352..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/.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.ui/.settings/org.eclipse.core.runtime.prefs b/bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index 7ec5750225..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/.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.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index fa697df5c7..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,79 +0,0 @@
-#Wed Mar 28 03:11:45 EDT 2007
-eclipse.preferences.version=1
-org.eclipse.jdt.core.builder.cleanOutputFolder=clean
-org.eclipse.jdt.core.builder.duplicateResourceTask=warning
-org.eclipse.jdt.core.builder.invalidClasspath=ignore
-org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
-org.eclipse.jdt.core.circularClasspath=error
-org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
-org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=ignore
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=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=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.3
-org.eclipse.jdt.core.incompatibleJDKLevel=ignore
-org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 301c7adde6..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/.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.ui/.settings/org.eclipse.ltk.core.refactoring.prefs b/bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index c59368c5e1..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/.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.ui/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.jst.jsp.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index fc522bba76..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/.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.ui/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF
deleted file mode 100644
index cce65fc0ad..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,67 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.jst.jsp.ui; singleton:=true
-Bundle-Version: 1.1.700.qualifier
-Bundle-Activator: org.eclipse.jst.jsp.ui.internal.JSPUIPlugin
-Bundle-Vendor: %providerName
-Bundle-Localization: plugin
-Export-Package: org.eclipse.jst.jsp.css.ui.internal.properties;x-internal:=true,
- org.eclipse.jst.jsp.css.ui.internal.registry;x-internal:=true,
- org.eclipse.jst.jsp.css.ui.internal.views.properties;x-internal:=true,
- org.eclipse.jst.jsp.ui,
- org.eclipse.jst.jsp.ui.internal;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.autoedit;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.breakpointproviders;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.contentassist;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.contentproperties.ui;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.derived;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.editor;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.format;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.handlers;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.hyperlink;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.java.refactoring;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.java.search;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.java.search.ui;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.preferences;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.preferences.ui;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.registry;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.style;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.style.java;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.style.jspel;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.taginfo;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.templates;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.text;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.validation;x-internal:=true,
- org.eclipse.jst.jsp.ui.internal.wizard;x-internal:=true,
- org.eclipse.jst.jsp.ui.views.contentoutline
-Import-Package: com.ibm.icu.util; version="3.8",
- com.ibm.icu.text; version="3.8"
-Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.jface.text;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.forms;bundle-version="[3.4.0,4.0.0]",
- org.eclipse.wst.sse.ui;bundle-version="[1.2.0,1.4.0)",
- org.eclipse.wst.html.ui;bundle-version="[1.0.500,1.1.0)",
- org.eclipse.wst.css.ui;bundle-version="[1.0.500,1.1.0)",
- org.eclipse.wst.xml.ui;bundle-version="[1.1.100,1.2.0)",
- org.eclipse.jst.jsp.core;bundle-version="[1.2.401,1.3.0)",
- org.eclipse.wst.html.core;bundle-version="[1.1.400,1.2.0)",
- org.eclipse.wst.css.core;bundle-version="[1.1.300,1.2.0)",
- org.eclipse.wst.xml.core;bundle-version="[1.1.500,1.2.0)",
- org.eclipse.wst.sse.core;bundle-version="[1.1.500,1.2.0)",
- org.eclipse.jdt.ui;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.jdt.core;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.debug.core;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.jdt.debug;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.search;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ltk.core.refactoring;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.wst.common.uriresolver;bundle-version="[1.2.0,2.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.5.0,4.0.0)",
- org.eclipse.ui.views;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.wst.validation;bundle-version="[1.2.100,1.3.0)",
- org.eclipse.core.filesystem;bundle-version="[1.3.0,2.0.0)"
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/bundles/org.eclipse.jst.jsp.ui/about.html b/bundles/org.eclipse.jst.jsp.ui/about.html
deleted file mode 100644
index 2199df3f05..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/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>June, 2008</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.ui/build.properties b/bundles/org.eclipse.jst.jsp.ui/build.properties
deleted file mode 100644
index a5bbc9e504..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/build.properties
+++ /dev/null
@@ -1,21 +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
-###############################################################################
-source.. = src/
-bin.includes = .,\
- templates/,\
- plugin.xml,\
- META-INF/,\
- icons/,\
- plugin.properties,\
- about.html
-bin.excludes = @dot/**,\
- temp.folder/**
-additional.bundles = org.eclipse.jdt.core.manipulation
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/dtool16/newjsp_wiz.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/dtool16/newjsp_wiz.gif
deleted file mode 100644
index 5ff9b3973d..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/dtool16/newjsp_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/elcl16/javaassist_co.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/elcl16/javaassist_co.gif
deleted file mode 100644
index e9a6bd966a..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/elcl16/javaassist_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/etool16/newjsp_wiz.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/etool16/newjsp_wiz.gif
deleted file mode 100644
index 14944ace0e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/etool16/newjsp_wiz.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/class_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/class_obj.gif
deleted file mode 100644
index c00118d098..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/class_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/default_co.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/default_co.gif
deleted file mode 100644
index 49a14611e8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/default_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_default_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_default_obj.gif
deleted file mode 100644
index 6929d3d13f..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_default_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_private_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_private_obj.gif
deleted file mode 100644
index 1fe064e6ca..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_private_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_protected_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_protected_obj.gif
deleted file mode 100644
index 3377b1ebe7..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_protected_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_public_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_public_obj.gif
deleted file mode 100644
index d4cb4254d9..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/field_public_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_default_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_default_obj.gif
deleted file mode 100644
index 4244a7f39d..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_default_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_private_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_private_obj.gif
deleted file mode 100644
index 7392f191d8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_private_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_protected_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_protected_obj.gif
deleted file mode 100644
index 5105577d5b..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_protected_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_public_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_public_obj.gif
deleted file mode 100644
index e4c2a836f8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerclass_public_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_default_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_default_obj.gif
deleted file mode 100644
index ab1b576aad..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_default_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_private_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_private_obj.gif
deleted file mode 100644
index a1cbff36f6..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_private_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_protected_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_protected_obj.gif
deleted file mode 100644
index f58eef07c1..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_protected_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_public_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_public_obj.gif
deleted file mode 100644
index 2ebc46e1d3..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/innerinterface_public_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/localvariable_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/localvariable_obj.gif
deleted file mode 100644
index 8adce9541f..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/localvariable_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/package_obj.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/package_obj.gif
deleted file mode 100644
index 131c28da40..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/package_obj.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/private_co.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/private_co.gif
deleted file mode 100644
index 5b881d8b2b..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/private_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/protected_co.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/protected_co.gif
deleted file mode 100644
index cd83b96c20..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/protected_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/public.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/public.gif
deleted file mode 100644
index 7d24707ee8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/public.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/public_co.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/public_co.gif
deleted file mode 100644
index a9af5d538d..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/public_co.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/sourceEditor.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/sourceEditor.gif
deleted file mode 100644
index 75ebdb8586..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/sourceEditor.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-generic.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-generic.gif
deleted file mode 100644
index 65f516e80a..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-generic.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-jsp.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-jsp.gif
deleted file mode 100644
index 4084602119..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-jsp.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-template.gif b/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-template.gif
deleted file mode 100644
index 5d1f81b6d4..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/obj16/tag-template.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/full/wizban/newjspfile_wiz.png b/bundles/org.eclipse.jst.jsp.ui/icons/full/wizban/newjspfile_wiz.png
deleted file mode 100644
index 1a0ff0cb19..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/full/wizban/newjspfile_wiz.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspdecl.gif b/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspdecl.gif
deleted file mode 100644
index 35f48efff8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspdecl.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspexp.gif b/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspexp.gif
deleted file mode 100644
index ab4d74bcb1..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspexp.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspincl.gif b/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspincl.gif
deleted file mode 100644
index 2584c31853..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspincl.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspscr.gif b/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspscr.gif
deleted file mode 100644
index 1753b96272..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jspscr.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jsptaglib.gif b/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jsptaglib.gif
deleted file mode 100644
index cb55e33b5e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/jsptaglib.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/tag-generic.gif b/bundles/org.eclipse.jst.jsp.ui/icons/snippets/tag-generic.gif
deleted file mode 100644
index 5e7fb33399..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/tag-generic.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/tag-jsp.gif b/bundles/org.eclipse.jst.jsp.ui/icons/snippets/tag-jsp.gif
deleted file mode 100644
index ea4de338fb..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/icons/snippets/tag-jsp.gif
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.jst.jsp.ui/plugin.properties b/bundles/org.eclipse.jst.jsp.ui/plugin.properties
deleted file mode 100644
index 26b2626fe6..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/plugin.properties
+++ /dev/null
@@ -1,122 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2011 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
-# Matthias Fuessel, mat.fuessel@gmx.net - [177387] use base hyperlinking extension points
-###############################################################################
-providerName=Eclipse Web Tools Platform
-pluginName=SSE JSP Source Editor
-JSP_Source_Page_Editor.name=JSP Editor
-CSS_JSP_Source_Page_Editor.name=CSS JSP Editor
-JSP_Files.name=JSP Files
-JSP_Source.name=Editor
-JSP_Content_Assist.name=Content Assist
-JSP_Templates.name=Templates
-JSP_Styles.name=Styles
-JSP_Syntax_Coloring=Syntax Coloring
-JSP_Source_target_name=JSP Editors
-JSP_Validation=Validation
-JSP_Property_validation=JSP Syntax
-JSP_Typing=Typing
-
-# Snippets contributions for helping with JSP syntax
-jsp_scriptlet=<%..%> scriptlet
-jsp_scr_content=<% %>
-jsp_hidden_comment=<%--..--%> comment
-jsp_hidden_comment_content=<%-- --%>
-jsp_declaration=<%!..%> declaration
-jsp_declaration_content=<%! %>
-jsp_expression=<%=..%> expression
-jsp_expression_content=<%= %>
-jsp_include_directive=include directive
-jsp_include_directive_content=<%@ include file="" %>
-jsp_page_directive=page directive
-jsp_page_directive_content=<%@ page contentType="text/html; charset=" %>
-jsp_taglib_directive=taglib directive
-jsp_taglib_directive_content=<%@ taglib uri="${uri}" prefix="${prefix}" %>
-jsp_taglib_directive_uri=URI to the containing JAR file or taglib descriptor (.tld)
-jsp_taglib_directive_prefix=Namespace prefix for tags from this library
-JSPFragmentContentSettings.name=JSP Fragment
-JSP_Property_tag_contentSettings=Tag Content
-command.jsp.refactor.rename.name=Rename
-command.jsp.refactor.rename.description=Rename a Java Element
-command.jsp.refactor.move.name=Move
-command.jsp.refactor.move.description=Move a Java Element to another package
-scope.structured.text.editor.jsp.name=Editing JSP Source
-scope.structured.text.editor.jsp.description=Editing JSP Source
-scope.jsp.core.jspsource.name=JSP Source
-scope.jsp.core.jspsource.description=JSP Source
-JSP_Type_Rename_Participant_Extension_Element.name=JSP Type Rename Participant
-JSP_Method_Rename_Participant_Extension_Element.name=JSP Method Rename Participant
-JSP_Package_Rename_Participant_Extension_Element.name=JSP Package Rename Participant
-JSP_Field_Rename_Participant_Extension_Element.name=JSP Field Rename Participant
-JSP_Type_Move_Participant_Extension_Element.name=JSP Type Move Participant
-All_JSP_context_type_Extension_Element.name=All JSP
-JSP_New_context_type_Extension_Element.name=New JSP
-Tag_New_context_type_Extension_Element.name=New Tag
-JSP_Tag_context_type_Extension_Element.name=JSP Tag
-JSP_Attribute_context_type_Extension_Element.name=JSP Attribute
-JSP_Attribute_value_context_type_Extension_Element.name=JSP Attribute value
-JSP_Query_Participant_Extension_Element.name=JSP Query Participant
-JSP_Extension_Element.label=JSP
-#org.eclipse.ui.newWizards extension point
-_UI_WIZARD_NAME = JSP File
-_UI_WIZARD_CREATE_NEW_FILE = Create a new JSP file
-_UI_WIZARD_TAG_NAME = JSP Tag
-_UI_WIZARD_TAG_CREATE_NEW_FILE = Create a new JSP Tag file
-##
-AddTask.label=Add &Task...
-AddTask.tooltip=Add Task...
-AddBookmark.label=Add Boo&kmark...
-AddBookmark.tooltip=Add Bookmark...
-SelectRuler.label=Select Ruler
-## EL Error Message
-##
-CleanupDocument_label=Cleanup Document...
-CleanupDocument_tooltip=Cleanup Document
-ToggleComment_label=Toggle Comment
-ToggleComment_tooltip=Toggle Comment
-AddBlockComment_label=Add Block Comment
-AddBlockComment_tooltip=Add Block Comment
-RemoveBlockComment_label=Remove Block Comment
-RemoveBlockComment_tooltip=Remove Block Comment
-FindOccurrences_label=Occurrences in File
-RenameElement_label=Rename
-MoveElement_label=Move
-StructureSelectEnclosing_label=Enclosing Element
-StructureSelectEnclosing_tooltip=Expand selection to include enclosing element
-StructureSelectNext_label=Next Element
-StructureSelectNext_tooltip=Expand selection to include next sibling
-StructureSelectPrevious_label=Previous Element
-StructureSelectPrevious_tooltip=Expand selection to include previous sibling
-StructureSelectHistory_label=Restore Last Selection
-StructureSelectHistory_tooltip=Restore last selection
-##
-preferenceKeywords.files=editor jsp creating saving files suffix specified encoding iana validating validate fragments
-preferenceKeywords.contentassist=jsp editor content code assist complete completion insert overwrite single proposal common prefix automatically import fill argument name guess alphabetical hide auto activation trigger category categories separate specific
-preferenceKeywords.templates=editor jsp templates snippet macros
-preferenceKeywords.styles=editor jsp style customize syntax highlighting type text content foreground background bold color
-preferenceKeywords.fragments=editor jsp fragment language content type validate
-preferenceKeywords.severities=jsp errors warnings ignore options severity severities suppress project specific projectspecific
-
-##
-Java_Element_hyperlink=Java Element
-Taglib_hyperlink=Tag Library Descriptor
-
-##
-proposalCategory.jspTemplates=JSP Template Proposals
-proposalCategory.jsp=JSP Proposals
-proposalCategory.jspJava=JSP Java Proposals
-
-##
-HideImportDeclaration.label=Import Directives
-HideImportDeclaration.description=Hides Import Directives
-HideComments.label=Comments
-HideComments.description=Hides Comments
-
-classPatternProvider.name = Class Pattern Provider \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/plugin.xml b/bundles/org.eclipse.jst.jsp.ui/plugin.xml
deleted file mode 100644
index 2244e3c6d0..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/plugin.xml
+++ /dev/null
@@ -1,1457 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?>
-<plugin>
- <extension-point id="classPatternProvider" name="%classPatternProvider.name" schema="schema/classPatternProvider.exsd"/>
-
- <extension point="org.eclipse.ui.editors">
- <editor
- name="%JSP_Source_Page_Editor.name"
- icon="$nl$/icons//full/obj16/sourceEditor.gif"
- extensions="jsp, jsf, jspf, jspx, tag, tagx, tagf"
- contributorClass="org.eclipse.jst.jsp.ui.internal.editor.ActionContributorJSP"
- class="org.eclipse.wst.sse.ui.StructuredTextEditor"
- symbolicFontName="org.eclipse.wst.sse.ui.textfont"
- id="org.eclipse.jst.jsp.core.jspsource.source">
- <contentTypeBinding
- contentTypeId="org.eclipse.jst.jsp.core.jspsource" />
- </editor>
- <editor
- name="%CSS_JSP_Source_Page_Editor.name"
- icon="$nl$/icons//full/obj16/sourceEditor.gif"
- contributorClass="org.eclipse.jst.jsp.ui.internal.editor.ActionContributorJSP"
- class="org.eclipse.wst.sse.ui.StructuredTextEditor"
- symbolicFontName="org.eclipse.wst.sse.ui.textfont"
- id="org.eclipse.jst.jsp.core.cssjspsource.source">
- <contentTypeBinding
- contentTypeId="org.eclipse.jst.jsp.core.cssjspsource" />
- <contentTypeBinding
- contentTypeId="org.eclipse.jst.jsp.core.cssjspfragmentsource" />
- </editor>
- </extension>
-
- <extension point="org.eclipse.wst.sse.ui.editorConfiguration">
- <sourceViewerConfiguration
- class="org.eclipse.jst.jsp.ui.StructuredTextViewerConfigurationJSP"
- target="org.eclipse.jst.jsp.core.jspsource" />
- <contentOutlineConfiguration
- class="org.eclipse.jst.jsp.ui.views.contentoutline.JSPContentOutlineConfiguration"
- target="org.eclipse.jst.jsp.core.jspsource" />
- <quickOutlineConfiguration
- class="org.eclipse.wst.xml.ui.internal.quickoutline.XMLQuickOutlineConfiguration"
- target="org.eclipse.jst.jsp.core.jspsource" />
- <propertySheetConfiguration
- class="org.eclipse.wst.xml.ui.views.properties.XMLPropertySheetConfiguration"
- target="org.eclipse.jst.jsp.core.jspsource" />
- <documentationTextHover
- class="org.eclipse.jst.jsp.ui.internal.taginfo.JSPTagInfoHoverProcessor"
- target="org.eclipse.jst.jsp.DEFAULT_JSP, org.eclipse.jst.jsp.JSP_DIRECTIVE">
- </documentationTextHover>
- <documentationTextHover
- class="org.eclipse.jst.jsp.ui.internal.taginfo.JSPJavaJavadocHoverProcessor"
- target="org.eclipse.jst.jsp.SCRIPT.JAVA">
- </documentationTextHover>
- <provisionalConfiguration
- type="sourceeditingtexttools"
- class="org.eclipse.jst.jsp.ui.internal.editor.JSPSourceEditingTextTools"
- target="org.eclipse.jst.jsp.core.jspsource" />
- <provisionalConfiguration
- type="characterpairmatcher"
- class="org.eclipse.jst.jsp.ui.internal.text.JSPDocumentRegionEdgeMatcher"
- target="org.eclipse.jst.jsp.core.jspsource" />
- <provisionalConfiguration
- type="foldingstrategy"
- class="org.eclipse.wst.xml.ui.internal.projection.XMLFoldingStrategy"
- target="org.eclipse.jst.jsp.core.jspsource" />
- <provisionalDefinition
- type="preferencepages"
- value="org.eclipse.jst.jsp.ui.preferences.jsp, org.eclipse.wst.sse.ui.preferences.jsp.source, org.eclipse.wst.sse.ui.preferences.jsp.templates, org.eclipse.wst.sse.ui.preferences.jsp.styles,,org.eclipse.jst.jsp.ui.preferences.validation, org.eclipse.wst.sse.ui.preferences.jsp.contentassist"
- target="org.eclipse.jst.jsp.core.jspsource" />
- <provisionalDefinition
- type="showintarget"
- value="org.eclipse.jdt.ui.PackageExplorer"
- target="org.eclipse.jst.jsp.core.jspsource" />
- <provisionalDefinition
- type="spellingregions"
- value="XML_COMMENT_TEXT, JSP_COMMENT_TEXT, XML_CONTENT, HTML_CONTENT"
- target="org.eclipse.jst.jsp.core.jspsource" />
- <provisionalDefinition
- type="activecontexts"
- value="org.eclipse.jst.jsp.core.jspsource, org.eclipse.jst.jsp.ui.structured.text.editor.jsp.scope, org.eclipse.wst.html.core.htmlsource, org.eclipse.core.runtime.xml, org.eclipse.wst.xml.navigation, org.eclipse.wst.xml.selection, org.eclipse.wst.sse.comments"
- target="org.eclipse.jst.jsp.core.jspsource" />
-
- <contentOutlineConfiguration
- class="org.eclipse.jst.jsp.ui.internal.views.contentoutline.TLDContentOutlineConfiguration"
- target="org.eclipse.jst.jsp.core.tldsource" />
- <documentationTextHover
- class="org.eclipse.jst.jsp.ui.internal.taginfo.XMLJavadocHoverProcessor"
- target="org.eclipse.wst.xml.XML_DEFAULT"/>
- </extension>
-
- <!--======================================================================================-->
- <!-- source validation for JSP -->
- <!--======================================================================================-->
- <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.jspsourcevalidator">
- <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.JSP_DIRECTIVE">
- </partitionType>
- </contentTypeIdentifier>
- </validator>
- </extension>
- <!--======================================================================================-->
- <!-- source (as you type) validation for JSP EL -->
- <!--======================================================================================-->
- <extension point="org.eclipse.wst.sse.ui.sourcevalidation">
- <validator
- scope="total"
- class="org.eclipse.jst.jsp.core.internal.validation.JSPELValidator"
- id="org.eclipse.jst.jsp.jspelsourcevalidator">
- <contentTypeIdentifier
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType id="org.eclipse.jst.jsp.SCRIPT.JSP_EL">
- </partitionType>
- </contentTypeIdentifier>
- </validator>
- </extension>
- <!--======================================================================================-->
- <!-- source (as you type) validation for JSP directive -->
- <!--======================================================================================-->
- <extension point="org.eclipse.wst.sse.ui.sourcevalidation">
- <validator
- scope="total"
- 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>
- <!--======================================================================================-->
- <!-- source (as you type) validation for JSP action tags -->
- <!--======================================================================================-->
- <extension point="org.eclipse.wst.sse.ui.sourcevalidation">
- <validator
- scope="total"
- class="org.eclipse.jst.jsp.ui.internal.validation.JSPActionSourceValidator"
- id="org.eclipse.jst.jsp.ui.internal.validation.jspactionvalidator">
- <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>
-
- <!--======================================================================================-->
- <!-- HTML (as you type) validation -->
- <!--======================================================================================-->
- <extension point="org.eclipse.wst.sse.ui.sourcevalidation">
- <validator
- scope="total"
- class="org.eclipse.jst.jsp.ui.internal.validation.JSPContentSourceValidator"
- id="org.eclipse.jst.jsp.ui.internal.validation.htmlsyntaxvalidator">
- <contentTypeIdentifier
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType id="org.eclipse.jst.jsp.JSP_DIRECTIVE"/>
- <partitionType id="org.eclipse.jst.jsp.JSP_COMMENT"/>
- <partitionType id="org.eclipse.wst.html.HTML_DEFAULT"/>
- <partitionType id="org.eclipse.wst.html.HTML_DECLARATION"/>
- <partitionType id="org.eclipse.wst.html.HTML_COMMENT"/>
- <partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
- <partitionType id="org.eclipse.wst.sse.ST_DEFAULT"/>
- </contentTypeIdentifier>
- </validator>
- </extension>
-
- <!-- for .tagx files -->
- <extension point="org.eclipse.wst.sse.ui.sourcevalidation">
- <validator
- scope="total"
- class="org.eclipse.wst.xml.ui.internal.validation.DelegatingSourceValidatorForXML"
- id="org.eclipse.wst.xml.ui.internal.validation.DelegatingSourceValidatorForXML">
- <contentTypeIdentifier id="org.eclipse.jst.jsp.core.tagxsource">
- <partitionType id="org.eclipse.wst.xml.XML_DEFAULT"/>
- <partitionType id="org.eclipse.wst.xml.XML_COMMENT"/>
- <partitionType id="org.eclipse.wst.sse.ST_DEFAULT"/>
- </contentTypeIdentifier>
- </validator>
- </extension>
-
- <!--======================================================================================-->
- <!-- JSP UI Adapter factories -->
- <!--======================================================================================-->
- <extension
- point="org.eclipse.wst.sse.ui.adapterFactoryDescription">
- <adapterFactoryDescription
- class="org.eclipse.jst.jsp.ui.internal.registry.AdapterFactoryProviderForJSP">
- <contentType id="org.eclipse.jst.jsp.core.jspsource" />
- </adapterFactoryDescription>
- </extension>
-
- <extension
- point="org.eclipse.core.filebuffers.annotationModelCreation">
- <factory
- contentTypeId="org.eclipse.jst.jsp.core.jspsource"
- class="org.eclipse.wst.sse.ui.internal.StructuredResourceMarkerAnnotationModelFactory" />
- </extension>
-
- <extension point="org.eclipse.ui.preferencePages">
-
- <!--======================================================================================-->
- <!-- JSP PREFERENCE PAGES -->
- <!--======================================================================================-->
- <page
- name="%JSP_Files.name"
- category="org.eclipse.wst.html.ui.preferences.web"
- class="org.eclipse.jst.jsp.ui.internal.preferences.ui.JSPFilesPreferencePage"
- id="org.eclipse.jst.jsp.ui.preferences.jsp">
- <keywordReference id="org.eclipse.jst.jsp.ui.files"/>
- </page>
- <page
- name="%JSP_Source.name"
- category="org.eclipse.jst.jsp.ui.preferences.jsp"
- class="org.eclipse.jst.jsp.ui.internal.preferences.ui.JSPSourcePreferencePage"
- id="org.eclipse.wst.sse.ui.preferences.jsp.source">
- </page>
- <page
- category="org.eclipse.wst.sse.ui.preferences.jsp.source"
- class="org.eclipse.jst.jsp.ui.internal.preferences.ui.JSPContentAssistPreferencePage"
- id="org.eclipse.wst.sse.ui.preferences.jsp.contentassist"
- name="%JSP_Content_Assist.name">
- <keywordReference
- id="org.eclipse.jst.jsp.ui.contentassist">
- </keywordReference>
- </page>
- <page
- name="%JSP_Templates.name"
- category="org.eclipse.wst.sse.ui.preferences.jsp.source"
- class="org.eclipse.jst.jsp.ui.internal.preferences.ui.JSPTemplatePreferencePage"
- id="org.eclipse.wst.sse.ui.preferences.jsp.templates">
- <keywordReference id="org.eclipse.jst.jsp.ui.templates"/>
- </page>
- <page
- name="%JSP_Syntax_Coloring"
- category="org.eclipse.wst.sse.ui.preferences.jsp.source"
- class="org.eclipse.jst.jsp.ui.internal.preferences.ui.JSPSyntaxColoringPage"
- id="org.eclipse.wst.sse.ui.preferences.jsp.styles">
- <keywordReference id="org.eclipse.jst.jsp.ui.styles"/>
- </page>
- <page
- name="%JSP_Validation"
- category="org.eclipse.jst.jsp.ui.preferences.jsp"
- class="org.eclipse.jst.jsp.ui.internal.preferences.ui.JSPValidationPreferencePage"
- id="org.eclipse.jst.jsp.ui.preferences.validation">
- <keywordReference id="org.eclipse.jst.jsp.ui.severities"/>
- </page>
- <page
- name="%JSP_Typing"
- category="org.eclipse.wst.sse.ui.preferences.jsp.source"
- class="org.eclipse.jst.jsp.ui.internal.preferences.ui.JSPTypingPreferencePage"
- id="org.eclipse.jst.jsp.ui.preferences.typing">
- </page>
- </extension>
-
- <!-- Keywords for preference and properties pages -->
- <extension point="org.eclipse.ui.keywords">
- <keyword
- label="%preferenceKeywords.files"
- id="org.eclipse.jst.jsp.ui.files"/>
- <keyword
- label="%preferenceKeywords.contentassist"
- id="org.eclipse.jst.jsp.ui.contentassist"/>
- <keyword
- label="%preferenceKeywords.templates"
- id="org.eclipse.jst.jsp.ui.templates"/>
- <keyword
- label="%preferenceKeywords.styles"
- id="org.eclipse.jst.jsp.ui.styles"/>
- <keyword
- label="%preferenceKeywords.fragments"
- id="org.eclipse.jst.jsp.ui.fragments"/>
- <keyword
- label="%preferenceKeywords.severities"
- id="org.eclipse.jst.jsp.ui.severities"/>
- </extension>
-
- <!--======================================================================================-->
- <!-- FOR JSP/JAVA RENAME PARTICIPATION -->
- <!--======================================================================================-->
- <extension
- point="org.eclipse.ltk.core.refactoring.renameParticipants">
- <renameParticipant
- name="%JSP_Type_Rename_Participant_Extension_Element.name"
- class="org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPTypeRenameParticipant"
- id="org.eclipse.jst.jsp.ui.java.refactoring.JSPTypeRenameParticipant">
- <enablement>
- <with variable="affectedNatures">
- <iterate operator="or">
- <equals value="org.eclipse.jdt.core.javanature" />
-
- </iterate>
- </with>
- <with variable="element">
- <instanceof value="org.eclipse.jdt.core.IType" />
-
- </with>
- </enablement>
- </renameParticipant>
-
- <renameParticipant
- name="%JSP_Method_Rename_Participant_Extension_Element.name"
- class="org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPMethodRenameParticipant"
- id="org.eclipse.jst.jsp.ui.java.refactoring.JSPMethodRenameParticipant">
- <enablement>
- <with variable="affectedNatures">
- <iterate operator="or">
- <equals value="org.eclipse.jdt.core.javanature" />
-
- </iterate>
- </with>
- <with variable="element">
- <instanceof value="org.eclipse.jdt.core.IMethod" />
-
- </with>
- </enablement>
- </renameParticipant>
-
- <renameParticipant
- name="%JSP_Package_Rename_Participant_Extension_Element.name"
- class="org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPPackageRenameParticipant"
- id="org.eclipse.jst.jsp.ui.java.refactoring.JSPPackageRenameParticipant">
- <enablement>
- <with variable="affectedNatures">
- <iterate operator="or">
- <equals value="org.eclipse.jdt.core.javanature" />
-
- </iterate>
- </with>
- <with variable="element">
- <instanceof
- value="org.eclipse.jdt.core.IPackageFragment" />
-
- </with>
- </enablement>
- </renameParticipant>
- <renameParticipant
- class="org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPFieldRenameParticipant"
- id="org.eclipse.jst.jsp.ui.java.refactoring.JSFieldRenameParticipant"
- name="%JSP_Field_Rename_Participant_Extension_Element.name">
- <enablement>
- <with variable="affectedNatures">
- <iterate operator="or">
- <equals value="org.eclipse.jdt.core.javanature">
- </equals>
- </iterate>
- </with>
- <with variable="element">
- <instanceof value="org.eclipse.jdt.core.IField">
- </instanceof>
- </with>
- </enablement>
- </renameParticipant>
- </extension>
-
- <!--======================================================================================-->
- <!-- FOR JSP/JAVA MOVE PARTICIPATION -->
- <!--======================================================================================-->
- <extension
- point="org.eclipse.ltk.core.refactoring.moveParticipants">
-
- <moveParticipant
- id="org.eclipse.jst.jsp.ui.java.refactoring.JSPTypeMoveParticipant"
- name="%JSP_Type_Move_Participant_Extension_Element.name"
- class="org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPTypeMoveParticipant">
- <enablement>
- <with variable="affectedNatures">
- <iterate operator="or">
- <equals value="org.eclipse.jdt.core.javanature" />
- </iterate>
- </with>
- <with variable="element">
- <instanceof value="org.eclipse.jdt.core.IType" />
-
- </with>
- </enablement>
- </moveParticipant>
- </extension>
-
- <!--======================================================================================-->
- <!-- for breakpoint -->
- <!--======================================================================================-->
- <extension point="org.eclipse.wst.sse.ui.breakpoint">
- <breakpointContribution id="org.eclipse.jst.jsp.ui.providers">
- <provider
- contentTypes="org.eclipse.jst.jsp.core.jspsource"
- id="org.eclipse.jst.jsp.ui.internal.breakpointproviders.JavaStratumBreakpointProvider">
- <class class="org.eclipse.jst.jsp.ui.internal.breakpointproviders.JavaStratumBreakpointProvider">
- <parameter name="org.eclipse.jst.jsp.core.jspsource" value="*jsp,jsp_servlet._*"/>
- <parameter name="org.eclipse.jst.jsp.core.tagsource" value="*tag,*tagx,tag._*,tagx._*"/>
- </class>
- </provider>
- </breakpointContribution>
- </extension>
-
- <!--======================================================================================-->
- <!-- Snippet View contributions -->
- <!--======================================================================================-->
- <extension
- point="org.eclipse.wst.common.snippets.SnippetContributions">
- <category
- label="%JSP_Extension_Element.label"
- smallicon="icons/snippets/tag-jsp.gif"
- id="org.eclipse.jst.jsp.ui.category0"
- contenttypes="org.eclipse.jst.jsp.core.jspsource">
- <item
- label="%jsp_hidden_comment"
- smallicon="icons/snippets/tag-generic.gif"
- id="org.eclipse.jst.jsp.ui.jsp_hidden_comment">
- <content>%jsp_hidden_comment_content</content>
- </item>
- <item
- label="%jsp_scriptlet"
- smallicon="icons/snippets/jspscr.gif"
- id="org.eclipse.jst.jsp.ui.jsp_scriptlet">
- <content>%jsp_scr_content</content>
- </item>
- <item
- label="%jsp_expression"
- smallicon="icons/snippets/jspexp.gif"
- id="org.eclipse.jst.jsp.ui.jsp_expression">
- <content>%jsp_expression_content</content>
- </item>
- <item
- label="%jsp_declaration"
- smallicon="icons/snippets/jspdecl.gif"
- id="org.eclipse.jst.jsp.ui.jsp_declaration">
- <content>%jsp_declaration_content</content>
- </item>
- <item
- label="%jsp_include_directive"
- smallicon="icons/snippets/jspincl.gif"
- id="org.eclipse.jst.jsp.ui.jsp_include_directive">
- <content>%jsp_include_directive_content</content>
- </item>
- <item
- label="%jsp_page_directive"
- id="org.eclipse.jst.jsp.ui.jsp_page_directive">
- <content>%jsp_page_directive_content</content>
- </item>
- <item
- label="%jsp_taglib_directive"
- smallicon="icons/snippets/jsptaglib.gif"
- id="org.eclipse.jst.jsp.ui.jsp_taglib_directive">
- <content>%jsp_taglib_directive_content</content>
- <variable
- description="%jsp_taglib_directive_uri"
- id="uri" />
-
- <variable
- default="mylib"
- description="%jsp_taglib_directive_prefix"
- id="prefix" />
-
- </item>
- </category>
- </extension>
-
- <!-- Editor actionsets -->
- <extension point="org.eclipse.ui.actionSetPartAssociations">
- <actionSetPartAssociation
- targetID="org.eclipse.ui.edit.text.actionSet.annotationNavigation">
- <part id="org.eclipse.jst.jsp.core.jspsource.source" />
- </actionSetPartAssociation>
- <actionSetPartAssociation
- targetID="org.eclipse.ui.NavigateActionSet">
- <part id="org.eclipse.jst.jsp.core.jspsource.source" />
- </actionSetPartAssociation>
- <actionSetPartAssociation
- targetID="org.eclipse.debug.ui.launchActionSet">
- <part id="org.eclipse.jst.jsp.core.jspsource.source"/>
- </actionSetPartAssociation>
- </extension>
-
- <!--======================================================================================-->
- <!-- JSP Editor specific actions -->
- <!--======================================================================================-->
- <extension point="org.eclipse.ui.commands">
- <!-- rename refactor -->
- <command
- name="%command.jsp.refactor.rename.name"
- description="%command.jsp.refactor.rename.description"
- categoryId="org.eclipse.ui.category.edit"
- id="org.eclipse.jst.jsp.ui.refactor.rename" />
-
- <!-- move refactor -->
- <command
- name="%command.jsp.refactor.move.name"
- description="%command.jsp.refactor.move.description"
- categoryId="org.eclipse.ui.category.edit"
- id="org.eclipse.jst.jsp.ui.refactor.move" />
- </extension>
-
- <!-- Keybinding scope for jsp source editor -->
- <extension point="org.eclipse.ui.contexts">
- <context
- name="%scope.structured.text.editor.jsp.name"
- parentId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
- description="%scope.structured.text.editor.jsp.description"
- id="org.eclipse.jst.jsp.ui.structured.text.editor.jsp.scope">
- </context>
- <context
- name="%scope.jsp.core.jspsource.name"
- parentId="org.eclipse.wst.sse.ui.structuredTextEditorScope"
- description="%scope.jsp.core.jspsource.description"
- id="org.eclipse.jst.jsp.core.jspsource">
- </context>
- </extension>
-
- <!-- Keybindings for jsp source editor -->
- <extension point="org.eclipse.ui.bindings">
- <!-- win32: M1=CTRL, M2=SHIFT, M3=ALT -->
- <!-- rename refactor -->
- <key
- sequence="M2+M3+R"
- contextId="org.eclipse.jst.jsp.ui.structured.text.editor.jsp.scope"
- commandId="org.eclipse.jst.jsp.ui.refactor.rename"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
- </key>
-
- <!-- move refactor -->
- <key
- sequence="M2+M3+V"
- contextId="org.eclipse.jst.jsp.ui.structured.text.editor.jsp.scope"
- commandId="org.eclipse.jst.jsp.ui.refactor.move"
- schemeId="org.eclipse.ui.defaultAcceleratorConfiguration">
- </key>
- </extension>
-
- <!--======================================================================================-->
- <!-- Templates -->
- <!--======================================================================================-->
- <extension point="org.eclipse.ui.editors.templates">
- <contextType
- name="%All_JSP_context_type_Extension_Element.name"
- class="org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeJSP"
- id="jsp_all" />
-
- <contextType
- name="%JSP_New_context_type_Extension_Element.name"
- class="org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeJSP"
- id="jsp_new" />
-
- <contextType
- name="%Tag_New_context_type_Extension_Element.name"
- class="org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeJSP"
- id="tag_new" />
-
- <contextType
- name="%JSP_Tag_context_type_Extension_Element.name"
- class="org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeJSP"
- id="jsp_tag" />
-
- <contextType
- name="%JSP_Attribute_context_type_Extension_Element.name"
- class="org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeJSP"
- id="jsp_attribute" />
-
- <contextType
- name="%JSP_Attribute_value_context_type_Extension_Element.name"
- class="org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeJSP"
- id="jsp_attribute_value" />
-
- <include
- file="templates/jspdefault-templates.xml"
- translations="$nl$/templates/jspdefault-templates.properties" />
-
- </extension>
-
- <!--======================================================================================-->
- <!-- queryParticipant to participate in java seraches -->
- <!--======================================================================================-->
- <extension point="org.eclipse.jdt.ui.queryParticipants">
- <queryParticipant
- name="%JSP_Query_Participant_Extension_Element.name"
- nature="org.eclipse.jdt.core.javanature"
- class="org.eclipse.jst.jsp.ui.internal.java.search.ui.JSPQueryParticipant"
- id="org.eclipse.jst.jsp.ui.java.search.ui.JSPQueryParticipant" />
-
- </extension>
- <!-- initialize xml ui preferences -->
- <extension point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceInitializer" />
- </extension>
-
- <!--======================================================================================-->
- <!-- Document provider for ExternalFileEditorInput -->
- <!--======================================================================================-->
- <extension point="org.eclipse.ui.editors.documentProviders">
- <provider
- inputTypes="org.eclipse.jst.jsp.ui.internal.hyperlink.ExternalFileEditorInput"
- class="org.eclipse.ui.editors.text.TextFileDocumentProvider"
- id="org.eclipse.jst.jsp.ui.internal.ExternalFileDocumentProvider" />
-
- </extension>
-
- <!-- New JSP wizard -->
- <extension point="org.eclipse.ui.newWizards">
- <wizard
- id="org.eclipse.jst.jsp.ui.internal.wizard.NewJSPWizard"
- name="%_UI_WIZARD_NAME"
- class="org.eclipse.jst.jsp.ui.internal.wizard.NewJSPWizard"
- category="org.eclipse.wst.web.ui"
- icon="$nl$/icons/full/etool16/newjsp_wiz.gif">
- <description>%_UI_WIZARD_CREATE_NEW_FILE</description>
- <selection class="org.eclipse.core.resources.IResource" />
- </wizard>
-
- <wizard
- id="org.eclipse.jst.jsp.ui.internal.wizard.NewTagWizard"
- name="%_UI_WIZARD_TAG_NAME"
- class="org.eclipse.jst.jsp.ui.internal.wizard.NewTagWizard"
- category="org.eclipse.wst.web.ui"
- icon="$nl$/icons/full/etool16/newjsp_wiz.gif">
- <description>%_UI_WIZARD_TAG_CREATE_NEW_FILE</description>
- <selection class="org.eclipse.core.resources.IResource" />
- </wizard>
- </extension>
-
- <!-- Add new JSP wizard to Project Explorer -->
- <extension
- id="org.eclipse.jst.jsp.commonWizard.newJSP"
- point="org.eclipse.ui.navigator.navigatorContent">
- <commonWizard
- menuGroupId="org.eclipse.wst.web.ui"
- type="new"
- wizardId="org.eclipse.jst.jsp.ui.internal.wizard.NewJSPWizard">
- <enablement>
- <or>
- <adapt type="org.eclipse.core.resources.IResource">
- <test
- property="org.eclipse.wst.common.project.facet.core.projectFacet"
- value="jst.web"/>
- </adapt>
- </or>
- </enablement>
- </commonWizard>
- </extension>
-
- <extension point="org.eclipse.ui.popupMenus">
- <viewerContribution
- targetID="org.eclipse.jst.jsp.core.jspsource.source.RulerContext"
- id="org.eclipse.ui.texteditor.ruler.context.actions">
- <action
- label="%AddTask.label"
- helpContextId="org.eclipse.ui.AddTask_action_context"
- class="org.eclipse.ui.texteditor.TaskRulerAction"
- tooltip="%AddTask.tooltip"
- menubarPath="additions"
- id="org.eclipse.ui.texteditor.TaskRulerAction" />
-
- <action
- label="%AddBookmark.label"
- helpContextId="org.eclipse.ui.bookmark_action_context"
- class="org.eclipse.ui.texteditor.BookmarkRulerAction"
- tooltip="%AddBookmark.tooltip"
- menubarPath="additions"
- id="org.eclipse.ui.texteditor.BookmarkRulerAction" />
-
- </viewerContribution>
- <viewerContribution
- targetID="org.eclipse.jst.jsp.core.jspfragmentsource.source.RulerContext"
- id="org.eclipse.ui.texteditor.ruler.context.actions">
- <action
- label="%AddTask.label"
- helpContextId="org.eclipse.ui.AddTask_action_context"
- class="org.eclipse.ui.texteditor.TaskRulerAction"
- tooltip="%AddTask.tooltip"
- menubarPath="additions"
- id="org.eclipse.ui.texteditor.TaskRulerAction" />
-
- <action
- label="%AddBookmark.label"
- helpContextId="org.eclipse.ui.bookmark_action_context"
- class="org.eclipse.ui.texteditor.BookmarkRulerAction"
- tooltip="%AddBookmark.tooltip"
- menubarPath="additions"
- id="org.eclipse.ui.texteditor.BookmarkRulerAction" />
-
- </viewerContribution>
- <viewerContribution
- targetID="org.eclipse.jst.jsp.core.tagsource.source.RulerContext"
- id="org.eclipse.ui.texteditor.ruler.context.actions">
- <action
- label="%AddTask.label"
- helpContextId="org.eclipse.ui.AddTask_action_context"
- class="org.eclipse.ui.texteditor.TaskRulerAction"
- tooltip="%AddTask.tooltip"
- menubarPath="additions"
- id="org.eclipse.ui.texteditor.TaskRulerAction" />
-
- <action
- label="%AddBookmark.label"
- helpContextId="org.eclipse.ui.bookmark_action_context"
- class="org.eclipse.ui.texteditor.BookmarkRulerAction"
- tooltip="%AddBookmark.tooltip"
- menubarPath="additions"
- id="org.eclipse.ui.texteditor.BookmarkRulerAction" />
-
- </viewerContribution>
- <viewerContribution
- targetID="org.eclipse.jst.jsp.core.tldsource.source.RulerContext"
- id="org.eclipse.ui.texteditor.ruler.context.actions">
- <action
- label="%AddTask.label"
- helpContextId="org.eclipse.ui.AddTask_action_context"
- class="org.eclipse.ui.texteditor.TaskRulerAction"
- tooltip="%AddTask.tooltip"
- menubarPath="additions"
- id="org.eclipse.ui.texteditor.TaskRulerAction" />
-
- <action
- label="%AddBookmark.label"
- helpContextId="org.eclipse.ui.bookmark_action_context"
- class="org.eclipse.ui.texteditor.BookmarkRulerAction"
- tooltip="%AddBookmark.tooltip"
- menubarPath="additions"
- id="org.eclipse.ui.texteditor.BookmarkRulerAction" />
-
- </viewerContribution>
- </extension>
-
- <extension point="org.eclipse.ui.editorActions">
- <editorContribution
- id="org.eclipse.jst.jsp.core.jspsource.source.editorActions"
- targetID="org.eclipse.jst.jsp.core.jspsource.source">
- <!-- <action
- id="CleanupDocument"
- label="%CleanupDocument_label"
- definitionId="org.eclipse.wst.sse.ui.cleanup.document"
- tooltip="%CleanupDocument_tooltip"
- class="org.eclipse.wst.html.ui.internal.edit.ui.CleanupActionHTMLDelegate"
- actionID="CleanupDocument">
- </action>
- <action
- id="ToggleComment"
- label="%ToggleComment_label"
- definitionId="org.eclipse.wst.sse.ui.toggle.comment"
- tooltip="%ToggleComment_tooltip"
- class="org.eclipse.wst.xml.ui.internal.actions.ToggleCommentActionXMLDelegate"
- actionID="ToggleComment">
- </action>
- <action
- id="AddBlockComment"
- label="%AddBlockComment_label"
- definitionId="org.eclipse.wst.sse.ui.add.block.comment"
- tooltip="%AddBlockComment_tooltip"
- class="org.eclipse.wst.xml.ui.internal.actions.AddBlockCommentActionXMLDelegate"
- actionID="AddBlockComment">
- </action>
- <action
- id="RemoveBlockComment"
- label="%RemoveBlockComment_label"
- definitionId="org.eclipse.wst.sse.ui.remove.block.comment"
- tooltip="%RemoveBlockComment_tooltip"
- class="org.eclipse.wst.xml.ui.internal.actions.RemoveBlockCommentActionXMLDelegate"
- actionID="RemoveBlockComment">
- </action>-->
- <!--<action
- id="RenameElement"
- label="%RenameElement_label"
- definitionId="org.eclipse.jst.jsp.ui.refactor.rename"
- class="org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameElementActionDelegate"
- actionID="RenameElement">
- </action>
- <action
- id="MoveElement"
- label="%MoveElement_label"
- definitionId="org.eclipse.jst.jsp.ui.refactor.move"
- class="org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPMoveElementActionDelegate"
- actionID="MoveElement">
- </action>
- <action
- id="FindOccurrences"
- label="%FindOccurrences_label"
- definitionId="org.eclipse.wst.sse.ui.search.find.occurrences"
- class="org.eclipse.jst.jsp.ui.internal.java.search.JSPFindOccurrencesActionDelegate"
- actionID="FindOccurrences">
- </action>-->
- <!--<action
- id="StructureSelectEnclosing"
- label="%StructureSelectEnclosing_label"
- definitionId="org.eclipse.wst.sse.ui.structure.select.enclosing"
- tooltip="%StructureSelectEnclosing_tooltip"
- class="org.eclipse.wst.xml.ui.internal.selection.StructuredSelectEnclosingXMLActionDelegate"
- actionID="StructureSelectEnclosing">
- </action>
- <action
- id="StructureSelectNext"
- label="%StructureSelectNext_label"
- definitionId="org.eclipse.wst.sse.ui.structure.select.next"
- tooltip="%StructureSelectNext_tooltip"
- class="org.eclipse.wst.xml.ui.internal.selection.StructuredSelectNextXMLActionDelegate"
- actionID="StructureSelectNext">
- </action>
- <action
- id="StructureSelectPrevious"
- label="%StructureSelectPrevious_label"
- definitionId="org.eclipse.wst.sse.ui.structure.select.previous"
- tooltip="%StructureSelectPrevious_tooltip"
- class="org.eclipse.wst.xml.ui.internal.selection.StructuredSelectPreviousXMLActionDelegate"
- actionID="StructureSelectPrevious">
- </action>
- <action
- id="StructureSelectHistory"
- label="%StructureSelectHistory_label"
- definitionId="org.eclipse.wst.sse.ui.structure.select.last"
- tooltip="%StructureSelectHistory_tooltip"
- class="org.eclipse.wst.sse.ui.internal.selection.StructuredSelectHistoryActionDelegate"
- actionID="StructureSelectHistory">
- </action>-->
- </editorContribution>
- <editorContribution
- targetID="org.eclipse.jst.jsp.core.jspsource.source"
- id="org.eclipse.jst.jsp.core.jspsource.ruler.actions">
- <action
- label="%AddBookmark.label"
- helpContextId="org.eclipse.ui.bookmark_action_context"
- class="org.eclipse.ui.texteditor.BookmarkRulerAction"
- actionID="RulerDoubleClick"
- id="org.eclipse.ui.texteditor.BookmarkRulerAction"/>
- <action
- label="%SelectRuler.label"
- class="org.eclipse.ui.texteditor.SelectRulerAction"
- actionID="RulerClick"
- id="org.eclipse.ui.texteditor.SelectRulerAction"/>
- </editorContribution>
- </extension>
-
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.jst.jsp.ui.internal.java.refactoring.RenameElementHandler"
- commandId="org.eclipse.jst.jsp.ui.refactor.rename">
- <activeWhen>
- <reference
- definitionId="org.eclipse.wst.jsp.ui.jspSourceContributions.definition">
- </reference>
- </activeWhen>
- <enabledWhen>
- <reference
- definitionId="org.eclipse.wst.jsp.ui.jspSourceContributions.definition">
- </reference>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.jst.jsp.ui.internal.java.refactoring.MoveElementHandler"
- commandId="org.eclipse.jst.jsp.ui.refactor.move">
- <activeWhen>
- <reference
- definitionId="org.eclipse.wst.jsp.ui.jspSourceContributions.definition">
- </reference>
- </activeWhen>
- <enabledWhen>
- <reference
- definitionId="org.eclipse.wst.jsp.ui.jspSourceContributions.definition">
- </reference>
- </enabledWhen>
- </handler>
- <handler
- class="org.eclipse.jst.jsp.ui.internal.handlers.JSPFindOccurrencesHandler"
- commandId="org.eclipse.wst.sse.ui.search.find.occurrences">
- <activeWhen>
- <reference
- definitionId="org.eclipse.wst.jsp.ui.jspSourceContributions.definition">
- </reference>
- </activeWhen>
- <enabledWhen>
- <reference
- definitionId="org.eclipse.wst.jsp.ui.jspSourceContributions.definition">
- </reference>
- </enabledWhen>
- </handler>
- </extension>
-
- <extension point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension targetID="org.eclipse.wst.web.ui.webDevPerspective">
- <newWizardShortcut id="org.eclipse.jst.jsp.ui.internal.wizard.NewJSPWizard"/>
- </perspectiveExtension>
- </extension>
-
- <!-- JSP Fragment Property Page -->
- <extension point="org.eclipse.ui.propertyPages">
- <!-- for j2ee web project -->
- <page
- name="%JSPFragmentContentSettings.name"
- class="org.eclipse.jst.jsp.ui.internal.contentproperties.ui.ProjectJSPFContentSettingsPropertyPage"
- id="org.eclipse.jst.jsp.ui.internal.contentproperties.ProjectJSPFContentSettingsPropertyPage">
- <enabledWhen>
- <and>
- <adapt type="org.eclipse.core.resources.IProject">
- <or>
- <test
- forcePluginActivation="true"
- property="org.eclipse.wst.common.project.facet.core.projectFacet"
- value="jst.web" />
- </or>
- </adapt>
- </and>
- </enabledWhen>
- <keywordReference id="org.eclipse.jst.jsp.ui.fragments"/>
- </page>
- <page
- name="%JSPFragmentContentSettings.name"
- class="org.eclipse.jst.jsp.ui.internal.contentproperties.ui.JSPFContentSettingsPropertyPage"
- id="org.eclipse.jst.jsp.ui.internal.contentproperties.JSPFContentSettingsPropertyPage">
- <enabledWhen>
- <and>
- <adapt type="org.eclipse.core.resources.IFile">
- <or>
- <test
- forcePluginActivation="true"
- property="org.eclipse.core.resources.contentTypeId"
- value="org.eclipse.jst.jsp.core.jspfragmentsource" />
- <test
- forcePluginActivation="true"
- property="org.eclipse.core.resources.contentTypeId"
- value="org.eclipse.jst.jsp.core.cssjspfragmentsource" />
- </or>
- </adapt>
- </and>
- </enabledWhen>
- <keywordReference id="org.eclipse.jst.jsp.ui.fragments"/>
- </page>
- <page
- name="%JSP_Property_validation"
- class="org.eclipse.jst.jsp.ui.internal.preferences.ui.JSPValidationPreferencePage"
- id="org.eclipse.jst.jsp.ui.propertyPage.project.validation"
- category="ValidationPropertiesPage">
- <enabledWhen>
- <adapt type="org.eclipse.core.resources.IProject">
- <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.jdt.core.javanature"/>
- </adapt>
- </enabledWhen>
- <keywordReference id="org.eclipse.jst.jsp.ui.severities"/>
- </page>
- <page
- name="%JSP_Property_tag_contentSettings"
- class="org.eclipse.jst.jsp.ui.internal.contentproperties.ui.TagContentSettingsPropertyPage"
- id="org.eclipse.jst.jsp.ui.propertyPage.project.tag.content.settings"
- category="org.eclipse.ui.propertypages.info.file">
- <enabledWhen>
- <and>
- <adapt type="org.eclipse.core.resources.IFile">
- <or>
- <test
- forcePluginActivation="true"
- property="org.eclipse.core.resources.contentTypeId"
- value="org.eclipse.jst.jsp.core.tagsource" />
- </or>
- </adapt>
- </and>
- </enabledWhen>
- </page>
- </extension>
- <!-- jsp-for-css editor configurations -->
- <extension point="org.eclipse.wst.sse.ui.editorConfiguration">
- <contentOutlineConfiguration
- class="org.eclipse.wst.css.ui.views.contentoutline.CSSContentOutlineConfiguration"
- target="org.eclipse.jst.jsp.core.cssjspsource" />
- <sourceViewerConfiguration
- class="org.eclipse.wst.css.ui.StructuredTextViewerConfigurationCSS"
- target="org.eclipse.jst.jsp.core.cssjspsource" />
- <propertySheetConfiguration
- class="org.eclipse.jst.jsp.css.ui.internal.views.properties.JSPedCSSPropertySheetConfiguration"
- target="org.eclipse.jst.jsp.core.cssjspsource" />
- <provisionalConfiguration
- type="characterpairmatcher"
- class="org.eclipse.wst.css.ui.internal.text.CSSDocumentRegionEdgeMatcher"
- target="org.eclipse.jst.jsp.core.cssjspsource" />
- <provisionalConfiguration
- type="foldingstrategy"
- class="org.eclipse.wst.css.ui.internal.projection.CSSFoldingStrategy"
- target="org.eclipse.jst.jsp.core.cssjspsource" />
- <provisionalDefinition
- type="preferencepages"
- value="org.eclipse.wst.sse.ui.preferences.css, org.eclipse.wst.sse.ui.preferences.css.source, org.eclipse.wst.css.ui.preferences.templates, org.eclipse.wst.sse.ui.preferences.css.styles"
- target="org.eclipse.jst.jsp.core.cssjspsource" />
- </extension>
- <extension
- point="org.eclipse.wst.sse.ui.adapterFactoryDescription">
- <adapterFactoryDescription
- class="org.eclipse.jst.jsp.css.ui.internal.registry.AdapterFactoryProviderJSPedCSS">
- <contentType id="org.eclipse.jst.jsp.core.cssjspsource" />
- </adapterFactoryDescription>
- </extension>
- <extension
- point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets">
- <target
- id="org.eclipse.jst.jsp.core.jspsource"
- name="%JSP_Source_target_name">
- </target>
- </extension>
- <extension
- point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
- <hyperlinkDetector
- class="org.eclipse.jst.jsp.ui.internal.hyperlink.JSPJavaHyperlinkDetector"
- id="org.eclipse.jst.jsp.ui.internal.hyperlink.JSPJavaHyperlinkDetector"
- name="%Java_Element_hyperlink"
- targetId="org.eclipse.jst.jsp.core.jspsource">
- </hyperlinkDetector>
- <hyperlinkDetector
- class="org.eclipse.jst.jsp.ui.internal.hyperlink.TaglibHyperlinkDetector"
- id="org.eclipse.jst.jsp.ui.internal.hyperlink.TaglibHyperlinkDetector"
- name="%Taglib_hyperlink"
- targetId="org.eclipse.jst.jsp.core.jspsource">
- </hyperlinkDetector>
- <hyperlinkDetector
- class="org.eclipse.jst.jsp.ui.internal.hyperlink.XMLJavaHyperlinkDetector"
- id="org.eclipse.jst.jsp.ui.internal.hyperlink.XMLJavaHyperlinkDetector"
- name="%Java_Element_hyperlink"
- targetId="org.eclipse.core.runtime.xml">
- </hyperlinkDetector>
- </extension>
-
- <extension point="org.eclipse.core.expressions.definitions">
- <definition id="org.eclipse.wst.jsp.ui.jspSourceContributions.definition">
- <with variable="activeContexts">
- <iterate operator="or">
- <equals value="org.eclipse.jst.jsp.core.jspsource"/>
- </iterate>
- </with>
- </definition>
- </extension>
-
- <extension point="org.eclipse.ui.menus">
- <menuContribution locationURI="menu:refactorMenuId">
- <separator name="jspRefactorBegin" visible="false"></separator>
- <command commandId="org.eclipse.jst.jsp.ui.refactor.rename" id="RenameElement" label="%command.jsp.refactor.rename.name" style="push">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.wst.jsp.ui.jspSourceContributions.definition"></reference>
- </visibleWhen>
- </command>
- <command commandId="org.eclipse.jst.jsp.ui.refactor.move" id="MoveElement" label="%command.jsp.refactor.move.name" style="push">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.wst.jsp.ui.jspSourceContributions.definition"></reference>
- </visibleWhen>
- </command>
- <separator name="jspRefactorBegin" visible="false"></separator>
- </menuContribution>
- <menuContribution
- locationURI="popup:refactorPopupMenuId">
- <separator name="jspRefactorBegin" visible="false"></separator>
- <command commandId="org.eclipse.jst.jsp.ui.refactor.rename" id="RenameElement" label="%command.jsp.refactor.rename.name" style="push">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.wst.jsp.ui.jspSourceContributions.definition"></reference>
- </visibleWhen>
- </command>
- <command commandId="org.eclipse.jst.jsp.ui.refactor.move" id="MoveElement" label="%command.jsp.refactor.move.name" style="push">
- <visibleWhen checkEnabled="false">
- <reference definitionId="org.eclipse.wst.jsp.ui.jspSourceContributions.definition"></reference>
- </visibleWhen>
- </command>
- <separator name="jspRefactorBegin" visible="false"></separator>
- </menuContribution>
- </extension>
-
- <!-- Enable the FormatHandler for JSP Content Type -->
- <extension point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.wst.sse.ui.internal.handlers.FormatHandler"
- commandId="org.eclipse.wst.sse.ui.format">
- <activeWhen>
- <reference definitionId="org.eclipse.wst.jsp.ui.jspContentType.definition"></reference>
- </activeWhen>
- <enabledWhen>
- <reference definitionId="org.eclipse.wst.jsp.ui.jspContentType.definition"></reference>
- </enabledWhen>
- </handler>
- </extension>
-
- <!-- Set up a definition for JSP Content Types -->
- <extension point="org.eclipse.core.expressions.definitions">
- <definition id="org.eclipse.wst.jsp.ui.jspContentType.definition">
- <iterate ifEmpty="false">
- <adapt type="org.eclipse.core.resources.IFile">
- <!-- Force property tester to load, should not cause entire plug-in to start -->
- <test property="org.eclipse.wst.sse.core.resources.contentTypeId"
- value="org.eclipse.jst.jsp.core.jspsource" forcePluginActivation="true"/>
- </adapt>
- </iterate>
- </definition>
- </extension>
- <extension point="org.eclipse.wst.sse.ui.characterPairing">
- <inserter class="org.eclipse.wst.html.ui.internal.text.CharacterPairInserter" id="org.eclipse.wst.jsp.ui.inserter">
- <contentTypeIdentifier
- id="org.eclipse.jst.jsp.core.jspsource"
- partitions="org.eclipse.jst.jsp.JSP_DIRECTIVE,org.eclipse.wst.html.HTML_DEFAULT,org.eclipse.wst.html.HTML_DECLARATION">
- </contentTypeIdentifier>
- </inserter>
- </extension>
- <extension point="org.eclipse.wst.sse.ui.characterPairing">
- <inserter class="org.eclipse.jst.jsp.ui.internal.text.JavaCharacterPairInserter" id="org.eclipse.wst.jsp.java.ui.inserter">
- <contentTypeIdentifier
- id="org.eclipse.jst.jsp.core.jspsource"
- partitions="org.eclipse.jst.jsp.SCRIPT.JAVA">
- </contentTypeIdentifier>
- </inserter>
- </extension>
- <extension point="org.eclipse.wst.sse.ui.characterPairing">
- <inserter class="org.eclipse.wst.css.ui.internal.text.CSSCharacterPairInserter" id="org.eclipse.jst.jsp.css.ui.inserter">
- <contentTypeIdentifier
- id="org.eclipse.jst.jsp.core.jspsource"
- partitions="org.eclipse.wst.css.STYLE">
- </contentTypeIdentifier>
- </inserter>
- </extension>
- <extension
- point="org.eclipse.wst.sse.ui.commentingStrategy">
- <blockCommentingStrategy
- prefix="&lt;!--"
- suffix="--&gt;">
- <contentType
- associatedCommentPartitionTypeID="org.eclipse.wst.html.HTML_COMMENT"
- id="org.eclipse.jst.jsp.core.jspsource">
- <requiredPartitionTypes>
- <partitionType
- id="org.eclipse.wst.html.HTML_DEFAULT">
- </partitionType>
- <partitionType
- id="org.eclipse.wst.html.HTML_DECLARATION">
- </partitionType>
- <partitionType
- id="org.eclipse.wst.html.SCRIPT.EVENTHANDLER">
- </partitionType>
- <partitionType
- id="org.eclipse.wst.xml.XML_PI">
- </partitionType>
- </requiredPartitionTypes>
- <allowablePartitionTypes
- anyPartitionType="false">
- <partitionType
- id="org.eclipse.wst.css.STYLE">
- </partitionType>
- <partitionType
- id="org.eclipse.wst.html.SCRIPT">
- </partitionType>
- </allowablePartitionTypes>
- </contentType>
- </blockCommentingStrategy>
- <blockCommentingStrategy
- prefix="&lt;%--"
- suffix="--%&gt;">
- <contentType
- associatedCommentPartitionTypeID="org.eclipse.jst.jsp.JSP_COMMENT"
- id="org.eclipse.jst.jsp.core.jspsource">
- <requiredPartitionTypes>
- <partitionType
- id="org.eclipse.jst.jsp.JSP_DIRECTIVE">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.DEFAULT_JSP">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.SCRIPT.DELIMITER">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.SCRIPT.JSP_EL">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.SCRIPT.JSP_EL2">
- </partitionType>
- </requiredPartitionTypes>
- <allowablePartitionTypes
- anyPartitionType="true">
- </allowablePartitionTypes>
- </contentType>
- </blockCommentingStrategy>
- <blockCommentingStrategy
- prefix="/*"
- suffix="*/">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <requiredPartitionTypes>
- <partitionType
- id="org.eclipse.jst.jsp.SCRIPT.JAVA">
- </partitionType>
- </requiredPartitionTypes>
- <allowablePartitionTypes
- anyPartitionType="false">
- </allowablePartitionTypes>
- </contentType>
- </blockCommentingStrategy>
- <lineCommentingStrategy
- prefix="//">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <requiredPartitionTypes>
- <partitionType
- id="org.eclipse.jst.jsp.SCRIPT.JAVA">
- </partitionType>
- </requiredPartitionTypes>
- <allowablePartitionTypes
- anyPartitionType="false">
- </allowablePartitionTypes>
- </contentType>
- </lineCommentingStrategy>
- </extension>
- <extension
- point="org.eclipse.wst.sse.ui.completionProposal">
- <proposalCategory
- icon="icons/full/obj16/tag-template.gif"
- id="org.eclipse.jst.jsp.ui.proposalCategory.jspTemplates"
- name="%proposalCategory.jspTemplates">
- </proposalCategory>
- <proposalCategory
- icon="icons/full/obj16/tag-jsp.gif"
- id="org.eclipse.jst.jsp.ui.proposalCategory.jsp"
- name="%proposalCategory.jsp">
- </proposalCategory>
- <proposalCategory
- icon="icons/full/elcl16/javaassist_co.gif"
- id="org.eclipse.jst.jsp.ui.proposalCategory.jspJava"
- name="%proposalCategory.jspJava">
- </proposalCategory>
- <proposalComputerExtendedActivation
- id="org.eclipse.wst.html.ui.proposalComputer.htmlTags">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
- id="org.eclipse.wst.html.HTML_DEFAULT">
- </partitionType>
- <partitionType
- id="org.eclipse.wst.html.HTML_COMMENT">
- </partitionType>
- <partitionType
- id="org.eclipse.wst.sse.ST_DEFAULT">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.JSP_COMMENT">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.JSP_DIRECTIVE">
- </partitionType>
- </contentType>
- </proposalComputerExtendedActivation>
- <proposalComputerExtendedActivation
- id="org.eclipse.wst.html.ui.proposalComputer.htmlTemplates">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
- id="org.eclipse.wst.html.HTML_DEFAULT">
- </partitionType>
- <partitionType
- id="org.eclipse.wst.html.HTML_COMMENT">
- </partitionType>
- <partitionType
- id="org.eclipse.wst.sse.ST_DEFAULT">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.JSP_COMMENT">
- </partitionType>
- </contentType>
- </proposalComputerExtendedActivation>
- <proposalComputerExtendedActivation
- id="org.eclipse.wst.xml.ui.proposalComputer.xmlTags">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
- id="org.eclipse.wst.xml.XML_DEFAULT">
- </partitionType>
- </contentType>
- </proposalComputerExtendedActivation>
- <proposalComputerExtendedActivation
- id="org.eclipse.wst.xml.ui.proposalComputer.xmlTemplates">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
- id="org.eclipse.wst.xml.XML_DEFAULT">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.JSP_DIRECTIVE">
- </partitionType>
- </contentType>
- </proposalComputerExtendedActivation>
- <proposalComputer
- activate="false"
- categoryId="org.eclipse.jst.jsp.ui.proposalCategory.jspTemplates"
- class="org.eclipse.jst.jsp.ui.internal.contentassist.JSPTemplatesCompletionProposalComputer"
- id="org.eclipse.jst.jsp.ui.proposalComputer.jspTemplates">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
- id="org.eclipse.wst.html.HTML_DEFAULT">
- </partitionType>
- </contentType>
- </proposalComputer>
- <proposalComputer
- activate="false"
- categoryId="org.eclipse.jst.jsp.ui.proposalCategory.jsp"
- class="org.eclipse.jst.jsp.ui.internal.contentassist.JSPCompletionProposalComputer"
- id="org.eclipse.jst.jsp.ui.proposalComputer.jsp">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- </contentType>
- </proposalComputer>
- <proposalComputer
- activate="false"
- categoryId="org.eclipse.jst.jsp.ui.proposalCategory.jsp"
- class="org.eclipse.jst.jsp.ui.internal.contentassist.LibraryTagsCompletionProposalComputer"
- id="org.eclipse.jst.jsp.ui.proposalComputer.libraryTags">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
- id="org.eclipse.wst.html.HTML_DEFAULT">
- </partitionType>
- <partitionType
- id="org.eclipse.wst.html.HTML_COMMENT">
- </partitionType>
- <partitionType
- id="org.eclipse.wst.sse.ST_DEFAULT">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.JSP_COMMENT">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.JSP_DIRECTIVE">
- </partitionType>
- </contentType>
- </proposalComputer>
- <proposalComputer
- activate="false"
- categoryId="org.eclipse.jst.jsp.ui.proposalCategory.jspJava"
- class="org.eclipse.jst.jsp.ui.internal.contentassist.JSPJavaCompletionProposalComputer"
- id="org.eclipse.jst.jsp.ui.proposalComputer.jspJava">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
- id="org.eclipse.jst.jsp.SCRIPT.JAVA">
- </partitionType>
- <partitionType
- id="org.eclipse.wst.xml.XML_CDATA">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.DEFAULT_JSP">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.SCRIPT.DELIMITER">
- </partitionType>
- <partitionType
- id="org.eclipse.jst.jsp.SCRIPT.JAVASCRIPT">
- </partitionType>
- <partitionType
- id="org.eclipse.wst.html.SCRIPT">
- </partitionType>
- </contentType>
- </proposalComputer>
- <proposalComputer
- activate="false"
- categoryId="org.eclipse.jst.jsp.ui.proposalCategory.jspJava"
- class="org.eclipse.jst.jsp.ui.internal.contentassist.JSPELCompletionProposalComputer"
- id="org.eclipse.jst.jsp.ui.proposalComputer.jspEL">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
- id="org.eclipse.jst.jsp.SCRIPT.JSP_EL">
- </partitionType>
- </contentType>
- </proposalComputer>
- <proposalComputer
- activate="false"
- categoryId="org.eclipse.jst.jsp.ui.proposalCategory.jspJava"
- class="org.eclipse.jst.jsp.ui.internal.contentassist.JSPImportCompletionProposalComputer"
- id="org.eclipse.jst.jsp.ui.proposalComputer.jspImport">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
- id="org.eclipse.jst.jsp.JSP_DIRECTIVE">
- </partitionType>
- </contentType>
- </proposalComputer>
- <proposalComputer
- activate="false"
- categoryId="org.eclipse.jst.jsp.ui.proposalCategory.jsp"
- class="org.eclipse.jst.jsp.ui.internal.contentassist.JSPPropertyCompletionProposalComputer"
- id="org.eclipse.jst.jsp.ui.proposalComputer.jspProperty">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- </contentType>
- </proposalComputer>
- <proposalComputer
- activate="false"
- categoryId="org.eclipse.jst.jsp.ui.proposalCategory.jsp"
- class="org.eclipse.jst.jsp.ui.internal.contentassist.JSPUseBeanCompletionProposalComputer"
- id="org.eclipse.jst.jsp.ui.proposalComputer.jspUseBean">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- </contentType>
- </proposalComputer>
- <proposalComputer
- activate="false"
- categoryId="org.eclipse.jst.jsp.ui.proposalCategory.jsp"
- class="org.eclipse.jst.jsp.ui.internal.contentassist.JSPTaglibCompletionProposalComputer"
- id="org.eclipse.jst.jsp.ui.proposalComputer.jspTaglib">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- </contentType>
- </proposalComputer>
- <proposalComputerExtendedActivation
- id="org.eclipse.wst.css.ui.proposalComputer.css">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
- id="org.eclipse.wst.css.STYLE">
- </partitionType>
- </contentType>
- </proposalComputerExtendedActivation>
- <proposalComputerExtendedActivation
- id="org.eclipse.wst.css.ui.proposalComputer.cssTemplates">
- <contentType
- id="org.eclipse.jst.jsp.core.jspsource">
- <partitionType
- id="org.eclipse.wst.css.STYLE">
- </partitionType>
- </contentType>
- </proposalComputerExtendedActivation>
- </extension>
- <extension
- point="org.eclipse.wst.sse.ui.completionProposalCategoriesConfiguration">
- <categoriesConfiguration
- class="org.eclipse.jst.jsp.ui.internal.preferences.JSPCompletionProposalCategoriesConfiguration"
- contentTypeID="org.eclipse.jst.jsp.core.jspsource">
- </categoriesConfiguration>
- </extension>
-<extension
- point="org.eclipse.wst.sse.ui.outlineFilters">
- <filter
- targetId="org.eclipse.jst.jsp.ui.OutlinePage"
- name="%HideImportDeclaration.label"
- enabled="false"
- description="%HideImportDeclaration.description"
- class="org.eclipse.jst.jsp.ui.views.contentoutline.JSPImportDirectiveFilter"
- id="org.eclipse.jst.jsp.ui.views.contentoutline.JSPImportDirectiveFilter">
- </filter>
- <filter
- targetId="org.eclipse.jst.jsp.ui.OutlinePage"
- name="%HideComments.label"
- enabled="false"
- description="%HideComments.description"
- class="org.eclipse.wst.xml.ui.views.contentoutline.XMLCommentFilter"
- id="org.eclipse.jst.jsp.ui.views.contentoutline.XMLCommentFilter">
- </filter>
-</extension>
-</plugin>
diff --git a/bundles/org.eclipse.jst.jsp.ui/schema/classPatternProvider.exsd b/bundles/org.eclipse.jst.jsp.ui/schema/classPatternProvider.exsd
deleted file mode 100644
index 92e6106b49..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/schema/classPatternProvider.exsd
+++ /dev/null
@@ -1,106 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.jst.jsp.ui" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.jst.jsp.ui" id="classPatternProvider" name="Class Pattern Provider"/>
- </appInfo>
- <documentation>
- Provides a way for adding additional class patterns to the JavaStratumBreakpointProvider
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appInfo>
- <meta.element internal="true" />
- </appInfo>
- </annotation>
- <complexType>
- <sequence minOccurs="1" maxOccurs="unbounded">
- <element ref="classPatternProvider"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="classPatternProvider">
- <complexType>
- <attribute name="contentType" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="pattern" type="string" use="required">
- <annotation>
- <documentation>
-
- </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>
-
-
-</schema>
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/css/ui/internal/properties/JSPedCSSPropertySource.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/css/ui/internal/properties/JSPedCSSPropertySource.java
deleted file mode 100644
index 09c7828b9b..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/css/ui/internal/properties/JSPedCSSPropertySource.java
+++ /dev/null
@@ -1,40 +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.ui.internal.properties;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.css.ui.internal.properties.CSSPropertySource;
-
-
-
-public class JSPedCSSPropertySource extends CSSPropertySource {
-
- public JSPedCSSPropertySource(ICSSNode target) {
- super(target);
- }
-
- public void setPropertyValue(Object name, Object value) {
- // workaround to avoid DOMException: if value contains jsp element, nothing happen.
- String v = value.toString();
- if (v.indexOf("${") != -1 || v.indexOf("<%=") != -1){
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- String title = JSPUIMessages.Title_InvalidValue; //$NON-NLS-1$
- String message = JSPUIMessages.Message_InvalidValue; //$NON-NLS-1$
- MessageDialog.openWarning(window.getShell(), title, message);
- return;
- }
- super.setPropertyValue(name, value);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/css/ui/internal/registry/AdapterFactoryProviderJSPedCSS.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/css/ui/internal/registry/AdapterFactoryProviderJSPedCSS.java
deleted file mode 100644
index 809e87b0d9..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/css/ui/internal/registry/AdapterFactoryProviderJSPedCSS.java
+++ /dev/null
@@ -1,25 +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.ui.internal.registry;
-
-import org.eclipse.jst.jsp.css.core.internal.modelhandler.ModelHandlerForJSPedCSS;
-import org.eclipse.wst.css.ui.internal.registry.AdapterFactoryProviderCSS;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IDocumentTypeHandler;
-
-public class AdapterFactoryProviderJSPedCSS extends AdapterFactoryProviderCSS {
-
-
- public boolean isFor(IDocumentTypeHandler contentTypeDescription) {
- return (contentTypeDescription instanceof ModelHandlerForJSPedCSS);
- }
-
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/css/ui/internal/views/properties/JSPedCSSPropertySheetConfiguration.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/css/ui/internal/views/properties/JSPedCSSPropertySheetConfiguration.java
deleted file mode 100644
index 7403816675..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/css/ui/internal/views/properties/JSPedCSSPropertySheetConfiguration.java
+++ /dev/null
@@ -1,188 +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.ui.internal.views.properties;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jst.jsp.css.ui.internal.properties.JSPedCSSPropertySource;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.progress.UIJob;
-import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.eclipse.ui.views.properties.IPropertySourceProvider;
-import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.wst.css.core.internal.provisional.document.ICSSNode;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapter;
-import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
-import org.eclipse.wst.sse.ui.views.properties.PropertySheetConfiguration;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-public class JSPedCSSPropertySheetConfiguration extends PropertySheetConfiguration {
- private class CSSPropertySheetRefreshAdapter implements INodeAdapter {
- public boolean isAdapterForType(Object type) {
- return false;
- }
-
- public void notifyChanged(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) {
- if (fPropertySheetPage != null) {
- getPropertiesRefreshJob().addPropertySheetPage(fPropertySheetPage);
- }
- }
- }
-
- private class CSSPropertySourceProvider implements IPropertySourceProvider {
- private IPropertySource fPropertySource = null;
- private ICSSNode fSource = null;
-
- public IPropertySource getPropertySource(Object object) {
- if (fSource != null && object.equals(fSource)) {
- return fPropertySource;
- }
-
- if (object instanceof ICSSNode) {
- fSource = (ICSSNode)object;
- fPropertySource = new JSPedCSSPropertySource(fSource);
- }
- else {
- fSource = null;
- fPropertySource = null;
- }
- return fPropertySource;
- }
- }
-
- private class PropertiesRefreshJob extends UIJob {
- public static final int UPDATE_DELAY = 200;
-
- private Set propertySheetPages = null;
-
- public PropertiesRefreshJob() {
- super(XMLUIMessages.JFaceNodeAdapter_1);
- setSystem(true);
- setPriority(Job.SHORT);
- propertySheetPages = new HashSet(1);
- }
-
- void addPropertySheetPage(IPropertySheetPage page) {
- propertySheetPages.add(page);
- schedule(UPDATE_DELAY);
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor) {
- Object[] pages = propertySheetPages.toArray();
- propertySheetPages.clear();
-
- for (int i = 0; i < pages.length; i++) {
- PropertySheetPage page = (PropertySheetPage) pages[i];
- if (page.getControl() != null && !page.getControl().isDisposed()) {
- page.refresh();
- }
- }
-
- return Status.OK_STATUS;
- }
- }
-
- private PropertiesRefreshJob fPropertiesRefreshJob = null;
-
- IPropertySheetPage fPropertySheetPage;
-
- private IPropertySourceProvider fPropertySourceProvider = null;
-
- private INodeAdapter fRefreshAdapter = new CSSPropertySheetRefreshAdapter();
-
- private INodeNotifier[] fSelectedNotifiers;
-
- /**
- * Create new instance of CSSPropertySheetConfiguration
- */
- public JSPedCSSPropertySheetConfiguration() {
- // Must have empty constructor to createExecutableExtension
- super();
- }
-
- public ISelection getInputSelection(IWorkbenchPart selectingPart, ISelection selection) {
- // remove UI refresh adapters
- if (fSelectedNotifiers != null) {
- for (int i = 0; i < fSelectedNotifiers.length; i++) {
- fSelectedNotifiers[i].removeAdapter(fRefreshAdapter);
- }
- fSelectedNotifiers = null;
- }
-
- ISelection preferredSelection = super.getInputSelection(selectingPart, selection);
- if (preferredSelection instanceof IStructuredSelection) {
- Object[] selectedObjects = new Object[((IStructuredSelection) selection).size()];
- System.arraycopy(((IStructuredSelection) selection).toArray(), 0, selectedObjects, 0, selectedObjects.length);
- for (int i = 0; i < selectedObjects.length; i++) {
- if (selectedObjects[i] instanceof ICSSNode) {
- ICSSNode node = (ICSSNode) selectedObjects[i];
- while (node.getNodeType() == ICSSNode.PRIMITIVEVALUE_NODE || node.getNodeType() == ICSSNode.STYLEDECLITEM_NODE) {
- node = node.getParentNode();
- selectedObjects[i] = node;
- }
- }
- }
-
- /*
- * Add UI refresh adapters and remember notifiers for later
- * removal
- */
- if (selectedObjects.length > 0) {
- List selectedNotifiers = new ArrayList(1);
- for (int i = 0; i < selectedObjects.length; i++) {
- if (selectedObjects[i] instanceof INodeNotifier) {
- selectedNotifiers.add(selectedObjects[i]);
- ((INodeNotifier) selectedObjects[i]).addAdapter(fRefreshAdapter);
- }
- }
- fSelectedNotifiers = (INodeNotifier[]) selectedNotifiers.toArray(new INodeNotifier[selectedNotifiers.size()]);
- }
- preferredSelection = new StructuredSelection(selectedObjects);
- }
- return preferredSelection;
- }
-
- PropertiesRefreshJob getPropertiesRefreshJob() {
- if (fPropertiesRefreshJob == null) {
- fPropertiesRefreshJob = new PropertiesRefreshJob();
- }
- return fPropertiesRefreshJob;
- }
-
- public IPropertySourceProvider getPropertySourceProvider(IPropertySheetPage page) {
- if (fPropertySourceProvider == null) {
- fPropertySourceProvider = new CSSPropertySourceProvider();
- fPropertySheetPage = page;
- }
- return fPropertySourceProvider;
- }
-
- public void unconfigure() {
- super.unconfigure();
- if (fSelectedNotifiers != null) {
- for (int i = 0; i < fSelectedNotifiers.length; i++) {
- fSelectedNotifiers[i].removeAdapter(fRefreshAdapter);
- }
- fSelectedNotifiers = null;
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java
deleted file mode 100644
index 02d25e186e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/StructuredTextViewerConfigurationJSP.java
+++ /dev/null
@@ -1,369 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 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
- * Matthias Fuessel, mat.fuessel@gmx.net - [177387] use base hyperlinking extension points
- *******************************************************************************/
-package org.eclipse.jst.jsp.ui;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.jdt.ui.PreferenceConstants;
-import org.eclipse.jdt.ui.text.IJavaPartitions;
-import org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.IAutoEditStrategy;
-import org.eclipse.jface.text.ITextDoubleClickStrategy;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.formatter.IContentFormatter;
-import org.eclipse.jface.text.formatter.MultiPassContentFormatter;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.text.StructuredTextPartitionerForJSP;
-import org.eclipse.jst.jsp.core.text.IJSPPartitions;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.autoedit.AutoEditStrategyForTabs;
-import org.eclipse.jst.jsp.ui.internal.autoedit.StructuredAutoEditStrategyJSP;
-import org.eclipse.jst.jsp.ui.internal.autoedit.StructuredAutoEditStrategyJSPJava;
-import org.eclipse.jst.jsp.ui.internal.contentassist.JSPStructuredContentAssistProcessor;
-import org.eclipse.jst.jsp.ui.internal.format.FormattingStrategyJSPJava;
-import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
-import org.eclipse.jst.jsp.ui.internal.style.LineStyleProviderForJSP;
-import org.eclipse.jst.jsp.ui.internal.style.java.LineStyleProviderForJava;
-import org.eclipse.jst.jsp.ui.internal.style.jspel.LineStyleProviderForJSPEL;
-import org.eclipse.wst.css.core.text.ICSSPartitions;
-import org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl;
-import org.eclipse.wst.html.core.internal.provisional.contenttype.ContentTypeIdForHTML;
-import org.eclipse.wst.html.core.text.IHTMLPartitions;
-import org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTML;
-import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.eclipse.wst.sse.ui.internal.format.StructuredFormattingStrategy;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-import org.eclipse.wst.xml.core.internal.provisional.contenttype.ContentTypeIdForXML;
-import org.eclipse.wst.xml.core.text.IXMLPartitions;
-import org.eclipse.wst.xml.ui.StructuredTextViewerConfigurationXML;
-import org.eclipse.wst.xml.ui.internal.contentoutline.JFaceNodeLabelProvider;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Node;
-
-/**
- * Configuration for a source viewer which shows JSP content.
- * <p>
- * Clients can subclass and override just those methods which must be specific
- * to their needs.
- * </p>
- *
- * @see org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration
- * @since 1.0
- */
-public class StructuredTextViewerConfigurationJSP extends StructuredTextViewerConfiguration {
- /*
- * One instance per configuration because not sourceviewer-specific and
- * it's a String array
- */
- private String[] fConfiguredContentTypes;
- /*
- * One instance per configuration
- */
- private LineStyleProvider fLineStyleProviderForJava;
- /*
- * One instance per configuration
- */
- private LineStyleProvider fLineStyleProviderForJSP;
- /*
- * One instance per configuration
- */
- private LineStyleProvider fLineStyleProviderForJSPEL;
- private StructuredTextViewerConfiguration fHTMLSourceViewerConfiguration;
- private JavaSourceViewerConfiguration fJavaSourceViewerConfiguration;
- private StructuredTextViewerConfiguration fXMLSourceViewerConfiguration;
- private ILabelProvider fStatusLineLabelProvider;
-
- /**
- * Create new instance of StructuredTextViewerConfigurationJSP
- */
- public StructuredTextViewerConfigurationJSP() {
- // Must have empty constructor to createExecutableExtension
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration#getAutoEditStrategies(org.eclipse.jface.text.source.ISourceViewer,
- * java.lang.String)
- */
- public IAutoEditStrategy[] getAutoEditStrategies(ISourceViewer sourceViewer, String contentType) {
- IAutoEditStrategy[] strategies = null;
-
- if (contentType == IXMLPartitions.XML_DEFAULT) {
- // xml autoedit strategies
- strategies = getXMLSourceViewerConfiguration().getAutoEditStrategies(sourceViewer, contentType);
- }
- else if (contentType == IJSPPartitions.JSP_CONTENT_JAVA) {
- // jsp java autoedit strategies
- List allStrategies = new ArrayList(0);
-
- // add the scritplet autoedit strategy first
- allStrategies.add(new StructuredAutoEditStrategyJSPJava());
-
- IAutoEditStrategy[] javaStrategies = getJavaSourceViewerConfiguration().getAutoEditStrategies(sourceViewer, IJavaPartitions.JAVA_PARTITIONING);
- for (int i = 0; i < javaStrategies.length; i++) {
- allStrategies.add(javaStrategies[i]);
- }
- // be sure this is added last, after others, so it can modify
- // results from earlier steps.
- // add auto edit strategy that handles when tab key is pressed
- allStrategies.add(new AutoEditStrategyForTabs());
-
- strategies = (IAutoEditStrategy[]) allStrategies.toArray(new IAutoEditStrategy[allStrategies.size()]);
- }
- else if (contentType == IHTMLPartitions.HTML_DEFAULT || contentType == IHTMLPartitions.HTML_DECLARATION || contentType == IJSPPartitions.JSP_DIRECTIVE) {
- // html and jsp autoedit strategies
- List allStrategies = new ArrayList(0);
-
- // add the jsp autoedit strategy first then add all html's
- allStrategies.add(new StructuredAutoEditStrategyJSP());
-
- IAutoEditStrategy[] htmlStrategies = getHTMLSourceViewerConfiguration().getAutoEditStrategies(sourceViewer, contentType);
- for (int i = 0; i < htmlStrategies.length; i++) {
- allStrategies.add(htmlStrategies[i]);
- }
-
- strategies = (IAutoEditStrategy[]) allStrategies.toArray(new IAutoEditStrategy[allStrategies.size()]);
- }
- else {
- // default autoedit strategies
- List allStrategies = new ArrayList(0);
-
- IAutoEditStrategy[] superStrategies = super.getAutoEditStrategies(sourceViewer, contentType);
- for (int i = 0; i < superStrategies.length; i++) {
- allStrategies.add(superStrategies[i]);
- }
-
- // be sure this is added last, after others, so it can modify
- // results from earlier steps.
- // add auto edit strategy that handles when tab key is pressed
- allStrategies.add(new AutoEditStrategyForTabs());
-
- strategies = (IAutoEditStrategy[]) allStrategies.toArray(new IAutoEditStrategy[allStrategies.size()]);
- }
-
- return strategies;
- }
-
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- if (fConfiguredContentTypes == null) {
- /*
- * A little bit of cheating because assuming html's configured
- * content types will add default, unknown, and all xml configured
- * content types
- */
- String[] htmlTypes = getHTMLSourceViewerConfiguration().getConfiguredContentTypes(sourceViewer);
- String[] jspTypes = StructuredTextPartitionerForJSP.getConfiguredContentTypes();
- fConfiguredContentTypes = new String[htmlTypes.length + jspTypes.length];
-
- int index = 0;
- System.arraycopy(htmlTypes, 0, fConfiguredContentTypes, index, htmlTypes.length);
- System.arraycopy(jspTypes, 0, fConfiguredContentTypes, index += htmlTypes.length, jspTypes.length);
- }
-
- return fConfiguredContentTypes;
- }
-
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- final IContentAssistant assistant = super.getContentAssistant(sourceViewer);
- if (assistant instanceof ContentAssistant) {
- ((ContentAssistant) assistant).enableAutoInsert(JSPUIPlugin.getInstance().getPreferenceStore().getBoolean(JSPUIPreferenceNames.INSERT_SINGLE_SUGGESTION));
- }
- return assistant;
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration#getContentAssistProcessors(
- * org.eclipse.jface.text.source.ISourceViewer, java.lang.String)
- */
- protected IContentAssistProcessor[] getContentAssistProcessors(
- ISourceViewer sourceViewer, String partitionType) {
-
- IContentAssistProcessor processor = new JSPStructuredContentAssistProcessor(
- this.getContentAssistant(), partitionType, sourceViewer);
- return new IContentAssistProcessor[]{processor};
- }
-
- public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
- IContentFormatter formatter = super.getContentFormatter(sourceViewer);
- // super was unable to create a formatter, probably because
- // sourceViewer does not have document set yet, so just create a
- // generic one
- if (!(formatter instanceof MultiPassContentFormatter))
- formatter = new MultiPassContentFormatter(getConfiguredDocumentPartitioning(sourceViewer), IXMLPartitions.XML_DEFAULT);
-
- MultiPassContentFormatter multiFormatter = (MultiPassContentFormatter) formatter;
- multiFormatter.setMasterStrategy(new StructuredFormattingStrategy(new HTMLFormatProcessorImpl()));
- multiFormatter.setSlaveStrategy(new FormattingStrategyJSPJava(), IJSPPartitions.JSP_CONTENT_JAVA);
-
- return formatter;
- }
-
- public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) {
- ITextDoubleClickStrategy strategy = null;
-
- // html or javascript
- if (contentType == IHTMLPartitions.HTML_DEFAULT || contentType == IHTMLPartitions.SCRIPT)
- strategy = getHTMLSourceViewerConfiguration().getDoubleClickStrategy(sourceViewer, contentType);
- else if (contentType == IJSPPartitions.JSP_CONTENT_JAVA || contentType == IJSPPartitions.JSP_CONTENT_JAVASCRIPT)
- // JSP Java or JSP JavaScript
- strategy = getJavaSourceViewerConfiguration().getDoubleClickStrategy(sourceViewer, contentType);
- else if (contentType == IJSPPartitions.JSP_DEFAULT)
- // JSP (just treat like html)
- strategy = getHTMLSourceViewerConfiguration().getDoubleClickStrategy(sourceViewer, IHTMLPartitions.HTML_DEFAULT);
- else
- strategy = super.getDoubleClickStrategy(sourceViewer, contentType);
-
- return strategy;
- }
-
- private StructuredTextViewerConfiguration getHTMLSourceViewerConfiguration() {
- if (fHTMLSourceViewerConfiguration == null) {
- fHTMLSourceViewerConfiguration = new StructuredTextViewerConfigurationHTML();
- }
- return fHTMLSourceViewerConfiguration;
- }
-
- public String[] getIndentPrefixes(ISourceViewer sourceViewer, String contentType) {
- String[] indentations = null;
-
- if (contentType == IXMLPartitions.XML_DEFAULT)
- indentations = getXMLSourceViewerConfiguration().getIndentPrefixes(sourceViewer, contentType);
- else
- indentations = getHTMLSourceViewerConfiguration().getIndentPrefixes(sourceViewer, contentType);
-
- return indentations;
- }
-
- private JavaSourceViewerConfiguration getJavaSourceViewerConfiguration() {
- if (fJavaSourceViewerConfiguration == null) {
- IPreferenceStore store = PreferenceConstants.getPreferenceStore();
- /*
- * NOTE: null text editor is being passed to
- * JavaSourceViewerConfiguration because
- * StructuredTextViewerConfiguration does not know current editor.
- * this is okay because editor is not needed in the cases we are
- * using javasourceviewerconfiguration.
- */
- fJavaSourceViewerConfiguration = new JavaSourceViewerConfiguration(JavaUI.getColorManager(), store, null, IJavaPartitions.JAVA_PARTITIONING);
- }
- return fJavaSourceViewerConfiguration;
- }
-
- public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
- LineStyleProvider[] providers = null;
-
- if (partitionType == IHTMLPartitions.HTML_DEFAULT || partitionType == IHTMLPartitions.HTML_COMMENT || partitionType == IHTMLPartitions.HTML_DECLARATION) {
- providers = getHTMLSourceViewerConfiguration().getLineStyleProviders(sourceViewer, IHTMLPartitions.HTML_DEFAULT);
- }
- else if (partitionType == IHTMLPartitions.SCRIPT || partitionType == IJSPPartitions.JSP_CONTENT_JAVASCRIPT) {
- providers = getHTMLSourceViewerConfiguration().getLineStyleProviders(sourceViewer, IHTMLPartitions.SCRIPT);
- }
- else if (partitionType == ICSSPartitions.STYLE || partitionType == ICSSPartitions.COMMENT) {
- providers = getHTMLSourceViewerConfiguration().getLineStyleProviders(sourceViewer, ICSSPartitions.STYLE);
- }
- else if (partitionType == IXMLPartitions.XML_DEFAULT || partitionType == IXMLPartitions.XML_CDATA || partitionType == IXMLPartitions.XML_COMMENT || partitionType == IXMLPartitions.XML_DECLARATION || partitionType == IXMLPartitions.XML_PI) {
- providers = getXMLSourceViewerConfiguration().getLineStyleProviders(sourceViewer, IXMLPartitions.XML_DEFAULT);
- }
- else if (partitionType == IJSPPartitions.JSP_CONTENT_JAVA) {
- providers = new LineStyleProvider[]{getLineStyleProviderForJava()};
- }
- else if (partitionType == IJSPPartitions.JSP_DEFAULT_EL) {
- providers = new LineStyleProvider[]{getLineStyleProviderForJSPEL()};
- }
- else if (partitionType == IJSPPartitions.JSP_COMMENT || partitionType == IJSPPartitions.JSP_CONTENT_DELIMITER || partitionType == IJSPPartitions.JSP_DEFAULT || partitionType == IJSPPartitions.JSP_DIRECTIVE) {
- providers = new LineStyleProvider[]{getLineStyleProviderForJSP()};
- }
-
- return providers;
- }
-
- private LineStyleProvider getLineStyleProviderForJava() {
- if (fLineStyleProviderForJava == null) {
- fLineStyleProviderForJava = new LineStyleProviderForJava();
- }
- return fLineStyleProviderForJava;
- }
-
- private LineStyleProvider getLineStyleProviderForJSP() {
- if (fLineStyleProviderForJSP == null) {
- fLineStyleProviderForJSP = new LineStyleProviderForJSP();
- }
- return fLineStyleProviderForJSP;
- }
-
- private LineStyleProvider getLineStyleProviderForJSPEL() {
- if (fLineStyleProviderForJSPEL == null) {
- fLineStyleProviderForJSPEL = new LineStyleProviderForJSPEL();
- }
- return fLineStyleProviderForJSPEL;
- }
-
- public ILabelProvider getStatusLineLabelProvider(ISourceViewer sourceViewer) {
- if (fStatusLineLabelProvider == null) {
- fStatusLineLabelProvider = new JFaceNodeLabelProvider() {
- public String getText(Object element) {
- if (element == null)
- return null;
-
- StringBuffer s = new StringBuffer();
- Node node = (Node) element;
- while (node != null) {
- if (node.getNodeType() != Node.DOCUMENT_NODE) {
- s.insert(0, super.getText(node));
- }
-
- if (node.getNodeType() == Node.ATTRIBUTE_NODE)
- node = ((Attr) node).getOwnerElement();
- else
- node = node.getParentNode();
-
- if (node != null && node.getNodeType() != Node.DOCUMENT_NODE) {
- s.insert(0, IPath.SEPARATOR);
- }
- }
- return s.toString();
- }
-
- };
- }
- return fStatusLineLabelProvider;
- }
-
- private StructuredTextViewerConfiguration getXMLSourceViewerConfiguration() {
- if (fXMLSourceViewerConfiguration == null) {
- fXMLSourceViewerConfiguration = new StructuredTextViewerConfigurationXML();
- }
- return fXMLSourceViewerConfiguration;
- }
-
- protected Map getHyperlinkDetectorTargets(ISourceViewer sourceViewer) {
- Map targets = super.getHyperlinkDetectorTargets(sourceViewer);
- targets.put(ContentTypeIdForJSP.ContentTypeID_JSP, null);
-
- // also add html & xml since there could be html/xml content in jsp
- // (just hope the hyperlink detectors will do additional checking)
- targets.put(ContentTypeIdForHTML.ContentTypeID_HTML, null);
- targets.put(ContentTypeIdForXML.ContentTypeID_XML, null);
- return targets;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/IActionConstantsJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/IActionConstantsJSP.java
deleted file mode 100644
index a400780e48..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/IActionConstantsJSP.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.ui.internal;
-
-/**
- * @author pavery
- */
-public interface IActionConstantsJSP {
- public final static String ACTION_NAME_RENAME_ELEMENT = "RenameElement"; //$NON-NLS-1$
- public final static String ACTION_NAME_MOVE_ELEMENT = "MoveElement"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/IActionDefinitionIdsJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/IActionDefinitionIdsJSP.java
deleted file mode 100644
index f90607e7b2..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/IActionDefinitionIdsJSP.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.ui.internal;
-
-import org.eclipse.jdt.ui.actions.IJavaEditorActionDefinitionIds;
-
-/**
- * @author pavery
- */
-public interface IActionDefinitionIdsJSP {
- public final static String RENAME_ELEMENT = IJavaEditorActionDefinitionIds.RENAME_ELEMENT;
- public final static String MOVE_ELEMENT = IJavaEditorActionDefinitionIds.MOVE_ELEMENT;
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIMessages.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIMessages.java
deleted file mode 100644
index 3b5034eb58..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIMessages.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 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 - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.jst.jsp.ui.internal;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Strings used by JSP UI
- *
- * @plannedfor 1.0
- */
-public class JSPUIMessages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.jst.jsp.ui.internal.JSPUIPluginResources";//$NON-NLS-1$
- private static ResourceBundle fResourceBundle;
-
- static {
- // load message values from bundle file
- NLS.initializeMessages(BUNDLE_NAME, JSPUIMessages.class);
- }
-
- public static ResourceBundle getResourceBundle() {
- try {
- if (fResourceBundle == null)
- fResourceBundle = ResourceBundle.getBundle(BUNDLE_NAME);
- }
- catch (MissingResourceException x) {
- fResourceBundle = null;
- }
- return fResourceBundle;
- }
-
- public static String Sample_JSP_doc;
- public static String JSP_Delimiters_UI_;
- public static String Refactor_label;
- public static String RenameElement_label; // resource bundle
- public static String MoveElement_label; // resource bundle
- public static String MoveElementWizard;
- public static String OK;
- public static String JSP_changes;
- public static String ActionContributorJSP_0;
- public static String JSPRenameElementAction_0;
- public static String JSPMoveElementAction_0;
- public static String BasicRefactorSearchRequestor_0;
- public static String BasicRefactorSearchRequestor_1;
- public static String BasicRefactorSearchRequestor_2;
- public static String BasicRefactorSearchRequestor_3;
- public static String BasicRefactorSearchRequestor_4;
- public static String BasicRefactorSearchRequestor_5;
- public static String BasicRefactorSearchRequestor_6;
- public static String BasicRefactorSearchRequestor_7;
- public static String BreakpointNotAllowed;
- public static String _UI_WIZARD_NEW_TITLE;
- public static String _UI_WIZARD_NEW_HEADING;
- public static String _UI_WIZARD_NEW_DESCRIPTION;
- public static String _UI_WIZARD_TAG_NEW_TITLE;
- public static String _UI_WIZARD_TAG_NEW_HEADING;
- public static String _UI_WIZARD_TAG_NEW_DESCRIPTION;
- public static String _ERROR_FILENAME_MUST_END_JSP;
- public static String _WARNING_FILE_MUST_BE_INSIDE_JAVA_PROJECT;
- public static String _WARNING_FOLDER_MUST_BE_INSIDE_WEB_CONTENT;
- public static String ResourceGroup_nameExists;
- public static String NewJSPTemplatesWizardPage_0;
- public static String NewJSPTemplatesWizardPage_1;
- public static String NewJSPTemplatesWizardPage_2;
- public static String NewJSPTemplatesWizardPage_3;
- public static String NewJSPTemplatesWizardPage_4;
- public static String NewJSPTemplatesWizardPage_5;
- public static String NewJSPTemplatesWizardPage_6;
- public static String NewJSPTemplatesWizardPage_7;
- public static String NewTagTemplatesWizardPage_0;
- public static String NewTagTemplatesWizardPage_1;
- public static String NewTagTemplatesWizardPage_2;
- public static String NewTagTemplatesWizardPage_3;
- public static String NewTagTemplatesWizardPage_4;
- public static String NewTagTemplatesWizardPage_5;
- public static String NewTagTemplatesWizardPage_6;
- public static String NewTagTemplatesWizardPage_7;
- public static String ToggleComment_label; // resource bundle
- public static String ToggleComment_tooltip; // resource bundle
- public static String ToggleComment_description; // resource bundle
- public static String AddBlockComment_label; // resource bundle
- public static String AddBlockComment_tooltip; // resource bundle
- public static String AddBlockComment_description; // resource bundle
- public static String RemoveBlockComment_label; // resource bundle
- public static String RemoveBlockComment_tooltip; // resource bundle
- public static String RemoveBlockComment_description; // resource bundle
- public static String CleanupDocument_label; // resource bundle
- public static String CleanupDocument_tooltip; // resource bundle
- public static String CleanupDocument_description; // resource bundle
- public static String FindOccurrences_label; // resource bundle
- public static String OccurrencesSearchQuery_0;
- public static String OccurrencesSearchQuery_2;
- public static String Override_method_in;
- public static String Creating_files_encoding;
- public static String Content_Assist_not_availab_UI_;
- public static String Java_Content_Assist_is_not_UI_;
- public static String JSPSourcePreferencePage_0;
- public static String JSPSourcePreferencePage_1;
- public static String JSPSourcePreferencePage_2;
- public static String JSPColorPage_jsp_content;
- public static String JSPFilesPreferencePage_0;
- public static String JSPFilesPreferencePage_1;
- public static String JSPFContentSettingsPropertyPage_0;
- public static String JSPFContentSettingsPropertyPage_1;
- public static String JSPFContentSettingsPropertyPage_2;
- public static String JSPFContentSettingsPropertyPage_3;
- public static String JSPFContentSettingsPropertyPage_4;
- public static String ProjectJSPFContentSettingsPropertyPage_0;
- public static String TagPropertyPage_desc;
- public static String Template_Taglib_URI;
- public static String Title_InvalidValue;
- public static String Message_InvalidValue;
- public static String SyntaxColoringPage_0;
- public static String SyntaxColoringPage_2;
- public static String SyntaxColoringPage_3;
- public static String SyntaxColoringPage_4;
- public static String SyntaxColoringPage_5;
- public static String SyntaxColoringPage_6;
- public static String _UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK;
-
- public static String JSPTyping_Auto_Complete;
- public static String JSPTyping_Complete_Scriptlets;
- public static String JSPTyping_Complete_Braces;
- public static String JSPTyping_Complete_Comments;
- public static String JSPTyping_Java_Code;
- public static String JSPTyping_Close_Strings;
- public static String JSPTyping_Close_Brackets;
- public static String JSPValidationPreferencePage_0;
-
- // below are the strings for the validation page
- public static String Validation_description;
- public static String Validation_Warning;
- public static String Validation_Error;
- public static String Validation_Ignore;
-
- public static String VALIDATION_HEADER_DIRECTIVE;
- public static String VALIDATION_DIRECTIVE_ATTRIBUTE_DUPLICATE_NAME;
- public static String VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_DIFFERENT_URIS;
- public static String VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_SAME_URIS;
- public static String VALIDATION_DIRECTIVE_TAGLIB_MISSING_PREFIX;
- public static String VALIDATION_DIRECTIVE_TAGLIB_MISSING_URI_OR_TAGDIR;
- public static String VALIDATION_DIRECTIVE_TAGLIB_UNRESOLVABLE_URI_OR_TAGDIR;
- public static String VALIDATION_DIRECTIVE_PAGE_SUPERCLASS_NOT_FOUND;
- public static String VALIDATION_DIRECTIVE_INCLUDE_NO_FILE_SPECIFIED;
- public static String VALIDATION_DIRECTIVE_INCLUDE_FILE_NOT_FOUND;
-
- public static String VALIDATION_HEADER_JAVA;
- public static String VALIDATION_JAVA_NOTICE;
- public static String VALIDATION_JAVA_LOCAL_VARIABLE_NEVER_USED;
- public static String VALIDATION_JAVA_ARGUMENT_IS_NEVER_USED;
- public static String VALIDATION_JAVA_NULL_LOCAL_VARIABLE_REFERENCE;
- public static String VALIDATION_JAVA_POTENTIAL_NULL_LOCAL_VARIABLE_REFERENCE;
- public static String VALIDATION_JAVA_UNUSED_IMPORT;
-
- public static String VALIDATION_HEADER_EL;
- public static String VALIDATION_EL_SYNTAX;
- public static String VALIDATION_EL_LEXER;
- public static String VALIDATION_EL_FUNCTION_UNDEFINED;
-
- public static String VALIDATION_HEADER_CUSTOM_ACTIONS;
- public static String VALIDATION_ACTIONS_SEVERITY_MISSING_REQUIRED_ATTRIBUTE;
- public static String VALIDATION_ACTIONS_SEVERITY_UNKNOWN_ATTRIBUTE;
- public static String VALIDATION_ACTIONS_SEVERITY_UNEXPECTED_RTEXPRVALUE;
- public static String VALIDATION_ACTIONS_SEVERITY_NON_EMPTY_INLINE_TAG;
- public static String VALIDATION_TRANSLATION_TEI_VALIDATION_MESSAGE;
- public static String VALIDATION_TRANSLATION_TEI_CLASS_NOT_FOUND;
- public static String VALIDATION_TRANSLATION_TEI_CLASS_NOT_INSTANTIATED;
- public static String VALIDATION_TRANSLATION_TEI_CLASS_RUNTIME_EXCEPTION;
- public static String VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND;
-
- public static String VALIDATION_HEADER_STANDARD_ACTIONS;
- public static String VALIDATION_TRANSLATION_USEBEAN_INVALID_ID;
- public static String VALIDATION_TRANSLATION_USBEAN_MISSING_TYPE_INFO;
- public static String VALIDATION_TRANSLATION_USEBEAN_AMBIGUOUS_TYPE_INFO;
-
- public static String Open;
- public static String TLDHyperlink_hyperlinkText;
- public static String CustomTagHyperlink_hyperlinkText;
- public static String TLDContentOutlineConfiguration_0;
-
- public static String JSPFilesPreferencePage_Search_group;
- public static String JSPFilesPreferencePage_Supply_JSP_search_to_Java_search;
-
- public static String JSPCodeAssist_Insertion;
- public static String JSPCodeAssist_Auto_Import;
- public static String Cycling_UI;
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPlugin.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPlugin.java
deleted file mode 100644
index 43ccb8038f..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPlugin.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.ui.internal;
-
-import java.io.IOException;
-
-import org.eclipse.jface.text.templates.ContextTypeRegistry;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
-import org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeIdsJSP;
-import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
-import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistry;
-import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistryImpl;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class JSPUIPlugin extends AbstractUIPlugin {
- public final static String ID = "org.eclipse.jst.jsp.ui"; //$NON-NLS-1$
-
- protected static JSPUIPlugin instance = null;
-
- /**
- * The template store for the jsp editor.
- */
- private TemplateStore fTemplateStore;
-
- /**
- * The template context type registry for the jsp editor.
- */
- private ContextTypeRegistry fContextTypeRegistry;
-
- public JSPUIPlugin() {
- super();
- instance = this;
- }
-
- public static JSPUIPlugin getDefault() {
- return instance;
- }
-
- public synchronized static JSPUIPlugin getInstance() {
- return instance;
- }
-
- public AdapterFactoryRegistry getAdapterFactoryRegistry() {
- return AdapterFactoryRegistryImpl.getInstance();
-
- }
-
- /**
- * Returns the template store for the jsp editor templates.
- *
- * @return the template store for the jsp editor templates
- */
- public TemplateStore getTemplateStore() {
- if (fTemplateStore == null) {
- fTemplateStore= new ContributionTemplateStore(getTemplateContextRegistry(), getPreferenceStore(), JSPUIPreferenceNames.TEMPLATES_KEY);
-
- try {
- fTemplateStore.load();
- } catch (IOException e) {
- Logger.logException(e);
- }
- }
- return fTemplateStore;
- }
-
- /**
- * Returns the template context type registry for the jsp plugin.
- *
- * @return the template context type registry for the jsp plugin
- */
- public ContextTypeRegistry getTemplateContextRegistry() {
- if (fContextTypeRegistry == null) {
- ContributionContextTypeRegistry registry = new ContributionContextTypeRegistry();
- registry.addContextType(TemplateContextTypeIdsJSP.ALL);
- registry.addContextType(TemplateContextTypeIdsJSP.NEW);
- registry.addContextType(TemplateContextTypeIdsJSP.TAG);
- registry.addContextType(TemplateContextTypeIdsJSP.ATTRIBUTE);
- registry.addContextType(TemplateContextTypeIdsJSP.ATTRIBUTE_VALUE);
- registry.addContextType(TemplateContextTypeIdsJSP.NEW_TAG);
-
- fContextTypeRegistry= registry;
- }
-
- return fContextTypeRegistry;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties
deleted file mode 100644
index 23c103cdbd..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/JSPUIPluginResources.properties
+++ /dev/null
@@ -1,178 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2012 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
-###############################################################################
-## The following line is a sample JSP document. Please translate only the following parts:
-## Use below tags ONLY for JSP 1.1
-## Welcome!
-## Use below tags ONLY for JSP 1.2
-## Welcome!
-Sample_JSP_doc=<%@ page \n\tlanguage=\"java\" \n\tcontentType=\"text/html; charset=ISO-8859-1\"\n%>\n<jsp:include flush=\"true\" page=\"titleBar.jsp\"/>\n\n<%-- Use below tags ONLY for JSP 1.1 --%>\n<%\n\tSystem.out.println(\"Welcome!\");\n%>\n<%-- Use below tags ONLY for JSP 1.2 --%>\n<jsp:scriptlet>\n\tSystem.out.println(\"Welcome!\");\n</jsp:scriptlet>
-JSP_Delimiters_UI_=Scripting Element Delimiters
-Refactor_label=Refactor
-RenameElement_label=Rename
-MoveElement_label=Move
-MoveElementWizard=Move the selected elements
-#
-OK=OK
-BreakpointNotAllowed=A breakpoint is not allowed on this line
-JSP_changes=JSP changes
-ActionContributorJSP_0=Refa&ctor
-JSPRenameElementAction_0=Editor selection does not resolve to a renamable Java element
-JSPMoveElementAction_0=Editor selection does not resolve to movable Java elements
-BasicRefactorSearchRequestor_0=JSP Rename
-BasicRefactorSearchRequestor_1=in file: {0} line: {1}
-BasicRefactorSearchRequestor_2=Move Type ''{0}'' to package ''{1}''
-BasicRefactorSearchRequestor_3=Rename Method ''{0}'' to ''{1}''
-BasicRefactorSearchRequestor_4=Rename Type ''{0}'' to ''{1}''
-BasicRefactorSearchRequestor_5=Rename Package ''{0}'' to ''{1}''
-BasicRefactorSearchRequestor_6=JSP Rename Change
-BasicRefactorSearchRequestor_7=Rename Field ''{0}'' to ''{1}''
-#
-_UI_WIZARD_NEW_TITLE = New JSP File
-_UI_WIZARD_NEW_HEADING = JSP
-_UI_WIZARD_NEW_DESCRIPTION = Create a new JSP file.
-_UI_WIZARD_TAG_NEW_TITLE = New Tag File
-_UI_WIZARD_TAG_NEW_HEADING = Tag File
-_UI_WIZARD_TAG_NEW_DESCRIPTION = Create a new Tag.
-_ERROR_FILENAME_MUST_END_JSP = The file name must end in one of the following extensions {0}.
-_WARNING_FILE_MUST_BE_INSIDE_JAVA_PROJECT = JavaServer Pages created in projects that do not support Java might not work as expected.
-_WARNING_FOLDER_MUST_BE_INSIDE_WEB_CONTENT = Files created outside of the Web Content folder will not be included in your deployed Web application.
-ResourceGroup_nameExists = The same name already exists.
-NewJSPTemplatesWizardPage_0=Select JSP Template
-NewJSPTemplatesWizardPage_1=Select a template as initial content in the JSP page.
-NewJSPTemplatesWizardPage_2=Name
-NewJSPTemplatesWizardPage_3=Description
-NewJSPTemplatesWizardPage_4=&Use JSP Template
-NewJSPTemplatesWizardPage_5=&Preview:
-NewJSPTemplatesWizardPage_6=Templates are 'New JSP' templates found in the <a>JSP Templates</a> preference page.
-NewJSPTemplatesWizardPage_7=&Templates:
-NewTagTemplatesWizardPage_0=Select Tag file Template
-NewTagTemplatesWizardPage_1=Select a template as initial content in the Tag file.
-NewTagTemplatesWizardPage_2=Name
-NewTagTemplatesWizardPage_3=Description
-NewTagTemplatesWizardPage_4=&Use Tag file Template
-NewTagTemplatesWizardPage_5=&Preview:
-NewTagTemplatesWizardPage_6=Templates are 'New Tag' templates found in the <a>JSP Templates</a> preference page.
-NewTagTemplatesWizardPage_7=&Templates:
-# Copied from sse.ui
-CleanupDocument_label=Cleanup Document...
-CleanupDocument_tooltip=Cleanup Document
-CleanupDocument_description=Cleanup Document
-ToggleComment_label=Toggle Comment
-ToggleComment_tooltip=Toggle Comment
-ToggleComment_description=Toggle Comment
-AddBlockComment_label=Add Block Comment
-AddBlockComment_tooltip=Add Block Comment
-AddBlockComment_description=Add Block Comment
-RemoveBlockComment_label=Remove Block Comment
-RemoveBlockComment_tooltip=Remove Block Comment
-RemoveBlockComment_description=Remove Block Comment
-FindOccurrences_label=Occurrences in File
-OccurrencesSearchQuery_0={0} - {1} Occurrences in {2}
-OccurrencesSearchQuery_2=file
-Content_Assist_not_availab_UI_=Content Assist not available at the current location
-Java_Content_Assist_is_not_UI_=Java Content Assist is not available for the current cursor location
-#
-Override_method_in=Override method in '
-Creating_files_encoding=Creating files encoding preference
-#
-JSPSourcePreferencePage_0=JSP Source preferences are based on the content within the JSP.
-JSPSourcePreferencePage_1=See <a>''{0}''</a> for JSP with HTML content.
-JSPSourcePreferencePage_2=See <a>''{0}''</a> for JSP with XML content.
-JSPColorPage_jsp_content=Scripting Elements
-JSPFilesPreferencePage_0=Validating files
-JSPFilesPreferencePage_1=Validate JSP fragments
-# JSP Fragments
-JSPFContentSettingsPropertyPage_0=none
-JSPFContentSettingsPropertyPage_1=The properties used instead of the page directive that cannot be specified in JSP fragment files. The project setting is used if you specify "none."
-JSPFContentSettingsPropertyPage_2=Language:
-JSPFContentSettingsPropertyPage_3=Content Type:
-JSPFContentSettingsPropertyPage_4=Enable specific setting:
-ProjectJSPFContentSettingsPropertyPage_0=The properties for J2EE Web projects act as "project" default to be looked up when no properties are specified for a particular JSP fragment file.
-# CSS JSP
-Title_InvalidValue=Invalid Value
-Message_InvalidValue=Invalid property value.
-
-SyntaxColoringPage_0=S&yntax Element:
-SyntaxColoringPage_2=Enable
-SyntaxColoringPage_3=&Bold
-SyntaxColoringPage_4=&Italic
-SyntaxColoringPage_5=&Strikethrough
-SyntaxColoringPage_6=&Underline
-_UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK=JSP editing preferences. Note that some preferences may be set on the <a>{0}</a> preference page.
-
-# JSP Typing Preference Page
-JSPTyping_Auto_Complete=Automatically close
-JSPTyping_Complete_Scriptlets=&Scriptlet regions
-JSPTyping_Complete_Braces=&Braces in EL expressions
-JSPTyping_Complete_Comments=&JSP comments
-JSPTyping_Java_Code=Java
-JSPTyping_Close_Strings=Automatically close "s&trings"
-JSPTyping_Close_Brackets=Automatically close (parentheses), [square] and <angle> brac&kets
-# Validation page strings
-Validation_description=Select the severity level for the following validation problems:
-Validation_Warning=Warning
-Validation_Error=Error
-Validation_Ignore=Ignore
-JSPValidationPreferencePage_0=Errors/Warnings
-
-VALIDATION_HEADER_DIRECTIVE=Directives
-VALIDATION_DIRECTIVE_ATTRIBUTE_DUPLICATE_NAME=Attributes declared with the same name:
-VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_DIFFERENT_URIS=Same prefix used for different URIs or tagdir:
-VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_SAME_URIS=Redundant tag library directive:
-VALIDATION_DIRECTIVE_TAGLIB_MISSING_PREFIX=No prefix specified:
-VALIDATION_DIRECTIVE_TAGLIB_MISSING_URI_OR_TAGDIR=No URI or tagdir specified:
-VALIDATION_DIRECTIVE_TAGLIB_UNRESOLVABLE_URI_OR_TAGDIR=Unresolvable URI or tagdir:
-VALIDATION_DIRECTIVE_PAGE_SUPERCLASS_NOT_FOUND=Superclass not found:
-VALIDATION_DIRECTIVE_INCLUDE_NO_FILE_SPECIFIED=Included fragment file not specified:
-VALIDATION_DIRECTIVE_INCLUDE_FILE_NOT_FOUND=Included fragment file not found:
-
-VALIDATION_HEADER_JAVA=Java
-VALIDATION_JAVA_NOTICE=These values override those on the <a>Errors/Warnings</a> page:
-VALIDATION_JAVA_LOCAL_VARIABLE_NEVER_USED=Local variable never used:
-VALIDATION_JAVA_ARGUMENT_IS_NEVER_USED=Parameter is never read:
-VALIDATION_JAVA_NULL_LOCAL_VARIABLE_REFERENCE=Null pointer access:
-VALIDATION_JAVA_POTENTIAL_NULL_LOCAL_VARIABLE_REFERENCE=Potential null pointer access:
-VALIDATION_JAVA_UNUSED_IMPORT=Unused import:
-
-VALIDATION_HEADER_EL=Expression Language
-VALIDATION_EL_SYNTAX=EL Syntax problem:
-VALIDATION_EL_LEXER=Unable to analyze EL expression due to lexical analysis error:
-VALIDATION_EL_FUNCTION_UNDEFINED=Function is undefined:
-
-VALIDATION_HEADER_CUSTOM_ACTIONS=Custom actions
-VALIDATION_ACTIONS_SEVERITY_MISSING_REQUIRED_ATTRIBUTE=Missing required attribute:
-VALIDATION_ACTIONS_SEVERITY_UNKNOWN_ATTRIBUTE=Unknown attribute:
-VALIDATION_ACTIONS_SEVERITY_UNEXPECTED_RTEXPRVALUE=Attribute does not support runtime expressions:
-VALIDATION_ACTIONS_SEVERITY_NON_EMPTY_INLINE_TAG=Tag declared with empty content has content:
-VALIDATION_TRANSLATION_TEI_VALIDATION_MESSAGE=TagExtraInfo validation message:
-VALIDATION_TRANSLATION_TEI_CLASS_NOT_FOUND=TagExtraInfo class not on Java Build Path:
-VALIDATION_TRANSLATION_TEI_CLASS_NOT_INSTANTIATED=Failure instantiating TagExtraInfo class:
-VALIDATION_TRANSLATION_TEI_CLASS_RUNTIME_EXCEPTION=Other problems with TagExtraInfo class:
-VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND=Classic tag handler class not on Java Build Path:
-
-VALIDATION_HEADER_STANDARD_ACTIONS=Standard actions
-VALIDATION_TRANSLATION_USEBEAN_INVALID_ID=Invalid 'id' specified for jsp:useBean:
-VALIDATION_TRANSLATION_USBEAN_MISSING_TYPE_INFO=Missing type information for jsp:useBean:
-VALIDATION_TRANSLATION_USEBEAN_AMBIGUOUS_TYPE_INFO=Ambiguous type information for jsp:useBean:
-
-Open=Open ''{0}''
-TLDHyperlink_hyperlinkText=Open Descriptor
-CustomTagHyperlink_hyperlinkText=Open Declaration
-TLDContentOutlineConfiguration_0=Show Content Values
-TagPropertyPage_desc=Specify the surrounding language used in this tag file:
-Template_Taglib_URI=Tag Library URI
-
-JSPFilesPreferencePage_Search_group=Search
-JSPFilesPreferencePage_Supply_JSP_search_to_Java_search=&Include JSP matches in Java searches
-
-JSPCodeAssist_Insertion=Insertion
-JSPCodeAssist_Auto_Import=Add import instead of &qualified name
-Cycling_UI=Cycling \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/Logger.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/Logger.java
deleted file mode 100644
index 5df00f69d3..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/Logger.java
+++ /dev/null
@@ -1,144 +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.ui.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.ui"; //$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.ui/src/org/eclipse/jst/jsp/ui/internal/actions/JSPNodeActionManager.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/actions/JSPNodeActionManager.java
deleted file mode 100644
index e4a48ac4d2..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/actions/JSPNodeActionManager.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.ui.internal.actions;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.core.internal.preferences.HTMLCorePreferenceNames;
-import org.eclipse.wst.html.ui.internal.contentoutline.HTMLNodeActionManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.w3c.dom.Node;
-
-public class JSPNodeActionManager extends HTMLNodeActionManager {
-
- public JSPNodeActionManager(IStructuredModel model, Viewer viewer) {
- super(model, viewer);
- }
-
- protected boolean canContributeChildActions(Node node){
- String nodeName = node.getNodeName().toLowerCase();
- return !(nodeName.equals(JSP11Namespace.ElementName.SCRIPTLET) || nodeName.equals(JSP11Namespace.ElementName.DECLARATION) || nodeName.equals(JSP11Namespace.ElementName.EXPRESSION));
- }
-
- protected void updateCase() {
- if (fModel != null) {
- String modelContentTypeId = fModel.getContentTypeIdentifier();
- if (modelContentTypeId != null) {
- if (modelContentTypeId.equals(ContentTypeIdForJSP.ContentTypeID_JSP)) {
- Preferences prefs = HTMLCorePlugin.getDefault().getPluginPreferences(); //$NON-NLS-1$
- fTagCase = prefs.getInt(HTMLCorePreferenceNames.TAG_NAME_CASE);
- fAttrCase = prefs.getInt(HTMLCorePreferenceNames.ATTR_NAME_CASE);
- }
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/AutoEditStrategyForTabs.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/AutoEditStrategyForTabs.java
deleted file mode 100644
index 1ecbc02129..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/AutoEditStrategyForTabs.java
+++ /dev/null
@@ -1,187 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.ui.internal.autoedit;
-
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ConfigurableLineTracker;
-import org.eclipse.jface.text.DocumentCommand;
-import org.eclipse.jface.text.IAutoEditStrategy;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ILineTracker;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.ITextEditorExtension3;
-import org.eclipse.wst.html.core.internal.HTMLCorePlugin;
-import org.eclipse.wst.html.core.internal.preferences.HTMLCorePreferenceNames;
-
-/**
- * AutoEditStrategy to handle characters inserted when Tab key is pressed
- */
-public class AutoEditStrategyForTabs implements IAutoEditStrategy {
- private final String TAB_CHARACTER = "\t"; //$NON-NLS-1$
-
- public void customizeDocumentCommand(IDocument document, DocumentCommand command) {
- // if not in smart insert mode just ignore
- if (!isSmartInsertMode())
- return;
-
- // spaces for tab character
- if (command.length == 0 && command.text != null && command.text.length() > 0 && command.text.indexOf(TAB_CHARACTER) != -1)
- smartInsertForTab(command, document);
- }
-
- /**
- * Insert spaces for tabs
- *
- * @param command
- */
- private void smartInsertForTab(DocumentCommand command, IDocument document) {
- // tab key was pressed. now check preferences to see if need to insert
- // spaces instead of tab
- int indentationWidth = getIndentationWidth();
- if (indentationWidth > -1) {
- String originalText = command.text;
- StringBuffer newText = new StringBuffer(originalText);
-
- // determine where in line this command begins
- int lineOffset = -1;
- try {
- IRegion lineInfo = document.getLineInformationOfOffset(command.offset);
- lineOffset = command.offset - lineInfo.getOffset();
- } catch (BadLocationException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
-
- ILineTracker lineTracker = getLineTracker(document, originalText);
-
- int startIndex = 0;
- int index = newText.indexOf(TAB_CHARACTER);
- while (index != -1) {
- String indent = getIndentString(indentationWidth, lineOffset, lineTracker, index);
-
- // replace \t character with spaces
- newText.replace(index, index + 1, indent);
- if (lineTracker != null) {
- try {
- lineTracker.replace(index, 1, indent);
- } catch (BadLocationException e) {
- // if something goes wrong with replacing text, just
- // reset to current string
- lineTracker.set(newText.toString());
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
-
- startIndex = index + indent.length();
- index = newText.indexOf(TAB_CHARACTER, startIndex);
- }
- command.text = newText.toString();
- }
- }
-
- /**
- * Calculate number of spaces for next tab stop
- */
- private String getIndentString(int indentationWidth, int lineOffset, ILineTracker lineTracker, int index) {
- int indentSize = indentationWidth;
- int offsetInLine = -1;
- if (lineTracker != null) {
- try {
- IRegion lineInfo = lineTracker.getLineInformationOfOffset(index);
- if (lineInfo.getOffset() == 0 && lineOffset > -1)
- offsetInLine = lineOffset + index;
- else
- offsetInLine = index - lineInfo.getOffset();
- } catch (BadLocationException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- } else {
- if (lineOffset > -1) {
- offsetInLine = lineOffset + index;
- }
- }
- if (offsetInLine > -1 && indentationWidth > 0) {
- int remainder = offsetInLine % indentationWidth;
- indentSize = indentationWidth - remainder;
- }
-
- StringBuffer indent = new StringBuffer();
- for (int i = 0; i < indentSize; i++)
- indent.append(' ');
- return indent.toString();
- }
-
- /**
- * Set up a line tracker for text within command if text is multi-line
- */
- private ILineTracker getLineTracker(IDocument document, String originalText) {
- ConfigurableLineTracker lineTracker = null;
- int[] delims = TextUtilities.indexOf(document.getLegalLineDelimiters(), originalText, 0);
- if (delims[0] != -1 || delims[1] != -1) {
- lineTracker = new ConfigurableLineTracker(document.getLegalLineDelimiters());
- lineTracker.set(originalText);
- }
- return lineTracker;
- }
-
- /**
- * Return true if active editor is in smart insert mode, false otherwise
- *
- * @return
- */
- private boolean isSmartInsertMode() {
- boolean isSmartInsertMode = false;
-
- ITextEditor textEditor = null;
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- if (page != null) {
- IEditorPart editor = page.getActiveEditor();
- if (editor != null) {
- if (editor instanceof ITextEditor)
- textEditor = (ITextEditor) editor;
- else
- textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
- }
- }
- }
-
- // check if smart insert mode
- if (textEditor instanceof ITextEditorExtension3 && ((ITextEditorExtension3) textEditor).getInsertMode() == ITextEditorExtension3.SMART_INSERT)
- isSmartInsertMode = true;
- return isSmartInsertMode;
- }
-
- /**
- * Returns indentation width if using spaces for indentation, -1 otherwise
- *
- * @return
- */
- private int getIndentationWidth() {
- int width = -1;
-
- Preferences preferences = HTMLCorePlugin.getDefault().getPluginPreferences();
- if (HTMLCorePreferenceNames.SPACE.equals(preferences.getString(HTMLCorePreferenceNames.INDENTATION_CHAR)))
- width = preferences.getInt(HTMLCorePreferenceNames.INDENTATION_SIZE);
-
- return width;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSP.java
deleted file mode 100644
index 53f29d422e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSP.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 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.ui.internal.autoedit;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DocumentCommand;
-import org.eclipse.jface.text.IAutoEditStrategy;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.ITextEditorExtension3;
-import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
-import org.eclipse.wst.html.ui.internal.preferences.HTMLUIPreferenceNames;
-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.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-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.Node;
-
-public class StructuredAutoEditStrategyJSP implements IAutoEditStrategy {
- public void customizeDocumentCommand(IDocument document, DocumentCommand command) {
- Object textEditor = getActiveTextEditor();
- if (!(textEditor instanceof ITextEditorExtension3 && ((ITextEditorExtension3) textEditor).getInsertMode() == ITextEditorExtension3.SMART_INSERT))
- return;
-
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
-
- if (model != null) {
- if (command.text != null) {
- smartInsertForEndTag(command, document, model);
- smartRemoveEndTag(command, document, model);
- if (command.text.equals("%") && isPreferenceEnabled(JSPUIPreferenceNames.TYPING_COMPLETE_SCRIPTLETS)) { //$NON-NLS-1$
- // scriptlet - add end %>
- IDOMNode node = (IDOMNode) model.getIndexedRegion(command.offset);
- if (node != null && prefixedWith(document, command.offset, "<") && !node.getSource().endsWith("%>")) { //$NON-NLS-1$ //$NON-NLS-2$
- command.text += " %>"; //$NON-NLS-1$
- command.shiftsCaret = false;
- command.caretOffset = command.offset + 1;
- command.doit = false;
- }
- }
- if (command.text.equals("{") && isPreferenceEnabled(JSPUIPreferenceNames.TYPING_COMPLETE_EL_BRACES)) { //$NON-NLS-1$
- IDOMNode node = (IDOMNode) model.getIndexedRegion(command.offset);
- if (node != null && (prefixedWith(document, command.offset, "$") || prefixedWith(document, command.offset, "#")) && //$NON-NLS-1$ //$NON-NLS-2$
- !node.getSource().endsWith("}")) { //$NON-NLS-1$ //$NON-NLS-2$
- command.text += " }"; //$NON-NLS-1$
- command.shiftsCaret = false;
- command.caretOffset = command.offset + 1;
- command.doit = false;
- }
- }
- }
- }
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- }
-
- private boolean isPreferenceEnabled(String key) {
- return (key != null && JSPUIPlugin.getDefault().getPreferenceStore().getBoolean(key));
- }
-
- /**
- * Return the active text editor if possible, otherwise the active editor
- * part.
- *
- * @return
- */
- private Object getActiveTextEditor() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- if (page != null) {
- IEditorPart editor = page.getActiveEditor();
- if (editor != null) {
- if (editor instanceof ITextEditor)
- return editor;
- ITextEditor textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
- if (textEditor != null)
- return textEditor;
- return editor;
- }
- }
- }
- return null;
- }
-
- private boolean prefixedWith(IDocument document, int offset, String string) {
-
- try {
- return document.getLength() >= string.length() && document.get(offset - string.length(), string.length()).equals(string);
- }
- catch (BadLocationException e) {
- Logger.logException(e);
- return false;
- }
- }
-
- private boolean isCommentNode(IDOMNode node) {
- return ((node != null) && (node instanceof IDOMElement) && ((IDOMElement) node).isCommentTag());
- }
-
- private boolean isDocumentNode(IDOMNode node) {
- return ((node != null) && (node.getNodeType() == Node.DOCUMENT_NODE));
- }
-
- private void smartInsertForEndTag(DocumentCommand command, IDocument document, IStructuredModel model) {
- try {
- if (command.text.equals("/") && (document.getLength() >= 1) && document.get(command.offset - 1, 1).equals("<") && HTMLUIPlugin.getDefault().getPreferenceStore().getBoolean(HTMLUIPreferenceNames.TYPING_COMPLETE_END_TAGS)) { //$NON-NLS-1$ //$NON-NLS-2$
- IDOMNode parentNode = (IDOMNode) ((IDOMNode) model.getIndexedRegion(command.offset - 1)).getParentNode();
- if (isCommentNode(parentNode)) {
- // loop and find non comment node parent
- while ((parentNode != null) && isCommentNode(parentNode)) {
- parentNode = (IDOMNode) parentNode.getParentNode();
- }
- }
-
- if (!isDocumentNode(parentNode)) {
- // only add end tag if one does not already exist or if
- // add '/' does not create one already
- IStructuredDocumentRegion endTagStructuredDocumentRegion = parentNode.getEndStructuredDocumentRegion();
- IDOMNode ancestor = parentNode;
- boolean smartInsertForEnd = false;
- if(endTagStructuredDocumentRegion != null) {
- // Look for ancestors by the same name that are missing end tags
- while((ancestor = (IDOMNode) ancestor.getParentNode()) != null) {
- if(ancestor.getEndStructuredDocumentRegion() == null && parentNode.getNodeName().equals(ancestor.getNodeName())) {
- smartInsertForEnd = true;
- break;
- }
- }
- }
- if (endTagStructuredDocumentRegion == null || smartInsertForEnd) {
- StringBuffer toAdd = new StringBuffer(parentNode.getNodeName());
- if (toAdd.length() > 0) {
- toAdd.append(">"); //$NON-NLS-1$
- String suffix = toAdd.toString();
- if ((document.getLength() < command.offset + suffix.length()) || (!suffix.equals(document.get(command.offset, suffix.length())))) {
- command.text += suffix;
- }
- }
- }
- }
- }
- }
- catch (BadLocationException e) {
- Logger.logException(e);
- }
- }
-
- /**
- * Attempts to clean up an end-tag if a start-tag is converted into an empty-element
- * tag (e.g., <node />) and the original element was empty.
- *
- * @param command the document command describing the change
- * @param document the document that will be changed
- * @param model the model based on the document
- */
- private void smartRemoveEndTag(DocumentCommand command, IDocument document, IStructuredModel model) {
- try {
- // An opening tag is now a self-terminated end-tag
- if ("/".equals(command.text) && ">".equals(document.get(command.offset, 1)) && command.length == 0 && HTMLUIPlugin.getDefault().getPreferenceStore().getBoolean(HTMLUIPreferenceNames.TYPING_REMOVE_END_TAGS)) { //$NON-NLS-1$ //$NON-NLS-2$
- IDOMNode node = (IDOMNode) model.getIndexedRegion(command.offset);
- if (node != null && !node.hasChildNodes()) {
- IStructuredDocumentRegion region = node.getFirstStructuredDocumentRegion();
- if(region.getFirstRegion().getType() == DOMRegionContext.XML_TAG_OPEN && command.offset <= region.getEnd()) {
-
- /* if the region before the command offset is a an attribute value region
- * check to see if it has both and opening and closing quote
- */
- ITextRegion prevTextRegion = region.getRegionAtCharacterOffset(command.offset-1);
- boolean inUnclosedAttValueRegion = false;
- if(prevTextRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- //get the text of the attribute value region
- String prevText = region.getText(prevTextRegion);
- inUnclosedAttValueRegion = (prevText.startsWith("'") && ((prevText.length() == 1) || !prevText.endsWith("'"))) ||
- (prevText.startsWith("\"") && ((prevText.length() == 1) || !prevText.endsWith("\"")));
- if (!inUnclosedAttValueRegion) {
- // Check if action is taking place within the paired quotes. This means quotes are actually mismatched and attribute is not properly closed
- inUnclosedAttValueRegion = prevTextRegion == region.getRegionAtCharacterOffset(command.offset);
- }
- }
-
- //if command offset is in an unclosed attribute value region then done remove the end tag
- if(!inUnclosedAttValueRegion) {
- region = node.getEndStructuredDocumentRegion();
- if (region != null && region.isEnded()) {
- document.replace(region.getStartOffset(), region.getLength(), ""); //$NON-NLS-1$
- }
- }
- }
- }
- }
- }
- catch (BadLocationException e) {
- Logger.logException(e);
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSPJava.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSPJava.java
deleted file mode 100644
index 72ef7d158a..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/autoedit/StructuredAutoEditStrategyJSPJava.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.ui.internal.autoedit;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.DocumentCommand;
-import org.eclipse.jface.text.IAutoEditStrategy;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.ui.texteditor.ITextEditorExtension3;
-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.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-
-public class StructuredAutoEditStrategyJSPJava implements IAutoEditStrategy {
-
- public void customizeDocumentCommand(IDocument document, DocumentCommand command) {
- Object textEditor = getActiveTextEditor();
- if (!(textEditor instanceof ITextEditorExtension3 && ((ITextEditorExtension3) textEditor).getInsertMode() == ITextEditorExtension3.SMART_INSERT))
- return;
-
- IStructuredModel model = null;
- try {
- // Auto edit for JSP Comments
- if ("-".equals(command.text) && isPreferenceEnabled(JSPUIPreferenceNames.TYPING_COMPLETE_COMMENTS)) { //$NON-NLS-1$
- if (prefixedWith(document, command.offset, "<%-")) { //$NON-NLS-1$
-
- model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- if (model != null) {
- IDOMNode node = (IDOMNode) model.getIndexedRegion(command.offset);
- IDOMNode parent = (node != null) ? (IDOMNode) node.getParentNode() : null;
- // Parent is the scriptlet tag
- if (parent != null && JSP11Namespace.ElementName.SCRIPTLET.equals(parent.getNodeName()) && !parent.getSource().endsWith("--%>")) { //$NON-NLS-1$
- IStructuredDocumentRegion end = parent.getEndStructuredDocumentRegion();
- if (end != null) {
- try {
- document.replace(end.getStartOffset(), 0, "--"); //$NON-NLS-1$
- } catch (BadLocationException e) {
- Logger.logException(e);
- }
- }
- }
- }
- }
- }
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- }
-
- private boolean isPreferenceEnabled(String key) {
- return (key != null && JSPUIPlugin.getDefault().getPreferenceStore().getBoolean(key));
- }
-
- /**
- * Return the active text editor if possible, otherwise the active editor
- * part.
- *
- * @return
- */
- private Object getActiveTextEditor() {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- if (page != null) {
- IEditorPart editor = page.getActiveEditor();
- if (editor != null) {
- if (editor instanceof ITextEditor)
- return editor;
- ITextEditor textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
- if (textEditor != null)
- return textEditor;
- return editor;
- }
- }
- }
- return null;
- }
-
- private boolean prefixedWith(IDocument document, int offset, String string) {
-
- try {
- return document.getLength() >= string.length() && document.get(offset - string.length(), string.length()).equals(string);
- }
- catch (BadLocationException e) {
- Logger.logException(e);
- return false;
- }
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java
deleted file mode 100644
index f7e3772430..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/AbstractBreakpointProvider.java
+++ /dev/null
@@ -1,268 +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.jst.jsp.ui.internal.breakpointproviders;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.ui.IEditorInput;
-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.ITextRegionCollection;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
-import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
-import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.IBreakpointProvider;
-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.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMNodeWrapper;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.provisional.IDOMSourceEditingTextTools;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Abstract breakpoint provider class which implements breakpoint provider
- * interface.
- *
- * This is a temporary class for JavaBreakpointProvider and
- * JavaScriptBreakpointProvider, and should be refactored to separate Java and
- * JavaScript parts.
- */
-public abstract class AbstractBreakpointProvider implements IBreakpointProvider {
-
- protected static final int END_OF_LINE = -1;
- protected static final int JAVA = 1;
- protected static final int JAVASCRIPT = 2;
- private static final String[] JAVASCRIPT_LANGUAGE_KEYS = new String[]{"javascript", "javascript1.0", "javascript1.1_3", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- "javascript1.2", "javascript1.3", "javascript1.4", "javascript1.5", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- "javascript1.6", "jscript", "sashscript"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final String JSP_DIRECTIVE_PAGE = "jsp:directive.page"; //$NON-NLS-1$
-
- protected static final int NO_VALID_CONTENT = -2;
- protected static final int UNSUPPORTED = 0;
-
- protected static boolean contains(String[] haystack, String needle) {
- for (int i = 0; i < haystack.length; i++) {
- if (haystack[i].equals(needle)) {
- return true;
- }
- }
- return false;
- }
-
- /*
- * Return the page language
- */
- protected static int getPageLanguage(Document doc) {
- if (doc == null)
- return UNSUPPORTED;
-
- NodeList pageDirectives = doc.getElementsByTagName(JSP_DIRECTIVE_PAGE);
- // Search for first language directive
- for (int i = 0; i < pageDirectives.getLength(); i++) {
- Node child = pageDirectives.item(i);
- Node languageAttr = child.getAttributes().getNamedItem("language"); //$NON-NLS-1$
- if (languageAttr != null) {
- String pageLanguage = languageAttr.getNodeValue();
- if (pageLanguage == null || pageLanguage.length() == 0)
- return UNSUPPORTED;
- pageLanguage = pageLanguage.toLowerCase();
- if (contains(JAVASCRIPT_LANGUAGE_KEYS, pageLanguage))
- return JAVASCRIPT;
- else if (pageLanguage.equals("java"))//$NON-NLS-1$
- return JAVA;
- else
- return UNSUPPORTED;
- }
- }
- return JAVA; // Java is default if no language directive
- }
-
- /*
- * Search the RegionContainer's regions looking for JSP content. If valid
- * content is found, return the position >= 0 If no valid content is
- * found, return NO_VALID_CONTENT. If a region starts after the line's
- * endOffset, return END_OF_LINE.
- */
- private static int getValidRegionPosition(IStructuredModel model, ITextRegionCollection regionContainer, int startOffset, int endOffset) {
-
- ITextRegionList regions = regionContainer.getRegions();
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (region instanceof ITextRegionCollection) {
- int validPosition = getValidRegionPosition(model, (ITextRegionCollection) region, startOffset, endOffset);
- if (validPosition == END_OF_LINE || validPosition >= 0)
- return validPosition;
- }
- else {
- // region must be at least partially on selected line
- if (regionContainer.getEndOffset(region) > startOffset) {
-
- int regionStartOffset = regionContainer.getStartOffset(region);
- // if region starts after line's endOffset, we're done
- // searching
- if (regionStartOffset > endOffset)
- return END_OF_LINE;
-
- // If region is JSP content, make sure the language is
- // Java not Javascript by
- // checking the content assist adapter's type.
- if (region.getType().equals(DOMJSPRegionContexts.JSP_CONTENT)) {
- // DWM: this logic is not incorrect ... given changes
- // to adapters, etc.
- // but probably don't need anything here, since both
- // Java and JavaScript
- // are supported in V5.
-
- // nsd_TODO: verify this!!!
-
- // INodeNotifier notifier =
- // (INodeNotifier)model.getNode(region.getStartOffset());
- // IAdapterFactory factory =
- // model.getFactoryRegistry().getFactoryFor(ContentAssistAdapter.class);
- // if(factory instanceof
- // HTMLContentAssistAdapterFactory) {
- // INodeAdapter adapter =
- // ((HTMLContentAssistAdapterFactory)factory).createAdapter(notifier,
- // region);
- // if(adapter != null && adapter instanceof
- // JSPJavaContentAssistAdapter)
-
- if (regionStartOffset > startOffset)
- return regionStartOffset;
- else
- return startOffset;
- // }
- }
- // a custom tag, jsp:useBean, getproperty or setproperty
- // statement is also a valid breakpoint location
- else if (region.getType().equals(DOMRegionContext.XML_TAG_NAME) && (isCustomTagRegion(model.getIndexedRegion(regionStartOffset)) || regionContainer.getText(region).equals(JSP12Namespace.ElementName.USEBEAN) || regionContainer.getText(region).equals(JSP12Namespace.ElementName.GETPROPERTY) || regionContainer.getText(region).equals(JSP12Namespace.ElementName.SETPROPERTY))) {
-
- if (regionStartOffset > startOffset)
- return regionStartOffset;
- else
- return startOffset;
- }
- else {
- // Defect #241090, the Text Nodes inside of JSP
- // scriptlets, expressions, and declarations are valid
- // breakpoint-able locations
- boolean isCodeNode = false;
- IndexedRegion node = model.getIndexedRegion(regionStartOffset);
- if (node != null && node instanceof Node) {
- Node domNode = (Node) node;
- Node root = domNode.getOwnerDocument().getDocumentElement();
- if (root != null && root.getNodeName().equals(JSP12Namespace.ElementName.ROOT) && domNode.getNodeType() == Node.TEXT_NODE && domNode.getParentNode() != null) {
- String parentName = domNode.getParentNode().getNodeName();
- isCodeNode = parentName.equals(JSP12Namespace.ElementName.SCRIPTLET) || parentName.equals(JSP12Namespace.ElementName.EXPRESSION) || parentName.equals(JSP12Namespace.ElementName.DECLARATION);
- }
- }
- if (isCodeNode) {
- if (regionStartOffset > startOffset)
- return regionStartOffset;
- else
- return startOffset;
- }
- }
- }
- }
- }
- return NO_VALID_CONTENT;
- }
-
- private static boolean isCustomTagRegion(IndexedRegion node) {
-
- if (node instanceof Element) {
- Element xmlElement = (Element) node;
- ModelQuery mq = ModelQueryUtil.getModelQuery(xmlElement.getOwnerDocument());
- CMElementDeclaration decl = mq.getCMElementDeclaration(xmlElement);
- if (decl instanceof CMNodeWrapper) {
- CMNode cmNode = ((CMNodeWrapper) decl).getOriginNode();
- return cmNode instanceof TLDElementDeclaration;
- }
- }
- return false;
- }
-
- private ISourceEditingTextTools fSourceEditingTextTools;
-
-
- protected IResource getEditorInputResource(IEditorInput input) {
- IResource resource = (IResource) input.getAdapter(IFile.class);
- if (resource == null) {
- resource = (IResource) input.getAdapter(IResource.class);
- }
- return resource;
- }
-
- public ISourceEditingTextTools getSourceEditingTextTools() {
- return fSourceEditingTextTools;
- }
-
- protected int getValidPosition(IDocument idoc, int lineNumber) {
- if (!(getSourceEditingTextTools() instanceof IDOMSourceEditingTextTools)) {
- return NO_VALID_CONTENT;
- }
- if (idoc == null)
- return NO_VALID_CONTENT;
-
- int startOffset, endOffset;
- try {
- startOffset = idoc.getLineOffset(lineNumber - 1);
- endOffset = idoc.getLineOffset(lineNumber) - 1;
-
- if (idoc == null)
- return NO_VALID_CONTENT;
- String lineText = idoc.get(startOffset, endOffset - startOffset).trim();
-
- // blank lines or lines with only an open or close brace or
- // scriptlet tag cannot have a breakpoint
- if (lineText.equals("") || lineText.equals("{") || //$NON-NLS-2$//$NON-NLS-1$
- lineText.equals("}") || lineText.equals("<%"))//$NON-NLS-2$//$NON-NLS-1$
- return NO_VALID_CONTENT;
- }
- catch (BadLocationException e) {
- return NO_VALID_CONTENT;
- }
-
- IStructuredDocumentRegion flatNode = ((IStructuredDocument) idoc).getRegionAtCharacterOffset(startOffset);
- // go through the node's regions looking for JSP content
- // until reaching the end of the line
- while (flatNode != null) {
- int validPosition = getValidRegionPosition(((IDOMDocument) ((IDOMSourceEditingTextTools) getSourceEditingTextTools()).getDOMDocument()).getModel(), flatNode, startOffset, endOffset);
-
- if (validPosition == END_OF_LINE)
- return NO_VALID_CONTENT;
-
- if (validPosition >= 0)
- return validPosition;
-
- flatNode = flatNode.getNext();
- }
- return NO_VALID_CONTENT;
- }
-
- public void setSourceEditingTextTools(ISourceEditingTextTools sourceEditingTextTools) {
- fSourceEditingTextTools = sourceEditingTextTools;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/ClassPatternRegistry.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/ClassPatternRegistry.java
deleted file mode 100644
index 2c53099771..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/ClassPatternRegistry.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 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.ui.internal.breakpointproviders;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.RegistryFactory;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-
-import com.ibm.icu.util.StringTokenizer;
-
-/**
- * This registry provides all additional class patterns to be associated with a specific content type
- *
- */
-public class ClassPatternRegistry {
-
- private static ClassPatternRegistry fInstance = null;
-
- private Map fPatterns = null;
-
- private ClassPatternRegistry() {
- IExtensionRegistry registry = RegistryFactory.getRegistry();
- if (registry != null) {
- IConfigurationElement[] elements = RegistryFactory.getRegistry().getConfigurationElementsFor(JSPUIPlugin.ID, "classPatternProvider"); //$NON-NLS-1$
- fPatterns = new HashMap(elements.length);
- for (int i = 0; i < elements.length; i++) {
- final IConfigurationElement element = elements[i];
- final String contentType = element.getAttribute("contentType"); //$NON-NLS-1$
- final String pattern = element.getAttribute("pattern"); //$NON-NLS-1$
- if (pattern != null && contentType != null) {
- final StringTokenizer tokenizer = new StringTokenizer(pattern, ","); //$NON-NLS-1$
- Set patterns = (Set) fPatterns.get(contentType);
- if (patterns == null) {
- patterns = new HashSet(0);
- fPatterns.put(contentType, patterns);
- }
-
- while (tokenizer.hasMoreTokens()) {
- String token = tokenizer.nextToken();
- token = token.trim();
- if (token.length() > 0) {
- patterns.add(token);
- }
- }
- }
-
- }
- }
- }
-
- /**
- * Returns the additional class patterns to be associated with the provided content type id.
- * @param contentType the content type id to find patterns for
- * @return an String for the additional class patterns
- */
- public String getClassPattern(String contentType) {
- if (fPatterns == null)
- return null;
- final Set patterns = (Set) fPatterns.get(contentType);
- if (patterns != null) {
- final Iterator it = patterns.iterator();
- final StringBuffer buffer = new StringBuffer();
- while (it.hasNext()) {
- if (buffer.length() > 0)
- buffer.append(',');
- buffer.append(it.next());
- }
- return buffer.toString();
- }
- return null;
- }
-
- public Iterator getClassPatternSegments(String contentType) {
- Iterator result = EMPTY;
- if (fPatterns != null) {
- Set patterns = (Set) fPatterns.get(contentType);
- if (patterns != null)
- result = patterns.iterator();
- }
- return result;
- }
-
- private static final Iterator EMPTY = new Iterator() {
-
- /* (non-Javadoc)
- * @see java.util.Iterator#hasNext()
- */
- public boolean hasNext() {
- return false;
- }
-
- /* (non-Javadoc)
- * @see java.util.Iterator#next()
- */
- public Object next() {
- return null;
- }
-
- /* (non-Javadoc)
- * @see java.util.Iterator#remove()
- */
- public void remove() {}
-
- };
-
- public static synchronized ClassPatternRegistry getInstance() {
- if (fInstance == null) {
- fInstance = new ClassPatternRegistry();
- }
- return fInstance;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaBreakpointProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaBreakpointProvider.java
deleted file mode 100644
index bc0725b262..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaBreakpointProvider.java
+++ /dev/null
@@ -1,105 +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.jst.jsp.ui.internal.breakpointproviders;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.debug.core.JDIDebugModel;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.wst.xml.ui.internal.provisional.IDOMSourceEditingTextTools;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-
-/**
- * A BreakpointProvider supporting server-side Java as a JSP language
- *
- * @deprecated
- */
-public class JavaBreakpointProvider extends AbstractBreakpointProvider {
-
- /*
- * @param res @return String
- */
- private static final String getTypeName(IResource res) {
- IPath path = res.getFullPath();
- // Assume under Web Content folder if more than 2 segments
- if (path.segmentCount() > 2) {
- path = path.removeFirstSegments(2);
- }
- else {
- path = path.removeFirstSegments(1);
- }
- String typeName = path.toString().replace(IPath.SEPARATOR, '.');
- if (res.getFileExtension() != null) {
- typeName = typeName.substring(0, typeName.lastIndexOf('.'));
- }
- return typeName;
- }
-
-
-
- public IStatus addBreakpoint(IDocument document, IEditorInput input, int lineNumber, int offset) throws CoreException {
- int pos = getValidPosition(document, lineNumber);
- if (pos != NO_VALID_CONTENT) {
- IResource res = getEditorInputResource(input);
- if (res != null) {
- String typeName = getTypeName(res);
- try {
- JDIDebugModel.createLineBreakpoint(res, typeName, lineNumber, pos, pos, 0, true, null);
- }
- catch (CoreException e) {
- return e.getStatus();
- }
- }
- }
- return new Status(IStatus.OK, JSPUIPlugin.ID, IStatus.OK, JSPUIMessages.OK, null); //$NON-NLS-1$
- }
-
- public boolean canAddBreakpoint(IDocument document, IEditorInput input, Node node, int lineNumber, int offset) {
- IResource res = input instanceof IFileEditorInput ? ((IFileEditorInput) input).getFile() : null;
- Document doc = null;
- if (getSourceEditingTextTools() instanceof IDOMSourceEditingTextTools) {
- doc = ((IDOMSourceEditingTextTools) getSourceEditingTextTools()).getDOMDocument();
- }
-
- return res != null && !isBreakpointExist(res, lineNumber) && isValidPosition(document, lineNumber) && (getPageLanguage(doc) == JAVA);
- }
-
- public IResource getResource(IEditorInput input) {
- return getEditorInputResource(input);
- }
-
- /*
- * @param res @param lineNumber @return boolean
- */
- private boolean isBreakpointExist(IResource res, int lineNumber) {
- try {
- return JDIDebugModel.lineBreakpointExists(getTypeName(res), lineNumber) != null;
- }
- catch (CoreException e) {
- return false;
- }
- }
-
- /*
- * @param doc @param idoc @param lineNumber @return boolean
- */
- private boolean isValidPosition(IDocument idoc, int lineNumber) {
- return getValidPosition(idoc, lineNumber) != NO_VALID_CONTENT;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaScriptBreakpointProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaScriptBreakpointProvider.java
deleted file mode 100644
index 2c7c51d2c0..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaScriptBreakpointProvider.java
+++ /dev/null
@@ -1,81 +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.jst.jsp.ui.internal.breakpointproviders;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.IBreakpointManager;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.ui.IEditorInput;
-import org.w3c.dom.Document;
-
-/**
- * A IBreakpointProvider supporting server-side JavaScript as a JSP language
- *
- */
-public class JavaScriptBreakpointProvider extends AbstractBreakpointProvider {
- public boolean canAddBreakpoint(IDocument document, IEditorInput input, int lineNumber, int offset) {
- IResource res = getEditorInputResource(input);
- Document doc = null;
- return res != null && !isBreakpointExist(res, lineNumber) && isValidPosition(document, lineNumber) && (getPageLanguage(doc) != JAVA);
- }
-
-
- public IStatus addBreakpoint(IDocument document, IEditorInput input, int lineNumber, int offset) {
- int pos = getValidPosition(document, lineNumber);
- if (pos != NO_VALID_CONTENT && canAddBreakpoint(document, input, lineNumber, offset)) {
- IResource res = getEditorInputResource(input);
- if (res != null) {
- new JavascriptLineBreakpoint(res, lineNumber, pos, pos);
- }
- }
- return new Status(IStatus.OK, JSPUIPlugin.ID, IStatus.OK, JSPUIMessages.OK, null); //$NON-NLS-1$
- }
-
- /*
- * @param res @param lineNumber @return boolean
- */
- private boolean isBreakpointExist(IResource res, int lineNumber) {
- IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
- IBreakpoint[] breakpoints = manager.getBreakpoints();
- for (int i = 0; i < breakpoints.length; i++) {
- if (!(breakpoints[i] instanceof JavascriptLineBreakpoint))
- continue;
- JavascriptLineBreakpoint breakpoint = (JavascriptLineBreakpoint) breakpoints[i];
- try {
- if (breakpoint.getResource().equals(res) && breakpoint.getLineNumber() == lineNumber) {
- return true;
- }
- }
- catch (CoreException e) {
- return true;
- }
- }
- return false;
- }
-
- /*
- * @param doc @param idoc @param lineNumber @return boolean
- */
- private boolean isValidPosition(IDocument idoc, int lineNumber) {
- return getValidPosition(idoc, lineNumber) != NO_VALID_CONTENT;
- }
-
- public IResource getResource(IEditorInput input) {
- return getEditorInputResource(input);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaStratumBreakpointProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaStratumBreakpointProvider.java
deleted file mode 100644
index b97f332a76..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavaStratumBreakpointProvider.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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.ui.internal.breakpointproviders;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-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.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.debug.core.model.IBreakpoint;
-import org.eclipse.jdt.debug.core.JDIDebugModel;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jst.jsp.core.text.IJSPPartitions;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IStorageEditorInput;
-import org.eclipse.wst.sse.ui.internal.StructuredResourceMarkerAnnotationModel;
-import org.eclipse.wst.sse.ui.internal.provisional.extensions.ISourceEditingTextTools;
-import org.eclipse.wst.sse.ui.internal.provisional.extensions.breakpoint.IBreakpointProvider;
-
-/**
- * A IBreakpointProvider supporting JSP breakpoints for a Non-Java Language
- * Source JSP page
- */
-public class JavaStratumBreakpointProvider implements IBreakpointProvider, IExecutableExtension {
- private static final String DEFAULT_CLASS_PATTERN = "*jsp,jsp_servlet._*";
- private Object fData = null;
-
- public IStatus addBreakpoint(IDocument document, IEditorInput input, int editorLineNumber, int offset) throws CoreException {
- // check if there is a valid position to set breakpoint
- int pos = getValidPosition(document, editorLineNumber);
- IStatus status = null;
- if (pos >= 0) {
- IResource res = getResourceFromInput(input);
- if (res != null) {
- String path = null;
- IBreakpoint point = JDIDebugModel.createStratumBreakpoint(res, "JSP", res.getName(), path, getClassPattern(res), editorLineNumber, pos, pos, 0, true, null); //$NON-NLS-1$
- if (point == null) {
- status = new Status(IStatus.ERROR, JSPUIPlugin.ID, IStatus.ERROR, "unsupported input type", null); //$NON-NLS-1$
- }
- }
- else if (input instanceof IStorageEditorInput) {
- // For non-resources, use the workspace root and a coordinated
- // attribute that is used to
- // prevent unwanted (breakpoint) markers from being loaded
- // into the editors.
- res = ResourcesPlugin.getWorkspace().getRoot();
- String id = input.getName();
- if (input instanceof IStorageEditorInput && ((IStorageEditorInput) input).getStorage() != null && ((IStorageEditorInput) input).getStorage().getFullPath() != null) {
- id = ((IStorageEditorInput) input).getStorage().getFullPath().toString();
- }
- Map attributes = new HashMap();
- attributes.put(StructuredResourceMarkerAnnotationModel.SECONDARY_ID_KEY, id);
- String path = null;
- IBreakpoint point = JDIDebugModel.createStratumBreakpoint(res, "JSP", input.getName(), path, getClassPattern(res), editorLineNumber, pos, pos, 0, true, attributes); //$NON-NLS-1$
- if (point == null) {
- status = new Status(IStatus.ERROR, JSPUIPlugin.ID, IStatus.ERROR, "unsupported input type", null); //$NON-NLS-1$
- }
- }
- }
- else {
- status = new Status(IStatus.INFO, JSPUIPlugin.ID, IStatus.INFO, JSPUIMessages.BreakpointNotAllowed, null);
- }
- if (status == null) {
- status = new Status(IStatus.OK, JSPUIPlugin.ID, IStatus.OK, JSPUIMessages.OK, null);
- }
- return status;
- }
-
- private String getClassPattern(IResource resource) {
- if (resource != null) {
- String shortName = resource.getName();
- String extension = resource.getFileExtension();
- if (extension != null && extension.length() < shortName.length()) {
- shortName = shortName.substring(0, shortName.length() - extension.length() - 1);
- }
- if (fData instanceof String && fData.toString().length() > 0) {
- /*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=154475
- */
- return fData + ",_" + shortName;
- }
- else if (fData instanceof Map && resource.isAccessible() && resource.getType() == IResource.FILE) {
- IContentType[] types = Platform.getContentTypeManager().findContentTypesFor(resource.getName());
- if (types.length == 0) {
- // if failed to find quickly, be more aggressive
- IContentDescription d = null;
- try {
- // optimized description lookup, might not succeed
- d = ((IFile) resource).getContentDescription();
- if (d != null) {
- types = new IContentType[]{d.getContentType()};
- }
- }
- catch (CoreException e) {
- /*
- * should not be possible given the accessible and
- * file type check above
- */
- }
- }
- // wasn't found earlier
- if (types == null) {
- types = Platform.getContentTypeManager().findContentTypesFor(resource.getName());
- }
- StringBuffer patternBuffer = new StringBuffer("_" + shortName);
- final Set contributions = new HashSet(0);
- for (int i = 0; i < types.length; i++) {
- final String id = types[i].getId();
- Object pattern = ((Map) fData).get(id);
- if (pattern != null) {
- patternBuffer.append(","); //$NON-NLS-1$
- patternBuffer.append(pattern);
- }
- // Append contributions
-
- final Iterator it = ClassPatternRegistry.getInstance().getClassPatternSegments(id);
- while (it.hasNext()) {
- contributions.add(it.next());
- }
- }
- if (contributions.size() > 0) {
- final Iterator it = contributions.iterator();
- while (it.hasNext()) {
- patternBuffer.append(',');
- patternBuffer.append(it.next());
- }
- }
- return patternBuffer.toString();
- }
- }
- return DEFAULT_CLASS_PATTERN;
- }
-
- public IResource getResource(IEditorInput input) {
- return getResourceFromInput(input);
- }
-
- private IResource getResourceFromInput(IEditorInput input) {
- IResource resource = (IResource) input.getAdapter(IFile.class);
- if (resource == null) {
- resource = (IResource) input.getAdapter(IResource.class);
- }
- return resource;
- }
-
- /**
- * Finds a valid position somewhere on lineNumber in document, idoc, where
- * a breakpoint can be set and returns that position. -1 is returned if a
- * position could not be found.
- *
- * @param idoc
- * @param editorLineNumber
- * @return position to set breakpoint or -1 if no position could be found
- */
- private int getValidPosition(IDocument idoc, int editorLineNumber) {
- int result = -1;
- if (idoc != null) {
-
- int startOffset = 0;
- int endOffset = 0;
- try {
- IRegion line = idoc.getLineInformation(editorLineNumber - 1);
- startOffset = line.getOffset();
- endOffset = Math.max(line.getOffset(), line.getOffset() + line.getLength());
-
- String lineText = idoc.get(startOffset, endOffset - startOffset).trim();
-
- // blank lines or lines with only an open or close brace or
- // scriptlet tag cannot have a breakpoint
- if (lineText.equals("") || lineText.equals("{") || //$NON-NLS-1$ //$NON-NLS-2$
- lineText.equals("}") || lineText.equals("<%")) //$NON-NLS-1$ //$NON-NLS-2$
- {
- result = -1;
- }
- else {
- // get all partitions for current line
- ITypedRegion[] partitions = null;
-
- partitions = idoc.computePartitioning(startOffset, endOffset - startOffset);
-
-
- for (int i = 0; i < partitions.length; ++i) {
- String type = partitions[i].getType();
- // if found jsp java content, jsp directive tags,
- // custom
- // tags,
- // return that position
- if (type == IJSPPartitions.JSP_CONTENT_JAVA || type == IJSPPartitions.JSP_DIRECTIVE ||
- type == IJSPPartitions.JSP_DEFAULT_EL || type == IJSPPartitions.JSP_DEFAULT_EL2) {
- result = partitions[i].getOffset();
- }
- }
- }
- }
- catch (BadLocationException e) {
- result = -1;
- }
- }
-
- return result;
- }
-
- /**
- * @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 {
- fData = data;
- }
-
- public void setSourceEditingTextTools(ISourceEditingTextTools tools) {
- // not used
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavascriptLineBreakpoint.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavascriptLineBreakpoint.java
deleted file mode 100644
index 1fad5968e6..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/breakpointproviders/JavascriptLineBreakpoint.java
+++ /dev/null
@@ -1,64 +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
- *******************************************************************************/
-/*
- * Created on Jul 20, 2003
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.jst.jsp.ui.internal.breakpointproviders;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-
-/**
- * @author davidw
- *
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class JavascriptLineBreakpoint {
-
- /**
- * @param res
- * @param lineNumber
- * @param pos
- * @param pos1
- */
- public JavascriptLineBreakpoint(IResource res, int lineNumber, int pos, int pos1) {
-
- // TODO Should be deleted? Along with calling class?
- }
-
- /**
- *
- */
- public JavascriptLineBreakpoint() {
- super();
- }
-
- /**
- *
- */
- public IResource getResource() throws CoreException {
- // TODO Auto-generated method stub
- return null;
- }
-
- /**
- * @return
- */
- public int getLineNumber() {
- // TODO Auto-generated method stub
- return 0;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/AutoImportProposal.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/AutoImportProposal.java
deleted file mode 100644
index 07256dd759..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/AutoImportProposal.java
+++ /dev/null
@@ -1,263 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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
- * Genuitec, LLC - Fix for bug 203303
- *******************************************************************************/
-package org.eclipse.jst.jsp.ui.internal.contentassist;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jdt.core.IImportContainer;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP20TLDNames;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.text.edits.InsertEdit;
-import org.eclipse.text.edits.MalformedTreeException;
-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.ui.internal.contentassist.ContentAssistUtils;
-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.provisional.document.IDOMNode;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-public class AutoImportProposal extends JSPCompletionProposal {
-
- // the import string, no quotes or colons
- String fImportDeclaration;
- IImportContainer fImportContainer;
-
- public AutoImportProposal(String importDeclaration, String replacementString, int replacementOffset, int replacementLength, int cursorPosition, Image image, String displayString, IContextInformation contextInformation, String additionalProposalInfo, int relevance, boolean updateReplacementLengthOnValidate) {
- super(replacementString, replacementOffset, replacementLength, cursorPosition, image, displayString, contextInformation, additionalProposalInfo, relevance, updateReplacementLengthOnValidate);
- setImportDeclaration(importDeclaration);
- }
-
- public AutoImportProposal(String importDeclaration, IImportContainer importContainer ,String replacementString, int replacementOffset, int replacementLength, int cursorPosition, Image image, String displayString, IContextInformation contextInformation, String additionalProposalInfo, int relevance, boolean updateReplacementLengthOnValidate) {
- this(importDeclaration, replacementString, replacementOffset, replacementLength, cursorPosition, image, displayString, contextInformation, additionalProposalInfo, relevance, updateReplacementLengthOnValidate);
- fImportContainer = importContainer;
- }
-
- public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
- super.apply(viewer, trigger, stateMask, offset);
- // if the import doesn't exist, add it
- String importDecl = getImportDeclaration().replaceAll(";", ""); //$NON-NLS-1$//$NON-NLS-2$
- if (fImportContainer == null || !(fImportContainer.getImport(importDecl).exists() || isImportPageDirective(viewer, offset)))
- addImportDeclaration(viewer);
- }
-
- private boolean isImportPageDirective(ITextViewer viewer, int offset){
- Node node = (Node) ContentAssistUtils.getNodeAt(viewer, offset);
-
- while ((node != null) && (node.getNodeType() == Node.TEXT_NODE) && (node.getParentNode() != null)) {
- node = node.getParentNode();
- }
- if (node.getNodeName().equalsIgnoreCase(JSP11Namespace.ElementName.DIRECTIVE_PAGE)){
- NamedNodeMap nodeMap = node.getAttributes();
- if (nodeMap != null)
- return nodeMap.getNamedItem(JSP20TLDNames.IMPORT) != null;
- }
-
- return false ;
- }
- /**
- * adds the import declaration to the document in the viewer in the appropriate position
- * @param viewer
- */
- private void addImportDeclaration(ITextViewer viewer) {
- IDocument doc = viewer.getDocument();
-
- // calculate once and pass along
- boolean isXml = isXmlFormat(doc);
-
- int insertPosition = getInsertPosition(doc, isXml);
- String insertText = createImportDeclaration(doc, isXml);
- InsertEdit insert = new InsertEdit(insertPosition, insertText);
- try {
- insert.apply(doc);
- }
- catch (MalformedTreeException e) {
- Logger.logException(e);
- }
- catch (BadLocationException e) {
- Logger.logException(e);
- }
-
- // make sure the cursor position after is correct
- setCursorPosition(getCursorPosition() + insertText.length());
- }
-
- private Node getInsertNode(IDOMDocument documentNode) {
- NodeList childNodes = documentNode.getChildNodes();
- for (int i = 0; i < childNodes.getLength(); i++) {
- if (childNodes.item(i).getNodeType() == Node.ELEMENT_NODE)
- return childNodes.item(i);
- }
- return documentNode.getFirstChild();
- }
-
- /**
- *
- * @param doc
- * @param isXml
- * @return position after <jsp:root> if xml, otherwise right before the document element
- */
- private int getInsertPosition(IDocument doc, boolean isXml) {
- int pos = 0;
- IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(doc);
- try {
- if (sModel != null) {
- if (sModel instanceof IDOMModel) {
- IDOMDocument documentNode = ((IDOMModel) sModel).getDocument();
- /*
- * document element must be sole Element child of Document
- * to remain valid
- */
- Node targetElement = null;
- if (isXml) {
- targetElement = documentNode.getDocumentElement();
- }
- if (targetElement == null)
- targetElement = getInsertNode(documentNode);
- if (targetElement != null) {
- IStructuredDocumentRegion sdRegion = ((IDOMNode) targetElement).getFirstStructuredDocumentRegion();
- if (isXml) {
- /*
- * document Element must be sole Element child of
- * Document to remain valid, so insert after
- */
- pos = sdRegion.getEndOffset();
- try {
- while (pos < doc.getLength() && (doc.getChar(pos) == '\r' || doc.getChar(pos) == '\n')) {
- pos++;
- }
- }
- catch (BadLocationException e) {
- // not important, use pos as determined earlier
- }
- }
- else {
- // insert before target element
- pos = sdRegion.getStartOffset();
- }
- }
- else {
- pos = 0;
- }
- }
- }
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- return pos;
- }
-
- // Genuitec bug #6227,
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=203303
- private boolean isCustomTagDocument(IDocument doc) {
- boolean isTag = false;
- IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(doc);
- try {
- if (sModel instanceof IDOMModel) {
- String contentType = ((IDOMModel) sModel).getContentTypeIdentifier();
- if (contentType != null) {
- IContentType modelCT = Platform.getContentTypeManager().getContentType(contentType);
- IContentType tagCT = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSPTAG);
- if (modelCT != null && tagCT != null) {
- isTag = modelCT.isKindOf(tagCT);
- }
- }
- }
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- return isTag;
- }
-
- /**
- *
- * @param doc
- * @return true if this document is xml-jsp syntax, otherwise false
- */
- private boolean isXmlFormat(IDocument doc) {
- boolean isXml = false;
- IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(doc);
- try {
- if (sModel != null) {
- if (!isXml) {
- if (sModel instanceof IDOMModel) {
- IDOMDocument documentNode = ((IDOMModel) sModel).getDocument();
- Element docElement = documentNode.getDocumentElement();
- isXml = docElement != null && ((docElement.getNodeName().equals("jsp:root")) || docElement.getAttributeNode("xmlns:jsp") != null || ((((IDOMNode) docElement).getStartStructuredDocumentRegion() == null && ((IDOMNode) docElement).getEndStructuredDocumentRegion() == null))); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- return isXml;
- }
- /**
- *
- * @param doc
- * @param isXml
- * @return appropriate import declaration string depending if document is xml or not
- */
- private String createImportDeclaration(IDocument doc, boolean isXml) {
- String delim = (doc instanceof IStructuredDocument) ? ((IStructuredDocument) doc).getLineDelimiter() : TextUtilities.getDefaultLineDelimiter(doc);
- boolean isCustomTag = isCustomTagDocument(doc);
- final String opening;
- final String closing;
- if (isCustomTag) {
- if (isXml) {
- opening = "<jsp:directive.tag import=\""; //$NON-NLS-1$
- closing = "\"/>"; //$NON-NLS-1$
- }
- else {
- opening = "<%@tag import=\""; //$NON-NLS-1$
- closing = "\"%>"; //$NON-NLS-1$
- }
- }
- else {
- if (isXml) {
- opening = "<jsp:directive.page import=\""; //$NON-NLS-1$
- closing = "\"/>"; //$NON-NLS-1$
- }
- else {
- opening = "<%@page import=\""; //$NON-NLS-1$
- closing = "\"%>"; //$NON-NLS-1$
- }
- }
- return opening + getImportDeclaration() + closing + delim;
- }
-
- public String getImportDeclaration() {
- return fImportDeclaration;
- }
- public void setImportDeclaration(String importDeclaration) {
- fImportDeclaration = importDeclaration;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/BeanInfoProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/BeanInfoProvider.java
deleted file mode 100644
index 918bd2389d..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/BeanInfoProvider.java
+++ /dev/null
@@ -1,442 +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.ui.internal.contentassist;
-
-import java.beans.Introspector;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import com.ibm.icu.util.StringTokenizer;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.jdt.core.Flags;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.ITypeHierarchy;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-
-/**
- * Navigates the IJavaProject classpath (incl. source) on a given resource and infers bean properties
- * given a fully qualified beanname. Bean properties can be retrieved using:
- * <code>getRuntimeProperties(IResource baseResource, String typeName)</code>
- *
- * @plannedfor 1.0
- */
-public class BeanInfoProvider implements IBeanInfoProvider {
-
- public class JavaPropertyDescriptor implements IJavaPropertyDescriptor {
- String fType = null;
- String fName = null;
- boolean fReadable = true;
- boolean fWritable = true;
-
- public JavaPropertyDescriptor(String name, String type, boolean readable, boolean writable) {
- fName = name;
- fType = type;
- fReadable = readable;
- fWritable = writable;
- }
-
- public String getDeclaredType() {
- return fType;
- }
-
- public String getDisplayName() {
- return fName;
- }
-
- public String getName() {
- return fName;
- }
-
- public boolean getReadable() {
- return fReadable;
- }
-
- public boolean getWriteable() {
- return fWritable;
- }
- }
-
- // looks up encoded type (see Class.getName), and gives you a displayable string
- private HashMap fEncodedTypeMap = null;
- // to avoid repeat properties from showing up
- private HashSet fRepeatMethods = null;
-
- public BeanInfoProvider() {
- fRepeatMethods = new HashSet();
- }
-
- /**
- * Returns the inferred properties of a bean based on the project from the baseResource,
- * and the fully qualified name of the bean.
- *
- * @param baseResource the base resource where the bean is being used
- * @param typeName the <i>fully qualified</i> type name (eg. javax.swing.JButton) of the bean
- */
- public IJavaPropertyDescriptor[] getRuntimeProperties(IResource baseResource, String typeName) {
- IJavaProject javaProject = JavaCore.create(baseResource.getProject());
- QualifiedName typeQualifiedName = getTypeQualifiedName(typeName);
- List getMethodResults = new ArrayList();
- List isMethodResults = new ArrayList();
- List setMethodResults = new ArrayList();
- List descriptorResults = new ArrayList();
- try {
- IType type = javaProject.findType(typeQualifiedName.getQualifier() + "." + typeQualifiedName.getLocalName()); //$NON-NLS-1$
- // type must exist
- if(type != null) {
- ITypeHierarchy hierarchy = type.newTypeHierarchy(null);
- IType[] supers = hierarchy.getAllSuperclasses(type);
-
- IMethod[] methods = type.getMethods();
- // iterate the bean's methods
- for (int i = 0; i < methods.length; i++)
- acceptMethod(getMethodResults, isMethodResults, setMethodResults, methods[i]);
- // the bean hierarchy's methods
- for (int i = 0; i < supers.length; i++) {
- methods = supers[i].getMethods();
- for (int j = 0; j < methods.length; j++)
- acceptMethod(getMethodResults, isMethodResults, setMethodResults, methods[j]);
- }
- adaptMethodsToPropertyDescriptors(getMethodResults, isMethodResults, setMethodResults, descriptorResults);
- }
- }
- catch (JavaModelException jmex) {
- Logger.logException("Problem navigating JavaProject in BeanInfoProvider", jmex); //$NON-NLS-1$
- }
-
- IJavaPropertyDescriptor[] finalResults = new IJavaPropertyDescriptor[descriptorResults.size()];
- System.arraycopy(descriptorResults.toArray(), 0, finalResults, 0, descriptorResults.size());
- return finalResults;
- }
-
- /**
- * Retrieves the necessary information from method declaration lists, creates and fills a list of JavaPropertyDescriptors.
- * @param getMethods
- * @param isMethods
- * @param setMethods
- * @param descriptorResults
- */
- private void adaptMethodsToPropertyDescriptors(List getMethods, List isMethods, List setMethods, List descriptors) throws JavaModelException {
- List readable = new ArrayList();
- HashMap types = new HashMap();
-
- // iterate through get* and is* methods, updating 'readable' list and 'types' map
- filterGetMethods(getMethods, readable, types);
- filterIsMethods(isMethods, readable, types);
-
- // iterate set* methods, checking overlap w/ readable
- Iterator it = setMethods.iterator();
- IMethod temp = null;
- String name = ""; //$NON-NLS-1$
- String type = ""; //$NON-NLS-1$
- String[] encodedParams = null;
- String returnType = ""; //$NON-NLS-1$
- String param0 = ""; //$NON-NLS-1$
-
- while (it.hasNext()) {
- temp = (IMethod) it.next();
- name = createPropertyNameFromMethod(temp);
- // invalid naming convention
- if (name == null)
- continue;
-
- returnType = getDecodedTypeName(temp.getReturnType());
- // setter should have no return type
- if (!returnType.equals("void")) //$NON-NLS-1$
- continue;
-
- // need to get type from parameter
- encodedParams = temp.getParameterTypes();
- if (encodedParams != null && encodedParams.length > 0) {
- if (encodedParams.length > 1) {
- // multiple params
- param0 = getDecodedTypeName(encodedParams[0]);
- if (!param0.equals("int")) //$NON-NLS-1$
- // not a valid indexed property
- continue;
-
- type = getDecodedTypeName(encodedParams[1]);
- }
- else {
- // one param, regular setter
- if (isArray(encodedParams[0]))
- type = getDecodedTypeName(encodedParams[0]);
- }
- }
-
- if (readable.contains(name)) {
- // writable and readable
- if (!fRepeatMethods.contains(name)) {
- descriptors.add(new JavaPropertyDescriptor(name, (String) types.get(name), true, true));
- readable.remove(name);
- fRepeatMethods.add(name);
- }
- }
- else {
- // wasn't readable, just writable
- String[] params = temp.getParameterTypes();
- // can't be setProperty if no parameters
- if (!(params.length > 0))
- continue;
- if (!fRepeatMethods.contains(name)) {
- type = getDecodedTypeName(params[0]);
- descriptors.add(new JavaPropertyDescriptor(name, type, false, true));
- fRepeatMethods.add(name);
- }
- }
- }
- // add leftover from readable, get* and is* methods (readable = true, writable = false)
- it = readable.iterator();
- while (it.hasNext()) {
- name = (String) it.next();
- if (!fRepeatMethods.contains(name)) {
- descriptors.add(new JavaPropertyDescriptor(name, (String) types.get(name), true, false));
- fRepeatMethods.add(name);
- }
- }
- }
-
- private void filterGetMethods(List getMethods, List readable, HashMap types) throws JavaModelException {
- IMethod temp;
- String name;
- String encodedReturnType;
- String returnType;
- Iterator it = getMethods.iterator();
- String[] encodedParams;
- String paramType;
- // iterate get* methods
- while (it.hasNext()) {
- temp = (IMethod) it.next();
- name = createPropertyNameFromMethod(temp);
- // invalid bean naming convention
- if (name == null)
- continue;
-
- encodedReturnType = temp.getReturnType();
- returnType = getDecodedTypeName(encodedReturnType);
-
- // can't get be a getProperty if returns void
- if (returnType.equals("void")) //$NON-NLS-1$
- continue;
-
- // check params in case it's indexed propety
- encodedParams = temp.getParameterTypes();
- if (encodedParams != null && encodedParams.length == 1) {
- paramType = getDecodedTypeName(encodedParams[0]);
- // syntax is > Type getter(int);
- if (!paramType.equals("int")) { //$NON-NLS-1$
- //it's not an indexed property
- continue;
- }
- // it is indexed, prop type is an ARRAY
- returnType += "[]"; //$NON-NLS-1$
- }
-
- readable.add(name);
- types.put(name, returnType);
- }
-
- }
-
- private void filterIsMethods(List isMethodResults, List readable, HashMap types) throws JavaModelException {
- IMethod temp;
- String name;
- String encodedReturnType;
- String returnType;
- String[] encodedParams;
- String paramType;
- // iterate is* methods
- Iterator it = isMethodResults.iterator();
- while (it.hasNext()) {
- temp = (IMethod) it.next();
- name = createPropertyNameFromMethod(temp);
- // invalid bean naming convention
- if (name == null)
- continue;
- encodedReturnType = temp.getReturnType();
- returnType = getDecodedTypeName(encodedReturnType);
-
- // isProperty only valid for boolean
- if (!returnType.equals("boolean")) //$NON-NLS-1$
- continue;
-
- // check params in case it's indexed propety
- encodedParams = temp.getParameterTypes();
- if (encodedParams != null && encodedParams.length == 1) {
- paramType = getDecodedTypeName(encodedParams[0]);
- // syntax is > Type getter(int);
- if (!paramType.equals("int")) { //$NON-NLS-1$
- //it's not a valid indexed property
- continue;
- }
- }
-
- readable.add(name);
- types.put(name, returnType);
- }
- }
-
- /**
- * Pass in a get*|set*|is* method and it will return an inferred property name using <code>Introspector.decapitalize(String)</code>
- * @param temp
- * @return an inferred property name based on the IMethod name, null if the name is not valid according to bean spec
- */
- private String createPropertyNameFromMethod(IMethod temp) {
- String name = temp.getElementName();
- if (name.startsWith("is")) //$NON-NLS-1$
- name = Introspector.decapitalize(name.substring(2));
- else
- // must be get or set
- name = Introspector.decapitalize(name.substring(3));
- return name;
- }
-
- /**
- * Initial filtering of methods. Checks prefix if it's valid length. If the prefix is "get" the method name
- * is placed in the getMethodResults List. If the prefix is "is", the name is added to the isMethodResults list. If the
- * prefix is "set", it's added to the setMethodResultsList.
- *
- * @param getMethodResults
- * @param isMethodResults
- * @param setMethodResults
- * @param method
- */
- private void acceptMethod(List getMethodResults, List isMethodResults, List setMethodResults, IMethod method) throws JavaModelException {
- if (!fRepeatMethods.contains(method.getElementName())) {
- fRepeatMethods.add(method.getElementName());
- int flags = method.getFlags();
- String methodName = method.getElementName();
- if (Flags.isPublic(flags)) {
- if (methodName.length() > 3 && methodName.startsWith("get")) //$NON-NLS-1$
- getMethodResults.add(method);
- else if (methodName.length() > 2 && methodName.startsWith("is")) //$NON-NLS-1$
- isMethodResults.add(method);
- else if (methodName.length() > 3 && methodName.startsWith("set")) //$NON-NLS-1$
- setMethodResults.add(method);
- }
- }
- }
-
- /**
- * @param typeName
- * @return a Qualified name with the package as the qualifier, and class name as LocalName
- */
- private QualifiedName getTypeQualifiedName(String typeName) {
- StringTokenizer st = new StringTokenizer(typeName, ".", false); //$NON-NLS-1$
- int length = st.countTokens();
- int count = 0;
- StringBuffer root = new StringBuffer();
- while (count++ < length - 1) {
- root.append(st.nextToken());
- if (count < length - 1)
- root.append('.');
- }
- return new QualifiedName(root.toString(), st.nextToken());
- }
-
- /**
- * Checks if encodedTypeName is an array
- * @param encodedTypeName
- * @return true if encodedTypeName is an array, false otherwise.
- */
- private boolean isArray(String encodedTypeName) {
- if (encodedTypeName != null && encodedTypeName.length() > 0) {
- if (encodedTypeName.charAt(0) == '[')
- return true;
- }
- return false;
- }
-
- /**
- * Returns the decoded (displayable) name fo the type.
- * Either a primitive type (int, long, float...) Object (String)
- * @param type
- * @return decoded name for the encoded string
- */
- private String getDecodedTypeName(String encoded) {
- HashMap map = getEncodedTypeMap();
-
- StringBuffer decoded = new StringBuffer();
- char BRACKET = '[';
- String BRACKETS = "[]"; //$NON-NLS-1$
- char identifier = ' ';
- int last = 0;
- // count brackets
- while (encoded.indexOf(BRACKET, last) != -1) {
- last++;
- }
- identifier = encoded.charAt(last);
- Object primitiveType = map.get(String.valueOf(identifier));
- // L > binary type name, Q > source type name
- if (identifier == 'L' || identifier == 'Q') {
- // handle object
- String classname = encoded.substring(last + 1, encoded.length() - 1);
- decoded.append(classname);
- }
- else if (primitiveType != null) {
- // handle primitive type (from IField.getSignature())
- decoded.append((String) primitiveType);
- }
- else {
- // handle primitive type (from Class.getName())
- decoded.append(encoded);
- }
- // handle arrays
- if (last > 0) {
- for (int i = 0; i < last; i++) {
- decoded.append(BRACKETS);
- }
- }
- return decoded.toString();
- }
-
- /**
- * from Class.getName() javadoc
- * also see Signature in jdt.core api
- *<pre>
- * B byte
- * C char
- * D double
- * F float
- * I int
- * J long
- * Lclassname; class or interface
- * Qsourcename; source
- * S short
- * Z boolean
- * V void
- *</pre>
- *
- * @return the "encoding letter" to "type" map.
- */
- private HashMap getEncodedTypeMap() {
- if (fEncodedTypeMap == null) {
- fEncodedTypeMap = new HashMap();
- fEncodedTypeMap.put("B", "byte"); //$NON-NLS-1$ //$NON-NLS-2$
- fEncodedTypeMap.put("C", "char"); //$NON-NLS-1$ //$NON-NLS-2$
- fEncodedTypeMap.put("D", "double"); //$NON-NLS-1$ //$NON-NLS-2$
- fEncodedTypeMap.put("F", "float"); //$NON-NLS-1$ //$NON-NLS-2$
- fEncodedTypeMap.put("I", "int"); //$NON-NLS-1$ //$NON-NLS-2$
- fEncodedTypeMap.put("J", "long"); //$NON-NLS-1$ //$NON-NLS-2$
- fEncodedTypeMap.put("S", "short"); //$NON-NLS-1$ //$NON-NLS-2$
- fEncodedTypeMap.put("Z", "boolean"); //$NON-NLS-1$ //$NON-NLS-2$
- fEncodedTypeMap.put("V", "void"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return fEncodedTypeMap;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/CustomTemplateProposal.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/CustomTemplateProposal.java
deleted file mode 100644
index 98b3b2a762..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/CustomTemplateProposal.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 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.ui.internal.contentassist;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.contentassist.ICompletionProposalExtension4;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jface.text.templates.TemplateProposal;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceCompletionProposal;
-
-/**
- * Purpose of this class is to make the additional proposal info into content
- * fit for an HTML viewer (by escaping characters)
- *
- * @plannedfor 1.0
- */
-class CustomTemplateProposal extends TemplateProposal implements IRelevanceCompletionProposal, ICompletionProposalExtension4 {
- // copies of this class exist in:
- // org.eclipse.jst.jsp.ui.internal.contentassist
- // org.eclipse.wst.html.ui.internal.contentassist
- // org.eclipse.wst.xml.ui.internal.contentassist
-
- public CustomTemplateProposal(Template template, TemplateContext context, IRegion region, Image image, int relevance) {
- super(template, context, region, image, relevance);
- }
-
- public String getAdditionalProposalInfo() {
- String additionalInfo = super.getAdditionalProposalInfo();
- return StringUtils.convertToHTMLContent(additionalInfo);
- }
-
- public boolean isAutoInsertable() {
- return false;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/IBeanInfoProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/IBeanInfoProvider.java
deleted file mode 100644
index eed9ef7d95..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/IBeanInfoProvider.java
+++ /dev/null
@@ -1,20 +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.jst.jsp.ui.internal.contentassist;
-
-import org.eclipse.core.resources.IResource;
-
-/**
- * @plannedfor 1.0
- */
-public interface IBeanInfoProvider {
- IJavaPropertyDescriptor[] getRuntimeProperties(IResource baseResource, String typeName);
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/IJavaPropertyDescriptor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/IJavaPropertyDescriptor.java
deleted file mode 100644
index 423e3f60c4..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/IJavaPropertyDescriptor.java
+++ /dev/null
@@ -1,27 +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.jst.jsp.ui.internal.contentassist;
-
-/**
- * @plannedfor 1.0
- */
-public interface IJavaPropertyDescriptor {
-
- String getDeclaredType();
-
- String getDisplayName();
-
- String getName();
-
- boolean getReadable();
-
- boolean getWriteable();
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java
deleted file mode 100644
index eded388c5a..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProcessor.java
+++ /dev/null
@@ -1,309 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.ui.internal.contentassist;
-
-import java.util.HashMap;
-import java.util.Iterator;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.WorkingCopyOwner;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-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.ui.internal.JSPUIMessages;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.ui.internal.IReleasable;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.osgi.framework.Bundle;
-
-
-/**
- * @plannedfor 1.0
- * @deprecated This class is no longer used locally and will be removed in the future
- */
-public class JSPCompletionProcessor implements IContentAssistProcessor, IReleasable {
- // 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$
- }
-
- private static final String JDT_CORE_PLUGIN_ID = "org.eclipse.jdt.core"; //$NON-NLS-1$
-
- protected int fJspSourcePosition, fJavaPosition;
- protected String fErrorMessage = null;
- protected StructuredTextViewer fViewer = null;
- private JSPTranslationAdapter fTranslationAdapter = null;
- // translation adapter may be stale, check the model id
- private String fModelId = null;
-
- /**
- * Returns a list of completion proposals based on the specified location
- * within the document that corresponds to the current cursor position
- * within the text viewer.
- *
- * @param viewer
- * the viewer whose document is used to compute the proposals
- * @param documentPosition
- * an offset within the document for which completions should
- * be computed
- * @return an array of completion proposals or <code>null</code> if no
- * proposals are possible
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int pos) {
- return computeCompletionProposals(viewer, pos, 0);
- }
-
- /**
- * The same as the normal <code>computeCompeltaionProposals</code> except the calculated
- * java position is offset by the given extra offset.
- *
- * @param viewer
- * the viewer whose document is used to compute the proposals
- * @param documentPosition
- * an offset within the document for which completions should
- * be computed
- * @param javaPositionExtraOffset
- * the extra offset for the java position
- * @return an array of completion proposals or <code>null</code> if no
- * proposals are possible
- */
- protected ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int pos, int javaPositionExtraOffset) {
- initialize(pos);
-
- JSPProposalCollector collector = null;
-
- IDOMModel xmlModel = null;
- try {
- if (viewer instanceof StructuredTextViewer)
- fViewer = (StructuredTextViewer) viewer;
-
- xmlModel = (IDOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(fViewer.getDocument());
-
- IDOMDocument xmlDoc = xmlModel.getDocument();
- if (fTranslationAdapter == null || xmlModel.getId() != fModelId) {
- fTranslationAdapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
- fModelId = xmlModel.getId();
- }
- if (fTranslationAdapter != null) {
-
- JSPTranslation translation = fTranslationAdapter.getJSPTranslation();
- fJavaPosition = translation.getJavaOffset(getDocumentPosition())+javaPositionExtraOffset;
-
- if (DEBUG)
- System.out.println(debug(translation));
-
- try {
-
- ICompilationUnit cu = translation.getCompilationUnit();
-
- // can't get java proposals w/out a compilation unit
- // or without a valid position
- if (cu == null || -1 == fJavaPosition)
- return new ICompletionProposal[0];
-
- collector = getProposalCollector(cu, translation);
- synchronized (cu) {
- cu.codeComplete(fJavaPosition, collector, (WorkingCopyOwner) null);
- }
- }
- catch (CoreException coreEx) {
- // a possible Java Model Exception due to not being a Web
- // (Java) Project
- coreEx.printStackTrace();
- }
- }
- }
- catch (Exception exc) {
- exc.printStackTrace();
- // throw out exceptions on code assist.
- }
- finally {
- if (xmlModel != null) {
- xmlModel.releaseFromRead();
- }
- }
- ICompletionProposal[] results = new ICompletionProposal[0];
- if(collector != null) {
- results = collector.getJSPCompletionProposals();
- if (results == null || results.length < 1)
- fErrorMessage = JSPUIMessages.Java_Content_Assist_is_not_UI_;
- }
- return results;
- }
-
- protected JSPProposalCollector getProposalCollector(ICompilationUnit cu, JSPTranslation translation) {
- return new JSPProposalCollector(cu, translation);
- }
-
- /**
- * For debugging translation mapping only.
- *
- * @param translation
- */
- private String debug(JSPTranslation translation) {
- StringBuffer debugString = new StringBuffer();
- HashMap jsp2java = translation.getJsp2JavaMap();
- String javaText = translation.getJavaText();
- String jspText = fViewer.getDocument().get();
- debugString.append("[jsp2JavaMap in JSPCompletionProcessor]\r\n"); //$NON-NLS-1$
- debugString.append("jsp cursor position >> " + fViewer.getTextWidget().getCaretOffset() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
- Iterator it = jsp2java.keySet().iterator();
- while (it.hasNext()) {
- try {
- Position jspPos = (Position) it.next();
- Position javaPos = (Position) jsp2java.get(jspPos);
- debugString.append("jsp > " + jspPos.offset + ":" + jspPos.length + ":" + jspText.substring(jspPos.offset, jspPos.offset + jspPos.length) + ":\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- debugString.append("java > " + javaPos.offset + ":" + javaPos.length + ":" + javaText.substring(javaPos.offset, javaPos.offset + javaPos.length) + ":\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- debugString.append("-------------------------------------------------\n"); //$NON-NLS-1$
- }
- catch (Exception e) {
- // eat exceptions, it's only for debug
- }
- }
- return debugString.toString();
- }
-
- /**
- * Returns information about possible contexts based on the specified
- * location within the document that corresponds to the current cursor
- * position within the text viewer.
- *
- * @param viewer
- * the viewer whose document is used to compute the possible
- * contexts
- * @param documentPosition
- * an offset within the document for which context information
- * should be computed
- * @return an array of context information objects or <code>null</code>
- * if no context could be found
- */
- public org.eclipse.jface.text.contentassist.IContextInformation[] computeContextInformation(org.eclipse.jface.text.ITextViewer viewer, int documentOffset) {
- return null;
- }
-
- /**
- * Returns a string of characters which when pressed should automatically
- * display content-assist proposals.
- *
- * @return string of characters
- */
- public java.lang.String getAutoProposalInvocationCharacters() {
- return null;
- }
-
- /**
- * Returns a string of characters which when pressed should automatically
- * display a content-assist tip.
- *
- * @return string of characters
- */
- public java.lang.String getAutoTipInvocationCharacters() {
- return null;
- }
-
- /**
- * Returns the characters which when entered by the user should
- * automatically trigger the presentation of possible completions.
- *
- * @return the auto activation characters for completion proposal or
- * <code>null</code> if no auto activation is desired
- */
- public char[] getCompletionProposalAutoActivationCharacters() {
- return null;
- }
-
- /**
- * Returns the characters which when entered by the user should
- * automatically trigger the presentation of context information.
- *
- * @return the auto activation characters for presenting context
- * information or <code>null</code> if no auto activation is
- * desired
- */
- public char[] getContextInformationAutoActivationCharacters() {
- return null;
- }
-
- /**
- * Returns a validator used to determine when displayed context
- * information should be dismissed. May only return <code>null</code> if
- * the processor is incapable of computing context information.
- *
- * @return a context information validator, or <code>null</code> if the
- * processor is incapable of computing context information
- */
- public org.eclipse.jface.text.contentassist.IContextInformationValidator getContextInformationValidator() {
- return null;
- }
-
- protected int getDocumentPosition() {
- return fJspSourcePosition;
- }
-
- public String getErrorMessage() {
- // TODO: get appropriate error message
- // if (fCollector.getErrorMessage() != null &&
- // fCollector.getErrorMessage().length() > 0)
- // return fCollector.getErrorMessage();
- return fErrorMessage;
- }
-
- /**
- * Initialize the code assist processor.
- */
- protected void initialize(int pos) {
- initializeJavaPlugins();
-
- fJspSourcePosition = pos;
- fErrorMessage = null;
- }
-
- /**
- * Initialize the Java Plugins that the JSP processor requires.
- * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=143765
- * We should not call "start", because that will cause that
- * state to be remembered, and re-started automatically during
- * the next boot up sequence.
- *
- * ISSUE: we may be able to get rid of this all together, in future,
- * since 99% we probably have already used some JDT class by the time
- * we need JDT to be active ... but ... this is the safest fix for
- * this point in 1.5 stream. Next release, let's just remove this,
- * re-discover what ever bug this was fixing (if any) and if there is
- * one, then we'll either put back in, as is, or come up with a
- * more appropriate fix.
- *
- */
- protected void initializeJavaPlugins() {
- try {
- Bundle bundle = Platform.getBundle(JDT_CORE_PLUGIN_ID);
- bundle.loadClass("dummyClassNameThatShouldNeverExist");
- }
- catch (ClassNotFoundException e) {
- // this is the expected result, we just want to
- // nudge the bundle to be sure its activated.
- }
- }
-
- public void release() {
- fTranslationAdapter = null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposal.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposal.java
deleted file mode 100644
index c4a60367b0..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposal.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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.ui.internal.contentassist;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IInformationControlCreator;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposalExtension3;
-import org.eclipse.jface.text.contentassist.ICompletionProposalExtension5;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-
-/**
- * Implements IJavaCompletionProposal for use with JSPProposalCollector.
- *
- * @plannedfor 1.0
- */
-public class JSPCompletionProposal extends CustomCompletionProposal implements IJavaCompletionProposal, ICompletionProposalExtension3, ICompletionProposalExtension5 {
-
- private static final char[] TRIGGERS = new char[] { '.', '[' };
- /*
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=124483
- *
- * This is a wrapped proposal so we don't need to
- * make "slow" calls to the java proposal up front, only when needed
- * for example, getAdditionalInfo() reads external javadoc, and it makes
- * no sense
- */
- ICompletionProposal fJavaCompletionProposal = null;
-
- public JSPCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition, Image image, String displayString, IContextInformation contextInformation, String additionalProposalInfo, int relevance, boolean updateReplacementLengthOnValidate) {
- super(replacementString, replacementOffset, replacementLength, cursorPosition, image, displayString, contextInformation, additionalProposalInfo, relevance, updateReplacementLengthOnValidate);
- }
-
- /**
- * Sets cursor position after applying.
- */
- public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
- if (trigger != (char) 0 ) {
- setReplacementString(getReplacementString() + trigger);
- setCursorPosition(getCursorPosition() + 1);
- }
- super.apply(viewer, trigger, stateMask, offset);
- //move the caret to the end of the change
- int endOffsetOfChanges = getReplacementString().length() + getReplacementOffset();
- viewer.getTextWidget().setCaretOffset(endOffsetOfChanges);
- }
-
- final public ICompletionProposal getJavaCompletionProposal() {
- return fJavaCompletionProposal;
- }
-
- final public void setJavaCompletionProposal(ICompletionProposal javaCompletionProposal) {
- fJavaCompletionProposal = javaCompletionProposal;
- }
-
- public String getAdditionalProposalInfo() {
- String additionalInfo = super.getAdditionalProposalInfo();
- ICompletionProposal javaProposal = getJavaCompletionProposal();
- if(javaProposal != null)
- additionalInfo = javaProposal.getAdditionalProposalInfo();
-
- return additionalInfo;
- }
-
- /**
- * use the java proposals image if there is one for this proposals image
- */
- public Image getImage() {
- if(this.fJavaCompletionProposal != null) {
- return this.fJavaCompletionProposal.getImage();
- } else {
- return super.getImage();
- }
- }
-
- /*
- * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension5#getAdditionalProposalInfo(org.eclipse.core.runtime.IProgressMonitor)
- */
- public Object getAdditionalProposalInfo(IProgressMonitor monitor) {
- Object additionalInfo = super.getAdditionalProposalInfo();
- ICompletionProposal javaProposal = getJavaCompletionProposal();
- if (javaProposal != null) {
- if (javaProposal instanceof ICompletionProposalExtension5)
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=260951
- additionalInfo = ((ICompletionProposalExtension5) javaProposal).getAdditionalProposalInfo(monitor);
- else
- additionalInfo = javaProposal.getAdditionalProposalInfo();
- }
-
- return additionalInfo;
- }
-
- /*
- * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension3#getInformationControlCreator()
- */
- public IInformationControlCreator getInformationControlCreator() {
- // [277530] Use the java proposal's information control creator
- ICompletionProposal javaProposal = getJavaCompletionProposal();
- IInformationControlCreator informationControlCreator = null;
-
- if (javaProposal instanceof ICompletionProposalExtension3)
- informationControlCreator = ((ICompletionProposalExtension3) javaProposal).getInformationControlCreator();
-
- return informationControlCreator;
- }
-
- /*
- * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension3#getPrefixCompletionStart(org.eclipse.jface.text.IDocument, int)
- */
- public int getPrefixCompletionStart(IDocument document, int completionOffset) {
- ICompletionProposal javaProposal = getJavaCompletionProposal();
- if (javaProposal instanceof ICompletionProposalExtension3)
- return ((ICompletionProposalExtension3) javaProposal).getPrefixCompletionStart(document, completionOffset);
-
- return getReplacementOffset();
- }
-
- public char[] getTriggerCharacters() {
- return TRIGGERS;
- }
-
- /*
- * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension3#getPrefixCompletionText(org.eclipse.jface.text.IDocument, int)
- */
- public CharSequence getPrefixCompletionText(IDocument document, int completionOffset) {
- ICompletionProposal javaProposal = getJavaCompletionProposal();
- if (javaProposal instanceof ICompletionProposalExtension3)
- return ((ICompletionProposalExtension3) javaProposal).getPrefixCompletionText(document, completionOffset);
-
- return getReplacementString();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposalComputer.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposalComputer.java
deleted file mode 100644
index 2d022bde2b..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPCompletionProposalComputer.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.ui.internal.contentassist;
-
-import java.util.Iterator;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImageHelper;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImages;
-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.ui.contentassist.CompletionProposalInvocationContext;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-import org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLRelevanceConstants;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-/**
- * <p>Computes JSP specific proposals</p>
- *
- * @base org.eclipse.jst.jsp.ui.internal.contentassist.JSPContentAssistProcessor
- */
-public class JSPCompletionProposalComputer extends DefaultXMLCompletionProposalComputer {
- /**
- * <p>Create the computer</p>
- */
- public JSPCompletionProposalComputer() {
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLCompletionProposalComputer#computeCompletionProposals(java.lang.String, org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion, org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode, org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected ContentAssistRequest computeCompletionProposals(String matchString, ITextRegion completionRegion,
- IDOMNode treeNode, IDOMNode xmlnode, CompletionProposalInvocationContext context) {
-
- //be sure to get the super proposals
- ContentAssistRequest request = super.computeCompletionProposals(matchString, completionRegion, treeNode, xmlnode, context);
-
- //calculate JSP specific proposals
- int documentPosition = context.getInvocationOffset();
- IStructuredDocumentRegion sdRegion = ContentAssistUtils.getStructuredDocumentRegion(
- context.getViewer(), documentPosition);
-
- Document doc = null;
- if (xmlnode != null) {
- if (xmlnode.getNodeType() == Node.DOCUMENT_NODE) {
- doc = (Document) xmlnode;
- } else {
- doc = xmlnode.getOwnerDocument();
- }
- }
- String[] directiveNames = {"page", "include", "taglib"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- ITextRegion prevTextRegion = null;
- try {
- int offset = sdRegion.getStartOffset(completionRegion);
- if(offset > 0) {
- offset--;
- }
- ITypedRegion prevRegion = context.getDocument().getPartition(offset);
- prevTextRegion = sdRegion.getRegionAtCharacterOffset(prevRegion.getOffset());
- } catch(BadLocationException e) {
- //this should never happen
- Logger.logException(e);
- }
-
- // suggest JSP Expression inside of XML comments
- if (completionRegion.getType() == DOMRegionContext.XML_COMMENT_TEXT && !isXMLFormat(doc)) {
- if (request == null) {
- request = new ContentAssistRequest(treeNode, xmlnode, sdRegion,
- completionRegion, documentPosition, 0, ""); //$NON-NLS-1$
- }
- request.addProposal(new CustomCompletionProposal("<%= %>",//$NON-NLS-1$
- documentPosition, 0, 4,
- JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_JSP),
- "jsp:expression", null, "&lt;%= %&gt;", XMLRelevanceConstants.R_JSP)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- /* handle proposals in and around JSP_DIRECTIVE_OPEN,
- * JSP_DIRECTIVE_CLOSE (preceded by OPEN) and JSP_DIRECTIVE_NAME
- */
- else if ((completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN &&
- documentPosition >= sdRegion.getTextEndOffset(completionRegion)) ||
- (completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME &&
- documentPosition <= sdRegion.getTextEndOffset(completionRegion)) ||
- (completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE &&
- prevTextRegion != null &&
- prevTextRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN &&
- documentPosition <= sdRegion.getTextEndOffset(completionRegion))) {
-
- if (completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN ||
- completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE) {
-
- if (request == null) {
- request = new ContentAssistRequest(xmlnode, xmlnode, sdRegion,
- completionRegion, documentPosition, 0, matchString);
- }
-
- //determine if there is any part of a directive name already existing
- Iterator regions = sdRegion.getRegions().iterator();
- String nameString = null;
- int begin = request.getReplacementBeginPosition();
- int length = request.getReplacementLength();
- while (regions.hasNext()) {
- ITextRegion region = (ITextRegion) regions.next();
- if (region.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- nameString = sdRegion.getText(region);
- begin = sdRegion.getStartOffset(region);
- length = region.getTextLength();
- break;
- }
- }
- if (nameString == null) {
- nameString = ""; //$NON-NLS-1$
- }
-
- /* Suggest the directive names that have been determined to be
- * appropriate based on existing content
- */
- for (int i = 0; i < directiveNames.length; i++) {
- if (directiveNames[i].startsWith(nameString) || documentPosition <= begin) {
- request.addProposal(new CustomCompletionProposal(directiveNames[i], begin,
- length, directiveNames[i].length(),
- JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_JSP),
- directiveNames[i], null, null, XMLRelevanceConstants.R_JSP));
- }
- }
- }
- // by default, JSP_DIRECTIVE_NAME
- else {
- if (request == null) {
- request = new ContentAssistRequest(xmlnode, xmlnode, sdRegion,
- completionRegion, sdRegion.getStartOffset(completionRegion),
- completionRegion.getTextLength(), matchString);
- }
- //add each of the directive names as a proposal
- for (int i = 0; i < directiveNames.length; i++) {
- if (directiveNames[i].startsWith(matchString)) {
- request.addProposal(new CustomCompletionProposal(
- directiveNames[i], request.getReplacementBeginPosition(),
- request.getReplacementLength(), directiveNames[i].length(),
- JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_JSP),
- directiveNames[i], null, null, XMLRelevanceConstants.R_JSP));
- }
- }
- }
- }
- else if ((completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME &&
- documentPosition > sdRegion.getTextEndOffset(completionRegion)) ||
- (completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE &&
- documentPosition <= sdRegion.getStartOffset(completionRegion))) {
-
- if (request == null) {
- request = computeAttributeProposals(matchString, completionRegion,
- treeNode, xmlnode, context);
- }
- }
- // no name?: <%@ %>
- else if (completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE &&
- documentPosition <= sdRegion.getStartOffset(completionRegion)) {
- if (request != null) {
- request = computeAttributeProposals(matchString, completionRegion, treeNode,
- xmlnode, context);
- }
- Iterator regions = sdRegion.getRegions().iterator();
- String nameString = null;
- while (regions.hasNext()) {
- ITextRegion region = (ITextRegion) regions.next();
- if (region.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- nameString = sdRegion.getText(region);
- break;
- }
- }
- if (nameString == null) {
- for (int i = 0; i < directiveNames.length; i++) {
- request.addProposal(new CustomCompletionProposal(
- directiveNames[i], request.getReplacementBeginPosition(),
- request.getReplacementLength(), directiveNames[i].length(),
- JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_JSP),
- directiveNames[i], null, null, XMLRelevanceConstants.R_JSP));
- }
- }
- }
-
- return request;
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer#addAttributeValueProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addAttributeValueProposals(
- ContentAssistRequest contentAssistRequest,
- CompletionProposalInvocationContext context) {
-
- //nothing to suggest here
- }
-
- /**
- * @param doc determine if this doc is XML format
- * @return <code>true</code> if the given doc is of XML format, <code>false</code> otherwise.
- */
- private boolean isXMLFormat(Document doc) {
- if (doc == null)
- return false;
- Element docElement = doc.getDocumentElement();
- return docElement != null && ((docElement.getNodeName().equals("jsp:root")) || //$NON-NLS-1$
- ((((IDOMNode) docElement).getStartStructuredDocumentRegion() == null &&
- ((IDOMNode) docElement).getEndStructuredDocumentRegion() == null))) ||
- declaresNameSpacesInRoot(docElement);
- }
-
- private boolean declaresNameSpacesInRoot(Element docElement) {
- if (docElement.hasAttribute("xmlns:jsp"))
- return true;
- NamedNodeMap attributes = docElement.getAttributes();
- for (int i = 0; i < attributes.getLength(); i++) {
- Attr attr = (Attr) attributes.item(i);
- String prefix = attr.getPrefix();
- if (prefix != null && "xmlns".equals(prefix)) {
- return true;
- }
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistHelper.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistHelper.java
deleted file mode 100644
index 1bbb4c4abe..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistHelper.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.ui.internal.contentassist;
-
-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.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.text.IDocument;
-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.IStructuredDocumentRegion;
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-
-/**
- * <p>Helpful utility methods for JSP content assist</p>
- */
-public class JSPContentAssistHelper {
- /**
- * Returns project request is in
- *
- * @param request
- * @return {@link IResource} representing the project the given request was made in
- */
- public static IResource getResource(ContentAssistRequest request) {
- IResource resource = null;
- String baselocation = null;
-
- if (request != null) {
- IStructuredDocumentRegion region = request.getDocumentRegion();
- if (region != null) {
- IDocument document = region.getParentDocument();
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- if (model != null) {
- baselocation = model.getBaseLocation();
- }
- } finally {
- if (model != null)
- model.releaseFromRead();
- }
- }
- }
-
- if (baselocation != null) {
- // copied from JSPTranslationAdapter#getJavaProject
- IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
- IPath filePath = new Path(baselocation);
- IFile file = null;
-
- if (filePath.segmentCount() > 1) {
- file = root.getFile(filePath);
- }
- if (file != null) {
- resource = file.getProject();
- }
- }
- return resource;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
deleted file mode 100644
index 892f559087..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPContentAssistProcessor.java
+++ /dev/null
@@ -1,1149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.Vector;
-
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.ITextViewerExtension5;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-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.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache;
-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.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.text.IJSPPartitions;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImageHelper;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImages;
-import org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeIdsJSP;
-import org.eclipse.wst.css.ui.internal.contentassist.CSSContentAssistProcessor;
-import org.eclipse.wst.html.core.internal.contentmodel.JSPCMDocument;
-import org.eclipse.wst.html.core.text.IHTMLPartitions;
-import org.eclipse.wst.html.ui.StructuredTextViewerConfigurationHTML;
-import org.eclipse.wst.html.ui.internal.contentassist.HTMLContentAssistProcessor;
-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.IModelManager;
-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.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.IStructuredPartitioning;
-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.text.IStructuredPartitions;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-import org.eclipse.wst.sse.ui.internal.IReleasable;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceCompletionProposal;
-import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceConstants;
-import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryProvider;
-import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryRegistry;
-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.ModelQuery;
-import org.eclipse.wst.xml.core.internal.modelquery.ModelQueryUtil;
-import org.eclipse.wst.xml.core.internal.parser.XMLSourceParser;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocType;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMDocumentTracker;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMNodeWrapper;
-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 org.eclipse.wst.xml.core.text.IXMLPartitions;
-import org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor;
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-import org.eclipse.wst.xml.ui.internal.contentassist.ProposalComparator;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLContentAssistProcessor;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLContentAssistUtilities;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLContentModelGenerator;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLRelevanceConstants;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Adds proposals not normally covered by the generic behavior with the
- * content model
- *
- * @deprecated This class is no longer used locally and will be removed in the future
- * @see JSPStructuredContentAssistProcessor
- */
-public class JSPContentAssistProcessor extends AbstractContentAssistProcessor {
-
- protected int depthCount = 0;
- protected ITextViewer fViewer = null;
- protected boolean useEmbeddedResults = true;
- protected boolean isInternalAdapter = false;
- protected HashMap fNameToProcessorMap = null;
- protected HashMap fPartitionToProcessorMap = null;
- private final ICompletionProposal[] EMPTY_PROPOSAL_SET = new ICompletionProposal[0];
- private JSPTemplateCompletionProcessor fTemplateProcessor = null;
- private List fTemplateContexts = new ArrayList();
- private IContentAssistProcessor fJSContentAssistProcessor;
-
- public JSPContentAssistProcessor() {
- super();
- initNameToProcessorMap();
- initPartitionToProcessorMap();
- }
-
- /**
- * init map for extra content assist processors (useBean,
- * get/setProperty). points [tagname > processor]
- */
- protected void initNameToProcessorMap() {
- fNameToProcessorMap = new HashMap();
- JSPPropertyContentAssistProcessor jspPropertyCAP = new JSPPropertyContentAssistProcessor();
- fNameToProcessorMap.put(JSP11Namespace.ElementName.SETPROPERTY, jspPropertyCAP);
- fNameToProcessorMap.put(JSP11Namespace.ElementName.GETPROPERTY, jspPropertyCAP);
- fNameToProcessorMap.put(JSP11Namespace.ElementName.USEBEAN, new JSPUseBeanContentAssistProcessor());
- fNameToProcessorMap.put(JSP11Namespace.ElementName.DIRECTIVE_TAGLIB, new JSPTaglibDirectiveContentAssistProcessor());
- }
-
- /**
- * int map that points [partition > processor]. This takes place of
- * embedded adapters for now.
- */
- protected void initPartitionToProcessorMap() {
- fPartitionToProcessorMap = new HashMap();
- HTMLContentAssistProcessor htmlProcessor = new HTMLContentAssistProcessor();
- JSPJavaContentAssistProcessor jspJavaProcessor = new JSPJavaContentAssistProcessor();
- XMLContentAssistProcessor xmlProcessor = new XMLContentAssistProcessor();
- IContentAssistProcessor javascriptProcessor = getJSContentAssistProcessor();
-
- fPartitionToProcessorMap.put(IHTMLPartitions.HTML_DEFAULT, htmlProcessor);
- fPartitionToProcessorMap.put(IXMLPartitions.XML_DEFAULT, xmlProcessor);
- fPartitionToProcessorMap.put(IStructuredPartitions.DEFAULT_PARTITION, htmlProcessor);
- fPartitionToProcessorMap.put(IJSPPartitions.JSP_DEFAULT, jspJavaProcessor);
- fPartitionToProcessorMap.put(IJSPPartitions.JSP_DIRECTIVE, xmlProcessor);
- fPartitionToProcessorMap.put(IHTMLPartitions.HTML_COMMENT, htmlProcessor);
- fPartitionToProcessorMap.put(IJSPPartitions.JSP_DEFAULT_EL, jspJavaProcessor);
- if (javascriptProcessor != null) {
- fPartitionToProcessorMap.put(IJSPPartitions.JSP_CONTENT_JAVASCRIPT, javascriptProcessor);
- fPartitionToProcessorMap.put(IHTMLPartitions.SCRIPT, javascriptProcessor); // default
- }
- // to
- // javascript
- // for
- // all
- // script
- }
-
- protected void addCommentProposal(ContentAssistRequest contentAssistRequest) {
- // do nothing
- }
-
- protected void addDocTypeProposal(ContentAssistRequest contentAssistRequest) {
- // do nothing
- }
-
- protected void addEmptyDocumentProposals(ContentAssistRequest contentAssistRequest) {
- if (ContentTypeIdForJSP.ContentTypeID_JSPTAG.equals(((IDOMNode) contentAssistRequest.getNode()).getModel().getContentTypeIdentifier())) {
- addTemplates(contentAssistRequest, TemplateContextTypeIdsJSP.NEW_TAG);
- }
- else {
- addTemplates(contentAssistRequest, TemplateContextTypeIdsJSP.NEW);
- }
-
- super.addEmptyDocumentProposals(contentAssistRequest);
- addTagInsertionProposals(contentAssistRequest, 0);
- }
-
- protected void addEndTagNameProposals(ContentAssistRequest contentAssistRequest) {
- // do nothing
- }
-
- protected void addPCDATAProposal(String nodeName, ContentAssistRequest contentAssistRequest) {
- // do nothing
- }
-
- protected void addStartDocumentProposals(ContentAssistRequest contentAssistRequest) {
- // do nothing
- }
-
- protected void addTagCloseProposals(ContentAssistRequest contentAssistRequest) {
- // do nothing
- }
-
- protected void addXMLProposal(ContentAssistRequest contentAssistRequest) {
- // do nothing
- }
-
- protected void addEndTagProposals(ContentAssistRequest contentAssistRequest) {
- // do nothing
- }
-
- protected void addAttributeNameProposals(ContentAssistRequest contentAssistRequest) {
- addTemplates(contentAssistRequest, TemplateContextTypeIdsJSP.ATTRIBUTE);
- }
-
- /**
- * add proposals for tags in attribute values
- */
- protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
- addTemplates(contentAssistRequest, TemplateContextTypeIdsJSP.ATTRIBUTE_VALUE);
-
- IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
-
- // add JSP extra proposals from JSPBeanInfoContentAssistProcessor
- // JSPPropertyContentAssistProcessor
-
- // 2.1
- // get results from JSPUseBean and JSPProperty here
- // (look up processor in a map based on node name)
- JSPDummyContentAssistProcessor extraProcessor = (JSPDummyContentAssistProcessor) fNameToProcessorMap.get(node.getNodeName());
- if (extraProcessor != null && contentAssistRequest != null) {
- extraProcessor.addAttributeValueProposals(contentAssistRequest);
- }
-
- ModelQuery mq = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
- if (mq != null) {
- CMDocument doc = mq.getCorrespondingCMDocument(node);
- // this shouldn't have to have the prefix coded in
- if (doc instanceof JSPCMDocument || doc instanceof CMNodeWrapper || node.getNodeName().startsWith("jsp:")) //$NON-NLS-1$
- return;
- }
-
- // Find the attribute name for which this position should have a value
- IStructuredDocumentRegion open = node.getFirstStructuredDocumentRegion();
- ITextRegionList openRegions = open.getRegions();
- int i = openRegions.indexOf(contentAssistRequest.getRegion());
- if (i < 0)
- return;
- ITextRegion nameRegion = null;
- while (i >= 0) {
- nameRegion = openRegions.get(i--);
- if (nameRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)
- break;
- }
-
- // on an empty value, add all the JSP and taglib tags
- CMElementDeclaration elementDecl = getCMElementDeclaration(node);
- if (nameRegion != null && elementDecl != null) {
- String attributeName = open.getText(nameRegion);
- if (attributeName != null) {
- String currentValue = node.getAttributes().getNamedItem(attributeName).getNodeValue();
-
- if(currentValue == null || currentValue.length() == 0) { //$NON-NLS-1$
- List additionalElements = ModelQueryUtil.getModelQuery(node.getOwnerDocument()).getAvailableContent((Element) node, elementDecl, ModelQuery.INCLUDE_ATTRIBUTES);
- for (i = 0; i < additionalElements.size(); i++) {
- Object additionalElement = additionalElements.get(i);
- if(additionalElement instanceof CMElementDeclaration) {
- CMElementDeclaration ed = (CMElementDeclaration) additionalElement;
-
- String tagname = getContentGenerator().getRequiredName(node, ed);
- StringBuffer contents = new StringBuffer("\""); //$NON-NLS-1$
- getContentGenerator().generateTag(node, ed, contents);
- contents.append('"'); //$NON-NLS-1$
- CustomCompletionProposal proposal = new CustomCompletionProposal(contents.toString(), contentAssistRequest.getReplacementBeginPosition(), contentAssistRequest.getReplacementLength(), contents.length(), JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_GENERIC), tagname, null, null, XMLRelevanceConstants.R_JSP_ATTRIBUTE_VALUE);
- contentAssistRequest.addProposal(proposal);
- }
- }
-
- }
- }
- }
- else if (contentAssistRequest.getRegion().getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- try {
- // Create a new model for Content Assist to operate on. This
- // will simulate
- // a full Document and then adjust the offset numbers in the
- // list of results.
- IStructuredModel internalModel = null;
- IModelManager mmanager = StructuredModelManager.getModelManager();
- internalModel = mmanager.createUnManagedStructuredModelFor(ContentTypeIdForJSP.ContentTypeID_JSP);
- IDOMNode xmlNode = null;
- IDOMModel xmlOuterModel = null;
- if (contentAssistRequest.getNode() instanceof IDOMNode) {
- xmlNode = (IDOMNode) contentAssistRequest.getNode();
- xmlOuterModel = xmlNode.getModel();
- internalModel.setResolver(xmlOuterModel.getResolver());
- internalModel.setBaseLocation(xmlOuterModel.getBaseLocation());
- }
- String contents = StringUtils.strip(contentAssistRequest.getText());
- if (xmlNode != null && contents != null) {
- int additionalShifts = 0;
- // Be sure that custom tags from taglibs also show up
- // by
- // adding taglib declarations to the internal model.
- TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(xmlOuterModel.getStructuredDocument());
- if (mgr != null) {
- List trackers = mgr.getCMDocumentTrackers(contentAssistRequest.getReplacementBeginPosition());
- if (trackers != null) {
- for (i = 0; i < trackers.size(); i++) {
- CMDocumentTracker tracker = (CMDocumentTracker) trackers.get(i);
- String declaration = tracker.getStructuredDocumentRegion().getText();
- if (declaration != null) {
- contents = declaration + contents;
- additionalShifts += declaration.length();
- }
- }
- }
- }
- // Also copy any jsp:useBean tags so that
- // jsp:[gs]etProperty will function
- Document doc = null;
- if (contentAssistRequest.getNode().getNodeType() == Node.DOCUMENT_NODE)
- doc = (Document) node;
- else
- doc = node.getOwnerDocument();
- NodeList useBeans = doc.getElementsByTagName(JSP12Namespace.ElementName.USEBEAN);
- for (int k = 0; k < useBeans.getLength(); k++) {
- IDOMNode useBean = (IDOMNode) useBeans.item(k);
- if (useBean.getStartOffset() < contentAssistRequest.getReplacementBeginPosition()) {
- StringBuffer useBeanText = new StringBuffer("<jsp:useBean"); //$NON-NLS-1$
- for (int j = 0; j < useBean.getAttributes().getLength(); j++) {
- Attr attr = (Attr) useBean.getAttributes().item(j);
- useBeanText.append(' ');
- useBeanText.append(attr.getName());
- useBeanText.append("=\""); //$NON-NLS-1$
- useBeanText.append(attr.getValue());
- useBeanText.append('"');
- }
- useBeanText.append("/>"); //$NON-NLS-1$
- additionalShifts += useBeanText.length();
- contents = useBeanText.toString() + contents;
- }
- }
- internalModel.getStructuredDocument().set(contents);
- int internalOffset = 0;
- boolean quoted = false;
- // if quoted, use position inside and shift by one
- if (contentAssistRequest.getMatchString().length() > 0 && (contentAssistRequest.getMatchString().charAt(0) == '\'' || contentAssistRequest.getMatchString().charAt(0) == '"')) {
- internalOffset = contentAssistRequest.getMatchString().length() - 1 + additionalShifts;
- quoted = true;
- }
- // if unquoted, use position inside
- else if (contentAssistRequest.getMatchString().length() > 0 && contentAssistRequest.getMatchString().charAt(0) == '<')
- internalOffset = contentAssistRequest.getMatchString().length() + additionalShifts;
- else
- internalOffset = contentAssistRequest.getReplacementBeginPosition() - contentAssistRequest.getStartOffset() + additionalShifts;
- depthCount++;
- IndexedRegion internalNode = null;
- int tmpOffset = internalOffset;
- while (internalNode == null && tmpOffset >= 0)
- internalNode = internalModel.getIndexedRegion(tmpOffset--);
-
- if (internalModel.getFactoryRegistry() != null) {
- // set up the internal model
- if (internalModel.getFactoryRegistry().getFactoryFor(PageDirectiveAdapter.class) == null) {
- internalModel.getFactoryRegistry().addFactory(new PageDirectiveAdapterFactory());
- }
- PageDirectiveAdapter outerEmbeddedTypeAdapter = (PageDirectiveAdapter) xmlOuterModel.getDocument().getAdapterFor(PageDirectiveAdapter.class);
- PageDirectiveAdapter internalEmbeddedTypeAdapter = (PageDirectiveAdapter) ((INodeNotifier) ((Node) internalNode).getOwnerDocument()).getAdapterFor(PageDirectiveAdapter.class);
- internalEmbeddedTypeAdapter.setEmbeddedType(outerEmbeddedTypeAdapter.getEmbeddedType());
- }
-
- AdapterFactoryRegistry adapterRegistry = JSPUIPlugin.getDefault().getAdapterFactoryRegistry();
- Iterator adapterList = adapterRegistry.getAdapterFactories();
- // And all those appropriate for this particular type
- // of content
- while (adapterList.hasNext()) {
- try {
- AdapterFactoryProvider provider = (AdapterFactoryProvider) adapterList.next();
- if (provider.isFor(internalModel.getModelHandler())) {
- provider.addAdapterFactories(internalModel);
- }
- }
- catch (Exception e) {
- Logger.logException(e);
- }
- }
-
- /**
- * the internal adapter does all the real work of using
- * the JSP content model to form proposals
- */
- ICompletionProposal[] results = null;
- depthCount--;
- if (results != null) {
- for (i = 0; i < results.length; i++) {
- contentAssistRequest.addProposal(new CustomCompletionProposal(((CustomCompletionProposal) results[i]).getReplacementString(), ((CustomCompletionProposal) results[i]).getReplacementOffset() - additionalShifts + contentAssistRequest.getStartOffset() + (quoted ? 1 : 0), ((CustomCompletionProposal) results[i]).getReplacementLength(), ((CustomCompletionProposal) results[i]).getCursorPosition(), results[i].getImage(), results[i].getDisplayString(), ((CustomCompletionProposal) results[i]).getContextInformation(), ((CustomCompletionProposal) results[i]).getAdditionalProposalInfo(), (results[i] instanceof IRelevanceCompletionProposal) ? ((IRelevanceCompletionProposal) results[i]).getRelevance() : IRelevanceConstants.R_NONE));
- }
- }
- }
- }
- catch (Exception e) {
- Logger.logException("Error in embedded JSP Content Assist", e); //$NON-NLS-1$
- }
- }
-
-
- }
-
- /**
- * For JSP files and segments, this is just the JSP
- * document, but when editing tag files and their fragments, it
- * should be the tag document.
- *
- * It may also vary based on the model being edited in the future.
- *
- * @return the default non-embedded CMDocument for the document being
- * edited.
- */
- CMDocument getDefaultJSPCMDocument(IDOMNode node) {
- // handle tag files here
- String contentType = node.getModel().getContentTypeIdentifier();
- if (ContentTypeIdForJSP.ContentTypeID_JSPTAG.equals(contentType))
- return JSPCMDocumentFactory.getCMDocument(CMDocType.TAG20_DOC_TYPE);
-
- CMDocument jcmdoc = null;
- String modelPath = node.getModel().getBaseLocation();
- if (modelPath != null && !IModelManager.UNMANAGED_MODEL.equals(modelPath)) {
- float version = DeploymentDescriptorPropertyCache.getInstance().getJSPVersion(new Path(modelPath));
- jcmdoc = JSPCMDocumentFactory.getCMDocument(version);
- }
- if (jcmdoc == null) {
- jcmdoc = JSPCMDocumentFactory.getCMDocument();
- }
-
- return jcmdoc;
- }
-
- protected void init() {
- super.init();
- }
-
- public void setErrorMessage(String errorMessage) {
- if (depthCount == 0)
- fErrorMessage = errorMessage;
- }
-
- /**
- * This method is acting as a "catch all" for pulling together content
- * assist proposals from different Processors when document partitioning
- * alone couldn't determine definitively what content assist should show
- * up at that particular position in the document
- *
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(ITextViewer,
- * int)
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentPosition) {
- fTemplateContexts.clear();
-
- IStructuredDocumentRegion sdRegion = ContentAssistUtils.getStructuredDocumentRegion(viewer, documentPosition);
- fViewer = viewer;
- ICompletionProposal[] jspResults = EMPTY_PROPOSAL_SET;
- ICompletionProposal[] embeddedResults = EMPTY_PROPOSAL_SET;
-
- // check the actual partition type
- String partitionType = getPartitionType(viewer, documentPosition);
- IStructuredDocument structuredDocument = (IStructuredDocument) viewer.getDocument();
-
- IStructuredDocumentRegion fn = structuredDocument.getRegionAtCharacterOffset(documentPosition);
-
- // ////////////////////////////////////////////////////////////////////////////
- // ANOTHER WORKAROUND UNTIL PARTITIONING TAKES CARE OF THIS
- // check for xml-jsp tags...
- if (partitionType == IJSPPartitions.JSP_DIRECTIVE && fn != null) {
- IStructuredDocumentRegion possibleXMLJSP = ((fn.getType() == DOMRegionContext.XML_CONTENT) && fn.getPrevious() != null) ? fn.getPrevious() : fn;
- ITextRegionList regions = possibleXMLJSP.getRegions();
- if (regions.size() > 1) {
- // check bounds cases
- ITextRegion xmlOpenOrClose = regions.get(0);
- if (xmlOpenOrClose.getType() == DOMRegionContext.XML_TAG_OPEN && documentPosition == possibleXMLJSP.getStartOffset()) {
- // do regular jsp content assist
- }
- else if (xmlOpenOrClose.getType() == DOMRegionContext.XML_END_TAG_OPEN && documentPosition > possibleXMLJSP.getStartOffset()) {
- // do regular jsp content assist
- }
- else {
- // possible xml-jsp
- ITextRegion nameRegion = regions.get(1);
- String name = possibleXMLJSP.getText(nameRegion);
- if (name.equals("jsp:scriptlet") || name.equals("jsp:expression") || name.equals("jsp:declaration")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return getJSPJavaCompletionProposals(viewer, documentPosition);
- }
- }
- }
- }
-
- // ////////////////////////////////////////////////////////////////////////////
- // ** THIS IS A TEMP FIX UNTIL PARTITIONING TAKES CARE OF THIS...
- // check for XML-JSP in a <script> region
- if (partitionType == IJSPPartitions.JSP_CONTENT_JAVASCRIPT || partitionType == IHTMLPartitions.SCRIPT) {
- // fn should be block text
- IStructuredDocumentRegion decodedSDRegion = decodeScriptBlock(fn.getFullText());
- // System.out.println("decoded > " +
- // blockOfText.substring(decodedSDRegion.getStartOffset(),
- // decodedSDRegion.getEndOffset()));
- if (decodedSDRegion != null) {
- IStructuredDocumentRegion sdr = decodedSDRegion;
- while (sdr != null) {
- // System.out.println("sdr " + sdr.getType());
- // System.out.println("sdr > " +
- // blockOfText.substring(sdr.getStartOffset(),
- // sdr.getEndOffset()));
- if (sdr.getType() == DOMJSPRegionContexts.JSP_CONTENT) {
- if (documentPosition >= fn.getStartOffset() + sdr.getStartOffset() && documentPosition <= fn.getStartOffset() + sdr.getEndOffset()) {
- return getJSPJavaCompletionProposals(viewer, documentPosition);
- }
- }
- else if (sdr.getType() == DOMRegionContext.XML_TAG_NAME) {
- if (documentPosition > fn.getStartOffset() + sdr.getStartOffset() && documentPosition < fn.getStartOffset() + sdr.getEndOffset()) {
- return EMPTY_PROPOSAL_SET;
- }
- else if (documentPosition == fn.getStartOffset() + sdr.getEndOffset() && sdr.getNext() != null && sdr.getNext().getType() == DOMJSPRegionContexts.JSP_CONTENT) {
- // the end of an open tag <script>
- // <jsp:scriptlet>| blah </jsp:scriptlet>
- return getJSPJavaCompletionProposals(viewer, documentPosition);
- }
- else if (documentPosition == fn.getStartOffset() + sdr.getStartOffset() && sdr.getPrevious() != null && sdr.getPrevious().getType() == DOMRegionContext.XML_TAG_NAME) {
- return getJSPJavaCompletionProposals(viewer, documentPosition);
- }
- }
- sdr = sdr.getNext();
- }
- }
- }
- // /////////////////////////////////////////////////////////////////////////
- // check special JSP delimiter cases
- if (fn != null && partitionType == IJSPPartitions.JSP_CONTENT_DELIMITER) {
- IStructuredDocumentRegion fnDelim = fn;
-
- // if it's a nested JSP region, need to get the correct
- // StructuredDocumentRegion
- // not sure why this check was there...
- // if (fnDelim.getType() == XMLRegionContext.BLOCK_TEXT) {
- Iterator blockRegions = fnDelim.getRegions().iterator();
- ITextRegion temp = null;
- ITextRegionContainer trc;
- while (blockRegions.hasNext()) {
- temp = (ITextRegion) blockRegions.next();
- // we hit a nested
- if (temp instanceof ITextRegionContainer) {
- trc = (ITextRegionContainer) temp;
- // it's in this region
- if (documentPosition >= trc.getStartOffset() && documentPosition < trc.getEndOffset()) {
- Iterator nestedJSPRegions = trc.getRegions().iterator();
- while (nestedJSPRegions.hasNext()) {
- temp = (ITextRegion) nestedJSPRegions.next();
- if (XMLContentAssistUtilities.isJSPOpenDelimiter(temp.getType()) && documentPosition == trc.getStartOffset(temp)) {
- // HTML content assist
- // we actually want content assist for the
- // previous type of region,
- // well get those proposals from the embedded
- // adapter
- if (documentPosition > 0) {
- partitionType = getPartitionType(viewer, documentPosition - 1);
- break;
- }
- }
- else if (XMLContentAssistUtilities.isJSPCloseDelimiter(temp.getType()) && documentPosition == trc.getStartOffset(temp)) {
- // JSP content assist
- return getJSPJavaCompletionProposals(viewer, documentPosition);
- }
- }
- }
- }
- // }
- }
-
- // take care of XML-JSP delimter cases
- if (XMLContentAssistUtilities.isXMLJSPDelimiter(fnDelim)) {
- // since it's a delimiter, we know it's a ITextRegionContainer
- ITextRegion firstRegion = fnDelim.getRegions().get(0);
- if (fnDelim.getStartOffset() == documentPosition && (firstRegion.getType() == DOMRegionContext.XML_TAG_OPEN)) {
- // |<jsp:scriptlet> </jsp:scriptlet>
- // (pa) commented out so that we get regular behavior JSP
- // macros etc...
- // return getHTMLCompletionProposals(viewer,
- // documentPosition);
- }
- else if (fnDelim.getStartOffset() == documentPosition && (firstRegion.getType() == DOMRegionContext.XML_END_TAG_OPEN)) {
- // <jsp:scriptlet> |</jsp:scriptlet>
- // check previous partition type to see if it's JAVASCRIPT
- // if it is, we're just gonna let the embedded JAVASCRIPT
- // adapter get the proposals
- if (documentPosition > 0) {
- String checkType = getPartitionType(viewer, documentPosition - 1);
- if (checkType != IJSPPartitions.JSP_CONTENT_JAVASCRIPT) { // this
- // check
- // is
- // failing
- // for
- // XML-JSP
- // (region
- // is
- // not
- // javascript...)
- return getJSPJavaCompletionProposals(viewer, documentPosition);
- }
- partitionType = IJSPPartitions.JSP_CONTENT_JAVASCRIPT;
- }
- }
- else if ((firstRegion.getType() == DOMRegionContext.XML_TAG_OPEN) && documentPosition >= fnDelim.getEndOffset()) {
- // anything else inbetween
- return getJSPJavaCompletionProposals(viewer, documentPosition);
- }
- }
- else if (XMLContentAssistUtilities.isJSPDelimiter(fnDelim)) {
- // the delimiter <%, <%=, <%!, ...
- if (XMLContentAssistUtilities.isJSPCloseDelimiter(fnDelim)) {
- if (documentPosition == fnDelim.getStartOffset()) {
- // check previous partition type to see if it's
- // JAVASCRIPT
- // if it is, we're just gonna let the embedded
- // JAVASCRIPT adapter get the proposals
- if (documentPosition > 0) {
- String checkType = getPartitionType(viewer, documentPosition - 1);
- if (checkType != IJSPPartitions.JSP_CONTENT_JAVASCRIPT) {
- return getJSPJavaCompletionProposals(viewer, documentPosition);
- }
- partitionType = IJSPPartitions.JSP_CONTENT_JAVASCRIPT;
- }
- }
- }
- else if (XMLContentAssistUtilities.isJSPOpenDelimiter(fnDelim)) {
- // if it's the first position of open delimiter
- // use embedded HTML results
- if (documentPosition == fnDelim.getStartOffset()) {
- embeddedResults = getHTMLCompletionProposals(viewer, documentPosition);
- }
- else if (documentPosition == fnDelim.getEndOffset()) {
- // it's at the EOF <%|
- return getJSPJavaCompletionProposals(viewer, documentPosition);
- }
- }
- }
- }
-
- // need to check if it's JSP region inside of CDATA w/ no region
- // <![CDATA[ <%|%> ]]>
- // or a comment region
- // <!-- <% |%> -->
- if (fn != null && (fn.getType() == DOMRegionContext.XML_CDATA_TEXT || fn.getType() == DOMRegionContext.XML_COMMENT_TEXT)) {
- if (fn instanceof ITextRegionContainer) {
- Object[] cdataRegions = fn.getRegions().toArray();
- ITextRegion r = null;
- ITextRegion jspRegion = null;
- for (int i = 0; i < cdataRegions.length; i++) {
- r = (ITextRegion) cdataRegions[i];
- if (r instanceof ITextRegionContainer) {
- // CDATA embedded container, or comment container
- Object[] jspRegions = ((ITextRegionContainer) r).getRegions().toArray();
- for (int j = 0; j < jspRegions.length; j++) {
- jspRegion = (ITextRegion) jspRegions[j];
- if (jspRegion.getType() == DOMJSPRegionContexts.JSP_CLOSE) {
- if (sdRegion.getStartOffset(jspRegion) == documentPosition)
- return getJSPJavaCompletionProposals(viewer, documentPosition);
- }
- }
- }
- }
-
- }
- }
-
- // check if it's in an attribute value, if so, don't add CDATA
- // proposal
- ITextRegion attrContainer = (fn != null) ? fn.getRegionAtCharacterOffset(documentPosition) : null;
- if (attrContainer != null && attrContainer instanceof ITextRegionContainer) {
- if (attrContainer.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- // test location of the cursor
- // return null if it's in the middle of an open/close
- // delimeter
- Iterator attrRegions = ((ITextRegionContainer) attrContainer).getRegions().iterator();
- ITextRegion testRegion = null;
- while (attrRegions.hasNext()) {
- testRegion = (ITextRegion) attrRegions.next();
- // need to check for other valid attribute regions
- if (XMLContentAssistUtilities.isJSPOpenDelimiter(testRegion.getType())) {
- if (!(((ITextRegionContainer) attrContainer).getEndOffset(testRegion) <= documentPosition))
- return EMPTY_PROPOSAL_SET;
- }
- else if (XMLContentAssistUtilities.isJSPCloseDelimiter(testRegion.getType())) {
- if (!(((ITextRegionContainer) attrContainer).getStartOffset(testRegion) >= documentPosition))
- return EMPTY_PROPOSAL_SET;
- }
- }
- // TODO: handle non-Java code such as nested tags
- if (testRegion.getType().equals(DOMJSPRegionContexts.JSP_CONTENT))
- return getJSPJavaCompletionProposals(viewer, documentPosition);
- return EMPTY_PROPOSAL_SET;
- }
- }
-
- IContentAssistProcessor p = (IContentAssistProcessor) fPartitionToProcessorMap.get(partitionType);
- if (p != null) {
- embeddedResults = p.computeCompletionProposals(viewer, documentPosition);
- // get bean methods, objects, and constants if there are any...
- if (partitionType == IJSPPartitions.JSP_CONTENT_JAVASCRIPT || partitionType == IHTMLPartitions.SCRIPT) {
- ICompletionProposal[] beanResults = getJSPJavaBeanProposals(viewer, documentPosition);
- if (beanResults != null && beanResults.length > 0) {
- ICompletionProposal[] added = new ICompletionProposal[beanResults.length + embeddedResults.length];
- System.arraycopy(beanResults, 0, added, 0, beanResults.length);
- System.arraycopy(embeddedResults, 0, added, beanResults.length, embeddedResults.length);
- embeddedResults = added;
- }
- }
- }
- else {
- // the partition type is probably not mapped
- }
-
- // fix for:
- // HTML content assist give JSP tags in between empty script tags
- if (!((getJSContentAssistProcessor() != null && getJSContentAssistProcessor().getClass().isInstance(p)) || p instanceof CSSContentAssistProcessor)) {
- fTemplateContexts.clear();
- jspResults = super.computeCompletionProposals(viewer, documentPosition);
- }
-
- //merge the embedded results
- if (useEmbeddedResults && embeddedResults != null && embeddedResults.length > 0) {
- jspResults = merge(jspResults, embeddedResults);
- }
- if (jspResults == null)
- jspResults = EMPTY_PROPOSAL_SET;
- setErrorMessage(jspResults.length == 0 ? UNKNOWN_CONTEXT : null);
-
- // fix for:
- // check for |<%-- --%> first position of jsp comment
- if (partitionType == IJSPPartitions.JSP_COMMENT) {
- if (sdRegion.getStartOffset() == documentPosition) {
- ICompletionProposal[] htmlResults = getHTMLCompletionProposals(viewer, documentPosition);
- jspResults = merge(jspResults, htmlResults);
- }
- }
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=86656
- if (partitionType == IJSPPartitions.JSP_DIRECTIVE) {
- ICompletionProposal[] importProposals = getImportProposals(viewer, documentPosition);
- if (importProposals.length > 0)
- jspResults = merge(jspResults, importProposals);
- }
- return jspResults;
- }
-
- private ICompletionProposal[] getImportProposals(ITextViewer viewer, int documentPosition) {
- List importProposals = new ArrayList();
- ICompletionProposal[] proposals = getJSPJavaCompletionProposals(viewer, documentPosition);
- for (int i = 0; i < proposals.length; i++) {
- if (proposals[i] instanceof JSPCompletionProposal) {
-
- ICompletionProposal importProposal = adjustImportProposal((JSPCompletionProposal) proposals[i]);
- importProposals.add(importProposal);
- }
- }
- return (ICompletionProposal[]) importProposals.toArray(new ICompletionProposal[importProposals.size()]);
- }
-
-
- private ICompletionProposal adjustImportProposal(JSPCompletionProposal importProposal) {
-
- // just need to remove the ";"
- // and adjust offsets for the change
- String newReplace = importProposal.getReplacementString().replaceAll(";", ""); //$NON-NLS-1$ //$NON-NLS-2$
- importProposal.setReplacementString(newReplace);
-
- String newDisplay = importProposal.getDisplayString().replaceAll(";", ""); //$NON-NLS-1$ //$NON-NLS-2$
- importProposal.setDisplayString(newDisplay);
-
- int newReplacementLength = importProposal.getReplacementLength() - 1;
- if (newReplacementLength >= 0)
- importProposal.setReplacementLength(newReplacementLength);
-
- int newCursorPosition = importProposal.getCursorPosition() - 1;
- importProposal.setCursorPosition(newCursorPosition);
-
- return importProposal;
- }
-
- /**
- * Adds 2 arrays of {@link ICompletionProposal}s to a {@link TreeSet}
- * eliminating duplicates and sorting with a {@link ProposalComparator}
- * then returning the new merged, filtered, sorted, array of {@link ICompletionProposal}s.
- *
- * @param proposalsOne
- * @param proposalsTwo
- * @return a new merged, filtered, sorted array of {@link ICompletionProposal}s created from
- * the two given arrays of {@link ICompletionProposal}s.
- */
- private ICompletionProposal[] merge(ICompletionProposal[] proposalsOne, ICompletionProposal[] proposalsTwo) {
- Set results = new TreeSet(new ProposalComparator());
-
- if (proposalsOne != null) {
- for (int i = 0; i < proposalsOne.length; i++)
- results.add(proposalsOne[i]);
- }
- if (proposalsTwo != null) {
- for (int i = 0; i < proposalsTwo.length; i++)
- results.add(proposalsTwo[i]);
- }
-
- return (ICompletionProposal[]) results.toArray(new ICompletionProposal[results.size()]);
- }
-
- private IContentAssistProcessor getJSContentAssistProcessor() {
- if (fJSContentAssistProcessor == null) {
- fJSContentAssistProcessor = new StructuredTextViewerConfigurationHTML().getContentAssistant(null).getContentAssistProcessor(IHTMLPartitions.SCRIPT);
- }
- return fJSContentAssistProcessor;
- }
-
- /*
- * This method will return JSPJava Proposals that are relevant to any java
- * beans that in scope at the documentPosition
- *
- * TODO (pa) are taglib vars getting filtered?
- *
- * @param viewer @param documentPosition @return ICompletionProposal[]
- */
- private ICompletionProposal[] getJSPJavaBeanProposals(ITextViewer viewer, int documentPosition) {
- ICompletionProposal[] regularJSPResults = getJSPJavaCompletionProposals(viewer, documentPosition);
- Vector filteredProposals = new Vector();
- ICompletionProposal[] finalResults = EMPTY_PROPOSAL_SET;
- for (int i = 0; i < regularJSPResults.length; i++) {
- ICompletionProposal test = regularJSPResults[i];
-
- System.out.println("proposal > " + test.getDisplayString()); //$NON-NLS-1$
- System.out.println("relevance > " + ((CustomCompletionProposal) test).getRelevance()); //$NON-NLS-1$
-
- if (isRelevanceAllowed(((CustomCompletionProposal) test).getRelevance())) {
- filteredProposals.add(test);
- }
- }
- if (filteredProposals.size() > 0) {
- finalResults = new ICompletionProposal[filteredProposals.size()];
- Iterator it = filteredProposals.iterator();
- int j = 0;
- while (it.hasNext()) {
- finalResults[j++] = (ICompletionProposal) it.next();
- }
- }
- return finalResults;
- }
-
- // These are the only things I'm allowing for use bean if the language is
- // JAVASCRIPT
- // I'm filtering based on JavaContentAssistProposal relevance
- //
- // 485 > method that belongs to the bean
- // 486 > bean object
- // 386 > bean CONSTANT
- private boolean isRelevanceAllowed(int relevance) {
- return (relevance == 485 || relevance == 486 || relevance == 326);
- }
-
-
- /**
- *
- * @param viewer
- * @param documentPosition
- * @return ICompletionProposal[]
- */
- private ICompletionProposal[] getHTMLCompletionProposals(ITextViewer viewer, int documentPosition) {
-
- IContentAssistProcessor p = (IContentAssistProcessor) fPartitionToProcessorMap.get(IHTMLPartitions.HTML_DEFAULT);
- return p.computeCompletionProposals(viewer, documentPosition);
- }
-
- /**
- *
- * @param viewer
- * @param documentPosition
- * @return ICompletionProposal[]
- */
- protected ICompletionProposal[] getJSPJavaCompletionProposals(ITextViewer viewer, int documentPosition) {
- JSPJavaContentAssistProcessor p = (JSPJavaContentAssistProcessor) fPartitionToProcessorMap.get(IJSPPartitions.JSP_DEFAULT);
- return p.computeCompletionProposals(viewer, documentPosition);
- }
-
- /**
- * @param viewer
- * @param documentPosition
- * @return String
- */
- protected String getPartitionType(ITextViewer viewer, int documentPosition) {
- String partitionType = null;
- try {
- if (viewer instanceof ITextViewerExtension5)
- partitionType = TextUtilities.getContentType(viewer.getDocument(), IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING, ((ITextViewerExtension5) viewer).modelOffset2WidgetOffset(documentPosition), false);
- else
- partitionType = TextUtilities.getContentType(viewer.getDocument(), IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING, documentPosition, false);
- }
- catch (BadLocationException e) {
- partitionType = IDocument.DEFAULT_CONTENT_TYPE;
- }
- return partitionType;
- }
-
- /*
- * ** TEMP WORKAROUND FOR CMVC 241882 Takes a String and blocks out
- * jsp:scriptlet, jsp:expression, and jsp:declaration @param blockText
- * @return
- */
- private IStructuredDocumentRegion decodeScriptBlock(String blockText) {
- XMLSourceParser parser = new XMLSourceParser();
- // use JSP_CONTENT for region type
- parser.addBlockMarker(new BlockMarker("jsp:scriptlet", null, DOMJSPRegionContexts.JSP_CONTENT, false, false)); //$NON-NLS-1$
- parser.addBlockMarker(new BlockMarker("jsp:expression", null, DOMJSPRegionContexts.JSP_CONTENT, false, false)); //$NON-NLS-1$
- parser.addBlockMarker(new BlockMarker("jsp:declaration", null, DOMJSPRegionContexts.JSP_CONTENT, false, false)); //$NON-NLS-1$
- parser.reset(blockText);
- return parser.getDocumentRegions();
- }
-
- /*
- * @see ContentAssistAdapter#computeContextInformation(ITextViewer, int,
- * IndexedRegion)
- */
- public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset, IndexedRegion indexedNode) {
- return super.computeContextInformation(viewer, documentOffset);
- }
-
- /*
- * @see ContentAssistAdapter#getContextInformationAutoActivationCharacters()
- */
- public char[] getContextInformationAutoActivationCharacters() {
- return super.getContextInformationAutoActivationCharacters();
- }
-
-
- public char[] getCompletionProposalAutoActivationCharacters() {
- IContentAssistProcessor p = (IContentAssistProcessor) fPartitionToProcessorMap.get(IHTMLPartitions.HTML_DEFAULT);
- return p.getCompletionProposalAutoActivationCharacters();
- }
-
- /*
- * @see ContentAssistAdapter#getContextInformationValidator()
- */
- public IContextInformationValidator getContextInformationValidator() {
- return super.getContextInformationValidator();
- }
-
- protected boolean isXMLFormat(Document doc) {
- if (doc == null)
- return false;
- Element docElement = doc.getDocumentElement();
- return docElement != null && ((docElement.getNodeName().equals("jsp:root")) || ((((IDOMNode) docElement).getStartStructuredDocumentRegion() == null && ((IDOMNode) docElement).getEndStructuredDocumentRegion() == null))); //$NON-NLS-1$
- }
-
- /*
- * @see ContentAssistAdapter#release()
- */
- public void release() {
- super.release();
- // release *ContentAssistProcessors in maps
- // CMVC 254023
- releasePartitionToProcessorMap();
- releaseNameToProcessorMap();
- }
-
- protected void releasePartitionToProcessorMap() {
- releaseMap(fPartitionToProcessorMap);
- }
-
- protected void releaseNameToProcessorMap() {
- releaseMap(fNameToProcessorMap);
- }
-
- protected void releaseMap(HashMap map) {
- if (map != null) {
- if (!map.isEmpty()) {
- Iterator it = map.keySet().iterator();
- Object key = null;
- while (it.hasNext()) {
- key = it.next();
- if (map.get(key) instanceof IReleasable) {
- ((IReleasable) map.get(key)).release();
- }
- }
- }
- map.clear();
- map = null;
- }
- }
-
- /**
- * @see AbstractContentAssistProcessor#computeCompletionProposals(int,
- * String, ITextRegion, IDOMNode, IDOMNode)
- */
- protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode treeNode, IDOMNode xmlnode) {
-
- ContentAssistRequest request = super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
- IStructuredDocumentRegion sdRegion = ContentAssistUtils.getStructuredDocumentRegion(fTextViewer, documentPosition);
-
- Document doc = null;
- if (xmlnode != null) {
- if (xmlnode.getNodeType() == Node.DOCUMENT_NODE)
- doc = (Document) xmlnode;
- else
- doc = xmlnode.getOwnerDocument();
- }
- String[] directiveNames = {"page", "include", "taglib"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- // suggest JSP Expression inside of XML comments
- if (completionRegion.getType() == DOMRegionContext.XML_COMMENT_TEXT && !isXMLFormat(doc)) {
- if (request == null)
- request = newContentAssistRequest(treeNode, xmlnode, sdRegion, completionRegion, documentPosition, 0, ""); //$NON-NLS-1$
- request.addProposal(new CustomCompletionProposal("<%= %>", documentPosition, 0, 4, JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_GENERIC), "jsp:expression", null, "&lt;%= %&gt;", XMLRelevanceConstants.R_JSP)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
- // handle proposals in and around JSP_DIRECTIVE_OPEN and
- // JSP_DIRECTIVE_NAME
- else if ((completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN && documentPosition >= sdRegion.getTextEndOffset(completionRegion)) || (completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME && documentPosition <= sdRegion.getTextEndOffset(completionRegion))) {
- if (completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN) {
- if (request == null)
- request = newContentAssistRequest(xmlnode, xmlnode, sdRegion, completionRegion, documentPosition, 0, matchString);
- Iterator regions = sdRegion.getRegions().iterator();
- String nameString = null;
- int begin = request.getReplacementBeginPosition();
- int length = request.getReplacementLength();
- while (regions.hasNext()) {
- ITextRegion region = (ITextRegion) regions.next();
- if (region.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- nameString = sdRegion.getText(region);
- begin = sdRegion.getStartOffset(region);
- length = region.getTextLength();
- break;
- }
- }
- if (nameString == null)
- nameString = ""; //$NON-NLS-1$
- for (int i = 0; i < directiveNames.length; i++) {
- if (directiveNames[i].startsWith(nameString) || documentPosition <= begin)
- request.addProposal(new CustomCompletionProposal(directiveNames[i], begin, length, directiveNames[i].length(), JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_GENERIC), directiveNames[i], null, null, XMLRelevanceConstants.R_JSP));
- }
- }
- else { // by default, JSP_DIRECTIVE_NAME
- if (request == null)
- request = newContentAssistRequest(xmlnode, xmlnode, sdRegion, completionRegion, sdRegion.getStartOffset(completionRegion), completionRegion.getTextLength(), matchString);
- for (int i = 0; i < directiveNames.length; i++) {
- if (directiveNames[i].startsWith(matchString))
- request.addProposal(new CustomCompletionProposal(directiveNames[i], request.getReplacementBeginPosition(), request.getReplacementLength(), directiveNames[i].length(), JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_GENERIC), directiveNames[i], null, null, XMLRelevanceConstants.R_JSP));
- }
- }
- }
- else if ((completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME && documentPosition > sdRegion.getTextEndOffset(completionRegion)) || (completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE && documentPosition <= sdRegion.getStartOffset(completionRegion))) {
- if (request == null)
- request = computeAttributeProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
- super.addTagCloseProposals(request);
- // CMVC 274033, this is being added for all <jsp:* tags
- // in addAttributeNameProposals(contentAssistRequest)
- // super.addAttributeNameProposals(request);
- }
- // no name?: <%@ %>
- else if (completionRegion.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE && documentPosition <= sdRegion.getStartOffset(completionRegion)) {
- if (request != null)
- request = computeAttributeProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
- Iterator regions = sdRegion.getRegions().iterator();
- String nameString = null;
- while (regions.hasNext()) {
- ITextRegion region = (ITextRegion) regions.next();
- if (region.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- nameString = sdRegion.getText(region);
- break;
- }
- }
- if (nameString == null) {
- for (int i = 0; i < directiveNames.length; i++) {
- request.addProposal(new CustomCompletionProposal(directiveNames[i], request.getReplacementBeginPosition(), request.getReplacementLength(), directiveNames[i].length(), JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_GENERIC), directiveNames[i], null, null, XMLRelevanceConstants.R_JSP));
- }
- }
- }
-
- // bug115927 use original document position for all/any region
- // templates
- addTemplates(request, TemplateContextTypeIdsJSP.ALL, documentPosition);
- return request;
- }
-
- private JSPTemplateCompletionProcessor getTemplateCompletionProcessor() {
- if (fTemplateProcessor == null) {
- fTemplateProcessor = new JSPTemplateCompletionProcessor();
- }
- return fTemplateProcessor;
- }
-
- /**
- * Adds templates to the list of proposals
- *
- * @param contentAssistRequest
- * @param context
- */
- private void addTemplates(ContentAssistRequest contentAssistRequest, String context) {
- addTemplates(contentAssistRequest, context, contentAssistRequest.getReplacementBeginPosition());
- }
-
- /**
- * Adds templates to the list of proposals
- *
- * @param contentAssistRequest
- * @param context
- */
- private void addTemplates(ContentAssistRequest contentAssistRequest, String context, int startOffset) {
- if (contentAssistRequest == null)
- return;
-
- // if already adding template proposals for a certain context type, do
- // not add again
- if (!fTemplateContexts.contains(context)) {
- fTemplateContexts.add(context);
- boolean useProposalList = !contentAssistRequest.shouldSeparate();
-
- if (getTemplateCompletionProcessor() != null) {
- getTemplateCompletionProcessor().setContextType(context);
- ICompletionProposal[] proposals = getTemplateCompletionProcessor().computeCompletionProposals(fTextViewer, startOffset);
- for (int i = 0; i < proposals.length; ++i) {
- if (useProposalList)
- contentAssistRequest.addProposal(proposals[i]);
- else
- contentAssistRequest.addMacro(proposals[i]);
- }
- }
- }
- }
-
- protected void addEntityProposals(ContentAssistRequest contentAssistRequest, int documentPosition, ITextRegion completionRegion, IDOMNode treeNode) {
- // ignore
- }
-
- protected void addTagInsertionProposals(ContentAssistRequest contentAssistRequest, int childPosition) {
- addTemplates(contentAssistRequest, TemplateContextTypeIdsJSP.TAG);
- //don't need to call super here because otherwise we duplicate what the HTMLCOntentAssistProcessor that is running is already doing
- }
-
- /**
- * Use the embedded content assist processor to determine the content generator
- *
- * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor#getContentGenerator()
- */
- public XMLContentModelGenerator getContentGenerator() {
- if (fGenerator == null) {
- fGenerator = ((AbstractContentAssistProcessor) fPartitionToProcessorMap.get(IHTMLPartitions.HTML_DEFAULT)).getContentGenerator();
- }
- return fGenerator;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java
deleted file mode 100644
index 2b14ecee0d..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPDummyContentAssistProcessor.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.ui.internal.contentassist;
-
-import java.util.List;
-import java.util.Properties;
-import java.util.Vector;
-
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-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.contentmodel.CMAttributeDeclaration;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMContent;
-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.CMNode;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor;
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-import org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLContentModelGenerator;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * This class is a "null" version of AbstractContentAssistProcessor
- *
- * @deprecated This class is no longer used locally and will be removed in the future
- * @see DefaultXMLCompletionProposalComputer
- */
-public class JSPDummyContentAssistProcessor extends AbstractContentAssistProcessor {
- protected void addAttributeNameProposals(ContentAssistRequest contentAssistRequest) {
- super.addAttributeNameProposals(contentAssistRequest);
- }
-
- protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
- super.addAttributeValueProposals(contentAssistRequest);
- }
-
-
- protected void addCommentProposal(ContentAssistRequest contentAssistRequest) {
- super.addCommentProposal(contentAssistRequest);
- }
-
-
- protected void addContent(List contentList, CMContent content) {
- super.addContent(contentList, content);
- }
-
-
- protected void addDocTypeProposal(ContentAssistRequest contentAssistRequest) {
- super.addDocTypeProposal(contentAssistRequest);
- }
-
-
- protected void addEmptyDocumentProposals(ContentAssistRequest contentAssistRequest) {
- super.addEmptyDocumentProposals(contentAssistRequest);
- }
-
-
- protected void addEndTagNameProposals(ContentAssistRequest contentAssistRequest) {
- super.addEndTagNameProposals(contentAssistRequest);
- }
-
-
- protected void addEndTagProposals(ContentAssistRequest contentAssistRequest) {
- super.addEndTagProposals(contentAssistRequest);
- }
-
-
- protected void addEntityProposals(ContentAssistRequest contentAssistRequest, int documentPosition, ITextRegion completionRegion, IDOMNode treeNode) {
- super.addEntityProposals(contentAssistRequest, documentPosition, completionRegion, treeNode);
- }
-
-
- protected void addEntityProposals(Vector proposals, Properties map, String key, int nodeOffset, IStructuredDocumentRegion parent, ITextRegion completionRegion) {
- super.addEntityProposals(proposals, map, key, nodeOffset, parent, completionRegion);
- }
-
-
- protected void addPCDATAProposal(String nodeName, ContentAssistRequest contentAssistRequest) {
- super.addPCDATAProposal(nodeName, contentAssistRequest);
- }
-
-
- protected void addStartDocumentProposals(ContentAssistRequest contentAssistRequest) {
- super.addStartDocumentProposals(contentAssistRequest);
- }
-
-
- protected void addTagCloseProposals(ContentAssistRequest contentAssistRequest) {
- super.addTagCloseProposals(contentAssistRequest);
- }
-
-
- protected void addTagInsertionProposals(ContentAssistRequest contentAssistRequest, int childPosition) {
- super.addTagInsertionProposals(contentAssistRequest, childPosition);
- }
-
-
- protected void addTagNameProposals(ContentAssistRequest contentAssistRequest, int childPosition) {
- super.addTagNameProposals(contentAssistRequest, childPosition);
- }
-
- protected boolean attributeInList(IDOMNode node, Node parent, CMNode cmnode) {
- return super.attributeInList(node, parent, cmnode);
- }
-
-
- protected boolean beginsWith(String aString, String prefix) {
- return super.beginsWith(aString, prefix);
- }
-
-
- protected ContentAssistRequest computeAttributeProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
- return super.computeAttributeProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
- }
-
-
- protected ContentAssistRequest computeAttributeValueProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
- return super.computeAttributeValueProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
- }
-
-
- protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode treeNode, IDOMNode xmlnode) {
- return super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
- }
-
-
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
- return super.computeCompletionProposals(viewer, documentOffset);
- }
-
-
- protected ContentAssistRequest computeContentProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
- return super.computeContentProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
- }
-
-
- /**
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer,
- * int)
- */
- public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
- return super.computeContextInformation(viewer, documentOffset);
- }
-
- protected ContentAssistRequest computeEndTagOpenProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
- return super.computeEndTagOpenProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
- }
-
-
- protected ICompletionProposal[] computeEntityReferenceProposals(int documentPosition, ITextRegion completionRegion, IDOMNode treeNode) {
- return super.computeEntityReferenceProposals(documentPosition, completionRegion, treeNode);
- }
-
- protected ContentAssistRequest computeEqualsProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
- return super.computeEqualsProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
- }
-
- protected ContentAssistRequest computeStartDocumentProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
- return super.computeStartDocumentProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
- }
-
- protected ContentAssistRequest computeTagCloseProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
- return super.computeTagCloseProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
- }
-
- protected ContentAssistRequest computeTagNameProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
- return super.computeTagNameProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
- }
-
- protected ContentAssistRequest computeTagOpenProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode nodeAtOffset, IDOMNode node) {
- return super.computeTagOpenProposals(documentPosition, matchString, completionRegion, nodeAtOffset, node);
- }
-
- protected String getAdditionalInfo(CMNode parentOrOwner, CMNode cmnode) {
- return super.getAdditionalInfo(parentOrOwner, cmnode);
- }
-
- protected List getAvailableChildrenAtIndex(Element parent, int index, int validityChecking) {
- return super.getAvailableChildrenAtIndex(parent, index, validityChecking);
- }
-
- protected List getAvailableRootChildren(Document document, int childIndex) {
- return super.getAvailableRootChildren(document, childIndex);
- }
-
- protected CMElementDeclaration getCMElementDeclaration(Node node) {
- return super.getCMElementDeclaration(node);
- }
-
- public char[] getCompletionProposalAutoActivationCharacters() {
- return super.getCompletionProposalAutoActivationCharacters();
- }
-
- protected ITextRegion getCompletionRegion(int offset, IStructuredDocumentRegion flatNode) {
- return super.getCompletionRegion(offset, flatNode);
- }
-
- protected ITextRegion getCompletionRegion(int documentPosition, Node domnode) {
- return super.getCompletionRegion(documentPosition, domnode);
- }
-
- public XMLContentModelGenerator getContentGenerator() {
- return super.getContentGenerator();
- }
-
- public char[] getContextInformationAutoActivationCharacters() {
- return super.getContextInformationAutoActivationCharacters();
- }
-
- public IContextInformationValidator getContextInformationValidator() {
- return super.getContextInformationValidator();
- }
-
- protected int getElementPosition(Node child) {
- return super.getElementPosition(child);
- }
-
- /**
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#getErrorMessage()
- */
- public String getErrorMessage() {
- return super.getErrorMessage();
- }
-
- protected String getMatchString(IStructuredDocumentRegion parent, ITextRegion aRegion, int offset) {
- return super.getMatchString(parent, aRegion, offset);
- }
-
- protected ITextRegion getNameRegion(IStructuredDocumentRegion flatNode) {
- return super.getNameRegion(flatNode);
- }
-
-
- protected List getPossibleDataTypeValues(Node node, CMAttributeDeclaration ad) {
- return super.getPossibleDataTypeValues(node, ad);
- }
-
-
- protected String getRequiredName(Node parentOrOwner, CMNode cmnode) {
- return super.getRequiredName(parentOrOwner, cmnode);
- }
-
- protected String getRequiredText(Node parentOrOwner, CMAttributeDeclaration attrDecl) {
- return super.getRequiredText(parentOrOwner, attrDecl);
- }
-
- protected String getRequiredText(Node parentOrOwner, CMElementDeclaration elementDecl) {
- return super.getRequiredText(parentOrOwner, elementDecl);
- }
-
- protected List getValidChildElementDeclarations(Element parent, int childPosition, int kindOfAction) {
- return super.getValidChildElementDeclarations(parent, childPosition, kindOfAction);
- }
-
- protected void init() {
- super.init();
- }
-
- protected boolean isCloseRegion(ITextRegion region) {
- return super.isCloseRegion(region);
- }
-
- protected boolean isNameRegion(ITextRegion region) {
- return super.isNameRegion(region);
- }
-
- protected boolean isQuote(String string) {
- return super.isQuote(string);
- }
-
- protected Properties mapToProperties(CMNamedNodeMap map) {
- return super.mapToProperties(map);
- }
-
- public void setErrorMessage(String errorMessage) {
- super.setErrorMessage(errorMessage);
- }
-
- protected void setErrorMessage(String errorMessage, String append) {
- super.setErrorMessage(errorMessage, append);
- }
-
- protected void setErrorMessage(String errorMessage, String prepend, String append) {
- super.setErrorMessage(errorMessage, prepend, append);
- }
-
- protected boolean stringsEqual(String a, String b) {
- return super.stringsEqual(a, b);
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELCompletionProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELCompletionProcessor.java
deleted file mode 100644
index fc32b3c2dc..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELCompletionProcessor.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.contentassist;
-
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
-
-/**
- * @deprecated This class is no longer used locally and will be removed in the future
- */
-public class JSPELCompletionProcessor extends JSPCompletionProcessor {
- protected JSPProposalCollector getProposalCollector(ICompilationUnit cu, JSPTranslation translation) {
- return new JSPELProposalCollector(cu, translation);
- }
-
- /**
- * The java position offset needs to be shifted 3 for the "get" in the java
- * proposal mapped to a given JSP EL proposal
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int pos) {
- //3 for the "get" at the beginning of the java proposal
- return computeCompletionProposals(viewer, pos, 3);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELCompletionProposalComputer.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELCompletionProposalComputer.java
deleted file mode 100644
index 709baa04c1..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELCompletionProposalComputer.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jface.text.ITextViewer;
-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.jst.jsp.core.internal.java.JSPTranslation;
-import org.eclipse.jst.jsp.core.internal.java.jspel.JSPELParserConstants;
-import org.eclipse.jst.jsp.core.internal.java.jspel.JSPELParserTokenManager;
-import org.eclipse.jst.jsp.core.internal.java.jspel.SimpleCharStream;
-import org.eclipse.jst.jsp.core.internal.java.jspel.Token;
-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.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-
-/**
- * <p>Compute JSP EL completion proposals</p>
- */
-public class JSPELCompletionProposalComputer extends
- JSPJavaCompletionProposalComputer {
-
- /**
- * @see org.eclipse.jst.jsp.ui.internal.contentassist.JSPJavaCompletionProposalComputer#computeCompletionProposals(org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public List computeCompletionProposals(
- CompletionProposalInvocationContext context,
- IProgressMonitor monitor) {
-
- ITextViewer viewer = context.getViewer();
- int documentPosition = context.getInvocationOffset();
-
- // get results from JSP completion processor
- //3 for the "get" at the beginning of the java proposal
- List results = new ArrayList(computeJavaCompletionProposals(viewer, documentPosition, 3));
-
- //get the function proposals for syntax like: ${ fn:| }
- IStructuredDocumentRegion flat = ContentAssistUtils.getStructuredDocumentRegion(viewer, documentPosition);
- if (flat != null) {
- ITextRegion cursorRegion = flat.getRegionAtCharacterOffset(documentPosition);
- String elText;
- int startOffset;
- //if container then need to get inner region
- //else can use flat region
- if (cursorRegion instanceof ITextRegionContainer) {
- ITextRegionContainer container = (ITextRegionContainer) cursorRegion;
- cursorRegion = container.getRegionAtCharacterOffset(documentPosition);
- elText = container.getText(cursorRegion);
- startOffset = container.getStartOffset(cursorRegion);
- } else {
- elText = flat.getText(cursorRegion);
- startOffset = flat.getStartOffset(cursorRegion);
- }
-
- //sanity check that we are actually in EL region
- if (cursorRegion.getType() == DOMJSPRegionContexts.JSP_EL_CONTENT) {
- String prefix = getPrefix(documentPosition - startOffset, elText);
- if (null != prefix) {
- List proposals = getFunctionProposals(prefix, viewer, documentPosition);
- results.addAll(proposals);
- }
- }
- }
-
- return results;
- }
-
- /**
- * @see org.eclipse.jst.jsp.ui.internal.contentassist.JSPJavaCompletionProposalComputer#getProposalCollector(
- * org.eclipse.jdt.core.ICompilationUnit, org.eclipse.jst.jsp.core.internal.java.JSPTranslation)
- */
- protected JSPProposalCollector getProposalCollector(ICompilationUnit cu,
- JSPTranslation translation) {
-
- return new JSPELProposalCollector(cu, translation);
- }
-
- /**
- * <p>Gets the EL prefix from the relative position and the given EL text</p>
- *
- * @param relativePosition
- * @param elText
- * @return
- */
- private String getPrefix(int relativePosition, String elText) {
- java.io.StringReader reader = new java.io.StringReader(elText);
- JSPELParserTokenManager scanner = new JSPELParserTokenManager(new SimpleCharStream(reader, 1, 1));
- Token curToken = null, lastIdentifier = null;
- while (JSPELParserConstants.EOF != (curToken = scanner.getNextToken()).kind) {
- if (JSPELParserConstants.COLON == curToken.kind && curToken.endColumn == relativePosition && null != lastIdentifier) {
- return (lastIdentifier.image);
- }
-
- if (JSPELParserConstants.IDENTIFIER == curToken.kind) {
- lastIdentifier = curToken;
- }
- else {
- lastIdentifier = null;
- }
- }
- return null;
- }
-
- /**
- * <p>Get the EL function proposals, ex: ${fn:| }</p>
- * @param prefix
- * @param viewer
- * @param offset
- * @return
- */
- private List getFunctionProposals(String prefix, ITextViewer viewer, int offset) {
- TLDCMDocumentManager docMgr = TaglibController.getTLDCMDocumentManager(viewer.getDocument());
- ArrayList completionList = new ArrayList();
- if (docMgr == null)
- return null;
-
- Iterator taglibs = docMgr.getCMDocumentTrackers(offset).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();
- CustomCompletionProposal proposal = new CustomCompletionProposal(function.getName() + "()", //$NON-NLS-1$
- offset, 0, function.getName().length() + 1, null, function.getName() + " - " + function.getSignature(), null, null, 1); //$NON-NLS-1$
-
- completionList.add(proposal);
- }
- }
- }
- return completionList;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELContentAssistProcessor.java
deleted file mode 100644
index dbc6c5527d..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELContentAssistProcessor.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-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.jst.jsp.core.internal.java.jspel.ASTExpression;
-import org.eclipse.jst.jsp.core.internal.java.jspel.ASTFunctionInvocation;
-import org.eclipse.jst.jsp.core.internal.java.jspel.FindFunctionInvocationVisitor;
-import org.eclipse.jst.jsp.core.internal.java.jspel.JSPELParser;
-import org.eclipse.jst.jsp.core.internal.java.jspel.JSPELParserConstants;
-import org.eclipse.jst.jsp.core.internal.java.jspel.JSPELParserTokenManager;
-import org.eclipse.jst.jsp.core.internal.java.jspel.ParseException;
-import org.eclipse.jst.jsp.core.internal.java.jspel.SimpleCharStream;
-import org.eclipse.jst.jsp.core.internal.java.jspel.Token;
-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.sse.core.internal.provisional.text.ITextRegionContainer;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-/**
- * @deprecated This class is no longer used locally and will be removed in the future
- */
-public class JSPELContentAssistProcessor extends JSPJavaContentAssistProcessor {
- protected char elCompletionProposalAutoActivationCharacters[] = new char[]{'.', ':'};
-
- protected JSPCompletionProcessor getJspCompletionProcessor() {
- if (fJspCompletionProcessor == null) {
- fJspCompletionProcessor = new JSPELCompletionProcessor();
- }
- return fJspCompletionProcessor;
- }
-
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentPosition) {
-
-
- // get results from JSP completion processor
- fJspCompletionProcessor = getJspCompletionProcessor();
- ICompletionProposal[] results = fJspCompletionProcessor.computeCompletionProposals(viewer, documentPosition);
- fErrorMessage = fJspCompletionProcessor.getErrorMessage();
- if (results.length == 0 && (fErrorMessage == null || fErrorMessage.length() == 0)) {
- fErrorMessage = UNKNOWN_CONTEXT;
- }
-
- IStructuredDocumentRegion flat = ContentAssistUtils.getStructuredDocumentRegion(viewer, documentPosition);
-
- if (flat != null) {
- ITextRegion cursorRegion = flat.getRegionAtCharacterOffset(documentPosition);
- if (DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE == cursorRegion.getType()) {
- ITextRegionContainer container = (ITextRegionContainer) cursorRegion;
- cursorRegion = container.getRegionAtCharacterOffset(documentPosition);
- if (cursorRegion.getType() == DOMJSPRegionContexts.JSP_EL_CONTENT) {
- String elText = container.getText(cursorRegion).trim();
- String prefix = getPrefix(documentPosition - container.getStartOffset(cursorRegion) - 1, elText);
- if (null != prefix) {
- List proposals = getFunctionProposals(prefix, (StructuredTextViewer) viewer, documentPosition);
- results = new ICompletionProposal[proposals.size()];
- proposals.toArray(results);
- }
- }
- }
- }
-
-
- return results;
- }
-
- protected String getPrefix(int relativePosition, String elText) {
- java.io.StringReader reader = new java.io.StringReader(elText);
- JSPELParserTokenManager scanner = new JSPELParserTokenManager(new SimpleCharStream(reader, 1, 1));
- Token curToken = null, lastIdentifier = null;
- while (JSPELParserConstants.EOF != (curToken = scanner.getNextToken()).kind) {
- if (JSPELParserConstants.COLON == curToken.kind && curToken.endColumn == relativePosition && null != lastIdentifier) {
- return (lastIdentifier.image);
- }
-
- if (JSPELParserConstants.IDENTIFIER == curToken.kind) {
- lastIdentifier = curToken;
- }
- else {
- lastIdentifier = null;
- }
- }
- return null;
- }
-
- protected ASTFunctionInvocation getInvocation(int relativePosition, String elText) {
- FindFunctionInvocationVisitor visitor = new FindFunctionInvocationVisitor(relativePosition);
- JSPELParser parser = JSPELParser.createParser(elText);
- try {
- ASTExpression expression = parser.Expression();
- return (ASTFunctionInvocation) expression.jjtAccept(visitor, null);
- }
- catch (ParseException e) { /* parse exception = no completion */
- }
- return (null);
- }
-
-
- public char[] getCompletionProposalAutoActivationCharacters() {
- return elCompletionProposalAutoActivationCharacters;
- }
-
- protected List getFunctionProposals(String prefix, StructuredTextViewer viewer, int offset) {
- TLDCMDocumentManager docMgr = TaglibController.getTLDCMDocumentManager(viewer.getDocument());
- ArrayList completionList = new ArrayList();
- if (docMgr == null)
- return null;
-
- Iterator taglibs = docMgr.getCMDocumentTrackers(offset).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();
- CustomCompletionProposal proposal = new CustomCompletionProposal(function.getName() + "()", //$NON-NLS-1$
- offset, 0, function.getName().length() + 1, null, function.getName() + " - " + function.getSignature(), null, null, 1); //$NON-NLS-1$
-
- completionList.add(proposal);
- }
- }
- }
- return completionList;
- }
-
-
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELProposalCollector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELProposalCollector.java
deleted file mode 100644
index 5c7a0398b1..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPELProposalCollector.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2009 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.ui.internal.contentassist;
-
-import org.eclipse.jdt.core.CompletionProposal;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
-import org.eclipse.swt.graphics.Image;
-
-public class JSPELProposalCollector extends JSPProposalCollector {
-
- public JSPELProposalCollector(ICompilationUnit cu, JSPTranslation translation) {
- super(cu, translation);
- }
-
- protected IJavaCompletionProposal createJavaCompletionProposal(CompletionProposal proposal) {
- JSPCompletionProposal jspProposal = null;
-
- if(null == proposal || null == proposal.getName())
- return(null);
-
- String rawName = new String(proposal.getName());
- String completion = null;
-
- if(proposal.getKind() == CompletionProposal.METHOD_REF && proposal.findParameterNames(null).length == 0) {
- if(rawName.length() > 3 && rawName.startsWith("get")) { //$NON-NLS-1$
- completion = rawName.substring(3,4).toLowerCase() + rawName.substring(4, rawName.length());
- } else {
- return null;
- }
-
- // java offset
- int offset = proposal.getReplaceStart();
-
- // replacement length
- //-3 for "get" pre text on the java proposal
- int length = proposal.getReplaceEnd() - offset - 3;
-
- // translate offset from Java > JSP
- offset = getTranslation().getJspOffset(offset);
-
- // cursor position after must be calculated
- int positionAfter = offset + completion.length();
-
- // from java proposal
- IJavaCompletionProposal javaProposal = super.createJavaCompletionProposal(proposal);
- Image image = null;
- String longDisplayString = javaProposal.getDisplayString();
- int fistSpaceIndex = longDisplayString.indexOf(' ');
- String shortDisplayString = longDisplayString;
-
- if(fistSpaceIndex != -1) {
- shortDisplayString = longDisplayString.substring(fistSpaceIndex);
- }
-
- String displayString = completion + " " + shortDisplayString; //$NON-NLS-1$
- IContextInformation contextInformation = javaProposal.getContextInformation();
- String additionalInfo = javaProposal.getAdditionalProposalInfo();
- int relevance = javaProposal.getRelevance();
-
- boolean updateLengthOnValidate = true;
-
- jspProposal = new JSPCompletionProposal(completion, offset, length, positionAfter, image, displayString, contextInformation, additionalInfo, relevance, updateLengthOnValidate);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=124483
- // set wrapped java proposal so additional info can be calculated on demand
- jspProposal.setJavaCompletionProposal(javaProposal);
-
- return jspProposal;
- } else {
- return null;
- }
- }
-
-// protected void acceptMethod(char[] declaringTypePackageName, char[] declaringTypeName, char[] name, char[][] parameterPackageNames, char[][] parameterTypeNames, char[][] parameterNames, char[] returnTypePackageName, char[] returnTypeName, char[] completionName, int modifiers, int start, int end, int relevance) {
-// String rawName = String.valueOf(name);
-// if(parameterNames.length == 0 && rawName.length() > 3 && rawName.startsWith("get"))
-// {
-// String mangledName = rawName.substring(3,4).toLowerCase() + rawName.substring(4, rawName.length());
-// super.acceptField(declaringTypePackageName, declaringTypeName, mangledName.toCharArray(), returnTypePackageName, returnTypeName, mangledName.toCharArray(), modifiers, start, end, relevance);
-// }
-// }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPImportCompletionProposalComputer.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPImportCompletionProposalComputer.java
deleted file mode 100644
index c0bfb7f2b2..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPImportCompletionProposalComputer.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext;
-
-/**
- * <p>Generates JSP import completion proposals</p>
- */
-public class JSPImportCompletionProposalComputer extends
- JSPJavaCompletionProposalComputer {
-
- /**
- * @see org.eclipse.jst.jsp.ui.internal.contentassist.JSPJavaCompletionProposalComputer#computeCompletionProposals(org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public List computeCompletionProposals(
- CompletionProposalInvocationContext context,
- IProgressMonitor monitor) {
-
- List proposals = computeJavaCompletionProposals(context.getViewer(), context.getInvocationOffset(), 0);
- List importProposals = new ArrayList(proposals.size());
- for (int i = 0; i < proposals.size(); i++) {
- if (proposals.get(i) instanceof JSPCompletionProposal) {
-
- ICompletionProposal importProposal = adjustImportProposal((JSPCompletionProposal) proposals.get(i));
- importProposals.add(importProposal);
- }
- }
- return importProposals;
-
- }
-
- /**
- * <p>JSP import proposals need to be adjusted, this does that</p>
- *
- * @param importProposal {@link JSPCompletionProposal} to adjust
- * @return adjusted {@link ICompletionProposal}
- */
- private ICompletionProposal adjustImportProposal(JSPCompletionProposal importProposal) {
- // just need to remove the ";"
- // and adjust offsets for the change
- String newReplace;
- if (importProposal instanceof AutoImportProposal){
- newReplace =((AutoImportProposal)importProposal).getImportDeclaration() .replaceAll(";", ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- else{
- newReplace = importProposal.getReplacementString().replaceAll(";", ""); //$NON-NLS-1$ //$NON-NLS-2$
- }
- importProposal.setReplacementString(newReplace);
-
- String newDisplay = importProposal.getDisplayString().replaceAll(";", ""); //$NON-NLS-1$ //$NON-NLS-2$
- importProposal.setDisplayString(newDisplay);
-
- int newReplacementLength = importProposal.getReplacementLength() - 1;
- if (newReplacementLength >= 0) {
- importProposal.setReplacementLength(newReplacementLength);
- }
-
- int newCursorPosition = importProposal.getCursorPosition() - 1;
- importProposal.setCursorPosition(newCursorPosition);
-
- return importProposal;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaCompletionProposalComputer.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaCompletionProposalComputer.java
deleted file mode 100644
index a395fdbd7f..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaCompletionProposalComputer.java
+++ /dev/null
@@ -1,553 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 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.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.WorkingCopyOwner;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentExtension3;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.ITextViewerExtension5;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-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.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.text.IJSPPartitions;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.wst.html.core.text.IHTMLPartitions;
-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.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.IStructuredPartitioning;
-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.ui.contentassist.CompletionProposalInvocationContext;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.internal.parser.XMLSourceParser;
-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.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLContentAssistUtilities;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLRelevanceConstants;
-import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
-
-/**
- * <p>Generates Java proposals for JSP documents</p>
- *
- * @base org.eclipse.jst.jsp.ui.internal.contentassist.JSPJavaContentAssistProcessor
- */
-public class JSPJavaCompletionProposalComputer extends DefaultXMLCompletionProposalComputer {
-
- /** The translation adapter used to create the Java proposals */
- private JSPTranslationAdapter fTranslationAdapter = null;
-
- /** translation adapter may be stale, check the model id */
- private String fModelId = null;
-
- /**
- * Create the computer
- */
- public JSPJavaCompletionProposalComputer() {
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer#sessionEnded()
- */
- public void sessionEnded() {
- fTranslationAdapter = null;
- }
-
- /**
- * <p>Return a list of proposed code completions based on the specified
- * location within the document that corresponds to the current cursor
- * position within the text-editor control.</p>
- *
- * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLCompletionProposalComputer#computeCompletionProposals(org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public List computeCompletionProposals(
- CompletionProposalInvocationContext context,
- IProgressMonitor monitor) {
-
- List results = new ArrayList(0);
- if(isValidContext(context)) {
- ITextViewer viewer = context.getViewer();
- int documentPosition = context.getInvocationOffset();
- IndexedRegion treeNode = ContentAssistUtils.getNodeAt(viewer, documentPosition);
-
- // get results from JSP completion processor
- results = computeJavaCompletionProposals(viewer, documentPosition, 0);
-
- IDOMNode xNode = null;
- IStructuredDocumentRegion flat = null;
- if (treeNode instanceof IDOMNode) {
- xNode = (IDOMNode) treeNode;
- flat = xNode.getFirstStructuredDocumentRegion();
- if (flat != null && flat.getType() == DOMJSPRegionContexts.JSP_CONTENT) {
- flat = flat.getPrevious();
- }
- }
-
- // this is in case it's a <%@, it will be a region container...
- ITextRegion openRegion = null;
- if (flat != null && flat instanceof ITextRegionContainer) {
- ITextRegionList v = ((ITextRegionContainer) flat).getRegions();
- if (v.size() > 0)
- openRegion = v.get(0);
- }
-
- // ADD CDATA PROPOSAL IF IT'S AN XML-JSP TAG
- if (flat != null && flat.getType() != DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN &&
- flat.getType() != DOMJSPRegionContexts.JSP_DECLARATION_OPEN &&
- flat.getType() != DOMJSPRegionContexts.JSP_EXPRESSION_OPEN &&
- flat.getType() != DOMRegionContext.BLOCK_TEXT &&
- (openRegion != null &&
- openRegion.getType() != DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN) &&
- !inAttributeRegion(flat, documentPosition)) {
-
- // determine if cursor is before or after selected range
- int adjustedDocPosition = documentPosition;
- int realCaretPosition = viewer.getTextWidget().getCaretOffset();
- int selectionLength = viewer.getSelectedRange().y;
- if (documentPosition > realCaretPosition) {
- adjustedDocPosition -= selectionLength;
- }
-
- CustomCompletionProposal cdataProposal = createCDATAProposal(adjustedDocPosition, selectionLength);
- results.add(cdataProposal);
- }
- }
-
- return results;
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLCompletionProposalComputer#computeContextInformation(org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public List computeContextInformation(
- CompletionProposalInvocationContext context,
- IProgressMonitor monitor) {
-
- ITextViewer viewer = context.getViewer();
- int documentOffset = context.getInvocationOffset();
-
- List results = new ArrayList();
- // need to compute context info here, if it's JSP, call java computer
- IDocument doc = viewer.getDocument();
- IDocumentPartitioner dp = null;
- if (doc instanceof IDocumentExtension3) {
- dp = ((IDocumentExtension3) doc).getDocumentPartitioner(IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING);
- }
- if (dp != null) {
- //IDocumentPartitioner dp = viewer.getDocument().getDocumentPartitioner();
- String type = dp.getPartition(documentOffset).getType();
- if (type == IJSPPartitions.JSP_DEFAULT || type == IJSPPartitions.JSP_CONTENT_JAVA) {
- // get context info from completion results...
- List proposals = computeCompletionProposals(context,monitor);
- for (int i = 0; i < proposals.size(); i++) {
- IContextInformation ci = ((ICompletionProposal)proposals.get(i)).getContextInformation();
- if (ci != null)
- results.add(ci);
- }
- }
- }
- return results;
- }
-
- /**
- * The same as the normal <code>computeCompeltaionProposals</code> except the calculated
- * java position is offset by the given extra offset.
- *
- * @param viewer
- * the viewer whose document is used to compute the proposals
- * @param documentPosition
- * an offset within the document for which completions should
- * be computed
- * @param javaPositionExtraOffset
- * the extra offset for the java position
- * @return an array of completion proposals or <code>null</code> if no
- * proposals are possible
- */
- protected List computeJavaCompletionProposals(ITextViewer viewer,
- int pos, int javaPositionExtraOffset) {
-
- JSPProposalCollector collector = null;
-
- IDOMModel xmlModel = null;
- try {
- xmlModel = (IDOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(viewer.getDocument());
-
- IDOMDocument xmlDoc = xmlModel.getDocument();
- if (fTranslationAdapter == null || xmlModel.getId() != fModelId) {
- fTranslationAdapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
- fModelId = xmlModel.getId();
- }
- if (fTranslationAdapter != null) {
-
- JSPTranslation translation = fTranslationAdapter.getJSPTranslation();
- int javaPosition = translation.getJavaOffset(pos) + javaPositionExtraOffset;
-
- try {
-
- ICompilationUnit cu = translation.getCompilationUnit();
-
- // can't get java proposals w/out a compilation unit
- // or without a valid position
- if (cu == null || -1 == javaPosition)
- return new ArrayList(0);
-
- collector = getProposalCollector(cu, translation);
- synchronized (cu) {
- cu.codeComplete(javaPosition, collector, (WorkingCopyOwner) null);
- }
- }
- catch (CoreException coreEx) {
- // a possible Java Model Exception due to not being a Web
- // (Java) Project
- coreEx.printStackTrace();
- }
- }
- }
- catch (Exception exc) {
- exc.printStackTrace();
- // throw out exceptions on code assist.
- }
- finally {
- if (xmlModel != null) {
- xmlModel.releaseFromRead();
- }
- }
- ICompletionProposal[] results = new ICompletionProposal[0];
- if(collector != null) {
- results = collector.getJSPCompletionProposals();
- if (results == null || results.length < 1)
- this.setErrorMessage(JSPUIMessages.Java_Content_Assist_is_not_UI_);
- }
-
- return Arrays.asList(results);
- }
-
- protected JSPProposalCollector getProposalCollector(ICompilationUnit cu, JSPTranslation translation) {
- return new JSPProposalCollector(cu, translation);
- }
-
- private CustomCompletionProposal createCDATAProposal(int adjustedDocPosition, int selectionLength) {
- return new CustomCompletionProposal("<![CDATA[]]>", //$NON-NLS-1$
- adjustedDocPosition, selectionLength, // should be the selection length
- 9, SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_CDATASECTION),
- "CDATA Section", //$NON-NLS-1$
- null, null, XMLRelevanceConstants.R_CDATA);
- }
-
- private boolean inAttributeRegion(IStructuredDocumentRegion flat, int documentPosition) {
- ITextRegion attrContainer = flat.getRegionAtCharacterOffset(documentPosition);
- if (attrContainer != null && attrContainer instanceof ITextRegionContainer) {
- if (attrContainer.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * @param viewer
- * @param documentPosition
- * @return String
- */
- private String getPartitionType(ITextViewer viewer, int documentPosition) {
- String partitionType = null;
- try {
- if (viewer instanceof ITextViewerExtension5)
- partitionType = TextUtilities.getContentType(viewer.getDocument(), IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING, ((ITextViewerExtension5) viewer).modelOffset2WidgetOffset(documentPosition), false);
- else
- partitionType = TextUtilities.getContentType(viewer.getDocument(), IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING, documentPosition, false);
- }
- catch (BadLocationException e) {
- partitionType = IDocument.DEFAULT_CONTENT_TYPE;
- }
- return partitionType;
- }
-
- /**
- * <p>Determines if the context is a valid one for JSP Java proposals.
- * The default result is <code>true</code></p>
- *
- * @param context check this context to see if it is valid for JSP
- * Java proposals
- * @return <code>true</code> if the given context is a valid one for
- * JSP Java proposals, <code>false</code> otherwise. <code>true</code>
- * is the default response if a specific case for <code>false</code> is
- * not found.
- */
- private boolean isValidContext(CompletionProposalInvocationContext context) {
- ITextViewer viewer = context.getViewer();
- int documentPosition = context.getInvocationOffset();
-
- String partitionType = getPartitionType(viewer, documentPosition);
- if (partitionType == IJSPPartitions.JSP_CONTENT_JAVA)
- return true;
- IStructuredDocument structuredDocument = (IStructuredDocument) viewer.getDocument();
- IStructuredDocumentRegion fn = structuredDocument.getRegionAtCharacterOffset(documentPosition);
- IStructuredDocumentRegion sdRegion = ContentAssistUtils.getStructuredDocumentRegion(viewer, documentPosition);
- // ////////////////////////////////////////////////////////////////////////////
- // ANOTHER WORKAROUND UNTIL PARTITIONING TAKES CARE OF THIS
- // check for xml-jsp tags...
- if (partitionType == IJSPPartitions.JSP_DIRECTIVE && fn != null) {
- IStructuredDocumentRegion possibleXMLJSP = ((fn.getType() == DOMRegionContext.XML_CONTENT) && fn.getPrevious() != null) ? fn.getPrevious() : fn;
- ITextRegionList regions = possibleXMLJSP.getRegions();
- if (regions.size() > 1) {
- // check bounds cases
- ITextRegion xmlOpenOrClose = regions.get(0);
- if (xmlOpenOrClose.getType() != DOMRegionContext.XML_TAG_OPEN &&
- documentPosition != possibleXMLJSP.getStartOffset() &&
- xmlOpenOrClose.getType() != DOMRegionContext.XML_END_TAG_OPEN &&
- documentPosition <= possibleXMLJSP.getStartOffset()) {
-
- // possible xml-jsp
- ITextRegion nameRegion = regions.get(1);
- String name = possibleXMLJSP.getText(nameRegion);
- if (name.equals("jsp:scriptlet") || name.equals("jsp:expression") || name.equals("jsp:declaration")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- return true;
- }
- }
- }
- }
-
- // ////////////////////////////////////////////////////////////////////////////
- // ** THIS IS A TEMP FIX UNTIL PARTITIONING TAKES CARE OF THIS...
- // check for XML-JSP in a <script> region
- if (partitionType == IJSPPartitions.JSP_CONTENT_JAVASCRIPT || partitionType == IHTMLPartitions.SCRIPT) {
- // fn should be block text
- IStructuredDocumentRegion decodedSDRegion = decodeScriptBlock(fn.getFullText());
- // System.out.println("decoded > " +
- // blockOfText.substring(decodedSDRegion.getStartOffset(),
- // decodedSDRegion.getEndOffset()));
- if (decodedSDRegion != null) {
- IStructuredDocumentRegion sdr = decodedSDRegion;
- while (sdr != null) {
- // System.out.println("sdr " + sdr.getType());
- // System.out.println("sdr > " +
- // blockOfText.substring(sdr.getStartOffset(),
- // sdr.getEndOffset()));
- if (sdr.getType() == DOMJSPRegionContexts.JSP_CONTENT) {
- if (documentPosition >= fn.getStartOffset() + sdr.getStartOffset() && documentPosition <= fn.getStartOffset() + sdr.getEndOffset()) {
- return true;
- }
- }
- else if (sdr.getType() == DOMRegionContext.XML_TAG_NAME) {
- if (documentPosition > fn.getStartOffset() + sdr.getStartOffset() && documentPosition < fn.getStartOffset() + sdr.getEndOffset()) {
- return false;
- }
- else if (documentPosition == fn.getStartOffset() + sdr.getEndOffset() && sdr.getNext() != null && sdr.getNext().getType() == DOMJSPRegionContexts.JSP_CONTENT) {
- // the end of an open tag <script>
- // <jsp:scriptlet>| blah </jsp:scriptlet>
- return true;
- }
- else if (documentPosition == fn.getStartOffset() + sdr.getStartOffset() && sdr.getPrevious() != null && sdr.getPrevious().getType() == DOMRegionContext.XML_TAG_NAME) {
- return true;
- }
- }
- sdr = sdr.getNext();
- }
- }
- }
- // /////////////////////////////////////////////////////////////////////////
- // check special JSP delimiter cases
- if (fn != null && partitionType == IJSPPartitions.JSP_CONTENT_DELIMITER) {
- IStructuredDocumentRegion fnDelim = fn;
-
- // if it's a nested JSP region, need to get the correct
- // StructuredDocumentRegion
- // not sure why this check was there...
- // if (fnDelim.getType() == XMLRegionContext.BLOCK_TEXT) {
- Iterator blockRegions = fnDelim.getRegions().iterator();
- ITextRegion temp = null;
- ITextRegionContainer trc;
- while (blockRegions.hasNext()) {
- temp = (ITextRegion) blockRegions.next();
- // we hit a nested
- if (temp instanceof ITextRegionContainer) {
- trc = (ITextRegionContainer) temp;
- // it's in this region
- if (documentPosition >= trc.getStartOffset() && documentPosition < trc.getEndOffset()) {
- Iterator nestedJSPRegions = trc.getRegions().iterator();
- while (nestedJSPRegions.hasNext()) {
- temp = (ITextRegion) nestedJSPRegions.next();
- if (XMLContentAssistUtilities.isJSPOpenDelimiter(temp.getType()) && documentPosition == trc.getStartOffset(temp)) {
- // HTML content assist
- // we actually want content assist for the
- // previous type of region,
- // well get those proposals from the embedded
- // adapter
- if (documentPosition > 0) {
- partitionType = getPartitionType(viewer, documentPosition - 1);
- break;
- }
- }
- else if (XMLContentAssistUtilities.isJSPCloseDelimiter(temp.getType()) && documentPosition == trc.getStartOffset(temp)) {
- // JSP content assist
- return true;
- }
- }
- }
- }
- // }
- }
-
- // take care of XML-JSP delimter cases
- if (XMLContentAssistUtilities.isXMLJSPDelimiter(fnDelim)) {
- // since it's a delimiter, we know it's a ITextRegionContainer
- ITextRegion firstRegion = fnDelim.getRegions().get(0);
- if (fnDelim.getStartOffset() == documentPosition && (firstRegion.getType() == DOMRegionContext.XML_TAG_OPEN)) {
- // |<jsp:scriptlet> </jsp:scriptlet>
- // (pa) commented out so that we get regular behavior JSP
- // macros etc...
- // return getHTMLCompletionProposals(viewer,
- // documentPosition);
- }
- else if (fnDelim.getStartOffset() == documentPosition && (firstRegion.getType() == DOMRegionContext.XML_END_TAG_OPEN)) {
- // <jsp:scriptlet> |</jsp:scriptlet>
- // check previous partition type to see if it's JAVASCRIPT
- // if it is, we're just gonna let the embedded JAVASCRIPT
- // adapter get the proposals
- if (documentPosition > 0) {
- String checkType = getPartitionType(viewer, documentPosition - 1);
- if (checkType != IJSPPartitions.JSP_CONTENT_JAVASCRIPT) { // this
- // check is failing for XML-JSP (region is not javascript...)
- return true;
- }
- partitionType = IJSPPartitions.JSP_CONTENT_JAVASCRIPT;
- }
- }
- else if ((firstRegion.getType() == DOMRegionContext.XML_TAG_OPEN) && documentPosition >= fnDelim.getEndOffset()) {
- // anything else inbetween
- return true;
- }
- }
- else if (XMLContentAssistUtilities.isJSPDelimiter(fnDelim)) {
- // the delimiter <%, <%=, <%!, ...
- if (XMLContentAssistUtilities.isJSPCloseDelimiter(fnDelim)) {
- if (documentPosition == fnDelim.getStartOffset()) {
- // check previous partition type to see if it's
- // JAVASCRIPT
- // if it is, we're just gonna let the embedded
- // JAVASCRIPT adapter get the proposals
- if (documentPosition > 0) {
- String checkType = getPartitionType(viewer, documentPosition - 1);
- if (checkType != IJSPPartitions.JSP_CONTENT_JAVASCRIPT) {
- return true;
- }
- partitionType = IJSPPartitions.JSP_CONTENT_JAVASCRIPT;
- }
- }
- }
- else if (XMLContentAssistUtilities.isJSPOpenDelimiter(fnDelim)) {
- // if it's the first position of open delimiter
- // use embedded HTML results
- if (documentPosition == fnDelim.getEndOffset()) {
- // it's at the EOF <%|
- return true;
- }
- }
- }
- }
-
- // need to check if it's JSP region inside of CDATA w/ no region
- // <![CDATA[ <%|%> ]]>
- // or a comment region
- // <!-- <% |%> -->
- if (fn != null && (fn.getType() == DOMRegionContext.XML_CDATA_TEXT || fn.getType() == DOMRegionContext.XML_COMMENT_TEXT)) {
- if (fn instanceof ITextRegionContainer) {
- Object[] cdataRegions = fn.getRegions().toArray();
- ITextRegion r = null;
- ITextRegion jspRegion = null;
- for (int i = 0; i < cdataRegions.length; i++) {
- r = (ITextRegion) cdataRegions[i];
- if (r instanceof ITextRegionContainer) {
- // CDATA embedded container, or comment container
- Object[] jspRegions = ((ITextRegionContainer) r).getRegions().toArray();
- for (int j = 0; j < jspRegions.length; j++) {
- jspRegion = (ITextRegion) jspRegions[j];
- if (jspRegion.getType() == DOMJSPRegionContexts.JSP_CLOSE) {
- if (sdRegion.getStartOffset(jspRegion) == documentPosition) {
- return true;
- }
- }
- }
- }
- }
- }
- }
-
- // check if it's in an attribute value, if so, don't add CDATA
- // proposal
- ITextRegion attrContainer = (fn != null) ? fn.getRegionAtCharacterOffset(documentPosition) : null;
- if (attrContainer != null && attrContainer instanceof ITextRegionContainer) {
- if (attrContainer.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- // test location of the cursor
- // return null if it's in the middle of an open/close delimiter
- Iterator attrRegions = ((ITextRegionContainer) attrContainer).getRegions().iterator();
- ITextRegion testRegion = null;
- while (attrRegions.hasNext()) {
- testRegion = (ITextRegion) attrRegions.next();
- // need to check for other valid attribute regions
- if (XMLContentAssistUtilities.isJSPOpenDelimiter(testRegion.getType())) {
- if (!(((ITextRegionContainer) attrContainer).getEndOffset(testRegion) <= documentPosition))
- return false;
- }
- else if (XMLContentAssistUtilities.isJSPCloseDelimiter(testRegion.getType())) {
- if (!(((ITextRegionContainer) attrContainer).getStartOffset(testRegion) >= documentPosition))
- return false;
- }
- }
- // TODO: handle non-Java code such as nested tags
- if (testRegion.getType().equals(DOMJSPRegionContexts.JSP_CONTENT)) {
- return true;
- }
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * ** TEMP WORKAROUND FOR CMVC 241882 Takes a String and blocks out
- * jsp:scriptlet, jsp:expression, and jsp:declaration @param blockText
- * @return
- */
- private IStructuredDocumentRegion decodeScriptBlock(String blockText) {
- XMLSourceParser parser = new XMLSourceParser();
- // use JSP_CONTENT for region type
- parser.addBlockMarker(new BlockMarker("jsp:scriptlet", null, DOMJSPRegionContexts.JSP_CONTENT, false, false)); //$NON-NLS-1$
- parser.addBlockMarker(new BlockMarker("jsp:expression", null, DOMJSPRegionContexts.JSP_CONTENT, false, false)); //$NON-NLS-1$
- parser.addBlockMarker(new BlockMarker("jsp:declaration", null, DOMJSPRegionContexts.JSP_CONTENT, false, false)); //$NON-NLS-1$
- parser.reset(blockText);
- return parser.getDocumentRegions();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java
deleted file mode 100644
index 91ff80371c..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPJavaContentAssistProcessor.java
+++ /dev/null
@@ -1,306 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jdt.ui.PreferenceConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IDocumentExtension3;
-import org.eclipse.jface.text.IDocumentPartitioner;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.text.IJSPPartitions;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredPartitioning;
-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.ui.internal.IReleasable;
-import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLRelevanceConstants;
-import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
-
-/**
- * @plannedfor 1.0
- * @deprecated This class is no longer used locally and will be removed in the future
- */
-public class JSPJavaContentAssistProcessor implements IContentAssistProcessor, IReleasable {
- /**
- * Preference listener to keep track of changes to content assist
- * preferences
- */
- private class PreferenceListener implements IPropertyChangeListener {
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- IPreferenceStore store = getJavaPreferenceStore();
-
- if (PreferenceConstants.CODEASSIST_AUTOACTIVATION.equals(property)) {
- fAutoActivate = store.getBoolean(PreferenceConstants.CODEASSIST_AUTOACTIVATION);
- }
- else if (PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA.equals(property)) {
- String autoCharacters = store.getString(PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA);
- completionProposalAutoActivationCharacters = (autoCharacters != null) ? autoCharacters.toCharArray() : new char[0];
- }
- }
- }
-
- private boolean fAutoActivate = true;
- protected char completionProposalAutoActivationCharacters[] = new char[]{'.'};
- protected char contextInformationAutoActivationCharacters[] = null;
- protected static final String UNKNOWN_CONTEXT = JSPUIMessages.Content_Assist_not_availab_UI_;
- protected String fErrorMessage = null;
- protected JSPCompletionProcessor fJspCompletionProcessor = null;
- private IPropertyChangeListener fJavaPreferenceListener;
-
- public JSPJavaContentAssistProcessor() {
- super();
- }
-
- /**
- * Return a list of proposed code completions based on the specified
- * location within the document that corresponds to the current cursor
- * position within the text-editor control.
- *
- * @param documentPosition
- * a location within the document
- * @return an array of code-assist items
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentPosition) {
-
- IndexedRegion treeNode = ContentAssistUtils.getNodeAt(viewer, documentPosition);
-
- // get results from JSP completion processor
- fJspCompletionProcessor = getJspCompletionProcessor();
- ICompletionProposal[] results = fJspCompletionProcessor.computeCompletionProposals(viewer, documentPosition);
- fErrorMessage = fJspCompletionProcessor.getErrorMessage();
- if (results.length == 0 && (fErrorMessage == null || fErrorMessage.length() == 0)) {
- fErrorMessage = UNKNOWN_CONTEXT;
- }
-
- IDOMNode xNode = null;
- IStructuredDocumentRegion flat = null;
- if (treeNode instanceof IDOMNode) {
- xNode = (IDOMNode) treeNode;
- flat = xNode.getFirstStructuredDocumentRegion();
- if (flat != null && flat.getType() == DOMJSPRegionContexts.JSP_CONTENT) {
- flat = flat.getPrevious();
- }
- }
-
- // this is in case it's a <%@, it will be a region container...
- ITextRegion openRegion = null;
- if (flat != null && flat instanceof ITextRegionContainer) {
- ITextRegionList v = ((ITextRegionContainer) flat).getRegions();
- if (v.size() > 0)
- openRegion = v.get(0);
- }
-
- // ADD CDATA PROPOSAL IF IT'S AN XML-JSP TAG
- if (flat != null && flat.getType() != DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN && flat.getType() != DOMJSPRegionContexts.JSP_DECLARATION_OPEN && flat.getType() != DOMJSPRegionContexts.JSP_EXPRESSION_OPEN && flat.getType() != DOMRegionContext.BLOCK_TEXT && (openRegion != null && openRegion.getType() != DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN) && !inAttributeRegion(flat, documentPosition)) {
-
- // determine if cursor is before or after selected range
- int adjustedDocPosition = documentPosition;
- int realCaretPosition = viewer.getTextWidget().getCaretOffset();
- int selectionLength = viewer.getSelectedRange().y;
- if (documentPosition > realCaretPosition) {
- adjustedDocPosition -= selectionLength;
- }
-
- CustomCompletionProposal cdataProposal = createCDATAProposal(adjustedDocPosition, selectionLength);
- ICompletionProposal[] newResults = new ICompletionProposal[results.length + 1];
- System.arraycopy(results, 0, newResults, 0, results.length);
- newResults[results.length] = cdataProposal;
- results = newResults;
- }
-
- // (pa) ** this is code in progress...
- // add ending %> proposal for non closed JSP tags
- // String tagText = flat.getText();
- // // TODO need a much better compare (using constants?)
- // if(tagText.equals("<%") || tagText.equals("<%=") || tagText.equals("<%!"));
- // {
- // ICompletionProposal testah = ContentAssistUtils.computeJSPEndTagProposal(viewer,documentPosition, treeNode, "<%" , SharedXMLEditorPluginImageHelper.IMG_OBJ_TAG_GENERIC);
- // if(testah != null)
- // {
- // ICompletionProposal[] newResults = new ICompletionProposal[results.length + 1];
- // System.arraycopy( results, 0, newResults, 0, results.length);
- // newResults[results.length] = testah;
- // results = newResults;
- // }
- // }
-
- return results;
- }
-
- private CustomCompletionProposal createCDATAProposal(int adjustedDocPosition, int selectionLength) {
- return new CustomCompletionProposal("<![CDATA[]]>", //$NON-NLS-1$
- adjustedDocPosition, selectionLength, // should be the selection length
- 9, SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_CDATASECTION),
- "CDATA Section", //$NON-NLS-1$
- null, null, XMLRelevanceConstants.R_CDATA);
- }
-
- private boolean inAttributeRegion(IStructuredDocumentRegion flat, int documentPosition) {
- ITextRegion attrContainer = flat.getRegionAtCharacterOffset(documentPosition);
- if (attrContainer != null && attrContainer instanceof ITextRegionContainer) {
- if (attrContainer.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Returns the characters which when entered by the user should
- * automatically trigger the presentation of possible completions.
- *
- * @return the auto activation characters for completion proposal or
- * <code>null</code> if no auto activation is desired
- */
- public char[] getCompletionProposalAutoActivationCharacters() {
- // if no listener has been created, preferenes have not been
- // initialized
- if (fJavaPreferenceListener == null)
- initializePreferences();
-
- if (fAutoActivate)
- return completionProposalAutoActivationCharacters;
- else
- return null;
- }
-
- /**
- * Returns the characters which when entered by the user should
- * automatically trigger the presentation of context information.
- *
- * @return the auto activation characters for presenting context
- * information or <code>null</code> if no auto activation is
- * desired
- */
- public char[] getContextInformationAutoActivationCharacters() {
- return contextInformationAutoActivationCharacters;
- }
-
- /**
- * Return the reason why computeProposals was not able to find any
- * completions.
- *
- * @return an error message or null if no error occurred
- */
- public String getErrorMessage() {
- return fErrorMessage;
- }
-
- /**
- * @see ContentAssistAdapter#release()
- */
- public void release() {
- // remove listener on java preferences if we added one
- if (fJavaPreferenceListener != null) {
- getJavaPreferenceStore().removePropertyChangeListener(fJavaPreferenceListener);
- }
-
- if (fJspCompletionProcessor != null) {
- fJspCompletionProcessor.release();
- fJspCompletionProcessor = null;
- }
- }
-
- /**
- *
- */
- protected JSPCompletionProcessor getJspCompletionProcessor() {
- if (fJspCompletionProcessor == null) {
- fJspCompletionProcessor = new JSPCompletionProcessor();
- }
- return fJspCompletionProcessor;
- }
-
- /**
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org.eclipse.jface.text.ITextViewer,
- * int)
- */
- public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
- List results = new ArrayList();
- // need to compute context info here, if it's JSP, call java computer
- IDocument doc = viewer.getDocument();
- IDocumentPartitioner dp = null;
- if (doc instanceof IDocumentExtension3) {
- dp = ((IDocumentExtension3) doc).getDocumentPartitioner(IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING);
- }
- if (dp != null) {
- //IDocumentPartitioner dp = viewer.getDocument().getDocumentPartitioner();
- String type = dp.getPartition(documentOffset).getType();
- if (type == IJSPPartitions.JSP_DEFAULT || type == IJSPPartitions.JSP_CONTENT_JAVA) {
- // get context info from completion results...
- ICompletionProposal[] proposals = computeCompletionProposals(viewer, documentOffset);
- for (int i = 0; i < proposals.length; i++) {
- IContextInformation ci = proposals[i].getContextInformation();
- if (ci != null)
- results.add(ci);
- }
- }
- }
- return (IContextInformation[]) results.toArray(new IContextInformation[results.size()]);
- }
-
- /**
- * Returns a validator used to determine when displayed context
- * information should be dismissed. May only return <code>null</code> if
- * the processor is incapable of computing context information.
- *
- * @return a context information validator, or <code>null</code> if the
- * processor is incapable of computing context information
- */
- public IContextInformationValidator getContextInformationValidator() {
- return new JavaParameterListValidator();
- }
-
- /**
- * Gets the java preference store. If this is the first time getting it,
- * add a preference listener to it.
- *
- * @return IPreferenceStore
- */
- private IPreferenceStore getJavaPreferenceStore() {
- IPreferenceStore store = PreferenceConstants.getPreferenceStore();
- if (fJavaPreferenceListener == null) {
- fJavaPreferenceListener = new PreferenceListener();
- store.addPropertyChangeListener(fJavaPreferenceListener);
- }
- return store;
- }
-
- /**
- * Initialize preference for content assist
- */
- private void initializePreferences() {
- IPreferenceStore store = getJavaPreferenceStore();
-
- fAutoActivate = store.getBoolean(PreferenceConstants.CODEASSIST_AUTOACTIVATION);
- String autoCharacters = store.getString(PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA);
- completionProposalAutoActivationCharacters = (autoCharacters != null) ? autoCharacters.toCharArray() : new char[0];
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPMethodCompletionProposal.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPMethodCompletionProposal.java
deleted file mode 100644
index 4cd2280855..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPMethodCompletionProposal.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.ui.internal.contentassist;
-
-import org.eclipse.jdt.core.CompletionProposal;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.core.formatter.DefaultCodeFormatterConstants;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.link.ILinkedModeListener;
-import org.eclipse.jface.text.link.LinkedModeModel;
-import org.eclipse.jface.text.link.LinkedModeUI;
-import org.eclipse.jface.text.link.LinkedModeUI.ExitFlags;
-import org.eclipse.jface.text.link.LinkedModeUI.IExitPolicy;
-import org.eclipse.jface.text.link.LinkedPosition;
-import org.eclipse.jface.text.link.LinkedPositionGroup;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.ui.texteditor.link.EditorLinkedModeUI;
-
-public class JSPMethodCompletionProposal extends JSPCompletionProposal {
-
- private CompletionProposal fProposal;
- private IJavaProject fProject;
- private FormatterPrefs fFormatterPrefs;
-
- private static final String LPAREN = "("; //$NON-NLS-1$
- private static final String RPAREN = ")"; //$NON-NLS-1$
- private static final String COMMA = ","; //$NON-NLS-1$
- private static final String SPACE = " "; //$NON-NLS-1$
-
- private IRegion fSelectedRegion;
-
- public JSPMethodCompletionProposal(CompletionProposal proposal, IJavaProject project, String replacementString, int replacementOffset, int replacementLength, int cursorPosition, Image image, String displayString, IContextInformation contextInformation, String additionalProposalInfo, int relevance, boolean updateReplacementLengthOnValidate) {
- super(replacementString, replacementOffset, replacementLength, cursorPosition, image, displayString, contextInformation, additionalProposalInfo, relevance, updateReplacementLengthOnValidate);
- fProposal = proposal;
- fProject = project;
- }
-
- public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
- Position[] positions = null;
- FormatterPrefs formatterPrefs = getFormatterPrefs();
- StringBuffer buffer = new StringBuffer();
-
- buffer.append(fProposal.getName());
-
- if (formatterPrefs.beforeOpeningParen)
- buffer.append(SPACE);
-
- buffer.append(LPAREN);
-
- if (formatterPrefs.afterOpeningParen)
- buffer.append(SPACE);
-
- if (Signature.getParameterCount(fProposal.getSignature()) > 0) {
- char[][] parameters = fProposal.findParameterNames(null);
- if (parameters != null) {
- positions = new Position[parameters.length];
-
- int base = getReplacementOffset();
- for (int i = 0; i < parameters.length; i++) {
- if (i != 0) {
- if (formatterPrefs.beforeComma)
- buffer.append(SPACE);
-
- buffer.append(COMMA);
-
- if (formatterPrefs.afterComma)
- buffer.append(SPACE);
- }
- Position position = new Position(0,0);
- position.setOffset(base + buffer.length());
- position.setLength(parameters[i].length);
- positions[i] = position;
- buffer.append(parameters[i]);
- }
- }
- }
-
- if (formatterPrefs.beforeClosingParen)
- buffer.append(SPACE);
-
- buffer.append(RPAREN);
- setReplacementString(buffer.toString());
-
- super.apply(viewer, trigger, stateMask, offset);
-
- try {
- if (positions != null) {
- LinkedModeModel model = new LinkedModeModel();
-
- for (int i = 0; i < positions.length; i++) {
- LinkedPositionGroup group = new LinkedPositionGroup();
- Position position = positions[i];
- group.addPosition(new LinkedPosition(viewer.getDocument(), position.getOffset(), position.getLength(), i));
- model.addGroup(group);
- }
- model.forceInstall();
-
- LinkedModeUI ui = new EditorLinkedModeUI(model, viewer);
- ui.setExitPosition(viewer, getReplacementOffset() + getReplacementString().length(), 0, Integer.MAX_VALUE);
- ui.setExitPolicy(new ExitPolicy(')', viewer.getDocument()));
- ui.setCyclingMode(LinkedModeUI.CYCLE_WHEN_NO_PARENT);
- ui.setDoContextInfo(true);
- ui.enter();
- fSelectedRegion = ui.getSelectedRegion();
- }
- }
- catch (BadLocationException e) {
-
- }
- }
-
- protected final FormatterPrefs getFormatterPrefs() {
- if (fFormatterPrefs == null)
- fFormatterPrefs= new FormatterPrefs(fProject);
- return fFormatterPrefs;
- }
-
- /* Copied from org.eclipse.jdt.internal.ui.text.java.AbstractJavaCompletionProposal.ExitPolicy */
- protected static final class ExitPolicy implements IExitPolicy {
-
- final char fExitCharacter;
- private final IDocument fDocument;
-
- public ExitPolicy(char exitCharacter, IDocument document) {
- fExitCharacter= exitCharacter;
- fDocument= document;
- }
-
- /*
- * @see org.eclipse.jdt.internal.ui.text.link.LinkedPositionUI.ExitPolicy#doExit(org.eclipse.jdt.internal.ui.text.link.LinkedPositionManager, org.eclipse.swt.events.VerifyEvent, int, int)
- */
- public ExitFlags doExit(LinkedModeModel environment, VerifyEvent event, int offset, int length) {
-
- if (event.character == fExitCharacter) {
- if (environment.anyPositionContains(offset))
- return new ExitFlags(ILinkedModeListener.UPDATE_CARET, false);
- else
- return new ExitFlags(ILinkedModeListener.UPDATE_CARET, true);
- }
-
- switch (event.character) {
- case ';':
- return new ExitFlags(ILinkedModeListener.NONE, true);
- case SWT.CR:
- // when entering an anonymous class as a parameter, we don't want
- // to jump after the parenthesis when return is pressed
- if (offset > 0) {
- try {
- if (fDocument.getChar(offset - 1) == '{')
- return new ExitFlags(ILinkedModeListener.EXIT_ALL, true);
- } catch (BadLocationException e) {
- }
- }
- return null;
- default:
- return null;
- }
- }
-
- }
-
- /* Copied from org.eclipse.jdt.internal.ui.text.java.LazyJavaCompletionProposal.FormatterPrefs */
- protected static final class FormatterPrefs {
- /* Methods & constructors */
- public final boolean beforeOpeningParen;
- public final boolean afterOpeningParen;
- public final boolean beforeComma;
- public final boolean afterComma;
- public final boolean beforeClosingParen;
- public final boolean inEmptyList;
-
- /* type parameters */
- public final boolean beforeOpeningBracket;
- public final boolean afterOpeningBracket;
- public final boolean beforeTypeArgumentComma;
- public final boolean afterTypeArgumentComma;
- public final boolean beforeClosingBracket;
-
- FormatterPrefs(IJavaProject project) {
- beforeOpeningParen = getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_PAREN_IN_METHOD_INVOCATION, false);
- afterOpeningParen = getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_PAREN_IN_METHOD_INVOCATION, false);
- beforeComma = getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_METHOD_INVOCATION_ARGUMENTS, false);
- afterComma = getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_INVOCATION_ARGUMENTS, true);
- beforeClosingParen = getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_PAREN_IN_METHOD_INVOCATION, false);
- inEmptyList = getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BETWEEN_EMPTY_PARENS_IN_METHOD_INVOCATION, false);
-
- beforeOpeningBracket = getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_OPENING_ANGLE_BRACKET_IN_PARAMETERIZED_TYPE_REFERENCE, false);
- afterOpeningBracket = getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_OPENING_ANGLE_BRACKET_IN_PARAMETERIZED_TYPE_REFERENCE, false);
- beforeTypeArgumentComma = getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_COMMA_IN_PARAMETERIZED_TYPE_REFERENCE, false);
- afterTypeArgumentComma = getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_PARAMETERIZED_TYPE_REFERENCE, true);
- beforeClosingBracket = getCoreOption(project, DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_BEFORE_CLOSING_ANGLE_BRACKET_IN_PARAMETERIZED_TYPE_REFERENCE, false);
- }
-
- protected final boolean getCoreOption(IJavaProject project, String key, boolean def) {
- String option = getCoreOption(project, key);
- if (JavaCore.INSERT.equals(option))
- return true;
- if (JavaCore.DO_NOT_INSERT.equals(option))
- return false;
- return def;
- }
-
- protected final String getCoreOption(IJavaProject project, String key) {
- if (project == null)
- return JavaCore.getOption(key);
- return project.getOption(key, true);
- }
- }
-
- public Point getSelection(IDocument document) {
- if (fSelectedRegion != null) {
- return new Point(fSelectedRegion.getOffset(), fSelectedRegion.getLength());
- }
- return super.getSelection(document);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyCompletionProposalComputer.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyCompletionProposalComputer.java
deleted file mode 100644
index 1018f8e4bb..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyCompletionProposalComputer.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.ui.internal.contentassist;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImageHelper;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImages;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-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.utils.StringUtils;
-import org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-import org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLRelevanceConstants;
-import org.eclipse.wst.xml.ui.internal.util.SharedXMLEditorPluginImageHelper;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * <p>This class computes attribute value completion proposals
- * for <code>&lt;jsp:[gs]etProperty&gt;</code> tags.</p>
- */
-public class JSPPropertyCompletionProposalComputer extends
- DefaultXMLCompletionProposalComputer {
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer#addAttributeValueProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addAttributeValueProposals(
- ContentAssistRequest contentAssistRequest,
- CompletionProposalInvocationContext context) {
-
- IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
-
- //only add attribute value proposals for specific elements
- if(node.getNodeName().equals(JSP11Namespace.ElementName.SETPROPERTY) ||
- node.getNodeName().equals(JSP11Namespace.ElementName.GETPROPERTY)) {
-
- // Find the attribute name for which this position should have a value
- IStructuredDocumentRegion open = node.getFirstStructuredDocumentRegion();
- ITextRegionList openRegions = open.getRegions();
- int i = openRegions.indexOf(contentAssistRequest.getRegion());
- if (i < 0)
- return;
-
- // get the attribute in question (first attr name to the left of the cursor)
- ITextRegion attrNameRegion = null;
- String attributeName = null;
- while (i >= 0) {
- attrNameRegion = openRegions.get(i--);
- if (attrNameRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)
- break;
- }
- if (attrNameRegion != null)
- attributeName = open.getText(attrNameRegion);
-
- // determine get or set
- ITextRegion tagNameRegion = null;
- boolean isGetProperty = true;
- for (int j = 0; j < openRegions.size(); j++) {
- tagNameRegion = openRegions.get(j);
- if (tagNameRegion.getType() == DOMRegionContext.XML_TAG_NAME &&
- open.getText(tagNameRegion).trim().equals("jsp:setProperty")) { //$NON-NLS-1$
- isGetProperty = false;
- break;
- }
- }
-
- String currentValue = null;
- if (contentAssistRequest.getRegion().getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)
- currentValue = contentAssistRequest.getText();
- else
- currentValue = ""; //$NON-NLS-1$
- String matchString = null;
- // fixups since the matchString computations don't care if there are quotes around the value
- if (currentValue.length() > StringUtils.strip(currentValue).length() &&
- (currentValue.startsWith("\"") || currentValue.startsWith("'")) && //$NON-NLS-1$ //$NON-NLS-2$
- contentAssistRequest.getMatchString().length() > 0) {
- matchString = currentValue.substring(1, contentAssistRequest.getMatchString().length());
- } else {
- matchString = currentValue.substring(0, contentAssistRequest.getMatchString().length());
- }
- // for now we ignore complicated values such as jsp embedded in an attribute
- boolean existingComplicatedValue =
- contentAssistRequest.getRegion() != null &&
- contentAssistRequest.getRegion() instanceof ITextRegionContainer;
- if (existingComplicatedValue) {
- contentAssistRequest.getProposals().clear();
- contentAssistRequest.getMacros().clear();
- }
- else {
- if (attributeName.equals(JSP11Namespace.ATTR_NAME_NAME)) {
- addBeanNameProposals(contentAssistRequest, node, matchString);
- }
- else if (attributeName.equals(JSP11Namespace.ATTR_NAME_PROPERTY)) {
- addBeanPropertyProposals(contentAssistRequest, node, isGetProperty, matchString);
- }
- }
- }
- }
-
- /**
- * <p>Add bean property proposals to the given {@link ContentAssistRequest}</p>
- *
- * @param contentAssistRequest
- * @param node
- * @param isGetProperty
- * @param matchString
- */
- private void addBeanPropertyProposals(ContentAssistRequest contentAssistRequest,
- IDOMNode node, boolean isGetProperty, String matchString) {
-
- if (((Element) node).hasAttribute(JSP11Namespace.ATTR_NAME_NAME)) {
- // assumes that the node is the [gs]etProperty tag
- String useBeanName = ((Element) node).getAttribute(JSP11Namespace.ATTR_NAME_NAME);
- // properties can only be provided if a class/type/beanName has been declared
- if (useBeanName.length() > 0) {
- NodeList useBeans = node.getOwnerDocument().getElementsByTagName(JSP11Namespace.ElementName.USEBEAN);
- if (useBeans != null) {
- String typeName = null;
- for (int j = 0; j < useBeans.getLength(); j++) {
- if (useBeans.item(j).getNodeType() != Node.ELEMENT_NODE)
- continue;
- Element useBean = (Element) useBeans.item(j);
- if (useBean instanceof IndexedRegion && ((IndexedRegion) useBean).getStartOffset() < node.getStartOffset()) {
- if (useBeanName.equals(useBean.getAttribute(JSP11Namespace.ATTR_NAME_ID))) {
- typeName = useBean.getAttribute(JSP11Namespace.ATTR_NAME_CLASS);
- if (!useBean.hasAttribute(JSP11Namespace.ATTR_NAME_CLASS) || typeName.length() < 1) {
- typeName = useBean.getAttribute(JSP11Namespace.ATTR_NAME_TYPE);
- }
- if (!useBean.hasAttribute(JSP11Namespace.ATTR_NAME_TYPE) || typeName.length() < 1) {
- typeName = useBean.getAttribute(JSP11Namespace.ATTR_NAME_BEAN_NAME);
- }
- }
- }
- }
- if (typeName != null && typeName.length() > 0) {
- // find the class/type/beanName definition and obtain the list of properties
- IBeanInfoProvider provider = new BeanInfoProvider();
- IResource resource = JSPContentAssistHelper.getResource(contentAssistRequest);
- IJavaPropertyDescriptor[] descriptors = provider.getRuntimeProperties(resource, typeName);
- CustomCompletionProposal proposal = null;
- String displayString = ""; //$NON-NLS-1$
- for (int j = 0; j < descriptors.length; j++) {
- IJavaPropertyDescriptor pd = descriptors[j];
- // check whether it's get or set kinda property
- if (pd.getReadable() && isGetProperty || pd.getWriteable() && !isGetProperty) {
- // filter attr value name
- if (matchString.length() == 0 || pd.getName().toLowerCase().startsWith(matchString.toLowerCase())) {
- displayString = pd.getDisplayName();
- if (pd.getDeclaredType() != null && pd.getDeclaredType().length() > 0)
- displayString += " - " + pd.getDeclaredType(); //$NON-NLS-1$
- proposal = new CustomCompletionProposal("\"" + pd.getName() + "\"", //$NON-NLS-1$ //$NON-NLS-2$
- contentAssistRequest.getReplacementBeginPosition(),
- contentAssistRequest.getReplacementLength(),
- pd.getName().length() + 2,
- SharedXMLEditorPluginImageHelper.getImage(SharedXMLEditorPluginImageHelper.IMG_OBJ_ATTRIBUTE),
- displayString, null, pd.getDeclaredType(), XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
- contentAssistRequest.addProposal(proposal);
- }
- }
- }
- }
- }
- }
- }
- }
-
- /**
- * <p>Add bean name propoasals to the given {@link ContentAssistRequest}</p>
- *
- * @param contentAssistRequest
- * @param node
- * @param matchString
- */
- private void addBeanNameProposals(ContentAssistRequest contentAssistRequest, IDOMNode node, String matchString) {
- // will not catch useBeans specified using other than actual DOM Nodes
- NodeList useBeans = node.getOwnerDocument().getElementsByTagName(JSP11Namespace.ElementName.USEBEAN);
- if (useBeans != null) {
- String id = ""; //$NON-NLS-1$
- String displayString = null;
- String classOrType = null;
- String imageName = JSPEditorPluginImages.IMG_OBJ_CLASS_OBJ;
- for (int j = 0; j < useBeans.getLength(); j++) {
- if (useBeans.item(j).getNodeType() != Node.ELEMENT_NODE) {
- continue;
- }
- Element useBean = (Element) useBeans.item(j);
- if (useBean instanceof IndexedRegion &&
- ((IndexedRegion) useBean).getStartOffset() < node.getStartOffset() &&
- useBean.hasAttribute(JSP11Namespace.ATTR_NAME_ID)) {
-
- id = useBean.hasAttribute(JSP11Namespace.ATTR_NAME_ID) ?
- StringUtils.strip(useBean.getAttribute(JSP11Namespace.ATTR_NAME_ID)) : null;
- displayString = null;
- classOrType = null;
- imageName = JSPEditorPluginImages.IMG_OBJ_CLASS_OBJ;
- // set the Image based on whether the class, type, or beanName attribute is present
- if (useBean.hasAttribute(JSP11Namespace.ATTR_NAME_CLASS))
- classOrType = useBean.getAttribute(JSP11Namespace.ATTR_NAME_CLASS);
- if ((classOrType == null || classOrType.length() < 1) && useBean.hasAttribute(JSP11Namespace.ATTR_NAME_TYPE)) {
- classOrType = useBean.getAttribute(JSP11Namespace.ATTR_NAME_TYPE);
- imageName = JSPEditorPluginImages.IMG_OBJ_PUBLIC;
- }
- if ((classOrType == null || classOrType.length() < 1) && useBean.hasAttribute(JSP11Namespace.ATTR_NAME_BEAN_NAME)) {
- classOrType = useBean.getAttribute(JSP11Namespace.ATTR_NAME_BEAN_NAME);
- imageName = JSPEditorPluginImages.IMG_OBJ_PUBLIC;
- }
- if (classOrType != null && classOrType.length() > 0) {
- displayString = id + " - " + classOrType; //$NON-NLS-1$
- } else {
- displayString = id;
- }
-
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=2341
- if(id != null) {
- // filter
- if (matchString.length() == 0 || id.startsWith(matchString)) {
- CustomCompletionProposal proposal = new CustomCompletionProposal("\"" + id + "\"", //$NON-NLS-1$ //$NON-NLS-2$
- contentAssistRequest.getReplacementBeginPosition(),
- contentAssistRequest.getReplacementLength(),
- id.length() + 2,
- JSPEditorPluginImageHelper.getInstance().getImage(imageName),
- displayString, null, null,
- XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
- contentAssistRequest.addProposal(proposal);
- }
- }
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java
deleted file mode 100644
index c8b5dcc655..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPPropertyContentAssistProcessor.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.ui.internal.contentassist;
-
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-
-/**
- * This class computes attribute value completion proposals for &lt;jsp:[gs]etProperty&gt; tags.
- *
- * @deprecated This class is no longer used locally and will be removed in the future
- * @see JSPPropertyCompletionProposalComputer
- */
-public class JSPPropertyContentAssistProcessor extends JSPDummyContentAssistProcessor {
- private JSPPropertyCompletionProposalComputer fComputer;
-
- public JSPPropertyContentAssistProcessor() {
- super();
- fComputer = new JSPPropertyCompletionProposalComputer();
- }
-
- protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
- fComputer.addAttributeValueProposals(contentAssistRequest, null);
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPProposalCollector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPProposalCollector.java
deleted file mode 100644
index e73d4657df..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPProposalCollector.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2011 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.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.jdt.core.CompletionProposal;
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.IImportContainer;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.ui.text.java.CompletionProposalCollector;
-import org.eclipse.jdt.ui.text.java.CompletionProposalComparator;
-import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationExtension;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * Passed into ICodeComplete#codeComplete(int offset, CompletionRequestor requestor).
- * Adapts IJavaCompletionProposals to JSPCompletion proposals.
- * This includes:
- * - translating offsets
- * - "fixing" up display strings
- * - filtering some unwanted proposals
- *
- * @plannedfor 1.0
- */
-public class JSPProposalCollector extends CompletionProposalCollector {
-
- private JSPTranslation fTranslation;
- private Comparator fComparator;
- private IImportContainer fImportContainer;
-
- public JSPProposalCollector(ICompilationUnit cu, JSPTranslation translation) {
- super(cu);
-
- if(translation == null)
- throw new IllegalArgumentException("JSPTranslation cannot be null"); //$NON-NLS-1$
-
- fTranslation = translation;
- fImportContainer = cu.getImportContainer();
- }
-
- /**
- * Ensures that we only return JSPCompletionProposals.
- * @return an array of JSPCompletionProposals
- */
- public JSPCompletionProposal[] getJSPCompletionProposals() {
- List results = new ArrayList();
- IJavaCompletionProposal[] javaProposals = getJavaCompletionProposals();
- // need to filter out non JSPCompletionProposals
- // because their offsets haven't been translated
- for (int i = 0; i < javaProposals.length; i++) {
- if(javaProposals[i] instanceof JSPCompletionProposal)
- results.add(javaProposals[i]);
- }
- Collections.sort(results, getComparator());
- return (JSPCompletionProposal[])results.toArray(new JSPCompletionProposal[results.size()]);
- }
-
- private Comparator getComparator() {
- if(fComparator == null)
- fComparator = new CompletionProposalComparator();
- return fComparator;
- }
-
- /**
- * Overridden to:
- * - translate Java -> JSP offsets
- * - fix cursor-position-after
- * - fix mangled servlet name in display string
- * - remove unwanted proposals (servlet constructor)
- */
- protected IJavaCompletionProposal createJavaCompletionProposal(CompletionProposal proposal) {
-
- JSPCompletionProposal jspProposal = null;
-
- // ignore constructor proposals (they're not relevant for our JSP proposal list)
- if(!proposal.isConstructor()) {
- int kind = proposal.getKind();
- if(proposal.getKind() == CompletionProposal.TYPE_REF && JSPUIPlugin.getDefault().getPreferenceStore().getBoolean(JSPUIPreferenceNames.AUTO_IMPORT_INSERT)) {
- String signature = String.valueOf(proposal.getDeclarationSignature());
- String completion = String.valueOf(proposal.getCompletion());
- if(completion.indexOf(signature + ".") != -1) { //$NON-NLS-1$
- jspProposal = createAutoImportProposal(proposal);
- }
- }
- else if (kind == CompletionProposal.METHOD_REF) {
- jspProposal = createMethodProposal(proposal);
- }
-
- // default behavior
- if(jspProposal == null)
- jspProposal = createJspProposal(proposal);
- }
- return jspProposal;
- }
-
- /**
- * Retrieves the type name from the string <code>fullName</code>
- * @param fullName the fully qualified Java name
- * @return the type name
- */
- private String getTypeName(String fullName) {
- int index = fullName.lastIndexOf('.');
- return (index != -1) ? fullName.substring(index + 1) : fullName;
- }
-
- private JSPCompletionProposal createAutoImportProposal(CompletionProposal proposal) {
-
- JSPCompletionProposal jspProposal = null;
-
- String completion = new String(proposal.getCompletion());
-
- // it's fully qualified so we should
- // add an import statement
- // create an autoimport proposal
- String newCompletion = getTypeName(completion);
-
- // java offset
- int offset = proposal.getReplaceStart();
- // replacement length
- int length = proposal.getReplaceEnd() - offset;
- // translate offset from Java > JSP
- offset = fTranslation.getJspOffset(offset);
- // cursor position after must be calculated
- int positionAfter = calculatePositionAfter(proposal, newCompletion, offset);
-
- // from java proposal
- IJavaCompletionProposal javaProposal = super.createJavaCompletionProposal(proposal);
- proposal.getDeclarationSignature();
- Image image = javaProposal.getImage();
- String displayString = javaProposal.getDisplayString();
- displayString = getTranslation().fixupMangledName(displayString);
- IContextInformation contextInformation = javaProposal.getContextInformation();
- // don't do this, it's slow
- // String additionalInfo = javaProposal.getAdditionalProposalInfo();
- int relevance = javaProposal.getRelevance();
-
- boolean updateLengthOnValidate = true;
-
- jspProposal = new AutoImportProposal(completion, fImportContainer, newCompletion, offset, length, positionAfter, image, displayString, contextInformation, null, relevance, updateLengthOnValidate);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=124483
- // set wrapped java proposal so additional info can be calculated on demand
- jspProposal.setJavaCompletionProposal(javaProposal);
-
- return jspProposal;
- }
-
- private JSPCompletionProposal createJspProposal(CompletionProposal proposal) {
-
- JSPCompletionProposal jspProposal;
- String completion = String.valueOf(proposal.getCompletion());
- // java offset
- int offset = proposal.getReplaceStart();
- // replacement length
- int length = proposal.getReplaceEnd() - offset;
- // translate offset from Java > JSP
- offset = fTranslation.getJspOffset(offset);
- // cursor position after must be calculated
- int positionAfter = calculatePositionAfter(proposal, completion, offset);
-
- // from java proposal
- IJavaCompletionProposal javaProposal = super.createJavaCompletionProposal(proposal);
- proposal.getDeclarationSignature();
- Image image = javaProposal.getImage();
- String displayString = javaProposal.getDisplayString();
- displayString = getTranslation().fixupMangledName(displayString);
- IContextInformation contextInformation = javaProposal.getContextInformation();
- // String additionalInfo = javaProposal.getAdditionalProposalInfo();
-
- /* the context information is calculated with respect to the java document
- * thus it needs to be updated in respect of the JSP document.
- */
- if(contextInformation instanceof IContextInformationExtension) {
- contextInformation = new JavaContextInformationWrapper(contextInformation);
- }
-
- int relevance = javaProposal.getRelevance();
-
- boolean updateLengthOnValidate = true;
-
- jspProposal = new JSPCompletionProposal(completion, offset, length, positionAfter, image, displayString, contextInformation, null, relevance, updateLengthOnValidate);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=124483
- // set wrapped java proposal so additional info can be calculated on demand
- jspProposal.setJavaCompletionProposal(javaProposal);
-
- return jspProposal;
- }
-
- private class JavaContextInformationWrapper implements IContextInformation, IContextInformationExtension {
- private IContextInformation contextInformation;
-
- public JavaContextInformationWrapper(IContextInformation contextInformation) {
- this.contextInformation = contextInformation;
- }
-
- public String getContextDisplayString() {
- return contextInformation.getContextDisplayString();
- }
-
- public Image getImage() {
- return contextInformation.getImage();
- }
-
- public String getInformationDisplayString() {
- return contextInformation.getInformationDisplayString();
- }
-
- public int getContextInformationPosition() {
- return fTranslation.getJspOffset(((IContextInformationExtension) contextInformation).getContextInformationPosition());
- }
-
- }
-
- private JSPCompletionProposal createMethodProposal(CompletionProposal proposal) {
-
- JSPCompletionProposal jspProposal;
- String completion = String.valueOf(proposal.getCompletion());
- // java offset
- int offset = proposal.getReplaceStart();
- // replacement length
- int length = proposal.getReplaceEnd() - offset;
- // translate offset from Java > JSP
- offset = fTranslation.getJspOffset(offset);
- // cursor position after must be calculated
- int positionAfter = calculatePositionAfter(proposal, completion, offset);
-
- // from java proposal
- IJavaCompletionProposal javaProposal = super.createJavaCompletionProposal(proposal);
- proposal.getDeclarationSignature();
- Image image = javaProposal.getImage();
- String displayString = javaProposal.getDisplayString();
- displayString = getTranslation().fixupMangledName(displayString);
- IContextInformation contextInformation = javaProposal.getContextInformation();
- // String additionalInfo = javaProposal.getAdditionalProposalInfo();
-
- /* the context information is calculated with respect to the java document
- * thus it needs to be updated in respect of the JSP document.
- */
- if(contextInformation instanceof IContextInformationExtension) {
- contextInformation = new JavaContextInformationWrapper(contextInformation);
- }
-
- int relevance = javaProposal.getRelevance();
-
- boolean updateLengthOnValidate = true;
-
- jspProposal = new JSPMethodCompletionProposal(proposal, fTranslation.getJavaProject(), completion, offset, length, positionAfter, image, displayString, contextInformation, null, relevance, updateLengthOnValidate);
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=124483
- // set wrapped java proposal so additional info can be calculated on demand
- jspProposal.setJavaCompletionProposal(javaProposal);
-
- return jspProposal;
- }
-
- /**
- * Cacluates the where the cursor should be after applying this proposal.
- * eg. method(|) if the method proposal chosen had params.
- *
- * @param proposal
- * @param completion
- * @param currentCursorOffset
- * @return
- */
- private int calculatePositionAfter(CompletionProposal proposal, String completion, int currentCursorOffset) {
- // calculate cursor position after
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=118398
- //int positionAfter = currentCursorOffset+completion.length();
- int positionAfter = completion.length();
-
- int kind = proposal.getKind();
-
- // may need better logic here...
- // put cursor inside parenthesis if there's params
- // only checking for any kind of declaration
- if(kind == CompletionProposal.ANONYMOUS_CLASS_DECLARATION || kind == CompletionProposal.METHOD_DECLARATION || kind == CompletionProposal.POTENTIAL_METHOD_DECLARATION || kind == CompletionProposal.METHOD_REF) {
- String[] params = Signature.getParameterTypes(String.valueOf(proposal.getSignature()));
- if(completion.length() > 0 && params.length > 0)
- positionAfter--;
- }
- return positionAfter;
- }
-
- static char[] getTypeTriggers() {
- return TYPE_TRIGGERS;
- }
-
- public JSPTranslation getTranslation() {
- return fTranslation;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPStructuredContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPStructuredContentAssistProcessor.java
deleted file mode 100644
index 4a94d89a2e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPStructuredContentAssistProcessor.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 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.ui.internal.contentassist;
-
-import org.eclipse.jdt.ui.PreferenceConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jst.jsp.core.text.IJSPPartitions;
-import org.eclipse.wst.html.ui.internal.HTMLUIPlugin;
-import org.eclipse.wst.html.ui.internal.preferences.HTMLUIPreferenceNames;
-import org.eclipse.wst.sse.ui.contentassist.StructuredContentAssistProcessor;
-import org.eclipse.wst.xml.ui.internal.contentassist.AttributeContextInformationPresenter;
-
-/**
- * <p>Implementation of {@link StructuredContentAssistProcessor} for JSP documents</p>
- *
- * <p>Currently this implementation still uses the HTML preferences for auto
- * activation characters, but in the future this should probably change</p>
- */
-public class JSPStructuredContentAssistProcessor extends StructuredContentAssistProcessor {
-
- /** auto activation characters */
- private char[] fCompletionProposalAutoActivationCharacters;
-
- /** property key for determining if auto activation is enabled */
- private String fAutoActivationEnabledPropertyKey;
-
- /** property key for determining what the auto activation characters are */
- private String fAutoActivationCharactersPropertyKey;
-
- /** property key for determining what the auto activation delay is*/
- private String fAutoActivationDelayKey;
-
- /** the context information validator for this processor */
- private IContextInformationValidator fContextInformationValidator;
-
- /**
- * <p>Constructor</p>
- *
- * @param assistant {@link ContentAssistant} to use
- * @param partitionTypeID the partition type this processor is for
- * @param viewer {@link ITextViewer} this processor is acting in
- */
- public JSPStructuredContentAssistProcessor(ContentAssistant assistant,
- String partitionTypeID, ITextViewer viewer) {
-
- super(assistant, partitionTypeID, viewer, isJavaPartitionType(partitionTypeID) ?
- PreferenceConstants.getPreferenceStore() : HTMLUIPlugin.getDefault().getPreferenceStore());
-
- //determine which property keys to used based on weather this processor is for Java or HTML syntax
- if(isJavaPartitionType(partitionTypeID)) {
- fAutoActivationEnabledPropertyKey = PreferenceConstants.CODEASSIST_AUTOACTIVATION;
- fAutoActivationCharactersPropertyKey = PreferenceConstants.CODEASSIST_AUTOACTIVATION_TRIGGERS_JAVA;
- } else {
- fAutoActivationEnabledPropertyKey = HTMLUIPreferenceNames.AUTO_PROPOSE;
- fAutoActivationCharactersPropertyKey = HTMLUIPreferenceNames.AUTO_PROPOSE_CODE;
- }
- fAutoActivationDelayKey = HTMLUIPreferenceNames.AUTO_PROPOSE_DELAY;
-
- //get the current user preference
- getAutoActivationCharacterPreferences();
- updateAutoActivationDelay();
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.contentassist.StructuredContentAssistProcessor#getContextInformationValidator()
- */
- public IContextInformationValidator getContextInformationValidator() {
- if (this.fContextInformationValidator == null) {
- this.fContextInformationValidator = new AttributeContextInformationPresenter();
- }
- return this.fContextInformationValidator;
- }
-
- /**
- * @see org.eclipse.wst.html.ui.internal.contentassist.HTMLStructuredContentAssistProcessor#getCompletionProposalAutoActivationCharacters()
- */
- public char[] getCompletionProposalAutoActivationCharacters() {
- return super.getCompletionProposalAutoActivationCharacters() != null ? super.getCompletionProposalAutoActivationCharacters() : this.fCompletionProposalAutoActivationCharacters;
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.contentassist.StructuredContentAssistProcessor#propertyChange(
- * org.eclipse.jface.util.PropertyChangeEvent)
- */
- public void propertyChange(PropertyChangeEvent event) {
- String property = event.getProperty();
- if(property.equals(fAutoActivationEnabledPropertyKey) ||
- property.equals(fAutoActivationCharactersPropertyKey)) {
- getAutoActivationCharacterPreferences();
- }else if (property.equals(fAutoActivationDelayKey)) {
- updateAutoActivationDelay();
- }
- }
-
- /**
- * <p>Sets the auto activation delay in Content Assist</p>
- */
- private void updateAutoActivationDelay() {
- IPreferenceStore store = getPreferenceStore();
- boolean doAuto = store.getBoolean(fAutoActivationEnabledPropertyKey);
- if (doAuto) {
- setAutoActivationDelay(store.getInt(fAutoActivationDelayKey));
- }
-
- }
-
- /**
- * <p>Gets the auto activation character user preferences for Java and stores them for later use</p>
- */
- private void getAutoActivationCharacterPreferences() {
- IPreferenceStore store = getPreferenceStore();
-
- boolean doAuto = store.getBoolean(fAutoActivationEnabledPropertyKey);
- if (doAuto) {
- fCompletionProposalAutoActivationCharacters =
- store.getString(fAutoActivationCharactersPropertyKey).toCharArray();
- } else {
- fCompletionProposalAutoActivationCharacters = null;
- }
- }
-
- /**
- * @param partitionTypeID check to see if this partition type ID is for a Java partition type
- * @return <code>true</code> if the given partiton type is a Java partition type,
- * <code>false</code> otherwise
- */
- private static boolean isJavaPartitionType(String partitionTypeID) {
- return IJSPPartitions.JSP_CONTENT_JAVA.equals(partitionTypeID) || IJSPPartitions.JSP_DEFAULT_EL.equals(partitionTypeID) || IJSPPartitions.JSP_DEFAULT_EL2.equals(partitionTypeID);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTaglibCompletionProposalComputer.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTaglibCompletionProposalComputer.java
deleted file mode 100644
index 0f3797ebfe..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTaglibCompletionProposalComputer.java
+++ /dev/null
@@ -1,433 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2011 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.ui.internal.contentassist;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.util.FacetModuleCoreSupport;
-import org.eclipse.jst.jsp.core.taglib.IJarRecord;
-import org.eclipse.jst.jsp.core.taglib.ITLDRecord;
-import org.eclipse.jst.jsp.core.taglib.ITagDirRecord;
-import org.eclipse.jst.jsp.core.taglib.ITaglibDescriptor;
-import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
-import org.eclipse.jst.jsp.core.taglib.IURLRecord;
-import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.html.core.internal.contentmodel.JSP20Namespace;
-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.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.utils.StringUtils;
-import org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceConstants;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-import org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImageHelper;
-import org.eclipse.wst.xml.ui.internal.editor.XMLEditorPluginImages;
-import org.w3c.dom.Node;
-
-/**
- * <p>Compute JSP taglib completion proposals</p>
- */
-public class JSPTaglibCompletionProposalComputer extends
- DefaultXMLCompletionProposalComputer {
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer#addAttributeValueProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addAttributeValueProposals(
- ContentAssistRequest contentAssistRequest,
- CompletionProposalInvocationContext context) {
-
- IPath basePath = getBasePath(contentAssistRequest);
- if (basePath != null) {
- IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
-
- //only add attribute value proposals for specific elements
- if(node.getNodeName().equals(JSP11Namespace.ElementName.DIRECTIVE_TAGLIB)) {
- // Find the attribute name for which this position should have a value
- IStructuredDocumentRegion open = node.getFirstStructuredDocumentRegion();
- ITextRegionList openRegions = open.getRegions();
- int i = openRegions.indexOf(contentAssistRequest.getRegion());
- if (i < 0)
- return;
- ITextRegion nameRegion = null;
- while (i >= 0) {
- nameRegion = openRegions.get(i--);
- if (nameRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)
- break;
- }
-
- String attributeName = null;
- if (nameRegion != null)
- attributeName = open.getText(nameRegion);
-
- String currentValue = null;
- if (contentAssistRequest.getRegion().getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)
- currentValue = contentAssistRequest.getText();
- else
- currentValue = ""; //$NON-NLS-1$
- String matchString = null;
- // fixups
- int start = contentAssistRequest.getReplacementBeginPosition();
- int length = contentAssistRequest.getReplacementLength();
- if (currentValue.length() > StringUtils.strip(currentValue).length() &&
- (currentValue.startsWith("\"") || currentValue.startsWith("'")) && //$NON-NLS-1$ //$NON-NLS-2$
- contentAssistRequest.getMatchString().length() > 0) {
-
- matchString = currentValue.substring(1, contentAssistRequest.getMatchString().length());
- }
- else {
- matchString = currentValue.substring(0, contentAssistRequest.getMatchString().length());
- }
- boolean existingComplicatedValue = contentAssistRequest.getRegion() != null &&
- contentAssistRequest.getRegion() instanceof ITextRegionContainer;
- if (existingComplicatedValue) {
- contentAssistRequest.getProposals().clear();
- contentAssistRequest.getMacros().clear();
- }
- else {
- String lowerCaseMatch = matchString.toLowerCase(Locale.US);
- if (attributeName.equals(JSP11Namespace.ATTR_NAME_URI)) {
- ITaglibRecord[] availableTaglibRecords = TaglibIndex.getAvailableTaglibRecords(basePath);
- /*
- * a simple enough way to remove duplicates (resolution at
- * runtime would be nondeterministic anyway)
- */
- Map uriToRecords = new HashMap();
- for (int taglibRecordNumber = 0; taglibRecordNumber < availableTaglibRecords.length; taglibRecordNumber++) {
- ITaglibRecord taglibRecord = availableTaglibRecords[taglibRecordNumber];
- ITaglibDescriptor descriptor = taglibRecord.getDescriptor();
- String uri = null;
- switch (taglibRecord.getRecordType()) {
- case ITaglibRecord.URL :
- uri = descriptor.getURI();
- uriToRecords.put(uri, taglibRecord);
- break;
- case ITaglibRecord.JAR : {
- IPath location = ((IJarRecord) taglibRecord).getLocation();
- IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(location);
- IPath localContextRoot = FacetModuleCoreSupport.computeWebContentRootPath(basePath);
- for (int fileNumber = 0; fileNumber < files.length; fileNumber++) {
- if (localContextRoot.isPrefixOf(files[fileNumber].getFullPath())) {
- uri = IPath.SEPARATOR +
- files[fileNumber].getFullPath().removeFirstSegments(localContextRoot.segmentCount()).toString();
- uriToRecords.put(uri, taglibRecord);
- }
- else {
- uri = FacetModuleCoreSupport.getRuntimePath(files[fileNumber].getFullPath()).toString();
- uriToRecords.put(uri, taglibRecord);
- }
- }
- break;
- }
- case ITaglibRecord.TLD : {
- uri = descriptor.getURI();
- if (uri == null || uri.trim().length() == 0) {
- IPath path = ((ITLDRecord) taglibRecord).getPath();
- IPath localContextRoot = FacetModuleCoreSupport.computeWebContentRootPath(basePath);
- if (localContextRoot.isPrefixOf(path)) {
- uri = IPath.SEPARATOR + path.removeFirstSegments(localContextRoot.segmentCount()).toString();
- }
- else {
- uri = FacetModuleCoreSupport.getRuntimePath(path).toString();
- }
- }
- uriToRecords.put(uri, taglibRecord);
- break;
- }
- }
- }
- /*
- * use the records and their descriptors to construct
- * proposals
- */
- Object[] uris = uriToRecords.keySet().toArray();
- for (int uriNumber = 0; uriNumber < uris.length; uriNumber++) {
- String uri = uris[uriNumber].toString();
- ITaglibRecord taglibRecord = (ITaglibRecord) uriToRecords.get(uri);
- ITaglibDescriptor descriptor = (taglibRecord).getDescriptor();
- if (uri != null && uri.length() > 0 && (matchString.length() == 0 ||
- uri.toLowerCase(Locale.US).startsWith(lowerCaseMatch))) {
-
- String url = getSmallImageURL(taglibRecord);
- ImageDescriptor imageDescriptor = JSPUIPlugin.getInstance().getImageRegistry().getDescriptor(url);
- if (imageDescriptor == null && url != null) {
- URL imageURL;
- try {
- imageURL = new URL(url);
- imageDescriptor = ImageDescriptor.createFromURL(imageURL);
- JSPUIPlugin.getInstance().getImageRegistry().put(url, imageDescriptor);
- }
- catch (MalformedURLException e) {
- Logger.logException(e);
- }
- }
- String additionalInfo = descriptor.getDisplayName() + "<br/>" + //$NON-NLS-1$
- descriptor.getDescription() + "<br/>" + descriptor.getTlibVersion(); //$NON-NLS-1$
- Image image = null;
- try {
- image = JSPUIPlugin.getInstance().getImageRegistry().get(url);
- }
- catch (Exception e) {
- Logger.logException(e);
- }
- if (image == null) {
- image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
- }
- CustomCompletionProposal proposal = new CustomCompletionProposal(
- "\"" + uri + "\"", start, length, uri.length() + 2, //$NON-NLS-1$ //$NON-NLS-2$
- image, uri, null, additionalInfo, IRelevanceConstants.R_NONE);
- contentAssistRequest.addProposal(proposal);
- }
- }
- }
- else if (attributeName.equals(JSP20Namespace.ATTR_NAME_TAGDIR)) {
- ITaglibRecord[] availableTaglibRecords = TaglibIndex.getAvailableTaglibRecords(basePath);
- /*
- * a simple enough way to remove duplicates (resolution at
- * runtime would be nondeterministic anyway)
- */
- Map uriToRecords = new HashMap();
- IPath localContextRoot = FacetModuleCoreSupport.computeWebContentRootPath(basePath);
- for (int taglibRecordNumber = 0; taglibRecordNumber < availableTaglibRecords.length; taglibRecordNumber++) {
- ITaglibRecord taglibRecord = availableTaglibRecords[taglibRecordNumber];
- String uri = null;
- if (taglibRecord.getRecordType() == ITaglibRecord.TAGDIR) {
- IPath path = ((ITagDirRecord) taglibRecord).getPath();
- if (localContextRoot.isPrefixOf(path)) {
- uri = IPath.SEPARATOR + path.removeFirstSegments(localContextRoot.segmentCount()).toString();
- uriToRecords.put(uri, taglibRecord);
- }
- }
- }
- /*
- * use the records and their descriptors to construct
- * proposals
- */
- Object[] uris = uriToRecords.keySet().toArray();
- for (int uriNumber = 0; uriNumber < uris.length; uriNumber++) {
- String uri = uris[uriNumber].toString();
- ITaglibRecord taglibRecord = (ITaglibRecord) uriToRecords.get(uri);
- ITaglibDescriptor descriptor = (taglibRecord).getDescriptor();
- if (uri != null && uri.length() > 0 && (matchString.length() == 0 ||
- uri.toLowerCase(Locale.US).startsWith(lowerCaseMatch))) {
-
- String url = getSmallImageURL(taglibRecord);
- ImageDescriptor imageDescriptor = null;
- if (url != null) {
- imageDescriptor = JSPUIPlugin.getInstance().getImageRegistry().getDescriptor(url);
- }
- if (imageDescriptor == null && url != null) {
- URL imageURL;
- try {
- imageURL = new URL(url);
- imageDescriptor = ImageDescriptor.createFromURL(imageURL);
- JSPUIPlugin.getInstance().getImageRegistry().put(url, imageDescriptor);
- }
- catch (MalformedURLException e) {
- Logger.logException(e);
- }
- }
- String additionalInfo = descriptor.getDescription() + "<br/>" + descriptor.getTlibVersion(); //$NON-NLS-1$
- Image image = null;
- try {
- image = JSPUIPlugin.getInstance().getImageRegistry().get(url);
- }
- catch (Exception e) {
- Logger.logException(e);
- }
- if (image == null) {
- image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
- }
- CustomCompletionProposal proposal = new CustomCompletionProposal(
- "\"" + uri + "\"", start, length, uri.length() + 2, image, uri, //$NON-NLS-1$ //$NON-NLS-2$
- null, additionalInfo, IRelevanceConstants.R_NONE);
- contentAssistRequest.addProposal(proposal);
- }
- }
- }
- else if (attributeName.equals(JSP11Namespace.ATTR_NAME_PREFIX)) {
- Node uriAttr = node.getAttributes().getNamedItem(JSP11Namespace.ATTR_NAME_URI);
- String uri = null;
- if (uriAttr != null) {
- uri = uriAttr.getNodeValue();
- ITaglibRecord[] availableTaglibRecords = TaglibIndex.getAvailableTaglibRecords(basePath);
- Map prefixMap = new HashMap();
- for (int taglibrecordNumber = 0; taglibrecordNumber < availableTaglibRecords.length; taglibrecordNumber++) {
- ITaglibDescriptor descriptor = availableTaglibRecords[taglibrecordNumber].getDescriptor();
- if (isTaglibForURI(uri, basePath, availableTaglibRecords[taglibrecordNumber])) {
- String shortName = descriptor.getShortName().trim();
- if (shortName.length() > 0) {
- boolean valid = true;
- for (int character = 0; character < shortName.length(); character++) {
- valid = valid && !Character.isWhitespace(shortName.charAt(character));
- }
- if (valid) {
- prefixMap.put(shortName, descriptor);
- }
- }
- }
- }
- Object prefixes[] = prefixMap.keySet().toArray();
- for (int j = 0; j < prefixes.length; j++) {
- String prefix = (String) prefixes[j];
- ITaglibDescriptor descriptor = (ITaglibDescriptor) prefixMap.get(prefix);
- Image image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
- CustomCompletionProposal proposal = new CustomCompletionProposal(
- "\"" + prefix + "\"", start, length, prefix.length() + 2, image, //$NON-NLS-1$ //$NON-NLS-2$
- prefix, null, descriptor.getDescription(), IRelevanceConstants.R_NONE);
- contentAssistRequest.addProposal(proposal);
- }
- }
- else {
- Node dirAttr = node.getAttributes().getNamedItem(JSP20Namespace.ATTR_NAME_TAGDIR);
- if (dirAttr != null) {
- String dir = dirAttr.getNodeValue();
- if (dir != null) {
- ITaglibRecord record = TaglibIndex.resolve(basePath.toString(), dir, false);
- if (record != null) {
- ITaglibDescriptor descriptor = record.getDescriptor();
- if (descriptor != null) {
- String shortName = descriptor.getShortName();
-
- Image image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
- CustomCompletionProposal proposal = new CustomCompletionProposal(
- "\"" + shortName + "\"", start, length, shortName.length() + 2, //$NON-NLS-1$ //$NON-NLS-2$
- image, shortName, null, descriptor.getDescription(),
- IRelevanceConstants.R_NONE);
- contentAssistRequest.addProposal(proposal);
- }
- else {
- if (dir.startsWith("/WEB-INF/")) { //$NON-NLS-1$
- dir = dir.substring(9);
- }
- String prefix = StringUtils.replace(dir, "/", "-"); //$NON-NLS-1$ //$NON-NLS-2$
-
- Image image = XMLEditorPluginImageHelper.getInstance().getImage(XMLEditorPluginImages.IMG_OBJ_ATTRIBUTE);
- CustomCompletionProposal proposal = new CustomCompletionProposal(
- "\"" + prefix + "\"", start, length, prefix.length() + 2, //$NON-NLS-1$ //$NON-NLS-2$
- image, prefix, null, null, IRelevanceConstants.R_NONE);
- contentAssistRequest.addProposal(proposal);
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-
- private boolean isTaglibForURI(String uri, IPath basePath, ITaglibRecord record) {
- final ITaglibDescriptor descriptor = record.getDescriptor();
- boolean matches = false;
- if (descriptor != null) {
- if (record.getRecordType() == ITaglibRecord.TLD && (descriptor.getURI() == null || "".equals(descriptor.getURI().trim()))) {
- matches = ((ITLDRecord) record).getPath().equals(FacetModuleCoreSupport.resolve(basePath, uri));
- }
- else {
- matches = descriptor.getURI().toLowerCase(Locale.US).equals(uri.toLowerCase(Locale.US));
- }
- }
- return matches;
- }
-
- private String getSmallImageURL(ITaglibRecord taglibRecord) {
- String url = null;
- switch (taglibRecord.getRecordType()) {
- case (ITaglibRecord.TLD) : {
- ITLDRecord record = (ITLDRecord) taglibRecord;
- IResource file = ResourcesPlugin.getWorkspace().getRoot().getFile(record.getPath());
- if (file.getLocation() != null && record.getDescriptor().getSmallIcon().length() > 0) {
- url = "platform:/resource/" + //$NON-NLS-1$
- FacetModuleCoreSupport.resolve(file.getFullPath(),
- record.getDescriptor().getSmallIcon());
- }
- }
- break;
- case (ITaglibRecord.JAR) : {
- IJarRecord record = (IJarRecord) taglibRecord;
- if (record.getDescriptor().getSmallIcon().length() > 0) {
- // url = "file:" +
- // URIHelper.normalize(record.getDescriptor().getSmallIcon(),
- // record.getLocation().toString(), "/"); //$NON-NLS-1$
- }
- }
- break;
- case (ITaglibRecord.TAGDIR) : {
- }
- break;
- case (ITaglibRecord.URL) : {
- IURLRecord record = (IURLRecord) taglibRecord;
- if (record.getDescriptor().getSmallIcon().length() > 0) {
- url = URIHelper.normalize(record.getDescriptor().getSmallIcon(), record.getURL().toString(), "/"); //$NON-NLS-1$
- }
- }
- break;
- }
- return url;
- }
-
- /**
- * Returns project request is in
- *
- * @param request
- * @return
- */
- private IPath getBasePath(ContentAssistRequest request) {
- IPath baselocation = null;
-
- if (request != null) {
- IStructuredDocumentRegion region = request.getDocumentRegion();
- if (region != null) {
- IDocument document = region.getParentDocument();
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- if (model != null) {
- String location = model.getBaseLocation();
- if (location != null) {
- baselocation = new Path(location);
- }
- }
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- }
- }
- return baselocation;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTaglibDirectiveContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTaglibDirectiveContentAssistProcessor.java
deleted file mode 100644
index 9374f8f380..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTaglibDirectiveContentAssistProcessor.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010 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.ui.internal.contentassist;
-
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-
-/**
- * @deprecated This class is no longer used locally and will be removed in the future
- * @see JSPTaglibCompletionProposalComputer
- */
-public class JSPTaglibDirectiveContentAssistProcessor extends JSPDummyContentAssistProcessor {
-
- private JSPTaglibCompletionProposalComputer fComputer;
-
- public JSPTaglibDirectiveContentAssistProcessor() {
- super();
- fComputer = new JSPTaglibCompletionProposalComputer();
- }
-
- protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
- fComputer.addAttributeValueProposals(contentAssistRequest, null);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java
deleted file mode 100644
index d2655a6bf8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplateCompletionProcessor.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.templates.ContextTypeRegistry;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.text.templates.TemplateCompletionProcessor;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jface.text.templates.TemplateContextType;
-import org.eclipse.jface.text.templates.TemplateException;
-import org.eclipse.jface.text.templates.TemplateProposal;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImageHelper;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImages;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.xml.ui.internal.contentassist.ReplaceNameTemplateContext;
-
-/**
- * Completion processor for JSP Templates. Most of the work is already done by
- * the JSP Content Assist processor, so by the time the
- * JSPTemplateCompletionProcessor is asked for content assist proposals, the
- * jsp content assist processor has already set the context type for
- * templates.
- */
-class JSPTemplateCompletionProcessor extends TemplateCompletionProcessor {
- private static final class ProposalComparator implements Comparator {
- public int compare(Object o1, Object o2) {
- return ((TemplateProposal) o2).getRelevance() - ((TemplateProposal) o1).getRelevance();
- }
- }
-
- private static final Comparator fgProposalComparator = new ProposalComparator();
- private String fContextTypeId = null;
-
- /*
- * Copied from super class except instead of calling createContext(viewer,
- * region) call createContext(viewer, region, offset) instead
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {
-
- ITextSelection selection = (ITextSelection) viewer.getSelectionProvider().getSelection();
-
- // adjust offset to end of normalized selection
- if (selection.getOffset() == offset)
- offset = selection.getOffset() + selection.getLength();
-
- String prefix = extractPrefix(viewer, offset);
- Region region = new Region(offset - prefix.length(), prefix.length());
- TemplateContext context = createContext(viewer, region, offset);
- if (context == null)
- return new ICompletionProposal[0];
-
- // name of the selection variables {line, word}_selection
- context.setVariable("selection", selection.getText()); // //$NON-NLS-1$
-
- Template[] templates = getTemplates(context.getContextType().getId());
-
- List matches = new ArrayList();
- for (int i = 0; i < templates.length; i++) {
- Template template = templates[i];
- try {
- context.getContextType().validate(template.getPattern());
- }
- catch (TemplateException e) {
- continue;
- }
- if (template.matches(prefix, context.getContextType().getId()))
- matches.add(createProposal(template, context, (IRegion) region, getRelevance(template, prefix)));
- }
-
- Collections.sort(matches, fgProposalComparator);
-
- return (ICompletionProposal[]) matches.toArray(new ICompletionProposal[matches.size()]);
- }
-
- /**
- * Creates a concrete template context for the given region in the
- * document. This involves finding out which context type is valid at the
- * given location, and then creating a context of this type. The default
- * implementation returns a <code>SmartReplaceTemplateContext</code> for
- * the context type at the given location. This takes the offset at which
- * content assist was invoked into consideration.
- *
- * @param viewer
- * the viewer for which the context is created
- * @param region
- * the region into <code>document</code> for which the
- * context is created
- * @param offset
- * the original offset where content assist was invoked
- * @return a template context that can handle template insertion at the
- * given location, or <code>null</code>
- */
- private TemplateContext createContext(ITextViewer viewer, IRegion region, int offset) {
- // pretty much same code as super.createContext except create
- // SmartReplaceTemplateContext
- TemplateContextType contextType = getContextType(viewer, region);
- if (contextType != null) {
- IDocument document = viewer.getDocument();
- return new ReplaceNameTemplateContext(contextType, document, region.getOffset(), region.getLength(), offset);
- }
- return null;
- }
-
- protected ICompletionProposal createProposal(Template template, TemplateContext context, IRegion region, int relevance) {
- return new CustomTemplateProposal(template, context, region, getImage(template), relevance);
- }
-
- protected TemplateContextType getContextType(ITextViewer viewer, IRegion region) {
- TemplateContextType type = null;
-
- ContextTypeRegistry registry = getTemplateContextRegistry();
- if (registry != null)
- type = registry.getContextType(fContextTypeId);
-
- return type;
- }
-
- protected Image getImage(Template template) {
- return JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_TEMPLATE);
- }
-
- private ContextTypeRegistry getTemplateContextRegistry() {
- return JSPUIPlugin.getDefault().getTemplateContextRegistry();
- }
-
- protected Template[] getTemplates(String contextTypeId) {
- Template templates[] = null;
-
- TemplateStore store = getTemplateStore();
- if (store != null)
- templates = store.getTemplates(contextTypeId);
-
- return templates;
- }
-
- private TemplateStore getTemplateStore() {
- return JSPUIPlugin.getDefault().getTemplateStore();
- }
-
- void setContextType(String contextTypeId) {
- fContextTypeId = contextTypeId;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplatesCompletionProposalComputer.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplatesCompletionProposalComputer.java
deleted file mode 100644
index beb058905c..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPTemplatesCompletionProposalComputer.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeIdsJSP;
-import org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-import org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer;
-
-/**
- * <p>Computes JSP template completion proposals</p>
- */
-public class JSPTemplatesCompletionProposalComputer extends
- DefaultXMLCompletionProposalComputer {
-
- /** Template completion processor used to create template proposals */
- private JSPTemplateCompletionProcessor fTemplateProcessor = null;
-
- /**
- * Create the computer
- */
- public JSPTemplatesCompletionProposalComputer() {
- this.fTemplateProcessor = new JSPTemplateCompletionProcessor();
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLCompletionProposalComputer#computeCompletionProposals(org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public List computeCompletionProposals(
- CompletionProposalInvocationContext context,
- IProgressMonitor monitor) {
-
- //get the templates specific to the context
- List proposals = new ArrayList(super.computeCompletionProposals(context, monitor));
-
- //get templates not specific to the context
- proposals.addAll(this.getTemplateProposals(TemplateContextTypeIdsJSP.ALL, context));
-
- return proposals;
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer#addAttributeNameProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addAttributeNameProposals(
- ContentAssistRequest contentAssistRequest,
- CompletionProposalInvocationContext context) {
-
- addTemplates(contentAssistRequest, TemplateContextTypeIdsJSP.ATTRIBUTE, context);
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer#addAttributeValueProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addAttributeValueProposals(
- ContentAssistRequest contentAssistRequest,
- CompletionProposalInvocationContext context) {
-
- addTemplates(contentAssistRequest, TemplateContextTypeIdsJSP.ATTRIBUTE_VALUE, context);
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer#addTagInsertionProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, int, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addTagInsertionProposals(
- ContentAssistRequest contentAssistRequest, int childPosition,
- CompletionProposalInvocationContext context) {
-
- addTemplates(contentAssistRequest, TemplateContextTypeIdsJSP.TAG, context);
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer#addEmptyDocumentProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addEmptyDocumentProposals(
- ContentAssistRequest contentAssistRequest,
- CompletionProposalInvocationContext context) {
-
- if (ContentTypeIdForJSP.ContentTypeID_JSPTAG.equals(
- ((IDOMNode) contentAssistRequest.getNode()).getModel().getContentTypeIdentifier())) {
-
- addTemplates(contentAssistRequest, TemplateContextTypeIdsJSP.NEW_TAG, context);
- } else {
- addTemplates(contentAssistRequest, TemplateContextTypeIdsJSP.NEW, context);
- }
- }
-
- /**
- * <p>Get the template proposals from the template processor</p>
- *
- * @param templateContext
- * @param context
- * @return
- */
- private List getTemplateProposals(String templateContext,
- CompletionProposalInvocationContext context) {
-
- List templateProposals = new ArrayList();
-
- if (fTemplateProcessor != null) {
- fTemplateProcessor.setContextType(templateContext);
- ICompletionProposal[] proposals =
- fTemplateProcessor.computeCompletionProposals(context.getViewer(), context.getInvocationOffset());
-
- templateProposals.addAll(Arrays.asList(proposals));
- }
-
- return templateProposals;
- }
-
- /**
- * <p>Adds templates to the list of proposals</p>
- *
- * @param contentAssistRequest
- * @param templateContext
- * @param context
- */
- private void addTemplates(ContentAssistRequest contentAssistRequest, String templateContext,
- CompletionProposalInvocationContext context) {
-
- if (contentAssistRequest != null) {
- boolean useProposalList = !contentAssistRequest.shouldSeparate();
- List proposals = this.getTemplateProposals(templateContext, context);
-
- for (int i = 0; i < proposals.size(); ++i) {
- if (useProposalList) {
- contentAssistRequest.addProposal((ICompletionProposal)proposals.get(i));
- }
- else {
- contentAssistRequest.addMacro((ICompletionProposal)proposals.get(i));
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanCompletionProposalComputer.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanCompletionProposalComputer.java
deleted file mode 100644
index a6033592e1..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanCompletionProposalComputer.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.ui.internal.contentassist;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-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.utils.StringUtils;
-import org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-import org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer;
-
-/**
- * <p>Compute JSP use bean completion proposals</p>
- */
-public class JSPUseBeanCompletionProposalComputer extends
- DefaultXMLCompletionProposalComputer {
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer#addAttributeValueProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addAttributeValueProposals(
- ContentAssistRequest contentAssistRequest,
- CompletionProposalInvocationContext context) {
-
- IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
-
- //only add attribute value proposals for specific elements
- if(node.getNodeName().equals(JSP11Namespace.ElementName.USEBEAN)) {
- // Find the attribute name for which this position should have a value
- IStructuredDocumentRegion open = node.getFirstStructuredDocumentRegion();
- ITextRegionList openRegions = open.getRegions();
- int i = openRegions.indexOf(contentAssistRequest.getRegion());
- if (i < 0)
- return;
- ITextRegion nameRegion = null;
- while (i >= 0) {
- nameRegion = openRegions.get(i--);
- if (nameRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)
- break;
- }
-
- String attributeName = null;
- if (nameRegion != null)
- attributeName = open.getText(nameRegion);
-
- String currentValue = null;
- if (contentAssistRequest.getRegion().getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE)
- currentValue = contentAssistRequest.getText();
- else
- currentValue = ""; //$NON-NLS-1$
- String matchString = null;
- // fixups
- int start = contentAssistRequest.getReplacementBeginPosition();
- int length = contentAssistRequest.getReplacementLength();
- if (currentValue.length() > StringUtils.strip(currentValue).length() && (currentValue.startsWith("\"") || currentValue.startsWith("'")) //$NON-NLS-1$ //$NON-NLS-2$
- && contentAssistRequest.getMatchString().length() > 0) {
- matchString = currentValue.substring(1, contentAssistRequest.getMatchString().length());
- start++;
- length = matchString.length();
- } else
- matchString = currentValue.substring(0, contentAssistRequest.getMatchString().length());
- boolean existingComplicatedValue = contentAssistRequest.getRegion() != null && contentAssistRequest.getRegion() instanceof ITextRegionContainer;
- if (existingComplicatedValue) {
- contentAssistRequest.getProposals().clear();
- contentAssistRequest.getMacros().clear();
- } else {
- if (attributeName.equals(JSP11Namespace.ATTR_NAME_CLASS)) {
- // class is the concrete implementation class
- IResource resource = JSPContentAssistHelper.getResource(contentAssistRequest);
- ICompletionProposal[] classProposals = JavaTypeFinder.getClassProposals(resource, start, length);
- if (classProposals != null) {
- for (int j = 0; j < classProposals.length; j++) {
- JavaTypeCompletionProposal proposal = (JavaTypeCompletionProposal) classProposals[j];
- if (matchString.length() == 0 || proposal.getQualifiedName().toLowerCase().startsWith(matchString.toLowerCase()) || proposal.getShortName().toLowerCase().startsWith(matchString.toLowerCase()))
- contentAssistRequest.addProposal(proposal);
- }
- }
- } else if (attributeName.equals(JSP11Namespace.ATTR_NAME_TYPE)) {
- // type is the more general type for the bean
- // which means it may be an interface
- IResource resource = JSPContentAssistHelper.getResource(contentAssistRequest);
- ICompletionProposal[] typeProposals = JavaTypeFinder.getTypeProposals(resource, start, length);
- if (typeProposals != null) {
- for (int j = 0; j < typeProposals.length; j++) {
- JavaTypeCompletionProposal proposal = (JavaTypeCompletionProposal) typeProposals[j];
- if (matchString.length() == 0 || proposal.getQualifiedName().toLowerCase().startsWith(matchString.toLowerCase()) || proposal.getShortName().toLowerCase().startsWith(matchString.toLowerCase()))
- contentAssistRequest.addProposal(proposal);
- }
- }
- } else if (attributeName.equals(JSP11Namespace.ATTR_NAME_BEAN_NAME)) {
- IResource resource = JSPContentAssistHelper.getResource(contentAssistRequest);
- ICompletionProposal[] beanNameProposals = JavaTypeFinder.getBeanProposals(resource, start, length);
- if (beanNameProposals != null) {
- for (int j = 0; j < beanNameProposals.length; j++) {
- if (beanNameProposals[j] instanceof CustomCompletionProposal) {
- JavaTypeCompletionProposal proposal = (JavaTypeCompletionProposal) beanNameProposals[j];
- if (matchString.length() == 0 || proposal.getDisplayString().toLowerCase().startsWith(matchString.toLowerCase()))
- contentAssistRequest.addProposal(proposal);
- } else if (beanNameProposals[j] instanceof JavaTypeCompletionProposal) {
- JavaTypeCompletionProposal proposal = (JavaTypeCompletionProposal) beanNameProposals[j];
- if (matchString.length() == 0 || proposal.getQualifiedName().toLowerCase().startsWith(matchString.toLowerCase()) || proposal.getShortName().toLowerCase().startsWith(matchString.toLowerCase()))
- contentAssistRequest.addProposal(proposal);
- }
- }
- }
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java
deleted file mode 100644
index 3ab7f8f80e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JSPUseBeanContentAssistProcessor.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.ui.internal.contentassist;
-
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-
-/**
- * @deprecated This class is no longer used locally and will be removed in the future
- * @see JSPUseBeanCompletionProposalComputer
- */
-public class JSPUseBeanContentAssistProcessor extends JSPDummyContentAssistProcessor {
-
- private JSPUseBeanCompletionProposalComputer fComputer;
-
- public JSPUseBeanContentAssistProcessor() {
- super();
- fComputer = new JSPUseBeanCompletionProposalComputer();
- }
-
- protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
- fComputer.addAttributeValueProposals(contentAssistRequest, null);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaParameterListValidator.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaParameterListValidator.java
deleted file mode 100644
index 633a4c24bd..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaParameterListValidator.java
+++ /dev/null
@@ -1,228 +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.ui.internal.contentassist;
-
-import org.eclipse.jface.text.Assert;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.TextPresentation;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationPresenter;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-
-
-/**
- * @plannedfor 1.0
- */
-public class JavaParameterListValidator implements IContextInformationValidator, IContextInformationPresenter {
-
- private int fPosition;
- private ITextViewer fViewer;
- private IContextInformation fInformation;
-
- private int fCurrentParameter;
-
- /**
- * @see IContextInformationValidator#install(IContextInformation,
- * ITextViewer, int)
- * @see IContextInformationPresenter#install(IContextInformation,
- * ITextViewer, int)
- */
- public void install(IContextInformation info, ITextViewer viewer, int documentPosition) {
- fPosition = documentPosition;
- fViewer = viewer;
- fInformation = info;
-
- fCurrentParameter = -1;
- }
-
- private int getCommentEnd(IDocument d, int pos, int end) throws BadLocationException {
- while (pos < end) {
- char curr = d.getChar(pos);
- pos++;
- if (curr == '*') {
- if (pos < end && d.getChar(pos) == '/') {
- return pos + 1;
- }
- }
- }
- return end;
- }
-
- private int getStringEnd(IDocument d, int pos, int end, char ch) throws BadLocationException {
- while (pos < end) {
- char curr = d.getChar(pos);
- pos++;
- if (curr == '\\') {
- // ignore escaped characters
- pos++;
- }
- else if (curr == ch) {
- return pos;
- }
- }
- return end;
- }
-
- private int getCharCount(IDocument document, int start, int end, char increment, char decrement, boolean considerNesting) throws BadLocationException {
-
- Assert.isTrue((increment != 0 || decrement != 0) && increment != decrement);
-
- int nestingLevel = 0;
- int charCount = 0;
- while (start < end) {
- char curr = document.getChar(start++);
- switch (curr) {
- case '/' :
- if (start < end) {
- char next = document.getChar(start);
- if (next == '*') {
- // a comment starts, advance to the comment end
- start = getCommentEnd(document, start + 1, end);
- }
- else if (next == '/') {
- // '//'-comment: nothing to do anymore on this
- // line
- start = end;
- }
- }
- break;
- case '*' :
- if (start < end) {
- char next = document.getChar(start);
- if (next == '/') {
- // we have been in a comment: forget what we read
- // before
- charCount = 0;
- ++start;
- }
- }
- break;
- case '"' :
- case '\'' :
- start = getStringEnd(document, start, end, curr);
- break;
- default :
-
- if (considerNesting) {
-
- if ('(' == curr)
- ++nestingLevel;
- else if (')' == curr)
- --nestingLevel;
-
- if (nestingLevel != 0)
- break;
- }
-
- if (increment != 0) {
- if (curr == increment)
- ++charCount;
- }
-
- if (decrement != 0) {
- if (curr == decrement)
- --charCount;
- }
- }
- }
-
- return charCount;
- }
-
- /**
- * @see IContextInformationValidator#isContextInformationValid(int)
- */
- public boolean isContextInformationValid(int position) {
-
- try {
- if (position < fPosition)
- return false;
-
- IDocument document = fViewer.getDocument();
- IRegion line = document.getLineInformationOfOffset(fPosition);
-
- if (position < line.getOffset() || position >= document.getLength())
- return false;
-
- return (getCharCount(document, fPosition, position, '(', ')', false) >= 0);
-
- }
- catch (BadLocationException x) {
- return false;
- }
- }
-
- /**
- * @see IContextInformationPresenter#updatePresentation(int,
- * TextPresentation)
- */
- public boolean updatePresentation(int position, TextPresentation presentation) {
-
- int currentParameter = -1;
-
- try {
- currentParameter = getCharCount(fViewer.getDocument(), fPosition, position, ',', (char) 0, true);
- }
- catch (BadLocationException x) {
- return false;
- }
-
- if (fCurrentParameter != -1) {
- if (currentParameter == fCurrentParameter)
- return false;
- }
-
- if (fInformation == null)
- return false;
-
- presentation.clear();
- fCurrentParameter = currentParameter;
-
- String s = fInformation.getInformationDisplayString();
- int start = 0;
- int occurrences = 0;
- while (occurrences < fCurrentParameter) {
- int found = s.indexOf(',', start);
- if (found == -1)
- break;
- start = found + 1;
- ++occurrences;
- }
-
- if (occurrences < fCurrentParameter) {
- presentation.addStyleRange(new StyleRange(0, s.length(), null, null, SWT.NORMAL));
- return true;
- }
-
- if (start == -1)
- start = 0;
-
- int end = s.indexOf(',', start);
- if (end == -1)
- end = s.length();
-
- if (start > 0)
- presentation.addStyleRange(new StyleRange(0, start, null, null, SWT.NORMAL));
-
- if (end > start)
- presentation.addStyleRange(new StyleRange(start, end - start, null, null, SWT.BOLD));
-
- if (end < s.length())
- presentation.addStyleRange(new StyleRange(end, s.length() - end, null, null, SWT.NORMAL));
-
- return true;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaTypeCompletionProposal.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaTypeCompletionProposal.java
deleted file mode 100644
index 1ba8e64b0f..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaTypeCompletionProposal.java
+++ /dev/null
@@ -1,300 +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.ui.internal.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-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.swt.graphics.Image;
-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.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceCompletionProposal;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-/**
- * An implementation of ICompletionProposal whose values can be
- * read after creation.
- *
- * @plannedfor 1.0
- */
-public class JavaTypeCompletionProposal extends CustomCompletionProposal implements IRelevanceCompletionProposal {
-
- private int fCursorPosition = 0;
- private String fLocalDisplayString;
- private String fShortName;
- private String fQualifiedName;
- private String fContainerName;
-
- public JavaTypeCompletionProposal(String replacementString, int replacementOffset, int replacementLength, String qualifiedName, Image image, String typeName, String containerName, int relevence, boolean updateReplacementLengthOnValidate) {
- super(replacementString, replacementOffset, replacementLength, qualifiedName.length() + 2, image,
- (containerName != null && containerName.length() > 0) ? typeName + " - " + containerName : typeName, null, null, relevence, true); //$NON-NLS-1$
- // CMVC 243817, superclass was comparing incorrect display string in validate method...
- //super(replacementString, replacementOffset, replacementLength, image, (containerName != null && containerName.length() > 0)? typeName + " - " + containerName:typeName/*qualifiedName*/, relevence);
- fShortName = typeName;
- fQualifiedName = qualifiedName;
- fContainerName = containerName;
- fCursorPosition = fQualifiedName.length() + 2;
- //fProposalInfo = proposalInfo;
- if (containerName != null && containerName.length() > 0)
- fLocalDisplayString = typeName + " - " + containerName; //$NON-NLS-1$
- else
- fLocalDisplayString = typeName;
- }
-
- public String getDisplayString() {
- return fLocalDisplayString;
- }
-
- public int getCursorPosition() {
- return fCursorPosition;
- }
-
- public void setCursorPosition(int cursorPosition) {
- super.setCursorPosition(cursorPosition);
- fCursorPosition = cursorPosition;
- }
-
- public String getQualifiedName() {
- return fQualifiedName;
- }
-
- public String getAdditionalProposalInfo() {
- // String info = super.getAdditionalProposalInfo();
- // if (info == null || info.length() == 0 && fProposalInfo != null)
- // return fProposalInfo.getInfo();
- // return info;
- return null; // unexplained NPE
- }
-
- public String getShortName() {
- return fShortName;
- }
-
- protected String getImport(IStructuredDocumentRegion flatNode) {
- ITextRegionList regions = flatNode.getRegions();
- String importSpec = null;
- boolean isImport = false;
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- if (flatNode.getText(region).equals(JSP11Namespace.ATTR_NAME_IMPORT)) {
- isImport = true;
- }
- else {
- isImport = false;
- }
- }
- else if (isImport && region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
- importSpec = flatNode.getText(region);
- }
- }
- return importSpec;
- }
-
- /**
- * Add an import page directive for the current type name
- */
- protected int applyImport(IStructuredDocument model) {
- // if the type is in the default package or java.lang, skip it
- if (fContainerName == null || fContainerName.length() == 0 || fContainerName.equals("java.lang")) //$NON-NLS-1$
- return 0;
- // collect page directives and store their import values
- List imports = new ArrayList();
- IStructuredDocumentRegion node = model.getFirstStructuredDocumentRegion();
-
- // use the last position of a page directive as a hint as to where to add
- // a new one
- int hint = 0;
- // watch for jsp:root so that we use the right XML/JSP format for the directive
- boolean useXML = false;
-
- while (node != null) {
- // Can't just look for all StructuredDocumentRegions starting with JSP_DIRECTIVE_OPEN
- // since the XML form is required, too
- ITextRegionList regions = node.getRegions();
- if (regions.size() > 1) {
- ITextRegion name = regions.get(1);
- // verify that this is a JSP directive
- if (name.getType() == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- // verify that this is a *page* directive
- if (node.getText(name).equals(JSP11Namespace.ATTR_NAME_PAGE) || node.getText(name).equals(JSP12Namespace.ElementName.DIRECTIVE_PAGE)) {
- if (node.getEndOffset() < getReplacementOffset())
- hint = node.getEndOffset();
- String importSpec = getImport(node);
- if (importSpec != null) {
- imports.add(importSpec);
- }
- }
- }
- else {
- // if this is a jsp:root tag, use the XML form
- useXML = useXML || name.getType() == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME;
- }
- }
- node = node.getNext();
- }
-
- // evaluate requirements for a "new" import directive
- boolean needsImport = !importHandles(fQualifiedName, imports);
- int adjustmentLength = 0;
- // insert "new" import directive
- if (needsImport) {
- String directive = null;
-
- // vary the XML behavior
- if (useXML) {
- directive = "<jsp:directive.page import=\"" + fQualifiedName + "\"/>"; //$NON-NLS-1$ //$NON-NLS-2$
- }
- else {
- directive = "<%@ page import=\"" + fQualifiedName + "\" %>"; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- try {
- IRegion line = model.getLineInformationOfOffset(hint);
- boolean prependNewLine = line.getOffset() + line.getLength() == hint;
- boolean appendNewLine = hint == 0;
- if (prependNewLine)
- directive = model.getLineDelimiter() + directive;
- if (appendNewLine)
- directive = directive + model.getLineDelimiter();
- adjustmentLength = directive.length();
- }
- catch (BadLocationException e) {
- // ignore
- }
-
- try {
- model.replace(hint, 0, directive);
-
- }
- catch (BadLocationException e) {
- // Not that we should ever get a BLE, but if so, our
- // replacement offset from the Content Assist call should
- // work
- try {
- model.replace(getReplacementOffset(), 0, directive);
- adjustmentLength = directive.length();
- }
- catch (BadLocationException e2) {
- // now what?
- }
- }
- }
- return adjustmentLength;
- }
-
- /**
- * See if the import specification is a wildcard import, and if so, that
- * it applies to the given type.
- */
- protected boolean isWildcardMatch(String importSpec, String type) {
- int specLength = importSpec.length();
- if (importSpec.endsWith("*") && specLength > 2 && type.length() >= specLength) { //$NON-NLS-1$
- // pull out the package name including the final '.'
- String container = importSpec.substring(0, specLength - 1);
- // verify that the type is in the container's hierarchy and that
- // there are no other package separators afterwards
- if (type.startsWith(container) && type.indexOf('.', specLength - 1) < 0) {
- // container matches
- return true;
- }
- }
- return false;
- }
-
- protected boolean importHandles(String type, List listOfImports) {
- Iterator imports = listOfImports.iterator();
- while (imports.hasNext()) {
- String importSpec = StringUtils.strip(imports.next().toString());
- if (importSpec.equals(type) || isWildcardMatch(importSpec, type))
- return true;
- }
- return false;
- }
-
- public void apply(IDocument document, char trigger, int offset) {
- // If we have a parsed IStructuredDocument, insert the short name instead of the
- // fully qualified name and a import page directive if
- // needed. Do the import first so the cursor goes to the right location
- // and we don't surprise the user.
-
- boolean addShortForm = false; //document instanceof IStructuredDocument && fContainerName != null && fContainerName.length() > 0;
- if (addShortForm) {
- setReplacementString('"' + fShortName + '"');
- int importLength = applyImport((IStructuredDocument) document);
- setReplacementOffset(getReplacementOffset() + importLength);
- }
-
- setCursorPosition(getReplacementString().length());
- super.apply(document, trigger, offset);
-
- }
-
- /*
- * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension1#apply(org.eclipse.jface.text.ITextViewer, char, int, int)
- */
- public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
- // CMVC 243815
- // (pa) this is overridden to get around replacement length modification
- // which is done in the super (since eclipse 2.1)
- apply(viewer.getDocument(), trigger, offset);
- }
-
- // code is borrowed from JavaCompletionProposal
- protected boolean startsWith(IDocument document, int offset, String word) {
- int wordLength = word == null ? 0 : word.length();
- if (offset > getReplacementOffset() + wordLength)
- return false;
-
- try {
- int length = offset - getReplacementOffset();
- // CMVC 243817
- // slightly modified to be a little more flexible for attribute value string matching..
- String start = StringUtils.stripQuotes(document.get(getReplacementOffset(), length));
- return word.toLowerCase().startsWith(start.toLowerCase()) || fQualifiedName.toLowerCase().startsWith(start.toLowerCase());
- //return word.substring(0, length).equalsIgnoreCase(start);
- }
- catch (BadLocationException x) {
- // ignore
- }
-
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal#validate(org.eclipse.jface.text.IDocument, int, org.eclipse.jface.text.DocumentEvent)
- // */
- // public boolean validate(IDocument document, int offset, org.eclipse.jface.text.DocumentEvent event) {
- // return super.validate(document, offset, event);
- // }
- /* (non-Javadoc)
- * @see org.eclipse.jdt.internal.ui.text.java.JavaCompletionProposal#selected(org.eclipse.jface.text.ITextViewer, boolean)
- */
- public void selected(ITextViewer viewer, boolean smartToggle) {
- // (pa) we currently don't use smart toggle...
- super.selected(viewer, false);
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaTypeFinder.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaTypeFinder.java
deleted file mode 100644
index f11c3b1c10..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaTypeFinder.java
+++ /dev/null
@@ -1,134 +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.jst.jsp.ui.internal.contentassist;
-
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.search.IJavaSearchConstants;
-import org.eclipse.jdt.core.search.IJavaSearchScope;
-import org.eclipse.jdt.core.search.SearchEngine;
-import org.eclipse.jdt.core.search.SearchPattern;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.wst.common.uriresolver.internal.util.URIHelper;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceConstants;
-
-/**
- * @plannedfor 1.0
- */
-public class JavaTypeFinder {
-
- public static ICompletionProposal[] getBeanProposals(IResource resource, int replacementStart, int replacementLength) {
- ICompletionProposal[] typeProposals = getTypeProposals(resource, replacementStart, replacementLength);
- ICompletionProposal[] serialProposals = getSerializedProposals(resource, replacementStart, replacementLength);
- ICompletionProposal[] beanProposals = new ICompletionProposal[typeProposals.length + serialProposals.length];
-
- int i;
- for (i = 0; i < serialProposals.length; i++) {
- beanProposals[i] = serialProposals[i];
- }
- for (i = serialProposals.length; i < serialProposals.length + typeProposals.length; i++) {
- beanProposals[i] = typeProposals[i - serialProposals.length];
- }
- return beanProposals;
- }
-
- private static void getMembers(IContainer container, List membersList) {
- try {
- IResource[] members = container.members(true);
- if (members != null) {
- for (int i = 0; i < members.length; i++) {
- if (members[i].getType() == IResource.FILE)
- membersList.add(members[i]);
- else if (members[i].getType() == IResource.FOLDER)
- getMembers((IContainer) members[i], membersList);
- }
- }
- }
- catch (CoreException e) {
- // do nothing
- }
- }
-
- private static ICompletionProposal[] getSerializedProposals(IResource resource, int replacementStart, int replacementLength) {
- List names = new ArrayList();
- List resources = new ArrayList();
- getMembers(resource.getProject(), resources);
- IResource memberResource = null;
- for (int i = 0; i < resources.size(); i++) {
- memberResource = (IResource) resources.get(i);
- if (memberResource.getType() == IResource.FILE && memberResource.getName().endsWith(".ser")) { //$NON-NLS-1$
- String path = URIHelper.normalize(memberResource.getFullPath().toString(), resource.getFullPath().toString(), resource.getProject().getFullPath().toString());
- if (path != null) {
- names.add(new CustomCompletionProposal("\"" + path + "\"", //$NON-NLS-1$ //$NON-NLS-2$
- replacementStart, replacementLength, path.length() + 2, null, path, null, null, IRelevanceConstants.R_NONE));
- }
- }
- }
- return (ICompletionProposal[]) names.toArray(new ICompletionProposal[names.size()]);
- }
-
- /**
- *
- * @param resource
- * @param replacementStart
- * @param replacementLength
- * @param searchFor IJavaSearchConstants.TYPE, IJavaSearchConstants.CLASS
- * @return
- */
- private static ICompletionProposal[] findProposals(IResource resource, int replacementStart, int replacementLength, int searchFor, boolean ignoreAbstractClasses) {
-
- JavaTypeNameRequestor requestor = new JavaTypeNameRequestor();
- requestor.setJSPOffset(replacementStart);
- requestor.setReplacementLength(replacementLength);
- requestor.setIgnoreAbstractClasses(ignoreAbstractClasses);
-
- try {
- IJavaElement[] elements = new IJavaElement[]{getJavaProject(resource)};
- IJavaSearchScope scope = SearchEngine.createJavaSearchScope(elements);
- new SearchEngine().searchAllTypeNames(null, null, SearchPattern.R_PATTERN_MATCH | SearchPattern.R_PREFIX_MATCH, searchFor, scope, requestor, IJavaSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null);
-
- }
- catch (CoreException exc) {
- Logger.logException(exc);
- }
- catch (Exception exc) {
- // JavaModel
- Logger.logException(exc);
- }
- return requestor.getProposals();
- }
-
- public static ICompletionProposal[] getTypeProposals(IResource resource, int replacementStart, int replacementLength) {
- return findProposals(resource, replacementStart, replacementLength, IJavaSearchConstants.TYPE, false);
- }
-
- public static ICompletionProposal[] getClassProposals(IResource resource, int replacementStart, int replacementLength) {
- return findProposals(resource, replacementStart, replacementLength, IJavaSearchConstants.CLASS, true);
- }
-
- private static IJavaProject getJavaProject(IResource resource) {
- IProject proj = resource.getProject();
- IJavaProject javaProject = JavaCore.create(proj);
- return javaProject;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaTypeNameRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaTypeNameRequestor.java
deleted file mode 100644
index 61a2dd8157..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/JavaTypeNameRequestor.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jdt.core.CompletionProposal;
-import org.eclipse.jdt.core.Flags;
-import org.eclipse.jdt.core.Signature;
-import org.eclipse.jdt.core.search.TypeNameRequestor;
-import org.eclipse.jdt.ui.text.java.CompletionProposalLabelProvider;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImageHelper;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.ui.internal.contentassist.IRelevanceConstants;
-
-/**
- * Use w/ JDT search engine to find all type names.
- * Creates proposals from matches reported.
- *
- * @plannedfor 1.0
- */
-public class JavaTypeNameRequestor extends TypeNameRequestor {
-
- private int fJSPOffset = -1;
- private int fReplacementLength = -1;
- private List fProposals = new ArrayList();
- private boolean fIgnoreAbstractClasses = false;
-
- private CompletionProposalLabelProvider fLabelProvider = new CompletionProposalLabelProvider();
-
- public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path) {
-
- int offset = getJSPOffset();
- int length = getReplacementLength();
-
- // somehow offset or length was set incorrectly
- if(offset == -1 || length == -1)
- return;
- // ignore abstract classes?
- if(ignoreAbstractClasses() && Flags.isAbstract(modifiers))
- return;
-
- Image image = calculateImage(modifiers);
-
- String containerNameString = new String(packageName);
- String typeNameString = String.valueOf(simpleTypeName);
-
- // containername can be null
- String fullName = concatenateName(containerNameString, typeNameString);
-
- String simpleName = Signature.getSimpleName(fullName);
- StringBuffer buf = new StringBuffer(simpleName);
- String typeQualifier = Signature.getQualifier(fullName);
- if (typeQualifier.length() > 0) {
- buf.append(" - "); //$NON-NLS-1$
- buf.append(typeQualifier);
- }
-
- JavaTypeCompletionProposal proposal = new JavaTypeCompletionProposal(fullName, offset, length, fullName, image, typeNameString, typeQualifier, IRelevanceConstants.R_NONE, true);
- proposal.setTriggerCharacters(JSPProposalCollector.getTypeTriggers());
- fProposals.add(proposal);
- }
-
-
- private Image calculateImage(int modifiers) {
- CompletionProposal p = CompletionProposal.create(CompletionProposal.TYPE_REF, getJSPOffset());
- p.setFlags(modifiers);
-
- //https://bugs.eclipse.org/bugs/show_bug.cgi?id=102206
- char[] sig = new char[]{Signature.C_UNRESOLVED};
- p.setSignature(sig);
-
- ImageDescriptor descriptor = fLabelProvider.createImageDescriptor(p);
- Image image = JSPEditorPluginImageHelper.getInstance().getImage(descriptor);
- return image;
- }
-
- /**
- * Concatenates two names. Uses a dot for separation. Both strings can be
- * empty or <code>null</code>.
- */
- public String concatenateName(String name1, String name2) {
- StringBuffer buf = new StringBuffer();
- if (name1 != null && name1.length() > 0) {
- buf.append(name1);
- }
- if (name2 != null && name2.length() > 0) {
- if (buf.length() > 0) {
- buf.append('.');
- }
- buf.append(name2);
- }
- return buf.toString();
- }
-
- int getJSPOffset() {
- return fJSPOffset;
- }
-
- void setJSPOffset(int offset) {
- fJSPOffset = offset;
- }
-
- int getReplacementLength() {
- return fReplacementLength;
- }
-
- void setReplacementLength(int replacementLength) {
- fReplacementLength = replacementLength;
- }
- void setIgnoreAbstractClasses(boolean ignore) {
- fIgnoreAbstractClasses = ignore;
- }
- boolean ignoreAbstractClasses() {
- return fIgnoreAbstractClasses;
- }
-
- JavaTypeCompletionProposal[] getProposals() {
- return (JavaTypeCompletionProposal[])fProposals.toArray(new JavaTypeCompletionProposal[fProposals.size()]);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/LibraryTagsCompletionProposalComputer.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/LibraryTagsCompletionProposalComputer.java
deleted file mode 100644
index 612ff3b3e7..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/LibraryTagsCompletionProposalComputer.java
+++ /dev/null
@@ -1,531 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.ui.internal.contentassist;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Path;
-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.jst.jsp.core.internal.contentmodel.tld.provisional.TLDElementDeclaration;
-import org.eclipse.jst.jsp.core.internal.contenttype.DeploymentDescriptorPropertyCache;
-import org.eclipse.jst.jsp.core.internal.modelquery.JSPModelQueryExtension;
-import org.eclipse.jst.jsp.core.internal.modelquery.TaglibModelQueryExtension;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP20Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImageHelper;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImages;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.html.core.internal.contentmodel.HTMLPropertyDeclaration;
-import org.eclipse.wst.html.core.internal.contentmodel.JSPCMDocument;
-import org.eclipse.wst.html.ui.internal.contentassist.HTMLTagsCompletionProposalComputer;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-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.ui.contentassist.CompletionProposalInvocationContext;
-import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
-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.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.CMDocType;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMNodeWrapper;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.core.internal.ssemodelquery.ModelQueryAdapter;
-import org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLModelQueryCompletionProposalComputer;
-import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
-import org.eclipse.wst.xml.ui.internal.contentassist.MarkupCompletionProposal;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLContentModelGenerator;
-import org.eclipse.wst.xml.ui.internal.contentassist.XMLRelevanceConstants;
-import org.eclipse.wst.xml.ui.internal.editor.CMImageUtil;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * <p>Computes tags provided by tag libraries completion proposals.</p>
- *
- * <p>Extends the {@link HTMLTagsCompletionProposalComputer} to benefit from
- * its work for determining the correct {@link XMLContentModelGenerator} to use</p>
- */
-public class LibraryTagsCompletionProposalComputer extends
- HTMLTagsCompletionProposalComputer {
-
- private int fDepthCount;
-
- /**
- * @see org.eclipse.wst.html.ui.internal.contentassist.HTMLTagsCompletionProposalComputer#computeContextInformation(org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext, org.eclipse.core.runtime.IProgressMonitor)
- */
- public List computeContextInformation(
- CompletionProposalInvocationContext context,
- IProgressMonitor monitor) {
-
- return Collections.EMPTY_LIST;
- }
-
- /**
- * @see org.eclipse.wst.html.ui.internal.contentassist.HTMLTagsCompletionProposalComputer#validModelQueryNode(org.eclipse.wst.xml.core.internal.contentmodel.CMNode)
- */
- protected boolean validModelQueryNode(CMNode node) {
- boolean isValid = false;
-
- //unwrap
- if(node instanceof CMNodeWrapper) {
- node = ((CMNodeWrapper)node).getOriginNode();
- }
-
- //determine if is valid
- if(node instanceof HTMLPropertyDeclaration) {
- HTMLPropertyDeclaration propDec = (HTMLPropertyDeclaration)node;
- isValid = propDec.isJSP();
- } else if(node.supports(TLDElementDeclaration.IS_LIBRARY_TAG)){
- Boolean isLibraryTag = (Boolean)node.getProperty(TLDElementDeclaration.IS_LIBRARY_TAG);
- isValid = isLibraryTag != null && isLibraryTag.booleanValue();
- }
-
- return isValid;
- }
-
- /**
- * <p>JSP has none. This overrides the default behavior to add in doctype proposals which
- * should really be contributed by the HTML tag computer</p>
- *
- * @see org.eclipse.wst.html.ui.internal.contentassist.HTMLTagsCompletionProposalComputer#addStartDocumentProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addStartDocumentProposals(
- ContentAssistRequest contentAssistRequest,
- CompletionProposalInvocationContext context) {
- //jsp has none
- }
-
- /**
- * @see org.eclipse.wst.html.ui.internal.contentassist.HTMLTagsCompletionProposalComputer#addEmptyDocumentProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addEmptyDocumentProposals(
- ContentAssistRequest contentAssistRequest,
- CompletionProposalInvocationContext context) {
- //jsp has none
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLModelQueryCompletionProposalComputer#addTagCloseProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addTagCloseProposals(ContentAssistRequest contentAssistRequest, CompletionProposalInvocationContext context) {
- //do nothing, html computer will take care of adding the > and /> suggestions
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.DefaultXMLCompletionProposalComputer#addAttributeValueProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addAttributeValueProposals(
- ContentAssistRequest contentAssistRequest,
- CompletionProposalInvocationContext context) {
-
- if(!this.isXHTML) {
- IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
-
- ModelQuery mq = ModelQueryUtil.getModelQuery(node.getOwnerDocument());
- if (mq != null) {
- CMDocument doc = mq.getCorrespondingCMDocument(node);
- // this shouldn't have to have the prefix coded in
- if (doc instanceof JSPCMDocument || doc instanceof CMNodeWrapper ||
- node.getNodeName().startsWith("jsp:")) { //$NON-NLS-1$
- return;
- }
- }
-
- // Find the attribute name for which this position should have a value
- IStructuredDocumentRegion open = node.getFirstStructuredDocumentRegion();
- ITextRegionList openRegions = open.getRegions();
- int i = openRegions.indexOf(contentAssistRequest.getRegion());
- if (i < 0) {
- return;
- }
- ITextRegion nameRegion = null;
- while (i >= 0) {
- nameRegion = openRegions.get(i--);
- if (nameRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- break;
- }
- }
-
- // on an empty value, add all the JSP and taglib tags
- CMElementDeclaration elementDecl =
- AbstractXMLModelQueryCompletionProposalComputer.getCMElementDeclaration(node);
- if (nameRegion != null && elementDecl != null) {
- String attributeName = open.getText(nameRegion);
- if (attributeName != null) {
- Node parent = contentAssistRequest.getParent();
-
- //ignore start quote in match string
- String matchString = contentAssistRequest.getMatchString().trim();
- if(matchString.startsWith("'") || matchString.startsWith("\"")) { //$NON-NLS-1$ //$NON-NLS-2$
- matchString = matchString.substring(1);
- }
-
- //get all the proposals
- List additionalElements = ModelQueryUtil.getModelQuery(node.getOwnerDocument()).getAvailableContent(
- (Element) node, elementDecl, ModelQuery.INCLUDE_ALL);
- Iterator nodeIterator = additionalElements.iterator();
-
- //check each suggestion
- while (nodeIterator.hasNext()) {
- CMNode additionalElementDecl = (CMNode) nodeIterator.next();
- if (additionalElementDecl != null && additionalElementDecl instanceof CMElementDeclaration &&
- validModelQueryNode(additionalElementDecl)) {
- CMElementDeclaration ed = (CMElementDeclaration) additionalElementDecl;
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=89811
- StringBuffer sb = new StringBuffer();
- getContentGenerator().generateTag(parent, ed, sb);
-
- String proposedText = sb.toString();
-
- //filter out any proposals that dont match matchString
- if (beginsWith(proposedText, matchString)) {
- //wrap with ' because JSP attributes are warped with "
- proposedText = "'" + proposedText; //$NON-NLS-1$
-
- //if its a container its possible the closing quote is already there
- //don't want to risk injecting an extra
- if(!(contentAssistRequest.getRegion() instanceof ITextRegionContainer)) {
- proposedText += "'"; //$NON-NLS-1$
- }
-
- //get the image
- Image image = CMImageUtil.getImage(elementDecl);
- if (image == null) {
- image = this.getGenericTagImage();
- }
-
- //create the proposal
- int cursorAdjustment = getCursorPositionForProposedText(proposedText);
- String proposedInfo = AbstractXMLModelQueryCompletionProposalComputer.getAdditionalInfo(
- AbstractXMLModelQueryCompletionProposalComputer.getCMElementDeclaration(parent), elementDecl);
- String tagname = getContentGenerator().getRequiredName(node, ed);
- CustomCompletionProposal proposal = new CustomCompletionProposal(
- proposedText, contentAssistRequest.getReplacementBeginPosition(),
- contentAssistRequest.getReplacementLength(), cursorAdjustment, image, tagname, null, proposedInfo,
- XMLRelevanceConstants.R_XML_ATTRIBUTE_VALUE);
- contentAssistRequest.addProposal(proposal);
- }
- }
- }
- }
- }
- }
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLCompletionProposalComputer#setErrorMessage(java.lang.String)
- */
- public void setErrorMessage(String errorMessage) {
- if (fDepthCount == 0) {
- super.setErrorMessage(errorMessage);
- }
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLModelQueryCompletionProposalComputer#getGenericTagImage()
- */
- protected Image getGenericTagImage() {
- return JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_JSP);
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLModelQueryCompletionProposalComputer#getDeemphasizedTagImage()
- */
- protected Image getDeemphasizedTagImage() {
- return JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_JSP);
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLModelQueryCompletionProposalComputer#getEmphasizedTagImage()
- */
- protected Image getEmphasizedTagImage() {
- return JSPEditorPluginImageHelper.getInstance().getImage(JSPEditorPluginImages.IMG_OBJ_TAG_JSP);
- }
-
- //----------------------BELOW HERE SHOULD BE REMOVED ONCE BUG 211961 IS FIXED ---------------------
-
- /**
- * <p><b>NOTE: </b>This should be removed as soon as Bug 311961 is fixed</p>
- *
- * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLModelQueryCompletionProposalComputer#addTagInsertionProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, int, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addTagInsertionProposals(
- ContentAssistRequest contentAssistRequest, int childPosition,
- CompletionProposalInvocationContext context) {
-
- //get the default proposals
- super.addTagInsertionProposals(contentAssistRequest, childPosition, context);
-
- /**
- * TODO: REMOVE THIS HACK - Bug 311961
- */
- if(contentAssistRequest.getParent().getNodeType() == Node.DOCUMENT_NODE) {
- this.forciblyAddTagLibAndJSPPropsoals((Document)contentAssistRequest.getParent(),
- contentAssistRequest, childPosition);
- }
- }
-
- /**
- * <p><b>NOTE: </b>This should be removed as soon as Bug 311961 is fixed</p>
- *
- * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractXMLModelQueryCompletionProposalComputer#addTagNameProposals(org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest, int, org.eclipse.wst.sse.ui.contentassist.CompletionProposalInvocationContext)
- */
- protected void addTagNameProposals(
- ContentAssistRequest contentAssistRequest, int childPosition,
- CompletionProposalInvocationContext context) {
-
- //get the default proposals
- super.addTagNameProposals(contentAssistRequest, childPosition, context);
-
- /**
- * TODO: REMOVE THIS HACK - Bug 311961
- */
- if(contentAssistRequest.getParent().getNodeType() == Node.DOCUMENT_NODE) {
- this.forciblyAddTagLibAndJSPPropsoals((Document)contentAssistRequest.getParent(),
- contentAssistRequest, childPosition);
- }
- }
-
- /**
- * <p><b>NOTE: </b>This should be removed as soon as Bug 311961 is fixed</p>
- * <p>This is bad because it does not use the ModelQuery framework</p>
- *
- * @param document
- * @param contentAssistRequest
- * @param childPosition
- */
- private void forciblyAddTagLibAndJSPPropsoals(Document document, ContentAssistRequest contentAssistRequest, int childPosition) {
- if (!isXMLFormat(document)) {
- List additionalElements = forciblyGetTagLibAndJSPElements(new ArrayList(), document, childPosition);
-
- //convert CMElementDeclartions to proposals
- for (int i = 0; i < additionalElements.size(); i++) {
- CMElementDeclaration ed = (CMElementDeclaration) additionalElements.get(i);
- if (ed != null) {
- Image image = CMImageUtil.getImage(ed);
- if (image == null) {
- image = this.getGenericTagImage();
- }
- String proposedText = getRequiredText(document, ed);
- final IDOMNode targetNode = (IDOMNode) contentAssistRequest.getNode();
- if (targetNode != null) {
- final IStructuredDocumentRegion region = targetNode.getLastStructuredDocumentRegion();
- if (region != null && region.getFirstRegion() != null && region.getFirstRegion().getType().equals(DOMRegionContext.XML_TAG_OPEN) && proposedText.length() > 0) {
- //in order to differentiate between content assist on
- //completely empty document and the one with xml open tag
- proposedText = proposedText.substring(1);
- }
- }
- if (!beginsWith(proposedText, contentAssistRequest.getMatchString())) {
- return;
- }
- String tagname = getRequiredName(document, ed);
- // account for the &lt; and &gt;
- int markupAdjustment = getCursorPositionForProposedText(proposedText);
- String proposedInfo = getAdditionalInfo(null, ed);
- MarkupCompletionProposal proposal = new MarkupCompletionProposal(
- proposedText, contentAssistRequest.getReplacementBeginPosition(),
- contentAssistRequest.getReplacementLength(), markupAdjustment, image,
- tagname, null, proposedInfo, XMLRelevanceConstants.R_TAG_INSERTION);
- contentAssistRequest.addProposal(proposal);
- }
- }
- }
- }
-
- /**
- * <p><b>NOTE: </b>This should be removed as soon as Bug 311961 is fixed</p>
- * <p>This is bad because it does not use the ModelQuery framework, it
- * access the TLDCMDocumentManager directly</p>
- * <p>This is essentially a combination of the {@link TaglibModelQueryExtension} and
- * the {@link JSPModelQueryExtension} but it means any other extensions get left
- * out when creating content assist suggestion at the document root level</p>
- *
- * @param elementDecls
- * @param node
- * @param childIndex
- * @return
- */
- private List forciblyGetTagLibAndJSPElements(List elementDecls, Node node, int childIndex) {
- if (node instanceof IDOMNode) {
- /*
- * find the location of the intended insertion as it will give us
- * the correct offset for checking position dependent CMDocuments
- */
- int textInsertionOffset = 0;
- NodeList children = node.getChildNodes();
- if (children.getLength() >= childIndex && childIndex >= 0) {
- Node nodeAlreadyAtIndex = children.item(childIndex);
- if (nodeAlreadyAtIndex instanceof IDOMNode)
- textInsertionOffset = ((IDOMNode) nodeAlreadyAtIndex).getEndOffset();
- }
- else {
- textInsertionOffset = ((IDOMNode) node).getStartOffset();
- }
- TLDCMDocumentManager mgr = TaglibController.getTLDCMDocumentManager(((IDOMNode) node).getStructuredDocument());
- if (mgr != null) {
- List moreCMDocuments = mgr.getCMDocumentTrackers(textInsertionOffset);
- if (moreCMDocuments != null) {
- for (int i = 0; i < moreCMDocuments.size(); i++) {
- CMDocument doc = (CMDocument) moreCMDocuments.get(i);
- CMNamedNodeMap elements = doc.getElements();
- if (elements != null) {
- for (int j = 0; j < elements.getLength(); j++) {
- CMElementDeclaration ed = (CMElementDeclaration) elements.item(j);
- elementDecls.add(ed);
- }
- }
- }
- }
- }
-
- // get position dependent CMDocuments and insert their tags as
- // proposals
-
- ModelQueryAdapter mqAdapter = null;
- if (node.getNodeType() == Node.DOCUMENT_NODE)
- mqAdapter = (ModelQueryAdapter) ((IDOMNode) node).getAdapterFor(ModelQueryAdapter.class);
- else
- mqAdapter = (ModelQueryAdapter) ((IDOMNode) node.getOwnerDocument()).getAdapterFor(ModelQueryAdapter.class);
-
- if (mqAdapter != null) {
- CMDocument doc = mqAdapter.getModelQuery().getCorrespondingCMDocument(node);
- if (doc != null) {
- CMDocument jcmdoc = getDefaultJSPCMDocument((IDOMNode) node);
- CMNamedNodeMap jspelements = jcmdoc.getElements();
-
- /*
- * For a built-in JSP action the content model is properly
- * set up, so don't just blindly add the rest--unless this
- * will be a direct child of the document
- */
- if (jspelements != null && (!(doc instanceof JSPCMDocument) || node.getNodeType() == Node.DOCUMENT_NODE)) {
- List rejectElements = new ArrayList();
-
- // determine if the document is in XML form
- Document domDoc = null;
- if (node.getNodeType() == Node.DOCUMENT_NODE)
- domDoc = (Document) node;
- else
- domDoc = node.getOwnerDocument();
-
- // Show XML tag forms of JSP markers if jsp:root is
- // the document element OR it's HTML but
- // isn't really in the text.
- // If the document isn't strictly XML, pull out the
- // XML tag forms it is xml format
- rejectElements.add(JSP12Namespace.ElementName.SCRIPTLET);
- rejectElements.add(JSP12Namespace.ElementName.EXPRESSION);
- rejectElements.add(JSP12Namespace.ElementName.DECLARATION);
- rejectElements.add(JSP12Namespace.ElementName.DIRECTIVE_INCLUDE);
- rejectElements.add(JSP12Namespace.ElementName.DIRECTIVE_PAGE);
- rejectElements.add(JSP12Namespace.ElementName.TEXT);
- rejectElements.add(JSP12Namespace.ElementName.DIRECTIVE_TAGLIB);
- rejectElements.add(JSP20Namespace.ElementName.DIRECTIVE_TAG);
- rejectElements.add(JSP20Namespace.ElementName.DIRECTIVE_ATTRIBUTE);
- rejectElements.add(JSP20Namespace.ElementName.DIRECTIVE_VARIABLE);
- if (isXMLFormat(domDoc)) {
- // jsp actions
- rejectElements.add(JSP12Namespace.ElementName.FALLBACK);
- rejectElements.add(JSP12Namespace.ElementName.USEBEAN);
- rejectElements.add(JSP12Namespace.ElementName.GETPROPERTY);
- rejectElements.add(JSP12Namespace.ElementName.SETPROPERTY);
- rejectElements.add(JSP12Namespace.ElementName.INCLUDE);
- rejectElements.add(JSP12Namespace.ElementName.FORWARD);
- rejectElements.add(JSP12Namespace.ElementName.PLUGIN);
- rejectElements.add(JSP12Namespace.ElementName.FALLBACK);
- rejectElements.add(JSP12Namespace.ElementName.PARAM);
- rejectElements.add(JSP12Namespace.ElementName.PARAMS);
- }
-
-
- // don't show jsp:root if a document element already
- // exists
- Element docElement = domDoc.getDocumentElement();
- if (docElement != null && ((docElement.getNodeName().equals("jsp:root")) || ((((IDOMNode) docElement).getStartStructuredDocumentRegion() != null || ((IDOMNode) docElement).getEndStructuredDocumentRegion() != null)))) //$NON-NLS-1$
- rejectElements.add(JSP12Namespace.ElementName.ROOT);
-
- for (int j = 0; j < jspelements.getLength(); j++) {
- CMElementDeclaration ed = (CMElementDeclaration) jspelements.item(j);
- if (rejectElements.contains(ed.getNodeName()))
- continue;
- elementDecls.add(ed);
- }
-
- }
- }
- // No cm document (such as for the Document (a non-Element) node itself)
- else {
- CMNamedNodeMap jspElements = getDefaultJSPCMDocument((IDOMNode) node).getElements();
- int length = jspElements.getLength();
- for (int i = 0; i < length; i++) {
- elementDecls.add(jspElements.item(i));
- }
- }
- }
- }
- return elementDecls;
- }
-
- /**
- * <p><b>NOTE: </b>This should be removed as soon as Bug 311961 is fixed</p>
- *
- * For JSP files and segments, this is just the JSP document, but when
- * editing tag files and their fragments, it should be the tag document.
- *
- * It may also vary based on the model being edited in the future.
- *
- * @return the default non-embedded CMDocument for the document being
- * edited.
- */
- private CMDocument getDefaultJSPCMDocument(IDOMNode node) {
- // handle tag files here
- String contentType = node.getModel().getContentTypeIdentifier();
- if (ContentTypeIdForJSP.ContentTypeID_JSPTAG.equals(contentType))
- return JSPCMDocumentFactory.getCMDocument(CMDocType.TAG20_DOC_TYPE);
-
- CMDocument jcmdoc = null;
- String modelPath = node.getModel().getBaseLocation();
- if (modelPath != null && !IModelManager.UNMANAGED_MODEL.equals(modelPath)) {
- float version = DeploymentDescriptorPropertyCache.getInstance().getJSPVersion(new Path(modelPath));
- jcmdoc = JSPCMDocumentFactory.getCMDocument(version);
- }
- if (jcmdoc == null) {
- jcmdoc = JSPCMDocumentFactory.getCMDocument();
- }
-
- return jcmdoc;
- }
-
- private boolean isXMLFormat(Document doc) {
- if (doc == null)
- return false;
- Element docElement = doc.getDocumentElement();
- return docElement != null && ((docElement.getNodeName().equals("jsp:root")) ||
- ((((IDOMNode) docElement).getStartStructuredDocumentRegion() == null &&
- ((IDOMNode) docElement).getEndStructuredDocumentRegion() == null))); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/NoRegionContentAssistProcessorForJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/NoRegionContentAssistProcessorForJSP.java
deleted file mode 100644
index a53c8e0653..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/NoRegionContentAssistProcessorForJSP.java
+++ /dev/null
@@ -1,96 +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.ui.internal.contentassist;
-
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.text.IJSPPartitions;
-import org.eclipse.wst.html.core.text.IHTMLPartitions;
-import org.eclipse.wst.html.ui.internal.contentassist.NoRegionContentAssistProcessorForHTML;
-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.text.IStructuredPartitions;
-import org.eclipse.wst.xml.core.text.IXMLPartitions;
-
-/**
- * @plannedfor 1.0
- */
-public class NoRegionContentAssistProcessorForJSP extends NoRegionContentAssistProcessorForHTML {
-
- private String[] fJSPContexts = null;
-
- public NoRegionContentAssistProcessorForJSP() {
- super();
- initJSPContexts();
- }
-
- /*
- * @see org.eclipse.wst.html.ui.internal.contentassist.NoRegionContentAssistProcessorForHTML#initPartitionToProcessorMap()
- */
- protected void initPartitionToProcessorMap() {
- super.initPartitionToProcessorMap();
- IContentAssistProcessor jspContentAssistProcessor = new JSPContentAssistProcessor();
-
- // JSP
- addPartitionProcessor(IStructuredPartitions.DEFAULT_PARTITION, jspContentAssistProcessor);
- addPartitionProcessor(IXMLPartitions.XML_DEFAULT, jspContentAssistProcessor);
- addPartitionProcessor(IHTMLPartitions.HTML_DEFAULT, jspContentAssistProcessor);
- addPartitionProcessor(IHTMLPartitions.HTML_COMMENT, jspContentAssistProcessor);
- addPartitionProcessor(IJSPPartitions.JSP_DEFAULT, jspContentAssistProcessor);
- addPartitionProcessor(IJSPPartitions.JSP_DIRECTIVE, jspContentAssistProcessor);
- addPartitionProcessor(IJSPPartitions.JSP_CONTENT_DELIMITER, jspContentAssistProcessor);
- addPartitionProcessor(IJSPPartitions.JSP_CONTENT_JAVASCRIPT, jspContentAssistProcessor);
-
- IContentAssistProcessor jspJavaContentAssistProcessor = new JSPJavaContentAssistProcessor();
- addPartitionProcessor(IJSPPartitions.JSP_CONTENT_JAVA, jspJavaContentAssistProcessor);
-
- }
-
- protected void initNameToProcessorMap() {
- super.initNameToProcessorMap();
- JSPPropertyContentAssistProcessor jspPropertyCAP = new JSPPropertyContentAssistProcessor();
- addNameProcessor(JSP11Namespace.ElementName.SETPROPERTY, jspPropertyCAP);
- addNameProcessor(JSP11Namespace.ElementName.GETPROPERTY, jspPropertyCAP);
- addNameProcessor(JSP11Namespace.ElementName.USEBEAN, new JSPUseBeanContentAssistProcessor());
- }
-
- private void initJSPContexts() {
- fJSPContexts = new String[]{DOMJSPRegionContexts.JSP_CLOSE, DOMJSPRegionContexts.JSP_CONTENT, DOMJSPRegionContexts.JSP_DECLARATION_OPEN, DOMJSPRegionContexts.JSP_EXPRESSION_OPEN, DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN};
- }
-
- /**
- * Quick check to see if context (String) should map to
- * JSPContentAssistProcessor.
- *
- * @param context
- * @return if it's a JSP Region (for which we need JSP Content assist)
- */
- private boolean isJSPRegion(IStructuredDocumentRegion sdRegion) {
- String context = sdRegion.getType();
- for (int i = 0; i < fJSPContexts.length; i++) {
- if (context == fJSPContexts[i])
- return true;
- }
- return false;
- }
-
- protected IContentAssistProcessor guessContentAssistProcessor(ITextViewer viewer, int documentOffset) {
- IContentAssistProcessor p = super.guessContentAssistProcessor(viewer, documentOffset);
- if (p == null) {
- IStructuredDocumentRegion sdRegion = ((IStructuredDocument) viewer.getDocument()).getRegionAtCharacterOffset(documentOffset);
- if (isJSPRegion(sdRegion))
- p = getPartitionProcessor(IJSPPartitions.JSP_CONTENT_JAVA);
- }
- return p;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/ReplaceNameTemplateContext.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/ReplaceNameTemplateContext.java
deleted file mode 100644
index ca15fd2e6a..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentassist/ReplaceNameTemplateContext.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010 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.ui.internal.contentassist;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.Position;
-import org.eclipse.jface.text.templates.DocumentTemplateContext;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.text.templates.TemplateBuffer;
-import org.eclipse.jface.text.templates.TemplateContextType;
-import org.eclipse.jface.text.templates.TemplateException;
-import org.eclipse.jface.text.templates.TemplateVariable;
-
-/**
- * Just like DocumentTemplateContext except if an insert offset is passed in,
- * during evaluation, the "prefix" before the template will be checked to see
- * if it matches the template name. If so, overwrite the template name.
- * Otherwise, just insert the template at the insert offset location (by not
- * overwriting the prefix text)
- *
- * @deprecated No longer used
- */
-public class ReplaceNameTemplateContext extends DocumentTemplateContext {
- private int fInsertOffset = -1;
-
- /**
- * Creates a document template context.
- *
- * @param type
- * the context type
- * @param document
- * the document this context applies to
- * @param offset
- * the offset of the document region
- * @param length
- * the length of the document region
- */
- public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length) {
- this(type, document, new Position(offset, length));
- }
-
- /**
- * Creates a document template context. The supplied <code>Position</code>
- * will be queried to compute the <code>getStart</code> and
- * <code>getEnd</code> methods, which will therefore answer updated
- * position data if it is registered with the document.
- *
- * @param type
- * the context type
- * @param document
- * the document this context applies to
- * @param position
- * the position describing the area of the document which forms
- * the template context
- * @since 3.1
- */
- public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, Position position) {
- super(type, document, position);
- }
-
- /**
- * Creates a document template context.
- *
- * @param type
- * the context type
- * @param document
- * the document this context applies to
- * @param offset
- * the offset of the document region
- * @param length
- * the length of the document region
- * @param insertOffset
- * the offset of the document region where insert was
- * originally requested
- */
- public ReplaceNameTemplateContext(TemplateContextType type, IDocument document, int offset, int length, int insertOffset) {
- this(type, document, new Position(offset, length));
- fInsertOffset = insertOffset;
- }
-
- /*
- * @see org.eclipse.jface.text.templates.TemplateContext#evaluate(org.eclipse.jface.text.templates.Template)
- */
- public TemplateBuffer evaluate(Template template) throws BadLocationException, TemplateException {
- TemplateBuffer buffer = super.evaluate(template);
- if (buffer != null) {
- if (fInsertOffset > -1 && fInsertOffset > getStart()) {
- String prefix = getDocument().get(getStart(), fInsertOffset - getStart());
- if (!template.getName().startsWith(prefix)) {
- // generate a new buffer that actually contains the
- // text that was going to be overwritten
- int prefixSize = prefix.length();
- TemplateVariable[] newTemplateVar = buffer.getVariables();
- for (int i =0; i < newTemplateVar.length; i++ ){
- int[] offsets = newTemplateVar[i].getOffsets();
- for (int j=0; j<offsets.length ;j++){
- offsets[j] += prefixSize;
- }
- }
- buffer = new TemplateBuffer(prefix + buffer.getString(), newTemplateVar);
- }
- }
- }
- return buffer;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/JSPFContentSettingsPropertyPage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/JSPFContentSettingsPropertyPage.java
deleted file mode 100644
index 3ae07984d7..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/JSPFContentSettingsPropertyPage.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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
- * David Schneider, david.schneider@unisys.com - [142500] WTP properties pages fonts don't follow Eclipse preferences
- *******************************************************************************/
-package org.eclipse.jst.jsp.ui.internal.contentproperties.ui;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jst.jsp.core.internal.contentproperties.JSPFContentProperties;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.editor.IHelpContextIds;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PropertyPage;
-
-/**
- * JSP Fragment Property Page
- */
-public class JSPFContentSettingsPropertyPage extends PropertyPage {
- private static final String SELECT_NONE = JSPUIMessages.JSPFContentSettingsPropertyPage_0;
-
- // TODO: Figure out what to do with these strings/variables
- private String[] fLanguages = {SELECT_NONE, "java", //$NON-NLS-1$
- "javascript"}; //$NON-NLS-1$
- private String[] fContentTypes = {SELECT_NONE, "application/xhtml+xml", //$NON-NLS-1$
- "application/xml", //$NON-NLS-1$
- "text/html", //$NON-NLS-1$
- "text/xml", //$NON-NLS-1$
- "text/css"}; //$NON-NLS-1$
-
-
- private Combo fLanguageCombo;
- private Combo fContentTypeCombo;
-
- public JSPFContentSettingsPropertyPage() {
- super();
- setDescription(JSPUIMessages.JSPFContentSettingsPropertyPage_1);
- }
-
- private Composite createComposite(Composite parent, int numColumns) {
- Composite composite = new Composite(parent, SWT.NULL);
-
- // GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- composite.setLayout(layout);
-
- // GridData
- GridData data = new GridData(GridData.FILL, GridData.FILL, true, false);
- data.horizontalIndent = 0;
- composite.setLayoutData(data);
-
- return composite;
- }
-
- protected Control createContents(Composite parent) {
- Composite propertyPage = createComposite(parent, 2);
-
- // fragment language control
- Text languageLabel = new Text(propertyPage, SWT.READ_ONLY);
- languageLabel.setText(JSPUIMessages.JSPFContentSettingsPropertyPage_2);
- fLanguageCombo = new Combo(propertyPage, SWT.NONE);
- GridData data = new GridData(GridData.FILL, GridData.FILL, true, false);
- data.horizontalIndent = 0;
- fLanguageCombo.setLayoutData(data);
- fLanguageCombo.setItems(fLanguages);
-
- // fragment content type control
- Text contentTypeLabel = new Text(propertyPage, SWT.READ_ONLY);
- contentTypeLabel.setText(JSPUIMessages.JSPFContentSettingsPropertyPage_3);
- fContentTypeCombo = new Combo(propertyPage, SWT.NONE);
- data = new GridData(GridData.FILL, GridData.FILL, true, false);
- data.horizontalIndent = 0;
- fContentTypeCombo.setLayoutData(data);
- fContentTypeCombo.setItems(fContentTypes);
-
- initializeValues();
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(propertyPage, IHelpContextIds.JSP_FRAGMENT_HELPID);
- Dialog.applyDialogFont(parent);
- return propertyPage;
- }
-
- /**
- * Get the resource this properties page is for
- *
- * @return IResource for this properties page or null if there is no
- * IResource
- */
- private IResource getResource() {
- IResource resource = null;
- IAdaptable adaptable = getElement();
- if (adaptable instanceof IResource) {
- resource = (IResource) adaptable;
- } else if (adaptable != null) {
- Object o = adaptable.getAdapter(IResource.class);
- if (o instanceof IResource) {
- resource = (IResource)o;
- }
- }
- return resource;
- }
-
- private void initializeValues() {
- String language = JSPFContentProperties.getProperty(JSPFContentProperties.JSPLANGUAGE, getResource(), false);
- if (language == null || language.length() == 0) {
- // if null, use none
- language = SELECT_NONE;
- }
- /*
- * If item is already part of combo, select it. Otherwise, add to the
- * combobox.
- */
- int index = fLanguageCombo.indexOf(language);
- if (index > -1)
- fLanguageCombo.select(index);
- else
- fLanguageCombo.setText(language);
-
- String contentType = JSPFContentProperties.getProperty(JSPFContentProperties.JSPCONTENTTYPE, getResource(), false);
- if (contentType == null || contentType.length() == 0) {
- // if null, use none
- contentType = SELECT_NONE;
- }
- /*
- * If item is already part of combo, select it. Otherwise, add to the
- * combobox.
- */
- index = fContentTypeCombo.indexOf(contentType);
- if (index > -1)
- fContentTypeCombo.select(index);
- else
- fContentTypeCombo.setText(contentType);
- }
-
- protected void performDefaults() {
- int index = fLanguageCombo.indexOf(SELECT_NONE);
- if (index > -1)
- fLanguageCombo.select(index);
-
- index = fContentTypeCombo.indexOf(SELECT_NONE);
- if (index > -1)
- fContentTypeCombo.select(index);
-
- super.performDefaults();
- }
-
- public boolean performOk() {
- try {
- // save the fragment language
- String language = fLanguageCombo.getText();
- if (language == null || language.length() == 0 || language.equalsIgnoreCase(SELECT_NONE)) {
- // if none, use null
- language = null;
- }
- JSPFContentProperties.setProperty(JSPFContentProperties.JSPLANGUAGE, getResource(), language);
-
- // save fragment content type
- String contentType = fContentTypeCombo.getText();
- if (contentType == null || contentType.length() == 0 || contentType.equalsIgnoreCase(SELECT_NONE)) {
- // if none, use null
- contentType = null;
- }
- JSPFContentProperties.setProperty(JSPFContentProperties.JSPCONTENTTYPE, getResource(), contentType);
- }
- catch (CoreException e) {
- // maybe in future, let user know there was a problem saving file
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
-
- return super.performOk();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/ProjectJSPFContentSettingsPropertyPage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/ProjectJSPFContentSettingsPropertyPage.java
deleted file mode 100644
index 31976b6591..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/ProjectJSPFContentSettingsPropertyPage.java
+++ /dev/null
@@ -1,19 +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.ui.internal.contentproperties.ui;
-
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-
-public class ProjectJSPFContentSettingsPropertyPage extends JSPFContentSettingsPropertyPage {
- public ProjectJSPFContentSettingsPropertyPage() {
- setDescription(JSPUIMessages.ProjectJSPFContentSettingsPropertyPage_0);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/TagContentSettingsPropertyPage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/TagContentSettingsPropertyPage.java
deleted file mode 100644
index b637ba2342..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/contentproperties/ui/TagContentSettingsPropertyPage.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.contentproperties.ui;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.preference.ComboFieldEditor;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.modelquery.TagModelQuery;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IWorkbenchPropertyPage;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.ui.preferences.ScopedPreferenceStore;
-
-public class TagContentSettingsPropertyPage extends PropertyPage implements IWorkbenchPropertyPage {
- private static final String[] fDisplayTypes = {"HTML", "XML"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private static final String[] fValues = {"text/html", "text/xml"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- private ComboFieldEditor fComboFieldEditor;
-
- public TagContentSettingsPropertyPage() {
- super();
- noDefaultAndApplyButton();
- setDescription(JSPUIMessages.TagPropertyPage_desc);
- }
-
- protected Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayoutData(GridDataFactory.fillDefaults());
- composite.setLayout(new GridLayout(2, true));
-
- Object adapter = getElement().getAdapter(IFile.class);
- if (adapter == null) {
- adapter = getElement().getAdapter(IResource.class);
- }
- if (adapter != null && adapter instanceof IResource) {
- String preferenceKey = TagModelQuery.createPreferenceKey(((IResource) adapter).getFullPath());
- new DefaultScope().getNode(JSPCorePlugin.getDefault().getBundle().getSymbolicName()).put(preferenceKey, fValues[0]);
- ScopedPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(((IResource) adapter).getProject()), JSPCorePlugin.getDefault().getBundle().getSymbolicName());
-
- String[][] entryNamesAndValues = new String[][]{{fDisplayTypes[0], fValues[0]}, {fDisplayTypes[1], fValues[1]}};
- fComboFieldEditor = new ComboFieldEditor(preferenceKey, JSPUIMessages.JSPFContentSettingsPropertyPage_2, entryNamesAndValues, composite);
- fComboFieldEditor.fillIntoGrid(composite, 2);
- fComboFieldEditor.setPreferenceStore(store);
- fComboFieldEditor.load();
-
- // let the page save for us if needed
- setPreferenceStore(store);
- }
- return composite;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.PreferencePage#performOk()
- */
- public boolean performOk() {
- if (fComboFieldEditor != null) {
- fComboFieldEditor.store();
- }
- return super.performOk();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/derived/SingleCharReader.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/derived/SingleCharReader.java
deleted file mode 100644
index e198a2766a..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/derived/SingleCharReader.java
+++ /dev/null
@@ -1,66 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.ui.internal.derived;
-
-import java.io.IOException;
-import java.io.Reader;
-
-/*
- * Copied from org.eclipse.jdt.internal.corext.javadoc.SingleCharReader.
- * Modification was made to fix statement unnecessarily nested within else
- * clause warning in read(..).
- */
-public abstract class SingleCharReader extends Reader {
-
- /**
- * @see Reader#read()
- */
- public abstract int read() throws IOException;
-
- /**
- * @see Reader#read(char[],int,int)
- */
- public int read(char cbuf[], int off, int len) throws IOException {
- int end = off + len;
- for (int i = off; i < end; i++) {
- int ch = read();
- if (ch == -1) {
- if (i == off) {
- return -1;
- }
- return i - off;
- }
- cbuf[i] = (char) ch;
- }
- return len;
- }
-
- /**
- * @see Reader#ready()
- */
- public boolean ready() throws IOException {
- return true;
- }
-
- /**
- * Gets the content as a String
- */
- public String getString() throws IOException {
- StringBuffer buf = new StringBuffer();
- int ch;
- while ((ch = read()) != -1) {
- buf.append((char) ch);
- }
- return buf.toString();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/ActionContributorJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/ActionContributorJSP.java
deleted file mode 100644
index 4a9715e4a0..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/ActionContributorJSP.java
+++ /dev/null
@@ -1,94 +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.ui.internal.editor;
-
-import java.util.ResourceBundle;
-
-import org.eclipse.jdt.ui.actions.RefactorActionGroup;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jst.jsp.ui.internal.IActionConstantsJSP;
-import org.eclipse.jst.jsp.ui.internal.IActionDefinitionIdsJSP;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.RetargetTextEditorAction;
-import org.eclipse.wst.html.ui.internal.edit.ui.ActionContributorHTML;
-import org.eclipse.wst.sse.ui.internal.actions.StructuredTextEditorActionConstants;
-
-/**
- * ActionContributorJSP
- *
- * This class should not be used inside multi page editor's
- * ActionBarContributor, since cascaded init() call from the
- * ActionBarContributor will causes exception and it leads to lose whole
- * toolbars.
- *
- * Instead, use SourcePageActionContributor for source page contributor of
- * multi page editor.
- *
- * Note that this class is still valid for single page editor.
- */
-public class ActionContributorJSP extends ActionContributorHTML {
-
- private RetargetTextEditorAction renameElementAction = null;
- private RetargetTextEditorAction moveElementAction = null;
- private IMenuManager refactorMenu = null;
-
- private static final String[] EDITOR_IDS = {"org.eclipse.jst.jsp.core.jspsource.source", "org.eclipse.wst.sse.ui.StructuredTextEditor"}; //$NON-NLS-1$ //$NON-NLS-2$
-
- public ActionContributorJSP() {
- super();
-
- ResourceBundle bundle = JSPUIMessages.getResourceBundle();
- this.renameElementAction = new RetargetTextEditorAction(bundle, IActionConstantsJSP.ACTION_NAME_RENAME_ELEMENT + StructuredTextEditorActionConstants.UNDERSCORE);
- this.renameElementAction.setActionDefinitionId(IActionDefinitionIdsJSP.RENAME_ELEMENT);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this.renameElementAction, IHelpContextIds.JSP_REFACTORRENAME_HELPID);
-
- this.moveElementAction = new RetargetTextEditorAction(bundle, IActionConstantsJSP.ACTION_NAME_MOVE_ELEMENT + StructuredTextEditorActionConstants.UNDERSCORE);
- this.moveElementAction.setActionDefinitionId(IActionDefinitionIdsJSP.MOVE_ELEMENT);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this.moveElementAction, IHelpContextIds.JSP_REFACTORMOVE_HELPID);
-
- // the refactor menu, add the menu itself to add all refactor actions
- this.refactorMenu = new MenuManager(JSPUIMessages.ActionContributorJSP_0, RefactorActionGroup.MENU_ID); //$NON-NLS-1$
- refactorMenu.add(this.renameElementAction);
- refactorMenu.add(this.moveElementAction);
- }
-
-
- protected String[] getExtensionIDs() {
- return EDITOR_IDS;
- }
-
-
- protected void addToMenu(IMenuManager menu) {
- super.addToMenu(menu);
-
- menu.insertAfter(IWorkbenchActionConstants.M_EDIT, this.refactorMenu);
- }
-
-
- public void setActiveEditor(IEditorPart activeEditor) {
-
- super.setActiveEditor(activeEditor);
- this.renameElementAction.setAction(getAction(getTextEditor(getActiveEditorPart()), IActionConstantsJSP.ACTION_NAME_RENAME_ELEMENT));
- this.moveElementAction.setAction(getAction(getTextEditor(getActiveEditorPart()), IActionConstantsJSP.ACTION_NAME_MOVE_ELEMENT));
- }
-
-
- public void setViewerSpecificContributionsEnabled(boolean enabled) {
-
- super.setViewerSpecificContributionsEnabled(enabled);
- this.renameElementAction.setEnabled(enabled);
- this.moveElementAction.setEnabled(enabled);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/IHelpContextIds.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/IHelpContextIds.java
deleted file mode 100644
index 70193600cd..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/IHelpContextIds.java
+++ /dev/null
@@ -1,53 +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.ui.internal.editor;
-
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-
-/**
- * Help context ids for the JSP Source Editor.
- * <p>
- * This interface contains constants only; it is not intended to be
- * implemented.
- * </p>
- *
- */
-public interface IHelpContextIds {
- // org.eclipse.jst.jsp.ui.
- public static final String PREFIX = JSPUIPlugin.ID + "."; //$NON-NLS-1$
-
-
- // // figured out on the fly
- // // JSP Source page editor
- // public static final String JSP_SOURCEVIEW_HELPID =
- // ContentTypeIdForJSP.ContentTypeID_JSP +"_source_HelpId"; //$NON-NLS-1$
-
- // JSP Files Preference page
- public static final String JSP_PREFWEBX_FILES_HELPID = PREFIX + "webx0050"; //$NON-NLS-1$
- // JSP Styles Preference page
- public static final String JSP_PREFWEBX_STYLES_HELPID = PREFIX + "webx0051"; //$NON-NLS-1$
- // JSP Templates Preference page
- public static final String JSP_PREFWEBX_TEMPLATES_HELPID = PREFIX + "webx0052"; //$NON-NLS-1$
-
-
- // JSP Fragment Property Page
- public static final String JSP_FRAGMENT_HELPID = PREFIX + "jspf1000"; //$NON-NLS-1$
-
- // JSP Source Editor Context Menu
- // Refactor Rename
- public static final String JSP_REFACTORRENAME_HELPID = PREFIX + "jspr0010"; //$NON-NLS-1$
-
- // Refactor Move
- public static final String JSP_REFACTORMOVE_HELPID = PREFIX + "jspr0020"; //$NON-NLS-1$
-
- // JSP New File Wizard - Template Page
- public static final String JSP_NEWWIZARD_TEMPLATE_HELPID = PREFIX + "jspw0010"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPEditorPluginImageHelper.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPEditorPluginImageHelper.java
deleted file mode 100644
index d4ca9f36f4..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPEditorPluginImageHelper.java
+++ /dev/null
@@ -1,179 +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.jst.jsp.ui.internal.editor;
-
-import java.util.HashMap;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-
-/**
- * Helper class to handle images provided by this plug-in.
- *
- * NOTE: For internal use only. For images used externally, please use the
- * Shared***ImageHelper class instead.
- *
- * @author amywu
- */
-public class JSPEditorPluginImageHelper {
- private final String PLUGINID = JSPUIPlugin.ID;
- private static JSPEditorPluginImageHelper instance = null;
-
- // save a descriptor for each image
- private HashMap fImageDescRegistry = null;
-
- /**
- * Gets the instance.
- *
- * @return Returns a JSPEditorPluginImageHelper
- */
- public synchronized static JSPEditorPluginImageHelper getInstance() {
- if (instance == null)
- instance = new JSPEditorPluginImageHelper();
- return instance;
- }
-
- /**
- * Retrieves the image associated with resource from the image registry.
- * If the image cannot be retrieved, attempt to find and load the image at
- * the location specified in resource.
- *
- * @param resource
- * the image to retrieve
- * @return Image the image associated with resource or null if one could
- * not be found
- */
- public Image getImage(String resource) {
- Image image = getImageRegistry().get(resource);
- if (image == null) {
- // create an image
- image = createImage(resource);
- }
- return image;
- }
-
- /**
- * Retrieves the Image associated with ImageDescriptor from the image
- * descriptor registry. If the Image cannot be retrieved, it is created
- * from the ImageDescriptor
- *
- * @param resource
- * the image descriptor to retrieve
- * @return Image the associated with the ImageDescriptor or
- * the default "missing" image descriptor if one could not be
- * found
- */
- public Image getImage(ImageDescriptor descriptor) {
- if (descriptor == null)
- descriptor= ImageDescriptor.getMissingImageDescriptor();
-
- Image result= (Image)getImageDescriptorRegistry().get(descriptor);
- if (result != null)
- return result;
-
- result= descriptor.createImage();
- if (result != null)
- getImageDescriptorRegistry().put(descriptor, result);
- return result;
- }
-
- /**
- * Retrieves the image descriptor associated with resource from the image
- * descriptor registry. If the image descriptor cannot be retrieved,
- * attempt to find and load the image descriptor at the location specified
- * in resource.
- *
- * @param resource
- * the image descriptor to retrieve
- * @return ImageDescriptor the image descriptor assocated with resource or
- * the default "missing" image descriptor if one could not be
- * found
- */
- public ImageDescriptor getImageDescriptor(String resource) {
- ImageDescriptor imageDescriptor = null;
- Object o = getImageDescriptorRegistry().get(resource);
- if (o == null) {
- //create a descriptor
- imageDescriptor = createImageDescriptor(resource);
- }
- else {
- imageDescriptor = (ImageDescriptor) o;
- }
- return imageDescriptor;
- }
-
- /**
- * Returns the image descriptor registry for this plugin.
- *
- * @return HashMap - image descriptor registry for this plugin
- */
- private HashMap getImageDescriptorRegistry() {
- if (fImageDescRegistry == null)
- fImageDescRegistry = new HashMap();
- return fImageDescRegistry;
- }
-
- /**
- * Returns the image registry for this plugin.
- *
- * @return ImageRegistry - image registry for this plugin
- */
- private ImageRegistry getImageRegistry() {
- return JFaceResources.getImageRegistry();
- }
-
- /**
- * Creates an image from the given resource and adds the image to the
- * image registry.
- *
- * @param resource
- * @return Image
- */
- private Image createImage(String resource) {
- ImageDescriptor desc = getImageDescriptor(resource);
- Image image = null;
-
- if (desc != null) {
- image = desc.createImage();
- // dont add the missing image descriptor image to the image registry
- if (!desc.equals(ImageDescriptor.getMissingImageDescriptor()))
- getImageRegistry().put(resource, image);
- }
- return image;
- }
-
- /**
- * Creates an image descriptor from the given imageFilePath and adds the
- * image descriptor to the image descriptor registry. If an image
- * descriptor could not be created, the default "missing" image descriptor
- * is returned but not added to the image descriptor registry.
- *
- * @param imageFilePath
- * @return ImageDescriptor image descriptor for imageFilePath or default
- * "missing" image descriptor if resource could not be found
- */
- private ImageDescriptor createImageDescriptor(String imageFilePath) {
- ImageDescriptor imageDescriptor = AbstractUIPlugin.imageDescriptorFromPlugin(PLUGINID, imageFilePath);
- if (imageDescriptor != null) {
- getImageDescriptorRegistry().put(imageFilePath, imageDescriptor);
- }
- else {
- imageDescriptor = ImageDescriptor.getMissingImageDescriptor();
- }
-
- return imageDescriptor;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPEditorPluginImages.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPEditorPluginImages.java
deleted file mode 100644
index bd38f2a288..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPEditorPluginImages.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.ui.internal.editor;
-
-/**
- * Bundle of most images used by the JSP Editor plug-in.
- */
-public class JSPEditorPluginImages {
- public static final String IMG_OBJ_CLASS_OBJ = "icons/full/obj16/class_obj.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_GENERIC = "icons/full/obj16/tag-generic.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_JSP = "icons/full/obj16/tag-jsp.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_TAG_TEMPLATE = "icons/full/obj16/tag-template.gif"; //$NON-NLS-1$
- public static final String IMG_OBJ_PUBLIC = "icons/full/obj16/public.gif"; //$NON-NLS-1$
-
- public static final String FIELD_PROTECTED_OBJ = "icons/full/obj16/field_protected_obj.gif"; //$NON-NLS-1$
- public static final String FIELD_PUBLIC_OBJ = "icons/full/obj16/field_public_obj.gif"; //$NON-NLS-1$
- public static final String FIELD_DEFAULT_OBJ= "icons/full/obj16/field_default_obj.gif"; //$NON-NLS-1$
- public static final String FIELD_PRIVATE_OBJ = "icons/full/obj16/field_private_obj.gif"; //$NON-NLS-1$
-
- public static final String DEFAULT_CO = "icons/full/obj16/default_co.gif"; //$NON-NLS-1$
- public static final String PROTECTED_CO = "icons/full/obj16/protected_co.gif"; //$NON-NLS-1$
- public static final String PUBLIC_CO = "icons/full/obj16/public_co.gif"; //$NON-NLS-1$
- public static final String PRIVATE_CO = "icons/full/obj16/private_co.gif"; //$NON-NLS-1$
-
- public static final String INNERCLASS_DEFAULT_OBJ= "icons/full/obj16/innerclass_default_obj.gif"; //$NON-NLS-1$
- public static final String INNERCLASS_PRIVATE_OBJ = "icons/full/obj16/innerclass_private_obj.gif"; //$NON-NLS-1$
- public static final String INNERCLASS_PROTECTED_OBJ = "icons/full/obj16/innerclass_protected_obj.gif"; //$NON-NLS-1$
- public static final String INNERCLASS_PUBLIC_OBJ = "icons/full/obj16/innerclass_public_obj.gif"; //$NON-NLS-1$
-
- public static final String INNERINTERFACE_DEFAULT_OBJ = "icons/full/obj16/innerinterface_default_obj.gif"; //$NON-NLS-1$
- public static final String INNERINTERFACE_PRIVATE_OBJ = "icons/full/obj16/innerinterface_private_obj.gif"; //$NON-NLS-1$
- public static final String INNERINTERFACE_PROTECTED_OBJ = "icons/full/obj16/innerinterface_protected_obj.gif"; //$NON-NLS-1$
- public static final String INNERINTERFACE_PUBLIC_OBJ = "icons/full/obj16/innerinterface_public_obj.gif"; //$NON-NLS-1$
-
- public static final String PACKAGE_OBJ = "icons/full/obj16/package_obj.gif"; //$NON-NLS-1$
-
- public static final String LOCAL_VARIABLE_OBJ = "icons/full/obj16/localvariable_obj.gif"; //$NON-NLS-1$
-
- public static final String IMG_OBJ_WIZBAN_NEWJSPFILE = "icons/full/wizban/newjspfile_wiz.png"; //$NON-NLS-1$
- public static final String IMG_OBJ_WIZBAN_NEWTAGFILE = "icons/full/wizban/newjspfile_wiz.png"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPSourceEditingTextTools.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPSourceEditingTextTools.java
deleted file mode 100644
index db268436c9..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/editor/JSPSourceEditingTextTools.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.ui.internal.editor;
-
-
-
-import org.eclipse.jst.jsp.core.internal.document.PageDirectiveAdapter;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.ui.internal.provisional.XMLSourceEditingTextTools;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Implements ISourceEditingTextTools interface
- */
-public class JSPSourceEditingTextTools extends XMLSourceEditingTextTools {
-
- public String getPageLanguage(Node node) {
- String language = null;
- Document doc = null;
- if (node.getNodeType() == Node.DOCUMENT_NODE) {
- doc = (Document) node;
- }
- else {
- doc = node.getOwnerDocument();
- }
- if (doc != null) {
- if (doc instanceof IDOMDocument) {
- PageDirectiveAdapter adapter = (PageDirectiveAdapter) ((IDOMDocument) doc).getAdapterFor(PageDirectiveAdapter.class);
- if (adapter != null)
- language = adapter.getLanguage();
- }
- else {
- // iterate through all of the page directives
- NodeList pageDirectives = doc.getElementsByTagName(JSP12Namespace.ElementName.DIRECTIVE_PAGE);
- for (int i = 0; i < pageDirectives.getLength(); i++) {
- Element pageDirective = (Element) pageDirectives.item(i);
- // last one to declare a language wins
- if (pageDirective.hasAttribute(JSP11Namespace.ATTR_NAME_LANGUAGE))
- language = pageDirective.getAttribute(JSP11Namespace.ATTR_NAME_LANGUAGE);
- }
- }
- }
- // if no language was specified anywhere, assume Java
- if (language == null)
- language = JSP11Namespace.ATTR_VALUE_JAVA;
- return language;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/format/FormattingStrategyJSPJava.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/format/FormattingStrategyJSPJava.java
deleted file mode 100644
index 251b185579..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/format/FormattingStrategyJSPJava.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 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.ui.internal.format;
-
-import java.util.LinkedList;
-import java.util.Map;
-
-import org.eclipse.jdt.core.ICompilationUnit;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.core.ToolFactory;
-import org.eclipse.jdt.core.formatter.CodeFormatter;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jface.text.TypedPosition;
-import org.eclipse.jface.text.formatter.ContextBasedFormattingStrategy;
-import org.eclipse.jface.text.formatter.FormattingContextProperties;
-import org.eclipse.jface.text.formatter.IFormattingContext;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslationUtil;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.TextEdit;
-
-
-public class FormattingStrategyJSPJava extends ContextBasedFormattingStrategy {
-
- /** Documents to be formatted by this strategy */
- private final LinkedList fDocuments = new LinkedList();
- /** Partitions to be formatted by this strategy */
- private final LinkedList fPartitions = new LinkedList();
- JSPTranslation translation = null;
-
- /**
- * Creates a new java formatting strategy.
- */
- public FormattingStrategyJSPJava() {
- super();
- }
-
- /*
- * @see org.eclipse.jface.text.formatter.ContextBasedFormattingStrategy#format()
- */
- public void format() {
- super.format();
- final IDocument document = (IDocument) fDocuments.removeFirst();
- final TypedPosition partition = (TypedPosition) fPartitions.removeFirst();
-
- if (document != null && partition != null) {
- try {
-
- JSPTranslationUtil translationUtil = new JSPTranslationUtil(document);
- ICompilationUnit cu = translationUtil.getCompilationUnit();
- if (cu != null) {
- String cuSource = cu.getSource();
- /*
- * Format the entire compilation unit, but only create
- * edits for the requested JSP partition's range in the
- * Java source
- */
- TextEdit textEdit = formatString(CodeFormatter.K_COMPILATION_UNIT, cuSource, translationUtil.getTranslation().getJavaOffset(partition.getOffset()), partition.getLength(), TextUtilities.getDefaultLineDelimiter(document), getPreferences());
-
- TextEdit jspEdit = translationUtil.getTranslation().getJspEdit(textEdit);
- if (jspEdit != null && jspEdit.hasChildren())
- jspEdit.apply(document);
- }
-
- }
- catch (MalformedTreeException exception) {
- Logger.logException(exception);
- }
- catch (BadLocationException exception) {
- // Can only happen on concurrent document modification - log
- // and bail out
- Logger.logException(exception);
- }
- catch (JavaModelException exception) {
- Logger.logException(exception);
- }
- }
- }
-
- private TextEdit formatString(int kind, String cuSource, int javaOffset, int length, String defaultLineDelimiter, Map preferences) {
- return ToolFactory.createCodeFormatter(preferences).format(kind, cuSource, javaOffset, length, 0, defaultLineDelimiter);
- }
-
- /*
- * @see org.eclipse.jface.text.formatter.ContextBasedFormattingStrategy#formatterStarts(org.eclipse.jface.text.formatter.IFormattingContext)
- */
- public void formatterStarts(final IFormattingContext context) {
- super.formatterStarts(context);
-
- fPartitions.addLast(context.getProperty(FormattingContextProperties.CONTEXT_PARTITION));
- fDocuments.addLast(context.getProperty(FormattingContextProperties.CONTEXT_MEDIUM));
- }
-
- /*
- * @see org.eclipse.jface.text.formatter.ContextBasedFormattingStrategy#formatterStops()
- */
- public void formatterStops() {
- super.formatterStops();
-
- fPartitions.clear();
- fDocuments.clear();
- }
-
- public TextEdit formatString(int kind, String string, int indentationLevel, String lineSeparator, Map options) {
- return ToolFactory.createCodeFormatter(options).format(kind, string, 0, string.length(), indentationLevel, lineSeparator);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/handlers/JSPFindOccurrencesHandler.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/handlers/JSPFindOccurrencesHandler.java
deleted file mode 100644
index 207266c866..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/handlers/JSPFindOccurrencesHandler.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.ui.internal.handlers;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jst.jsp.ui.internal.java.search.JSPFindOccurrencesProcessor;
-import org.eclipse.wst.html.ui.internal.search.HTMLFindOccurrencesProcessor;
-import org.eclipse.wst.sse.ui.internal.handlers.FindOccurrencesHandler;
-
-public class JSPFindOccurrencesHandler extends FindOccurrencesHandler {
- private List fProcessors;
-
- protected List getProcessors() {
- if (fProcessors == null) {
- fProcessors = new ArrayList();
- HTMLFindOccurrencesProcessor htmlProcessor = new HTMLFindOccurrencesProcessor();
- fProcessors.add(htmlProcessor);
- JSPFindOccurrencesProcessor jspProcessor = new JSPFindOccurrencesProcessor();
- fProcessors.add(jspProcessor);
- }
- return fProcessors;
- }
-
-
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/ExternalFileHyperlink.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/ExternalFileHyperlink.java
deleted file mode 100644
index 15ff247909..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/ExternalFileHyperlink.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2010 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.ui.internal.hyperlink;
-
-import java.io.File;
-
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-
-/**
- * Hyperlink for external files.
- */
-class ExternalFileHyperlink implements IHyperlink {
- // copies of this class exist in:
- // org.eclipse.wst.xml.ui.internal.hyperlink
- // org.eclipse.wst.html.ui.internal.hyperlink
- // org.eclipse.jst.jsp.ui.internal.hyperlink
-
- private IRegion fHyperlinkRegion;
- private File fHyperlinkFile;
-
- public ExternalFileHyperlink(IRegion region, File file) {
- fHyperlinkFile = file;
- fHyperlinkRegion = region;
- }
-
- public IRegion getHyperlinkRegion() {
- return fHyperlinkRegion;
- }
-
- public String getTypeLabel() {
- return null;
- }
-
- public String getHyperlinkText() {
- String path = fHyperlinkFile.getPath();
- if (path.length() > 60) {
- path = path.substring(0, 25) + "..." + path.substring(path.length() - 25, path.length());
- }
- return NLS.bind(JSPUIMessages.Open, path);
- }
-
- public void open() {
- if (fHyperlinkFile != null) {
- try {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IFileStore store = EFS.getLocalFileSystem().getStore(fHyperlinkFile.toURI());
- IDE.openEditorOnFileStore(page, store) ;
- }
- catch (PartInitException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlink.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlink.java
deleted file mode 100644
index aaeaeae3b7..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlink.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.hyperlink;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.ui.JavaElementLabels;
-import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IEditorPart;
-
-/**
- * Hyperlink for JSP Java elements
- */
-class JSPJavaHyperlink implements IHyperlink {
- private IRegion fRegion;
- private IJavaElement fElement;
-
- public JSPJavaHyperlink(IRegion region, IJavaElement element) {
- fRegion = region;
- fElement = element;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkRegion()
- */
- public IRegion getHyperlinkRegion() {
- return fRegion;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getTypeLabel()
- */
- public String getTypeLabel() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
- */
- public String getHyperlinkText() {
- return NLS.bind(JSPUIMessages.Open, JavaElementLabels.getElementLabel(fElement, JavaElementLabels.ALL_POST_QUALIFIED));
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#open()
- */
- public void open() {
- try {
- IEditorPart editor = JavaUI.openInEditor(fElement);
- if (editor != null) {
- JavaUI.revealInEditor(editor, fElement);
- }
- }
- catch (Exception e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlinkDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlinkDetector.java
deleted file mode 100644
index 7b2ba67aa8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/JSPJavaHyperlinkDetector.java
+++ /dev/null
@@ -1,264 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2011 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.ui.internal.hyperlink;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IField;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.ILocalVariable;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.ISourceRange;
-import org.eclipse.jdt.core.ISourceReference;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-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.ui.internal.Logger;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.util.URIResolver;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-/**
- * Detects hyperlinks in JSP Java content
- */
-public class JSPJavaHyperlinkDetector extends AbstractHyperlinkDetector {
-
- private IHyperlink createHyperlink(IJavaElement element, IRegion region, IDocument document) {
- IHyperlink link = null;
- if (region != null) {
- // open local variable in the JSP file...
- boolean isInTranslationCU = false;
- if (element instanceof ISourceReference) {
- IFile file = null;
- int jspOffset = 0;
- IStructuredModel sModel = null;
-
- // try to locate the file in the workspace
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- if (sModel != null) {
- URIResolver resolver = sModel.getResolver();
- if (resolver != null) {
- String uriString = resolver.getFileBaseLocation();
- file = getFile(uriString);
- }
- }
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
-
- // get Java range, translate coordinate to JSP
-
- try {
- ISourceRange range = null;
- IJSPTranslation jspTranslation = getJSPTranslation(document);
- if (jspTranslation != null) {
- // link to local variable definitions
- if (element instanceof ILocalVariable) {
- range = ((ILocalVariable) element).getNameRange();
- Object cu = ((ILocalVariable) element).getAncestor(IJavaElement.COMPILATION_UNIT);
- if (cu != null && cu.equals(jspTranslation.getCompilationUnit()))
- isInTranslationCU = true;
- }
- // linking to fields of the same compilation unit
- else if (element.getElementType() == IJavaElement.FIELD) {
- Object cu = ((IField) element).getCompilationUnit();
- if (cu != null && cu.equals(jspTranslation.getCompilationUnit())) {
- range = ((ISourceReference) element).getSourceRange();
- isInTranslationCU = true;
- }
- }
- // linking to methods of the same compilation unit
- else if (element.getElementType() == IJavaElement.METHOD) {
- Object cu = ((IMethod) element).getCompilationUnit();
- if (cu != null && cu.equals(jspTranslation.getCompilationUnit())) {
- range = ((ISourceReference) element).getSourceRange();
- isInTranslationCU = true;
- }
- }
- }
-
- if (range != null && file != null) {
- jspOffset = jspTranslation.getJspOffset(range.getOffset());
- if (jspOffset >= 0) {
- link = new WorkspaceFileHyperlink(region, file, new Region(jspOffset, range.getLength()));
- }
- }
- }
- catch (JavaModelException jme) {
- Logger.log(Logger.WARNING_DEBUG, jme.getMessage(), jme);
- }
- }
- if (link == null && !isInTranslationCU) { // Don't try to open the translation CU
- link = new JSPJavaHyperlink(region, element);
- }
- }
- return link;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlinkDetector#detectHyperlinks(org.eclipse.jface.text.ITextViewer,
- * org.eclipse.jface.text.IRegion, boolean)
- */
- public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
- List hyperlinks = new ArrayList(0);
-
- if (region != null && textViewer != null) {
- IDocument document = textViewer.getDocument();
-
- // check and make sure this is a valid Java type
- JSPTranslation jspTranslation = getJSPTranslation(document);
- if (jspTranslation != null) {
- // check if we are in JSP Java content
- int javaOffset = jspTranslation.getJavaOffset(region.getOffset());
- if (javaOffset > -1) {
- // check that we are not in indirect Java content (like
- // included files)
- if (!jspTranslation.isIndirect(javaOffset)) {
- // get Java elements
- IJavaElement[] elements = jspTranslation.getElementsFromJspRange(region.getOffset(), region.getOffset() + region.getLength());
- if (elements != null && elements.length > 0) {
- // create a JSPJavaHyperlink for each Java element
- for (int i = 0; i < elements.length; ++i) {
- IJavaElement element = elements[i];
-
- // find hyperlink range for Java element
- IRegion hyperlinkRegion = selectWord(document, region.getOffset());
- IHyperlink link = createHyperlink(element, hyperlinkRegion, document);
- if (link != null) {
- hyperlinks.add(link);
- }
- }
- }
- }
- }
- }
- }
-
- if (hyperlinks.size() == 0)
- return null;
- return (IHyperlink[]) hyperlinks.toArray(new IHyperlink[0]);
- }
-
- /**
- * Returns an IFile from the given uri if possible, null if cannot find
- * file from uri.
- *
- * @param fileString
- * file system path
- * @return returns IFile if fileString exists in the workspace
- */
- private IFile getFile(String fileString) {
- IFile file = null;
-
- if (fileString != null) {
- Path filePath = new Path(fileString);
- if (filePath.segmentCount() > 1 && ResourcesPlugin.getWorkspace().getRoot().getFile(filePath).exists()) {
- return ResourcesPlugin.getWorkspace().getRoot().getFile(filePath);
- }
- IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(filePath);
- for (int i = 0; i < files.length && file == null; i++)
- if (files[i].exists())
- file = files[i];
- }
-
- return file;
- }
-
- /**
- * Get JSP translation object
- *
- * @return JSPTranslation if one exists, null otherwise
- */
- private JSPTranslation getJSPTranslation(IDocument document) {
- JSPTranslation translation = null;
-
- IDOMModel xmlModel = null;
- try {
- xmlModel = (IDOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(document);
- if (xmlModel != null) {
- IDOMDocument xmlDoc = xmlModel.getDocument();
- JSPTranslationAdapter adapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
- if (adapter != null) {
- translation = adapter.getJSPTranslation();
- }
- }
- }
- finally {
- if (xmlModel != null)
- xmlModel.releaseFromRead();
- }
- return translation;
- }
-
- /**
- * Java always selects word when defining region
- *
- * @param document
- * @param anchor
- * @return IRegion
- */
- private IRegion selectWord(IDocument document, int anchor) {
-
- try {
- int offset = anchor;
- char c;
-
- while (offset >= 0) {
- c = document.getChar(offset);
- if (!Character.isJavaIdentifierPart(c))
- break;
- --offset;
- }
-
- int start = offset;
-
- offset = anchor;
- int length = document.getLength();
-
- while (offset < length) {
- c = document.getChar(offset);
- if (!Character.isJavaIdentifierPart(c))
- break;
- ++offset;
- }
-
- int end = offset;
-
- if (start == end)
- return new Region(start, 0);
-
- return new Region(start + 1, end - start - 1);
-
- }
- catch (BadLocationException x) {
- return null;
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TLDFileHyperlink.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TLDFileHyperlink.java
deleted file mode 100644
index 012b0f5bf0..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TLDFileHyperlink.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.ui.internal.hyperlink;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-class TLDFileHyperlink implements IHyperlink {
-
- private IResource fResource;
- private IRegion fHyperlinkRegion;
- private String fSearchName;
- private int fSearchType;
-
- public TLDFileHyperlink(IResource resource, int searchType, String searchName, IRegion hyperlinkRegion) {
- super();
- fResource = resource;
- fSearchName = searchName;
- fSearchType = searchType;
- fHyperlinkRegion = hyperlinkRegion;
- }
-
- private IMarker createMarker(IFile file, IRegion region) throws CoreException {
- // org.eclipse.ui.texteditor.MarkerUtilities.setCharStart(IMarker, int)
- IMarker marker = file.createMarker(JSPUIPlugin.ID + "hyperlink"); //$NON-NLS-1$
- marker.setAttribute(IMarker.TRANSIENT, Boolean.TRUE);
- marker.setAttribute(IMarker.SOURCE_ID, getClass().getName());
- marker.setAttribute(IMarker.CHAR_START, region.getOffset());
- marker.setAttribute(IMarker.CHAR_END, region.getOffset() + region.getLength());
- return marker;
- }
-
- public IRegion getHyperlinkRegion() {
- return fHyperlinkRegion;
- }
-
- public String getHyperlinkText() {
- return NLS.bind(JSPUIMessages.Open, fResource.getFullPath().toString());
- }
-
- public String getTypeLabel() {
- return null;
- }
-
- public void open() {
- IWorkbenchWindow window = JSPUIPlugin.getInstance().getWorkbench().getActiveWorkbenchWindow();
- if (window != null) {
- IWorkbenchPage page = window.getActivePage();
- if (fResource.getType() == IResource.FILE) {
- IFile file = (IFile) fResource;
- IMarker marker = null;
- IDOMModel domModel = null;
- try {
- IStructuredModel model = StructuredModelManager.getModelManager().getModelForRead(file);
- if (model instanceof IDOMModel) {
- domModel = (IDOMModel) model;
- if (domModel != null) {
- IRegion targetRegion = TaglibHyperlinkDetector.findDefinition(domModel, fSearchName, fSearchType);
- if (targetRegion != null) {
- try {
- marker = createMarker(file, targetRegion);
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- if (marker != null) {
- try {
- IDE.openEditor(page, marker);
- }
- catch (PartInitException e1) {
- Logger.logException(e1);
- }
- finally {
- try {
- marker.delete();
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- }
- else {
- IDE.openEditor(page, file);
- }
- }
- }
- }
- catch (IOException e2) {
- }
- catch (CoreException e2) {
- }
- finally {
- if (domModel != null) {
- domModel.releaseFromRead();
- }
- }
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java
deleted file mode 100644
index 66d7b430a7..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibHyperlinkDetector.java
+++ /dev/null
@@ -1,441 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2008 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.ui.internal.hyperlink;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jface.text.hyperlink.URLHyperlink;
-import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.CMElementDeclarationImpl;
-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.JSP11TLDNames;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP12Namespace;
-import org.eclipse.jst.jsp.core.taglib.ITLDRecord;
-import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
-import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
-import org.eclipse.jst.jsp.core.text.IJSPPartitions;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-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.IStructuredPartitioning;
-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.utils.StringUtils;
-import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
-import org.eclipse.wst.xml.core.internal.provisional.contentmodel.CMNodeWrapper;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
-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 org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Detects hyperlinks for taglibs.
- */
-public class TaglibHyperlinkDetector extends AbstractHyperlinkDetector {
- private final String HTTP_PROTOCOL = "http://";//$NON-NLS-1$
- private final String JAR_PROTOCOL = "jar:file:";//$NON-NLS-1$
- // private String URN_TAGDIR = "urn:jsptagdir:";
- private String URN_TLD = "urn:jsptld:";
- private String XMLNS = "xmlns:"; //$NON-NLS-1$
-
- static final int TAG = 1;
- static final int ATTRIBUTE = 2;
-
- static IRegion findDefinition(IDOMModel model, String searchName, int searchType) {
- NodeList declarations = null;
- if (searchType == TAG)
- declarations = model.getDocument().getElementsByTagNameNS("*", JSP11TLDNames.TAG);
- else if (searchType == ATTRIBUTE)
- declarations = model.getDocument().getElementsByTagNameNS("*", JSP11TLDNames.ATTRIBUTE);
- if (declarations == null || declarations.getLength() == 0) {
- if (searchType == TAG)
- declarations = model.getDocument().getElementsByTagName(JSP11TLDNames.TAG);
- else if (searchType == ATTRIBUTE)
- declarations = model.getDocument().getElementsByTagName(JSP11TLDNames.ATTRIBUTE);
- }
- for (int i = 0; i < declarations.getLength(); i++) {
- NodeList names = model.getDocument().getElementsByTagName(JSP11TLDNames.NAME);
- for (int j = 0; j < names.getLength(); j++) {
- String name = getContainedText(names.item(j));
- if (searchName.compareTo(name) == 0) {
- int start = -1;
- int end = -1;
- Node caret = names.item(j).getFirstChild();
- if (caret != null) {
- start = ((IDOMNode) caret).getStartOffset();
- }
- while (caret != null) {
- end = ((IDOMNode) caret).getEndOffset();
- caret = caret.getNextSibling();
- }
- if (start > 0) {
- return new Region(start, end - start);
- }
- }
- }
- }
-
- return null;
- }
-
- private static 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 IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
- IHyperlink hyperlink = null;
-
- if (textViewer != null && region != null) {
- IDocument doc = textViewer.getDocument();
- if (doc != null) {
- try {
- // check if jsp tag/directive first
- ITypedRegion partition = TextUtilities.getPartition(doc, IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING, region.getOffset(), false);
- if (partition != null && partition.getType() == IJSPPartitions.JSP_DIRECTIVE) {
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(doc);
- // check if jsp taglib directive
- Node currentNode = getCurrentNode(sModel, region.getOffset());
- if (currentNode != null && currentNode.getNodeType() == Node.ELEMENT_NODE) {
- String baseLocationForTaglib = getBaseLocationForTaglib(doc);
- if (baseLocationForTaglib != null && JSP11Namespace.ElementName.DIRECTIVE_TAGLIB.equalsIgnoreCase(currentNode.getNodeName())) {
- /**
- * The taglib directive itself
- */
- // get the uri attribute
- Attr taglibURINode = ((Element) currentNode).getAttributeNode(JSP11Namespace.ATTR_NAME_URI);
- if (taglibURINode != null) {
- ITaglibRecord reference = TaglibIndex.resolve(baseLocationForTaglib, taglibURINode.getValue(), false);
- // when using a tagdir
- // (ITaglibRecord.TAGDIR),
- // there's nothing to link to
- if (reference != null) {
- // handle taglibs
- switch (reference.getRecordType()) {
- case (ITaglibRecord.TLD) : {
- ITLDRecord record = (ITLDRecord) reference;
- String uriString = record.getPath().toString();
- IRegion hyperlinkRegion = getHyperlinkRegion(taglibURINode, region);
- if (hyperlinkRegion != null) {
- hyperlink = createHyperlink(uriString, hyperlinkRegion, doc, null);
- }
- }
- break;
- case (ITaglibRecord.JAR) :
- case (ITaglibRecord.URL) : {
- IRegion hyperlinkRegion = getHyperlinkRegion(taglibURINode, region);
- if (hyperlinkRegion != null) {
- hyperlink = new TaglibJarUriHyperlink(hyperlinkRegion, reference);
- }
- }
- }
- }
- }
- }
- else if (baseLocationForTaglib != null && JSP12Namespace.ElementName.ROOT.equalsIgnoreCase(currentNode.getNodeName())) {
- /**
- * The jsp:root element
- */
- NamedNodeMap attrs = currentNode.getAttributes();
- for (int i = 0; i < attrs.getLength(); i++) {
- Attr attr = (Attr) attrs.item(i);
- if (attr.getNodeName().startsWith(XMLNS)) {
- String uri = StringUtils.strip(attr.getNodeValue());
- if (uri.startsWith(URN_TLD)) {
- uri = uri.substring(URN_TLD.length());
- }
- ITaglibRecord reference = TaglibIndex.resolve(baseLocationForTaglib, uri, false);
- // when using a tagdir
- // (ITaglibRecord.TAGDIR),
- // there's nothing to link to
- if (reference != null) {
- // handle taglibs
- switch (reference.getRecordType()) {
- case (ITaglibRecord.TLD) : {
- ITLDRecord record = (ITLDRecord) reference;
- String uriString = record.getPath().toString();
- IRegion hyperlinkRegion = getHyperlinkRegion(attr, region);
- if (hyperlinkRegion != null) {
- hyperlink = createHyperlink(uriString, hyperlinkRegion, doc, null);
- }
- }
- break;
- case (ITaglibRecord.JAR) :
- case (ITaglibRecord.URL) : {
- IRegion hyperlinkRegion = getHyperlinkRegion(attr, region);
- if (hyperlinkRegion != null) {
- hyperlink = new TaglibJarUriHyperlink(hyperlinkRegion, reference);
- }
- }
- }
- }
- }
- }
- }
- else {
- /**
- * Hyperlink custom tag to its TLD or tag file
- */
- TLDCMDocumentManager documentManager = TaglibController.getTLDCMDocumentManager(doc);
- if (documentManager != null) {
- List documentTrackers = documentManager.getCMDocumentTrackers(currentNode.getPrefix(), region.getOffset());
- for (int i = 0; i < documentTrackers.size(); i++) {
- TaglibTracker tracker = (TaglibTracker) documentTrackers.get(i);
- CMElementDeclaration decl = (CMElementDeclaration) tracker.getElements().getNamedItem(currentNode.getNodeName());
- if (decl != null) {
- decl = (CMElementDeclaration) ((CMNodeWrapper) decl).getOriginNode();
- if (decl instanceof CMElementDeclarationImpl) {
- String base = ((CMElementDeclarationImpl) decl).getLocationString();
- IRegion hyperlinkRegion = getHyperlinkRegion(currentNode, region);
- if (hyperlinkRegion != null) {
- hyperlink = createHyperlink(base, hyperlinkRegion, doc, currentNode);
- }
- }
- }
- }
- }
- }
- }
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- }
- }
- catch (BadLocationException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- }
- if (hyperlink != null)
- return new IHyperlink[]{hyperlink};
- return null;
- }
-
- /**
- * Get the base location from the current model (if within workspace,
- * location is relative to workspace, otherwise, file system path)
- */
- private String getBaseLocationForTaglib(IDocument document) {
- String baseLoc = null;
-
- // get the base location from the current model
- IStructuredModel sModel = null;
- try {
- sModel = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- if (sModel != null) {
- baseLoc = sModel.getBaseLocation();
- }
- }
- finally {
- if (sModel != null) {
- sModel.releaseFromRead();
- }
- }
- return baseLoc;
- }
-
- // the below methods were copied from URIHyperlinkDetector
-
- private IRegion getHyperlinkRegion(Node node, IRegion boundingRegion) {
- IRegion hyperRegion = null;
-
- if (node != null) {
- short nodeType = node.getNodeType();
- if (nodeType == Node.DOCUMENT_TYPE_NODE) {
- // handle doc type node
- IDOMNode docNode = (IDOMNode) node;
- hyperRegion = new Region(docNode.getStartOffset(), docNode.getEndOffset() - docNode.getStartOffset());
- }
- else if (nodeType == Node.ATTRIBUTE_NODE) {
- // handle attribute nodes
- IDOMAttr att = (IDOMAttr) node;
- // do not include quotes in attribute value region
- int regOffset = att.getValueRegionStartOffset();
- ITextRegion valueRegion = att.getValueRegion();
- if (valueRegion != null) {
- int regLength = valueRegion.getTextLength();
- String attValue = att.getValueRegionText();
- if (StringUtils.isQuoted(attValue)) {
- ++regOffset;
- regLength = regLength - 2;
- }
- hyperRegion = new Region(regOffset, regLength);
- }
- }
- if (nodeType == Node.ELEMENT_NODE) {
- // Handle doc type node
- IDOMNode docNode = (IDOMNode) node;
- hyperRegion = getNameRegion(docNode.getFirstStructuredDocumentRegion());
- if (hyperRegion == null) {
- hyperRegion = new Region(docNode.getStartOffset(), docNode.getFirstStructuredDocumentRegion().getTextLength());
- }
- }
- }
- /**
- * Only return a hyperlink region that overlaps the search region.
- * This will help us to not underline areas not under the cursor.
- */
- if (hyperRegion != null && intersects(hyperRegion, boundingRegion))
- return hyperRegion;
- return null;
- }
-
- private boolean intersects(IRegion hyperlinkRegion, IRegion detectionRegion) {
- int hyperLinkStart = hyperlinkRegion.getOffset();
- int hyperLinkEnd = hyperlinkRegion.getOffset() + hyperlinkRegion.getLength();
- int detectionStart = detectionRegion.getOffset();
- int detectionEnd = detectionRegion.getOffset() + detectionRegion.getLength();
- return (hyperLinkStart <= detectionStart && detectionStart < hyperLinkEnd) || (hyperLinkStart <= detectionEnd && detectionEnd <= hyperLinkEnd);// ||
- }
-
- private IRegion getNameRegion(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;
- }
- }
- if (nameRegion != null)
- return new Region(containerRegion.getStartOffset(nameRegion), nameRegion.getTextLength());
- return null;
- }
-
- /**
- * Create the appropriate hyperlink
- *
- * @param uriString
- * @param hyperlinkRegion
- * @return IHyperlink
- */
- private IHyperlink createHyperlink(String uriString, IRegion hyperlinkRegion, IDocument document, Node node) {
- IHyperlink link = null;
-
- if (uriString != null) {
- String temp = uriString.toLowerCase();
- if (temp.startsWith(HTTP_PROTOCOL)) {
- // this is a URLHyperlink since this is a web address
- link = new URLHyperlink(hyperlinkRegion, uriString);
- }
- else if (temp.startsWith(JAR_PROTOCOL)) {
- // this is a URLFileHyperlink since this is a local address
- try {
- link = new URLFileRegionHyperlink(hyperlinkRegion, TAG, node.getLocalName(), new URL(uriString)) {
- public String getHyperlinkText() {
- return JSPUIMessages.CustomTagHyperlink_hyperlinkText;
- }
- };
- }
- catch (MalformedURLException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- else {
- // try to locate the file in the workspace
- IPath path = new Path(uriString);
- if (path.segmentCount() > 1) {
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- if (file.getType() == IResource.FILE && file.isAccessible()) {
- if (node != null) {
- link = new TLDFileHyperlink(file, TAG, node.getLocalName(), hyperlinkRegion) {
- public String getHyperlinkText() {
- return JSPUIMessages.CustomTagHyperlink_hyperlinkText;
- }
- };
- }
- else {
- link = new WorkspaceFileHyperlink(hyperlinkRegion, file);
- }
- }
- }
- }
- if (link == null) {
- // this is an ExternalFileHyperlink since file does not exist
- // in workspace
- File externalFile = new File(uriString);
- link = new ExternalFileHyperlink(hyperlinkRegion, externalFile);
- }
- }
-
- return link;
- }
-
- private Node getCurrentNode(IStructuredModel model, int offset) {
- // get the current node at the offset (returns either: element,
- // doctype, text)
- IndexedRegion inode = null;
- if (model != null) {
- inode = model.getIndexedRegion(offset);
- if (inode == null) {
- inode = model.getIndexedRegion(offset - 1);
- }
- }
-
- if (inode instanceof Node) {
- return (Node) inode;
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarHyperlink.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarHyperlink.java
deleted file mode 100644
index 3652adcf77..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarHyperlink.java
+++ /dev/null
@@ -1,113 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.hyperlink;
-
-import java.io.File;
-import java.io.InputStream;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipFile;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-
-/**
- * Hyperlink for taglib files in jars.
- */
-class TaglibJarHyperlink implements IHyperlink {
- static class ZipStorage implements IStorage {
- File fFile = null;
- String fEntryName = null;
-
- ZipStorage(File file, String entryName) {
- fFile = file;
- fEntryName = entryName;
- }
-
- public InputStream getContents() throws CoreException {
- InputStream stream = null;
- try {
- ZipFile file = new ZipFile(fFile);
- ZipEntry entry = file.getEntry(fEntryName);
- stream = file.getInputStream(entry);
- }
- catch (Exception e) {
- throw new CoreException(new Status(IStatus.ERROR, JSPUIPlugin.getDefault().getBundle().getSymbolicName(), IStatus.ERROR, getFullPath().toString(), e));
- }
- return stream;
- }
-
- public IPath getFullPath() {
- return new Path(fFile.getAbsolutePath() + IPath.SEPARATOR + fEntryName);
- }
-
- public String getName() {
- return fEntryName;
- }
-
- public boolean isReadOnly() {
- return true;
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
- }
-
- private IRegion fRegion;
- private IPath fZipFilePath;
-
- public TaglibJarHyperlink(IRegion region, IPath zipFilePath) {
- fRegion = region;
- fZipFilePath = zipFilePath;
- }
-
- public IRegion getHyperlinkRegion() {
- return fRegion;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getTypeLabel()
- */
- public String getTypeLabel() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
- */
- public String getHyperlinkText() {
- return JSPUIMessages.TLDHyperlink_hyperlinkText;
- }
-
- public void open() {
- IEditorInput input = new URLFileHyperlink.StorageEditorInput(new ZipStorage(fZipFilePath.toFile(), "META-INF/taglib.tld")); //$NON-NLS-1$
- IEditorDescriptor descriptor;
- try {
- descriptor = IDE.getEditorDescriptor(input.getName());
- if (descriptor != null) {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IDE.openEditor(page, input, descriptor.getId(), true);
- }
- }
- catch (PartInitException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarUriHyperlink.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarUriHyperlink.java
deleted file mode 100644
index ff4072eff4..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/TaglibJarUriHyperlink.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.hyperlink;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jst.jsp.core.taglib.IJarRecord;
-import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
-import org.eclipse.jst.jsp.core.taglib.IURLRecord;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-
-/**
- * Hyperlink for taglib files in jars or specified by urls.
- */
-class TaglibJarUriHyperlink implements IHyperlink {
- private IRegion fRegion;
- private ITaglibRecord fTaglibRecord;
- private IHyperlink fHyperlink;
-
- public TaglibJarUriHyperlink(IRegion region, ITaglibRecord record) {
- fRegion = region;
- fTaglibRecord = record;
- }
-
- private IHyperlink getHyperlink() {
- if (fHyperlink == null && fTaglibRecord != null) {
- switch (fTaglibRecord.getRecordType()) {
- case (ITaglibRecord.JAR) : {
- IJarRecord record = (IJarRecord) fTaglibRecord;
- fHyperlink = new TaglibJarHyperlink(fRegion, record.getLocation());
- }
- break;
- case (ITaglibRecord.URL) : {
- IURLRecord record = (IURLRecord) fTaglibRecord;
- fHyperlink = new URLFileHyperlink(fRegion, record.getURL());
- }
- }
- }
- return fHyperlink;
- }
-
- public IRegion getHyperlinkRegion() {
- IRegion region = null;
-
- IHyperlink link = getHyperlink();
- if (link != null) {
- region = link.getHyperlinkRegion();
- }
- return region;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getTypeLabel()
- */
- public String getTypeLabel() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
- */
- public String getHyperlinkText() {
- return JSPUIMessages.TLDHyperlink_hyperlinkText;
- }
-
- public void open() {
- IHyperlink link = getHyperlink();
- if (link != null) {
- link.open();
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileHyperlink.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileHyperlink.java
deleted file mode 100644
index df8d5a9cc3..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileHyperlink.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.hyperlink;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.IStorageEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.wst.sse.core.internal.util.JarUtilities;
-
-/**
- * Hyperlink for URLs (opens in read-only mode)
- */
-class URLFileHyperlink implements IHyperlink {
- // copies of this class exist in:
- // org.eclipse.wst.xml.ui.internal.hyperlink
- // org.eclipse.wst.html.ui.internal.hyperlink
- // org.eclipse.jst.jsp.ui.internal.hyperlink
-
- static class StorageEditorInput implements IStorageEditorInput {
- IStorage fStorage = null;
-
- StorageEditorInput(IStorage storage) {
- fStorage = storage;
- }
-
- public IStorage getStorage() throws CoreException {
- return fStorage;
- }
-
- public boolean exists() {
- return fStorage != null;
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof StorageEditorInput) {
- return fStorage.equals(((StorageEditorInput) obj).fStorage);
- }
- return super.equals(obj);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- public String getName() {
- return fStorage.getName();
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- return fStorage.getFullPath() != null ? fStorage.getFullPath().toString() : fStorage.getName();
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
- }
-
- static class URLStorage implements IStorage {
- URL fURL = null;
-
- URLStorage(URL url) {
- fURL = url;
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof URLStorage) {
- return fURL.equals(((URLStorage) obj).fURL);
- }
- return super.equals(obj);
- }
-
- public InputStream getContents() throws CoreException {
- InputStream stream = null;
- try {
- stream = JarUtilities.getInputStream(fURL);
- }
- catch (Exception e) {
- throw new CoreException(new Status(IStatus.ERROR, JSPUIPlugin.getDefault().getBundle().getSymbolicName(), IStatus.ERROR, fURL.toString(), e));
- }
- return stream;
- }
-
- public IPath getFullPath() {
- return new Path(fURL.toString());
- }
-
- public String getName() {
- return new Path(fURL.getFile()).lastSegment();
- }
-
- public boolean isReadOnly() {
- return true;
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- }
-
- private IRegion fRegion;
- private URL fURL;
-
- public URLFileHyperlink(IRegion region, URL url) {
- fRegion = region;
- fURL = url;
- }
-
- public IRegion getHyperlinkRegion() {
- return fRegion;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getTypeLabel()
- */
- public String getTypeLabel() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
- */
- public String getHyperlinkText() {
- String path = fURL.getPath();
- if (path.length() > 0)
- return NLS.bind(JSPUIMessages.Open, new Path(path).lastSegment());
- return NLS.bind(JSPUIMessages.TLDHyperlink_hyperlinkText, fURL.toString());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#open()
- */
- public void open() {
- if (fURL != null) {
- IEditorInput input = new StorageEditorInput(new URLStorage(fURL));
- IEditorDescriptor descriptor;
- try {
- descriptor = IDE.getEditorDescriptor(input.getName());
- if (descriptor != null) {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IDE.openEditor(page, input, descriptor.getId(), true);
- }
- }
- catch (PartInitException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileRegionHyperlink.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileRegionHyperlink.java
deleted file mode 100644
index 2b383c917d..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/URLFileRegionHyperlink.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.ui.internal.hyperlink;
-
-import java.io.InputStream;
-import java.net.URL;
-
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.TextSelection;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IEditorDescriptor;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IPersistableElement;
-import org.eclipse.ui.IStorageEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-/**
- * Hyperlink for URLs (opens in read-only mode)
- */
-class URLFileRegionHyperlink implements IHyperlink {
- // copies of this class exist in:
- // org.eclipse.wst.xml.ui.internal.hyperlink
- // org.eclipse.wst.html.ui.internal.hyperlink
- // org.eclipse.jst.jsp.ui.internal.hyperlink
-
- static class StorageEditorInput implements IStorageEditorInput {
- IStorage fStorage = null;
-
- StorageEditorInput(IStorage storage) {
- fStorage = storage;
- }
-
- public IStorage getStorage() throws CoreException {
- return fStorage;
- }
-
- public boolean exists() {
- return fStorage != null;
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof StorageEditorInput) {
- return fStorage.equals(((StorageEditorInput) obj).fStorage);
- }
- return super.equals(obj);
- }
-
- public ImageDescriptor getImageDescriptor() {
- return null;
- }
-
- public String getName() {
- return fStorage.getName();
- }
-
- public IPersistableElement getPersistable() {
- return null;
- }
-
- public String getToolTipText() {
- return fStorage.getFullPath() != null ? fStorage.getFullPath().toString() : fStorage.getName();
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
- }
-
- static class URLStorage implements IStorage {
- URL fURL = null;
-
- URLStorage(URL url) {
- fURL = url;
- }
-
- public boolean equals(Object obj) {
- if (obj instanceof URLStorage) {
- return fURL.equals(((URLStorage) obj).fURL);
- }
- return super.equals(obj);
- }
-
- public InputStream getContents() throws CoreException {
- InputStream stream = null;
- try {
- stream = fURL.openStream();
- }
- catch (Exception e) {
- throw new CoreException(new Status(IStatus.ERROR, JSPUIPlugin.getDefault().getBundle().getSymbolicName(), IStatus.ERROR, fURL.toString(), e));
- }
- return stream;
- }
-
- public IPath getFullPath() {
- return new Path(fURL.toString());
- }
-
- public String getName() {
- return new Path(fURL.getFile()).lastSegment();
- }
-
- public boolean isReadOnly() {
- return true;
- }
-
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- }
-
- private IRegion fRegion;
- private URL fURL;
- private int fSearchType;
- private String fSearchName;
-
- public URLFileRegionHyperlink(IRegion region, int searchType, String searchName, URL url) {
- fRegion = region;
- fURL = url;
- fSearchName = searchName;
- fSearchType = searchType;
- }
-
- public IRegion getHyperlinkRegion() {
- return fRegion;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getTypeLabel()
- */
- public String getTypeLabel() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
- */
- public String getHyperlinkText() {
- return NLS.bind(JSPUIMessages.Open, fURL.toString());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#open()
- */
- public void open() {
- if (fURL != null) {
- IEditorInput input = new StorageEditorInput(new URLStorage(fURL));
- IEditorDescriptor descriptor;
- try {
- descriptor = IDE.getEditorDescriptor(input.getName(), true);
- if (descriptor != null) {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IEditorPart openedEditor = IDE.openEditor(page, input, descriptor.getId(), true);
- IRegion definitionRegion = findDefinitionRegion(new URLStorage(fURL));
- if (definitionRegion != null) {
- openedEditor.getSite().getSelectionProvider().setSelection(new TextSelection(definitionRegion.getOffset(), definitionRegion.getLength()));
- }
- }
- }
- catch (PartInitException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- }
-
- /**
- * @return
- */
- private IRegion findDefinitionRegion(IStorage storage) {
- IRegion definition = null;
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getModelForRead(storage.getName(), storage.getContents(), null);
- }
- catch (Exception e) {
- Logger.logException(e);
- }
- if (model != null) {
- if (model instanceof IDOMModel) {
- definition = TaglibHyperlinkDetector.findDefinition((IDOMModel) model, fSearchName, fSearchType);
- }
- model.releaseFromRead();
- }
- return definition;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/WorkspaceFileHyperlink.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/WorkspaceFileHyperlink.java
deleted file mode 100644
index 20b2579ce2..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/WorkspaceFileHyperlink.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.hyperlink;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-/**
- * Hyperlink for files within the workspace. (As long as there is an IFile,
- * this can be used) Opens the default editor for the file.
- */
-class WorkspaceFileHyperlink implements IHyperlink {
- // copies of this class exist in:
- // org.eclipse.wst.xml.ui.internal.hyperlink
- // org.eclipse.wst.html.ui.internal.hyperlink
- // org.eclipse.jst.jsp.ui.internal.hyperlink
-
- private IRegion fRegion;
- private IFile fFile;
- private IRegion fHighlightRange;
-
- public WorkspaceFileHyperlink(IRegion region, IFile file) {
- fRegion = region;
- fFile = file;
- }
-
- public WorkspaceFileHyperlink(IRegion region, IFile file, IRegion range) {
- fRegion = region;
- fFile = file;
- fHighlightRange = range;
- }
-
- public IRegion getHyperlinkRegion() {
- return fRegion;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getTypeLabel()
- */
- public String getTypeLabel() {
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.hyperlink.IHyperlink#getHyperlinkText()
- */
- public String getHyperlinkText() {
- String path = fFile.getFullPath().toString();
- if (path.length() > 60) {
- path = path.substring(0, 25) + "..." + path.substring(path.length() - 25, path.length());
- }
- return NLS.bind(JSPUIMessages.Open, path);
- }
-
- public void open() {
- if (fFile != null && fFile.exists()) {
- try {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IEditorPart editor = IDE.openEditor(page, fFile, true);
- // highlight range in editor if possible
- if (fHighlightRange != null && editor instanceof ITextEditor) {
- ((ITextEditor) editor).setHighlightRange(fHighlightRange.getOffset(), fHighlightRange.getLength(), true);
- }
- }
- catch (PartInitException pie) {
- Logger.log(Logger.WARNING_DEBUG, pie.getMessage(), pie);
- }
- }
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLJavaHyperlinkDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLJavaHyperlinkDetector.java
deleted file mode 100644
index 52b85dc4e8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/hyperlink/XMLJavaHyperlinkDetector.java
+++ /dev/null
@@ -1,291 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2011 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.ui.internal.hyperlink;
-
-import org.eclipse.core.filebuffers.FileBuffers;
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-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.Path;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.ui.JavaElementLabels;
-import org.eclipse.jdt.ui.JavaUI;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
-import org.eclipse.jface.text.hyperlink.IHyperlink;
-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.ui.internal.JSPUIMessages;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.PartInitException;
-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.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-/**
- * Detects hyper-links in Tag Library Descriptors
- */
-public class XMLJavaHyperlinkDetector extends AbstractHyperlinkDetector {
-
- private static final String JAR_FILE_PROTOCOL = "jar:file:"; //$NON-NLS-1$
-
- /**
- * Based on org.eclipse.jdt.internal.ui.javaeditor.JavaElementHyperlink
- */
- static class JavaElementHyperlink implements IHyperlink {
-
- private final IJavaElement fElement;
- private final IRegion fRegion;
-
-
- /**
- * Creates a new Java element hyperlink.
- *
- * @param region
- * the region of the link
- * @param element
- * the java element to open
- * @param qualify
- * <code>true</code> if the hyper-link text should show a
- * qualified name for element.
- */
- JavaElementHyperlink(IRegion region, IJavaElement element) {
- fRegion = region;
- fElement = element;
- }
-
- public IRegion getHyperlinkRegion() {
- return fRegion;
- }
-
- public String getHyperlinkText() {
- String elementLabel = JavaElementLabels.getElementLabel(fElement, JavaElementLabels.ALL_POST_QUALIFIED);
- return NLS.bind(JSPUIMessages.Open, elementLabel);
- }
-
- public String getTypeLabel() {
- return null;
- }
-
- public void open() {
- try {
- JavaUI.openInEditor(fElement);
- }
- catch (PartInitException e) {
- }
- catch (JavaModelException e) {
- }
- }
- }
-
-
- private IHyperlink createHyperlink(String elementName, IRegion region, IDocument document) {
- // try file buffers
- ITextFileBuffer textFileBuffer = FileBuffers.getTextFileBufferManager().getTextFileBuffer(document);
- if (textFileBuffer != null) {
- IPath basePath = textFileBuffer.getLocation();
- if (basePath != null && !basePath.isEmpty()) {
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(basePath.segment(0));
- if (basePath.segmentCount() > 1 && project.isAccessible()) {
- return createJavaElementHyperlink(JavaCore.create(project), elementName, region);
- }
- }
- }
- // fallback to SSE-specific knowledge
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- if (model != null) {
- String baseLocation = model.getBaseLocation();
- // URL fixup from the taglib index record
- if (baseLocation.startsWith("jar:/file:")) { //$NON-NLS-1$
- baseLocation = StringUtils.replace(baseLocation, "jar:/", "jar:"); //$NON-NLS-1$ //$NON-NLS-2$
- }
- /*
- * Handle opened TLD files from JARs on the Java Build Path by
- * finding a package fragment root for the same .jar file and
- * opening the class from there. Note that this might be from
- * a different Java project's build path than the TLD.
- */
- if (baseLocation.startsWith(JAR_FILE_PROTOCOL) && baseLocation.indexOf('!') > JAR_FILE_PROTOCOL.length()) {
- String baseFile = baseLocation.substring(JAR_FILE_PROTOCOL.length(), baseLocation.indexOf('!'));
- IPath basePath = new Path(baseFile);
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < projects.length; i++) {
- try {
- if (projects[i].isAccessible() && projects[i].hasNature(JavaCore.NATURE_ID)) {
- IJavaProject javaProject = JavaCore.create(projects[i]);
- if (javaProject.exists()) {
- IPackageFragmentRoot root = javaProject.findPackageFragmentRoot(basePath);
- if (root != null) {
- return createJavaElementHyperlink(javaProject, elementName, region);
- }
- }
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- }
- else {
- IPath basePath = new Path(baseLocation);
- if (basePath.segmentCount() > 1) {
- return createJavaElementHyperlink(JavaCore.create(ResourcesPlugin.getWorkspace().getRoot().getProject(basePath.segment(0))), elementName, region);
- }
- }
- }
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- return null;
- }
-
- private boolean isJspJavaContent(IDocument document, IRegion region) {
- JSPTranslation translation = null;
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- IDOMModel xmlModel = null;
- if (model instanceof IDOMModel) {
- xmlModel = (IDOMModel) model;
- if (xmlModel != null) {
- final IDOMDocument xmlDoc = xmlModel.getDocument();
- final JSPTranslationAdapter adapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
- if (adapter != null) {
- translation = adapter.getJSPTranslation();
- if (translation!=null) {
- int javaOffset = translation.getJavaOffset(region.getOffset());
- if (javaOffset > -1) {
- return true;
- }
- }
- }
- }
- }
- }
- finally {
- if (model != null) {
- model.releaseFromRead();
- }
- }
-
- return false;
- }
-
- private IHyperlink createJavaElementHyperlink(IJavaProject javaProject, String elementName, IRegion region) {
- if (javaProject != null && javaProject.exists()) {
- try {
- IJavaElement element = javaProject.findType(elementName);
- if (element != null && element.exists()) {
- return new JavaElementHyperlink(region, element);
- }
- }
- catch (JavaModelException e) {
- // bad name, no link
- }
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.text.hyperlink.IHyperlinkDetector#detectHyperlinks
- * (org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion,
- * boolean)
- */
- public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
- if (region != null && textViewer != null) {
- IDocument document = textViewer.getDocument();
- // find hyperlink range for Java element
- IRegion hyperlinkRegion = region.getLength() > 0 ? region : selectQualifiedName(document, region.getOffset());
- if (isJspJavaContent(document, hyperlinkRegion)) { // Handled by JSPJavaHyperlinkDetector
- return null;
- }
- String name = null;
- try {
- name = document.get(hyperlinkRegion.getOffset(), hyperlinkRegion.getLength()).trim();
- }
- catch (BadLocationException e) {
- }
- if (name != null) {
- IHyperlink link = createHyperlink(name, hyperlinkRegion, document);
- if (link != null)
- return new IHyperlink[]{link};
- }
- }
-
- return null;
- }
-
- /**
- * Java always selects word when defining region
- *
- * @param document
- * @param anchor
- * @return IRegion
- */
- private IRegion selectQualifiedName(IDocument document, int anchor) {
-
- try {
- int offset = anchor;
- char c;
-
- while (offset >= 0) {
- c = document.getChar(offset);
- if (!Character.isJavaIdentifierPart(c) && c != '.')
- break;
- --offset;
- }
-
- int start = offset;
-
- offset = anchor;
- int length = document.getLength();
-
- while (offset < length) {
- c = document.getChar(offset);
- if (!Character.isJavaIdentifierPart(c) && c != '.')
- break;
- ++offset;
- }
-
- int end = offset;
-
- if (start == end)
- return new Region(start, 0);
-
- return new Region(start + 1, end - start - 1);
-
- }
- catch (BadLocationException x) {
- return null;
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java
deleted file mode 100644
index a057ed573d..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/BasicRefactorSearchRequestor.java
+++ /dev/null
@@ -1,274 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.ui.internal.java.refactoring;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.search.SearchDocument;
-import org.eclipse.jdt.core.search.SearchMatch;
-import org.eclipse.jdt.core.search.SearchRequestor;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.core.internal.java.search.JavaSearchDocumentDelegate;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.TextChange;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
-import org.eclipse.osgi.util.NLS;
-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.TextEditGroup;
-
-/**
- * <p>After a search is run with this {@link SearchRequestor} {@link #getChanges(RefactoringParticipant)}
- * can be called to get any new {@link Change}s that need to be created as a result of the search. If
- * {@link Change}s are already existing for the documents found then new {@link Change}s will not be
- * created for them, but the needed {@link TextEdit}s will be added to the existing {@link Change}s.</p>
- */
-public class BasicRefactorSearchRequestor extends SearchRequestor {
- /** The type being renamed (the old type)*/
- IJavaElement fElement = null;
- /** The new name of the type being renamed*/
- private String fNewName = ""; //$NON-NLS-1$
- /** maps a JSPSearchDocument path -> MultiTextEdit for the java file*/
- private HashMap fSearchDocPath2JavaEditMap = null;
-
- public BasicRefactorSearchRequestor(IJavaElement element, String newName) {
- this.fNewName = newName;
- this.fElement = element;
- this.fSearchDocPath2JavaEditMap = new HashMap();
- }
-
- public IJavaElement getElement() {
- return this.fElement;
- }
-
- /**
- * @return the new name for the Type
- */
- public String getNewName() {
- return this.fNewName;
- }
-
- /**
- * @see org.eclipse.jdt.core.search.SearchRequestor#acceptSearchMatch(org.eclipse.jdt.core.search.SearchMatch)
- */
- public void acceptSearchMatch(SearchMatch javaMatch) throws CoreException {
-
- String matchDocumentPath = javaMatch.getResource().getFullPath().toString();
- SearchDocument searchDoc = JSPSearchSupport.getInstance().getSearchDocument(matchDocumentPath);
-
- if (searchDoc != null && searchDoc instanceof JavaSearchDocumentDelegate) {
-
- String renameText = getRenameText((JavaSearchDocumentDelegate)searchDoc, javaMatch);
-
- //if rename text is null then don't create an edit for it
- if(renameText != null) {
- // add it for the correct document
- addJavaEdit(searchDoc.getPath(), new ReplaceEdit(javaMatch.getOffset(), javaMatch.getLength(), renameText));
- }
- }
- }
-
- /**
- * @param searchDoc
- * @return the rename text or <code>null</code> if no edit should be created for the given match.
- * Such a case would be a match where nothing needs to be edited.
- */
- protected String getRenameText(JavaSearchDocumentDelegate searchDoc, SearchMatch javaMatch) {
- return getNewName();
- }
-
- /**
- * Adds to the multi edit for a give java document.
- * @param javaDocument
- * @param javaEdit
- */
- private void addJavaEdit(String searchDocPath, ReplaceEdit javaEdit) {
-
- Object o = this.fSearchDocPath2JavaEditMap.get(searchDocPath);
- if(o != null) {
-
- MultiTextEdit multi = (MultiTextEdit)o;
- multi.addChild(javaEdit);
- }
- else {
- // use a multi edit so doc position offsets get updated automatically
- // when adding multiple child edits
- MultiTextEdit multi = new MultiTextEdit();
- multi.addChild(javaEdit);
- this.fSearchDocPath2JavaEditMap.put(searchDocPath, multi);
- }
- }
-
- /**
- * <p>This function is not safe because it does not check for existing {@link Change}s that
- * new {@link Change}s created by this method may conflict with. These conflicts can
- * cause indeterminate results when applied to documents. Long story short, don't
- * use this method any more.</p>
- *
- * @return all JSP changes for the search matches for the given Type, they may conflict
- * with already existing {@link Change}s
- *
- * @see #getChanges(RefactoringParticipant)
- *
- * @deprecated
- */
- public Change[] getChanges() {
-
- JSPSearchSupport support = JSPSearchSupport.getInstance();
- List changes = new ArrayList();
- Iterator keys = fSearchDocPath2JavaEditMap.keySet().iterator();
- String searchDocPath = null;
- SearchDocument delegate = null;
-
- while(keys.hasNext()) {
- // create on the fly
- searchDocPath = (String)keys.next();
- MultiTextEdit javaEdit = (MultiTextEdit)fSearchDocPath2JavaEditMap.get(searchDocPath);
- delegate = support.getSearchDocument(searchDocPath);
-
- if(delegate != null && delegate instanceof JavaSearchDocumentDelegate) {
- JavaSearchDocumentDelegate javaDelegate = (JavaSearchDocumentDelegate)delegate;
- changes.add(createChange(javaDelegate, javaDelegate.getJspTranslation().getJspEdit(javaEdit)));
- }
- }
- return (Change[])changes.toArray(new Change[changes.size()]);
- }
-
- /**
- * Gets new {@link Change}s created as a result of this {@link SearchRequestor}.
- * Any existing {@link TextChange}s that had new edits added to them will not be
- * returned.
- *
- * @param participant {@link RefactoringParticipant} to determine if there are already existing
- * {@link TextChange}s for the documents that this {@link SearchRequestor} found.
- * If existing
- * {@link TextChange}s are found then they will be used for any new edits, else new {@link TextChange}s
- * will be created.
- *
- * @return Any new {@link TextChange}s created by this {@link SearchRequestor}. If edits were
- * added to existing {@link TextChange}s then those existing {@link TextChange}s will not be
- * returned in this array.
- */
- public Change[] getChanges(RefactoringParticipant participant) {
-
- JSPSearchSupport support = JSPSearchSupport.getInstance();
- List changes = new ArrayList();
- Iterator keys = fSearchDocPath2JavaEditMap.keySet().iterator();
- String searchDocPath = null;
- SearchDocument delegate = null;
-
- while(keys.hasNext()) {
- // create on the fly
- searchDocPath = (String)keys.next();
- MultiTextEdit javaEdit = (MultiTextEdit)fSearchDocPath2JavaEditMap.get(searchDocPath);
- delegate = support.getSearchDocument(searchDocPath);
-
- if(delegate != null && delegate instanceof JavaSearchDocumentDelegate) {
- JavaSearchDocumentDelegate javaDelegate = (JavaSearchDocumentDelegate)delegate;
- Change change = createChange(javaDelegate, javaDelegate.getJspTranslation().getJspEdit(javaEdit), participant);
- changes.add(change);
- }
- }
- return (Change[])changes.toArray(new Change[changes.size()]);
- }
-
- /**
- * <p>This method is not safe because it does not take into consideration already existing
- * {@link Change}s and thus conflicts could occur that when applied create indeterminate
- * results in the target documents</p>
- *
- * @see #createChange(JavaSearchDocumentDelegate, TextEdit, RefactoringParticipant)
- *
- * @deprecated
- */
- private Change createChange(JavaSearchDocumentDelegate searchDoc, TextEdit edit) {
-
- IDocument doc = searchDoc.getJspTranslation().getJspDocument();
- String file = searchDoc.getFile().getName();
- String description = getDescription();
- try {
- // document lines are 0 based
- String lineNumber = Integer.toString(doc.getLineOfOffset(edit.getOffset()) + 1);
- description += " " + NLS.bind(JSPUIMessages.BasicRefactorSearchRequestor_1, new String[]{file, lineNumber}); //$NON-NLS-1$
- }
- catch (BadLocationException e) {
- Logger.logException(e);
- }
- return new JSPRenameChange(searchDoc.getFile(), doc, edit, description);
- }
-
- /**
- * </p>If a {@link TextChange} does not already exist for the given {@link JavaSearchDocumentDelegate}
- * then a new one will be created with the given {@link TextEdit}. Otherwise the given {@link TextEdit}
- * will be added to a new group and added to the existing change and <code>null</code> will be returned.</p>
- *
- * @param searchDoc the {@link JavaSearchDocumentDelegate} that the <code>edit</code> will be applied to
- * @param edit the {@link TextEdit} that needs to be added to a new {@link TextChange} or appended to an
- * existing one
- * @param participant the {@link RefactoringParticipant} that knows about the existing {@link TextChange}s
- * @return a new {@link Change} if there was not one already existing for the document in question,
- * else <code>null</code>
- */
- private Change createChange(JavaSearchDocumentDelegate searchDoc, TextEdit edit, RefactoringParticipant participant) {
- IDocument doc = searchDoc.getJspTranslation().getJspDocument();
- String description = getDescription();
-
- TextChange existingChange = participant.getTextChange(searchDoc.getFile());
- TextChange change = null;
- if(existingChange != null) {
- try {
- existingChange.addEdit(edit);
- }catch (MalformedTreeException e) {
- Logger.logException("MalformedTreeException while adding edit " + //$NON-NLS-1$
- edit + " to existing change " + change, e); //$NON-NLS-1$
- }
-
- TextEditGroup group = new TextEditGroup(description, edit);
- existingChange.addTextEditGroup(group);
- } else {
- change = new JSPRenameChange(searchDoc.getFile(), doc, edit, searchDoc.getFile().getName());
- TextEditGroup group = new TextEditGroup(description, edit);
- change.addTextEditGroup(group);
- }
-
- return change;
- }
-
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3205
- // only relevant for IType refactorings
- protected boolean isFullyQualified(String matchText) {
- if(getElement() instanceof IType) {
- String pkg = ((IType)getElement()).getPackageFragment().getElementName();
- return matchText.startsWith(pkg);
- }
- return false;
- }
-
- /**
- * Subclasses should override to better describe the change.
- * @return
- */
- protected String getDescription() {
- return ""; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPFieldRenameParticipant.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPFieldRenameParticipant.java
deleted file mode 100644
index bd9111e6bc..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPFieldRenameParticipant.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.ui.internal.java.refactoring;
-
-import org.eclipse.jdt.core.IField;
-import org.eclipse.jdt.core.IJavaElement;
-
-/**
- * <p>Participant for renaming Java fields in JSP documents</p>
- *
- */
-public class JSPFieldRenameParticipant extends JSPRenameParticipant {
-
- /**
- * <p>Initializes the name of this participant to the name of the {@link IField}</p>
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
- */
- protected boolean initialize(Object element) {
- boolean success = false;
- if(element instanceof IField) {
- super.fName = ((IField)element).getElementName();
- success = true;
- }
- return success;
- }
-
- /**
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant#isLegalElementType(org.eclipse.jdt.core.IJavaElement)
- */
- protected boolean isLegalElementType(IJavaElement element) {
- return (element instanceof IField);
- }
-
- /**
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant#getSearchRequestor(org.eclipse.jdt.core.IJavaElement, java.lang.String)
- */
- protected BasicRefactorSearchRequestor getSearchRequestor(IJavaElement element, String newName) {
- BasicRefactorSearchRequestor searchRequestor = null;
-
- if(isLegalElementType(element)) {
- searchRequestor = new JSPFieldRenameRequestor(element, newName);
- }
-
- return searchRequestor;
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPFieldRenameRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPFieldRenameRequestor.java
deleted file mode 100644
index 9ccdaf64de..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPFieldRenameRequestor.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 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.ui.internal.java.refactoring;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * <p>Reactor search requestor to rename Java fields in JSP documents</p>
- *
- */
-public class JSPFieldRenameRequestor extends BasicRefactorSearchRequestor {
-
- /**
- * <p>Constructor</p>
- *
- * @param element the old field name
- * @param newName the new field name
- */
- public JSPFieldRenameRequestor(IJavaElement element, String newName) {
- super(element, newName);
- }
-
- /**
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.BasicRefactorSearchRequestor#getDescription()
- */
- protected String getDescription() {
- String fieldName = getElement().getElementName();
- String newName = getNewName();
- String description = NLS.bind(JSPUIMessages.BasicRefactorSearchRequestor_7, (new String[]{fieldName, newName})); //$NON-NLS-1$
- return description;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPJavaSelectionProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPJavaSelectionProvider.java
deleted file mode 100644
index 08b6c96b45..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPJavaSelectionProvider.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 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.ui.internal.java.refactoring;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-import org.eclipse.jface.viewers.ISelection;
-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.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-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;
-
-class JSPJavaSelectionProvider {
- static IJavaElement[] getSelection(ITextEditor textEditor) {
- IJavaElement[] elements = null;
-
- IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
- ISelection selection = textEditor.getSelectionProvider().getSelection();
- if (selection instanceof ITextSelection) {
- ITextSelection textSelection = (ITextSelection) selection;
- // get the JSP translation object for this editor's document
- IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- try {
- if (model instanceof IDOMModel) {
- IDOMModel xmlModel = (IDOMModel)model;
- IDOMDocument xmlDoc = xmlModel.getDocument();
-
- JSPTranslationAdapter adapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
- if (adapter != null) {
- JSPTranslation translation = adapter.getJSPTranslation();
- elements = translation.getElementsFromJspRange(textSelection.getOffset(), textSelection.getOffset() + textSelection.getLength());
- }
- }
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- }
- if (elements == null) {
- elements = new IJavaElement[0];
- }
- return elements;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameChange.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameChange.java
deleted file mode 100644
index a9a7097522..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameChange.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.ui.internal.java.refactoring;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-
-/**
- * <p><b>Note:</b> This class is not used internally any longer and will
- * be removed at some point.</p>
- *
- * @deprecated
- */
-public class JSPMethodRenameChange extends Change {
-
- /**
- * @deprecated
- */
- public static Change[] createChangesFor(IMethod method, String newName) {
- JSPSearchSupport support = JSPSearchSupport.getInstance();
-
- // should be handled by JSPIndexManager
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3036
- // support.indexWorkspaceAndWait();
-
- BasicRefactorSearchRequestor requestor = new JSPMethodRenameRequestor(method, newName);
- support.searchRunnable(method, new JSPSearchScope(), requestor);
-
- return requestor.getChanges();
- }
-
- public String getName() {
- return JSPUIMessages.JSP_changes; //$NON-NLS-1$
- }
-
- public void initializeValidationData(IProgressMonitor pm) {
- // pa_TODO implement
- // must be implemented to decide correct value of isValid
- }
-
- public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException {
- // pa_TODO implement
- // This method must ensure that the change object is still valid.
- // This is in particular interesting when performing an undo change
- // since the workspace could have changed since the undo change has
- // been created.
- return new RefactoringStatus();
- }
-
- public Change perform(IProgressMonitor pm) throws CoreException {
- // pa_TODO return the "undo" change here
- return null;
- }
-
- public Object getModifiedElement() {
- // pa_TODO Auto-generated method stub
- return null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameParticipant.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameParticipant.java
deleted file mode 100644
index f422113e4e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameParticipant.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.ui.internal.java.refactoring;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-
-/**
- * {@link JSPRenameParticipant} used to update JSP documents when a Java method is renamed
- */
-public class JSPMethodRenameParticipant extends JSPRenameParticipant {
- /**
- * Initializes the name of this participant to the source of the given {@link IMethod}
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
- */
- protected boolean initialize(Object element) {
- boolean success = false;
- try {
- if(element instanceof IMethod) {
- super.fName = ((IMethod) element).getSource();
- success = true;
- }
- } catch (JavaModelException e) {
- Logger.logException(e);
- }
- return success;
- }
-
- /**
- * @return a {@link JSPMethodRenameRequestor}
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant#getSearchRequestor(org.eclipse.jdt.core.IJavaElement, java.lang.String)
- */
- protected BasicRefactorSearchRequestor getSearchRequestor(IJavaElement element, String newName) {
- BasicRefactorSearchRequestor searchRequestor = null;
-
- if(isLegalElementType(element)) {
- searchRequestor = new JSPMethodRenameRequestor(element, newName);
- }
-
- return searchRequestor;
- }
-
- /**
- * <p>Legal types are:
- * <ul><li>{@link IMethod}</li></ul></p>
- *
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant#isLegalElementType(org.eclipse.jdt.core.IJavaElement)
- */
- protected boolean isLegalElementType(IJavaElement element) {
- return (element instanceof IMethod);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameRequestor.java
deleted file mode 100644
index 428fe76e36..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMethodRenameRequestor.java
+++ /dev/null
@@ -1,47 +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.jst.jsp.ui.internal.java.refactoring;
-
-import java.text.MessageFormat;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.search.SearchMatch;
-import org.eclipse.jst.jsp.core.internal.java.search.JavaSearchDocumentDelegate;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-
-/**
- * @author pavery
- */
-public class JSPMethodRenameRequestor extends BasicRefactorSearchRequestor {
-
- public JSPMethodRenameRequestor(IJavaElement element, String newName) {
- super(element, newName);
- }
-
- protected String getRenameText(JavaSearchDocumentDelegate searchDoc, SearchMatch javaMatch) {
-
- String javaText = searchDoc.getJspTranslation().getJavaText();
- String methodText = javaText.substring(javaMatch.getOffset(), javaMatch.getOffset() + javaMatch.getLength());
- String methodSuffix = methodText.substring(methodText.indexOf("(")); //$NON-NLS-1$
- return getNewName() + methodSuffix;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.BasicRefactorSearchRequestor#getDescription()
- */
- protected String getDescription() {
-
- String methodName = getElement().getElementName();
- String newName = getNewName();
- String description = MessageFormat.format(JSPUIMessages.BasicRefactorSearchRequestor_3, new String[]{methodName, newName}); //$NON-NLS-1$
- return description;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveElementActionDelegate.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveElementActionDelegate.java
deleted file mode 100644
index e273dbd50b..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveElementActionDelegate.java
+++ /dev/null
@@ -1,116 +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.ui.internal.java.refactoring;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IEditorActionDelegate;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.wst.sse.ui.internal.util.PlatformStatusLineUtil;
-
-/**
- * An action delegate that launches JDT move element wizard
- *
- * Still relies heavily on internal API
- * will change post 3.0 with public move support
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=61817
- */
-public class JSPMoveElementActionDelegate implements IEditorActionDelegate, IActionDelegate2, IViewActionDelegate {
- //private IEditorPart fEditor;
-
- public void setActiveEditor(IAction action, IEditorPart targetEditor) {
- //fEditor = targetEditor;
- }
-
- public void dispose() {
- // nulling out just in case
- //fEditor = null;
- }
-
- public void init(IAction action) {
- if (action != null) {
- action.setText(JSPUIMessages.MoveElement_label);
- action.setToolTipText(JSPUIMessages.MoveElement_label);
- }
- }
-
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
- public void run(IAction action) {
-
- // no-op until we know how we're supposed to use this
- // eclipse 3.2M5
- // public move support: https://bugs.eclipse.org/bugs/show_bug.cgi?id=61817
-
-// IJavaElement[] elements = getSelectedElements();
-// if (elements.length > 0) {
-//
-// // need to check if it's movable
-// try {
-// JavaMoveProcessor processor = JavaMoveProcessor.create(getResources(elements), elements);
-//
-// Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
-// MoveRefactoring refactoring = new MoveRefactoring(processor);
-//
-// RefactoringWizard wizard = createWizard(refactoring);
-//
-// /*
-// * We want to get the shell from the refactoring dialog but
-// * it's not known at this point, so we pass the wizard and
-// * then, once the dialog is open, we will have access to its
-// * shell.
-// */
-//
-// processor.setCreateTargetQueries(new CreateTargetQueries(wizard));
-// processor.setReorgQueries(new ReorgQueries(wizard));
-// // String openRefactoringWizMsg =
-// // RefactoringMessages.getString("OpenRefactoringWizardAction.refactoring");
-// // //$NON-NLS-1$
-// String openRefactoringWizMsg = JSPUIMessages.MoveElementWizard; // "Move
-// // the
-// // selected
-// // elements";
-// // //$NON-NLS-1$
-// new RefactoringStarter().activate(refactoring, wizard, parent, openRefactoringWizMsg, true);
-//
-// PlatformStatusLineUtil.clearStatusLine();
-//
-// }
-// catch (JavaModelException e) {
-// Logger.logException(e);
-// }
-// }
-// else {
-// PlatformStatusLineUtil.displayErrorMessage(JSPUIMessages.JSPMoveElementAction_0); //$NON-NLS-1$
-// }
-
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- PlatformStatusLineUtil.clearStatusLine();
- }
-
- public void init(IViewPart view) {
- // do nothing
- }
-
-
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveParticipant.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveParticipant.java
deleted file mode 100644
index 8763bf3600..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPMoveParticipant.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.ui.internal.java.refactoring;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.search.SearchRequestor;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextChange;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.ISharableParticipant;
-import org.eclipse.ltk.core.refactoring.participants.MoveArguments;
-import org.eclipse.ltk.core.refactoring.participants.MoveParticipant;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor;
-import org.eclipse.text.edits.TextEdit;
-
-/**
- * Abstract {@link ISharableParticipant} {@link MoveParticipant} for editing JSP documents
- */
-public abstract class JSPMoveParticipant extends MoveParticipant implements ISharableParticipant {
-
- /**
- * The name of this participant.
- * Should be initialized by implementers in {@link #initialize(Object)}
- */
- protected String fName;
-
- /**
- * A map of {@link IJavaElement} names to pairs of {@link IJavaElement}s
- * and their associated {@link MoveArguments} that have been added to
- * this {@link ISharableParticipant}.
- *
- * key: {@link String} - Element name<br/>
- * value: {@link ElementAndArgumentsPair}
- */
- private Map fElementAndArgumentPairs;
-
- /**
- * When new changes are being safely created {@link #getTextChange(Object)}
- * is called first to check for existing {@link TextChange}s, but those
- * results do not usually include the changes that have been created thus far
- * locally by this {@link MoveParticipant}. This is to keep track of those
- * changes so the overridden version of {@link #getTextChange(Object)}s will take
- * these local {@link TextChange}s into account.
- */
- private Map fLocalTextChanges;
-
- /**
- * Groups an {@link IJavaElement} with its associated {@link MoveArguments}
- * that have been added to this {@link ISharableParticipant}
- */
- private class ElementAndArgumentsPair {
- protected IJavaElement fElement;
- protected MoveArguments fArgs;
-
- public ElementAndArgumentsPair(IJavaElement element, MoveArguments args) {
- this.fElement = element;
- this.fArgs = args;
- }
- }
-
- /**
- * <p>Do local initialization. This is done here instead of in an implementation of
- * {@link RefactoringParticipant#initialize(java.lang.Object)} because implementers
- * of this class are not expected to have to call super when they implement
- * {@link RefactoringParticipant#initialize(java.lang.Object)}</p>
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(
- * org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor, java.lang.Object,
- * org.eclipse.ltk.core.refactoring.participants.RefactoringArguments)
- */
- public boolean initialize(RefactoringProcessor processor, Object element,
- RefactoringArguments arguments) {
-
- this.fElementAndArgumentPairs = new HashMap();
- this.addElement(element, arguments);
- this.fLocalTextChanges = new HashMap();
- this.fName = ""; //$NON-NLS-1$
-
- return super.initialize(processor, element, arguments);
- }
-
- /**
- * <p>When an element is added to this {@link ISharableParticipant} it must be
- * a {@link IJavaElement} and be a legal element type ({@link #isLegalElementType(IJavaElement)}
- * and the given arguments must be {@link MoveArguments}. Also the new <code>element</code>
- * will not be added if and {@link IJavaElement} of that name has already been added to
- * this {@link ISharableParticipant}. This protects against elements being added more
- * then once.</p>
- *
- * @see org.eclipse.ltk.core.refactoring.participants.ISharableParticipant#addElement(java.lang.Object,
- * org.eclipse.ltk.core.refactoring.participants.RefactoringArguments)
- */
- public void addElement(Object element, RefactoringArguments arguments) {
- if(element instanceof IJavaElement &&
- isLegalElementType((IJavaElement)element) &&
- arguments instanceof MoveArguments) {
-
- //don't add elements that have already been added
- String elementName = ((IJavaElement)element).getElementName();
- if(!this.fElementAndArgumentPairs.containsKey(elementName)) {
- this.fElementAndArgumentPairs.put(elementName,
- new ElementAndArgumentsPair((IJavaElement)element, (MoveArguments)arguments));
- }
- }
- }
-
- /**
- * <p>As of now the conditions are always {@link RefactoringStatus#OK}</p>
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#checkConditions(
- * org.eclipse.core.runtime.IProgressMonitor, org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
- */
- public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) {
- return new RefactoringStatus();
- }
-
- /**
- *
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#createChange(
- * org.eclipse.core.runtime.IProgressMonitor)
- */
- public Change createChange(IProgressMonitor pm) throws CoreException {
- this.getTextChange(""); //$NON-NLS-1$
-
- //create one multi change to contain all new created changes
- CompositeChange multiChange = new CompositeChange(JSPUIMessages.JSP_changes);
-
- //for each element get the changes for it and add it to the multi change
- Iterator iter = fElementAndArgumentPairs.values().iterator();
- while(iter.hasNext()) {
- ElementAndArgumentsPair elemArgsPair = (ElementAndArgumentsPair)iter.next();
-
- Object dest = elemArgsPair.fArgs.getDestination();
-
- if(dest instanceof IPackageFragment) {
- Change[] changes = createChangesFor(elemArgsPair.fElement, ((IPackageFragment)dest).getElementName(), pm);
-
- /* add all new text changes to the local list of text changes so that
- * future iterations through the while loop will be aware of already
- * existing changes
- */
- for(int i = 0; i < changes.length; ++i) {
- if(changes[i] instanceof TextChange) {
- fLocalTextChanges.put(((TextChange)changes[i]).getModifiedElement(), changes[i]);
- }
- }
-
- if(changes.length > 0) {
- multiChange.addAll(changes);
- }
- }
- }
-
- //unless there are actually new changes return null
- Change result = null;
- if(multiChange.getChildren().length > 0) {
- result = multiChange;
- }
-
- return result;
- }
-
- /**
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
- */
- public String getName() {
- return fName;
- }
-
- /**
- * <p>Overridden to include locally created {@link TextChange}s that have not yet be returned by
- * {@link #createChange(IProgressMonitor)}.</p>
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getTextChange(java.lang.Object)
- */
- public TextChange getTextChange(Object element) {
- TextChange existingChange = (TextChange)fLocalTextChanges.get(element);
- if(existingChange == null) {
- existingChange = super.getTextChange(element);
- }
-
- return existingChange;
- }
-
- /**
- * Using a {@link SearchRequestor} create new changes.
- *
- * @param element the {@link IJavaElement} to create new changes for
- * @param newName the new name of the given {@link IJavaElement}
- *
- * @return any newly created {@link Change}s. It is important to note
- * that while no NEW {@link Change}s maybe returned it is possible that
- * new {@link TextEdit}s will still added to existing {@link Change}s.
- */
- protected Change[] createChangesFor(IJavaElement element, String newName, IProgressMonitor monitor) {
- Change[] changes;
- BasicRefactorSearchRequestor requestor = getSearchRequestor(element, newName);
- if(requestor != null) {
- JSPSearchSupport support = JSPSearchSupport.getInstance();
- support.searchRunnable(element, new JSPSearchScope(), requestor, monitor);
- changes = requestor.getChanges(this);
- } else {
- changes = new Change[0];
- }
-
- return changes;
- }
-
- /**
- * <p>Should be implemented to return the {@link BasicRefactorSearchRequestor} associated
- * with the implementers {@link JSPMoveParticipant}.</p>
- *
- * @param element the {@link IJavaElement} to create the {@link BasicRefactorSearchRequestor} from
- * @param newName the new name of the {@link IJavaElement} to use when
- * creating the {@link BasicRefactorSearchRequestor}
- *
- * @return a new {@link BasicRefactorSearchRequestor} based on the given parameters
- */
- protected abstract BasicRefactorSearchRequestor getSearchRequestor(IJavaElement element, String newName);
-
- /**
- * @param element check that this {@link IJavaElement} is of the type the
- * implementers {@link JSPMoveParticipant} is configured to deal with.
- *
- * @return <code>true</code> if the given {@link IJavaElement} is of a type
- * the implementers {@link JSPMoveParticipant} is configured to deal with,
- * <code>false</code> otherwise.
- */
- protected abstract boolean isLegalElementType(IJavaElement element);
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameChange.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameChange.java
deleted file mode 100644
index bd96a25b0e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameChange.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.ui.internal.java.refactoring;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-
-/**
- * <p><b>Note:</b> This class is not used internally any longer and will
- * be removed at some point.</p>
- *
- * @deprecated
- */
-public class JSPPackageRenameChange extends Change {
-
- /**
- * @deprecated
- */
- public static Change[] createChangesFor(IPackageFragment pkg, String newName) {
- JSPSearchSupport support = JSPSearchSupport.getInstance();
-
- // should be handled by JSPIndexManager
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3036
- //support.indexWorkspaceAndWait();
-
- BasicRefactorSearchRequestor requestor = new JSPPackageRenameRequestor(pkg, newName);
- support.searchRunnable(pkg, new JSPSearchScope(), requestor);
-
- return requestor.getChanges();
- }
-
- public String getName() {
- return JSPUIMessages.JSP_changes; //$NON-NLS-1$
- }
-
- public void initializeValidationData(IProgressMonitor pm) {
- // pa_TODO implement
- // must be implemented to decide correct value of isValid
- }
-
- public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException {
- // pa_TODO implement
- // This method must ensure that the change object is still valid.
- // This is in particular interesting when performing an undo change
- // since the workspace could have changed since the undo change has
- // been created.
- return new RefactoringStatus();
- }
-
- public Change perform(IProgressMonitor pm) throws CoreException {
- // TODO return the "undo" change here
- return null;
- }
-
- public Object getModifiedElement() {
-
- //return this.pkg;
- return null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameParticipant.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameParticipant.java
deleted file mode 100644
index e322ba4cc1..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameParticipant.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.ui.internal.java.refactoring;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IPackageFragment;
-
-/**
- * {@link JSPRenameParticipant} used to update JSP documents when a Java package is renamed
- */
-public class JSPPackageRenameParticipant extends JSPRenameParticipant {
- /**
- * Initializes the name of this participant to the name of the {@link IPackageFragment}
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
- */
- protected boolean initialize(Object element) {
- boolean success = false;
- if(element instanceof IPackageFragment) {
- super.fName = ((IPackageFragment)element).getElementName();
- success = true;
- }
- return success;
- }
-
- /**
- * @return a {@link JSPPackageRenameRequestor}
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant#getSearchRequestor(org.eclipse.jdt.core.IJavaElement, java.lang.String)
- */
- protected BasicRefactorSearchRequestor getSearchRequestor(IJavaElement element, String newName) {
- BasicRefactorSearchRequestor searchRequestor = null;
-
- if(isLegalElementType(element)) {
- searchRequestor = new JSPPackageRenameRequestor(element, newName);
- }
-
- return searchRequestor;
- }
-
- /**
- * <p>Legal types are:
- * <ul><li>{@link IPackageFragment}</li></ul></p>
- *
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant#isLegalElementType(java.lang.Object)
- */
- protected boolean isLegalElementType(IJavaElement element) {
- return (element instanceof IPackageFragment);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameRequestor.java
deleted file mode 100644
index da211bbd2c..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPPackageRenameRequestor.java
+++ /dev/null
@@ -1,41 +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.jst.jsp.ui.internal.java.refactoring;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Overrides get description
- * @author pavery
- */
-public class JSPPackageRenameRequestor extends BasicRefactorSearchRequestor {
-
- /**
- * Element is the old package. newName is the new package name.
- * @param element
- * @param newName
- */
- public JSPPackageRenameRequestor(IJavaElement element, String newName) {
- super(element, newName);
- }
-
- /*
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.BasicRefactorSearchRequestor#getDescription()
- */
- protected String getDescription() {
- String packageName = getElement().getElementName();
- String newName = getNewName();
- String description = NLS.bind(JSPUIMessages.BasicRefactorSearchRequestor_5, (new String[]{packageName, newName})); //$NON-NLS-1$
- return description;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameChange.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameChange.java
deleted file mode 100644
index bdbbb45971..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameChange.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2011 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.ui.internal.java.refactoring;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.DocumentChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.text.edits.MalformedTreeException;
-import org.eclipse.text.edits.MultiTextEdit;
-import org.eclipse.text.edits.TextEdit;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.WorkspaceModifyOperation;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.core.internal.document.DocumentReader;
-import org.eclipse.wst.sse.core.internal.encoding.CodedStreamCreator;
-
-/**
- * {@link DocumentChange} implementation for JSP Documents
- */
-public class JSPRenameChange extends DocumentChange {
-
- /**
- * The JSP file this {@link Change} will change
- */
- protected IFile fJSPFile = null;
-
- /**
- * The description of this change
- */
- private String fDescription;
-
- /**
- * Create a new {@link JSPRenameChange}
- *
- * @param jspFile
- * @param jspDoc
- * @param edit
- * @param description
- */
- public JSPRenameChange(IFile jspFile, IDocument jspDoc, TextEdit edit, String description) {
- super(JSPUIMessages.BasicRefactorSearchRequestor_6, jspDoc);
- MultiTextEdit parentEdit = new MultiTextEdit();
- parentEdit.addChild(edit);
- super.setEdit(parentEdit);
- this.fJSPFile = jspFile;
- this.fDescription = description;
- }
-
- /**
- * Create a new {@link JSPRenameChange} by shallow copying the given
- * original {@link JSPRenameChange}.
- *
- * @param originalChange the {@link JSPRenameChange} to shallow copy to create
- * a new {@link JSPRenameChange}
- */
- public JSPRenameChange(JSPRenameChange originalChange) {
- super(JSPUIMessages.BasicRefactorSearchRequestor_6, originalChange.getJSPDoc());
- super.setEdit(originalChange.getEdit());
- this.fJSPFile = originalChange.fJSPFile;
- this.fDescription = originalChange.fDescription;
- }
-
- /**
- * <p>Currently will always be {@link RefactoringStatus#OK}</p>
- *
- * @see org.eclipse.ltk.core.refactoring.DocumentChange#isValid(org.eclipse.core.runtime.IProgressMonitor)
- */
- public RefactoringStatus isValid(IProgressMonitor pm)throws CoreException {
- return new RefactoringStatus();
- }
-
- /**
- * @see org.eclipse.ltk.core.refactoring.TextChange#getPreviewDocument(org.eclipse.core.runtime.IProgressMonitor)
- */
- public IDocument getPreviewDocument(IProgressMonitor pm) throws CoreException {
- IDocument copyDoc = new Document(this.getJSPDoc().get());
- try {
- super.getEdit().apply(copyDoc);
- }
- catch (MalformedTreeException e) {
- // ignore
- }
- catch (BadLocationException e) {
- // ignore
- }
- return copyDoc;
- }
-
- /**
- * Performs this change and returns a {@link JSPRenameUndoChange} to undo the change.
- *
- * @return a {@link JSPRenameUndoChange} to undo this performed {@link Change}
- * @see org.eclipse.ltk.core.refactoring.TextChange#perform(org.eclipse.core.runtime.IProgressMonitor)
- */
- public Change perform(IProgressMonitor pm) throws CoreException {
- Change undoChange = null;
- try {
- //apply edit
- undoChange = super.perform(pm);
- undoChange = new JSPRenameUndoChange(this, undoChange);
-
- //save the model
- saveJSPFile(this.fJSPFile, this.getJSPDoc());
-
- } catch (MalformedTreeException e) {
- Logger.logException(e);
- }
- return undoChange;
- }
-
- /**
- * @see org.eclipse.ltk.core.refactoring.TextEditBasedChange#getName()
- */
- public String getName() {
- return this.fDescription;
- }
-
- /**
- * <p>The modified element is the JSP {@link IFile} that this {@link Change}
- * changes.</p>
- *
- * @see org.eclipse.ltk.core.refactoring.DocumentChange#getModifiedElement()
- */
- public Object getModifiedElement() {
- return this.fJSPFile;
- }
-
- /**
- * <p>Convenience method to get the JSP {@link IDocument} that this {@link Change}
- * edits.</p>
- *
- * @return the JSP {@link IDocument} that this {@link Change} edits
- */
- protected IDocument getJSPDoc() {
- IDocument doc = null;
- try {
- doc = this.acquireDocument(null);
- } catch(CoreException e) {
- //ignore, DocumentChange.acquireDocument will never throw it
- }
-
- return doc;
- }
-
- /**
- * <p>Saves a JSP file. If the file is not open in an editor then modifies the file directly, else
- * if the file is open an editor then run the save method on the open editor.</p>
- *
- * @param jspFile the {@link IFile} to save
- * @param jspDoc the {@link IDocument} with the new content for the given {@link IFile}
- */
- protected static void saveJSPFile(IFile jspFile, IDocument jspDoc) {
- //if not open then save model
- final ITextEditor editor = findOpenEditor(jspDoc);
- try {
- /* if no open editor then save the document to the file
- * else save the open editor
- */
- if(editor == null) {
- SaveJspFileOp op = new SaveJspFileOp(jspFile, jspDoc);
- op.run(JSPSearchSupport.getInstance().getProgressMonitor());
- } else {
- //editor save must be done on UI thread
- IRunnableWithProgress runnable= new IRunnableWithProgress() {
- public void run(IProgressMonitor pm) throws InterruptedException {
- editor.doSave(pm);
- }
- };
- PlatformUI.getWorkbench().getProgressService().runInUI(editor.getSite().getWorkbenchWindow(), runnable, null);
- }
- } catch (InvocationTargetException e) {
- Logger.logException(e);
- } catch (InterruptedException e) {
- Logger.logException(e);
- }
- }
-
- /**
- * <p>Checks if a document is open in an editor and returns it if it is</p>
- *
- * @param jspDoc check to see if this {@link IDocument} is currently open in an editor
- * @return the open {@link ITextEditor} associated with the given {@link IDocument} or
- * <code>null</code> if none can be found.
- */
- private static ITextEditor findOpenEditor(IDocument jspDoc) {
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- IWorkbenchWindow w = null;
- for (int i = 0; i < windows.length; i++) {
-
- w = windows[i];
- IWorkbenchPage page = w.getActivePage();
- if (page != null) {
-
- IEditorReference[] references = page.getEditorReferences();
- IEditorPart editor = null;
- Object o = null;
- IDocument doc = null;
- for (int j = 0; j < references.length; j++) {
-
- editor = references[j].getEditor(false);
- if (editor != null) { // editor might not be instantiated
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3764
- // use adapter to get ITextEditor (for things like
- // page designer)
- o = editor.getAdapter(ITextEditor.class);
- if (o != null && o instanceof ITextEditor) {
-
- doc = ((ITextEditor) o).getDocumentProvider().getDocument(editor.getEditorInput());
- if (doc != null && doc.equals(jspDoc)) {
- return (ITextEditor) o;
- }
- }
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Workspace operation to perform save on model for updated documents.
- * Should only be done on models not open in an editor.
- */
- private static class SaveJspFileOp extends WorkspaceModifyOperation {
-
- private IDocument fJSPDoc = null;
- private IFile fJSPFile = null;
-
- public SaveJspFileOp(IFile jspFile, IDocument jspDoc) {
- this.fJSPDoc = jspDoc;
- this.fJSPFile = jspFile;
- }
-
- protected void execute(IProgressMonitor monitor) throws CoreException, InvocationTargetException, InterruptedException {
-
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3765
- // save file w/ no intermediate model creation
-
- CodedStreamCreator codedStreamCreator = new CodedStreamCreator();
- Reader reader = new DocumentReader(this.fJSPDoc);
- codedStreamCreator.set(this.fJSPFile, reader);
-
- ByteArrayOutputStream codedByteStream = null;
- InputStream codedStream = null;
- try {
- codedByteStream = codedStreamCreator.getCodedByteArrayOutputStream();
- codedStream = new ByteArrayInputStream(codedByteStream.toByteArray());
- if (this.fJSPFile.exists())
- this.fJSPFile.setContents(codedStream, true, true, null);
- else
- this.fJSPFile.create(codedStream, false, null);
-
- } catch (CoreException e) {
- Logger.logException(e);
- } catch (IOException e) {
- Logger.logException(e);
- }
- finally {
- try {
- if(codedByteStream != null)
- codedByteStream.close();
- if(codedStream != null)
- codedStream.close();
- }
- catch (IOException e){
- // unlikely
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameElementActionDelegate.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameElementActionDelegate.java
deleted file mode 100644
index f487fc54a4..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameElementActionDelegate.java
+++ /dev/null
@@ -1,109 +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.ui.internal.java.refactoring;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.ui.refactoring.RenameSupport;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.ui.IActionDelegate2;
-import org.eclipse.ui.IEditorActionDelegate;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.ui.internal.util.PlatformStatusLineUtil;
-
-/**
- * An action delegate that launches JDT rename element wizard
- */
-public class JSPRenameElementActionDelegate implements IEditorActionDelegate, IActionDelegate2, IViewActionDelegate {
- private IEditorPart fEditor;
-
- public void setActiveEditor(IAction action, IEditorPart targetEditor) {
- fEditor = targetEditor;
- }
-
- public void dispose() {
- // nulling out just in case
- fEditor = null;
- }
-
- public void init(IAction action) {
- if (action != null) {
- action.setText(JSPUIMessages.RenameElement_label);
- action.setToolTipText(JSPUIMessages.RenameElement_label);
- }
- }
-
- public void runWithEvent(IAction action, Event event) {
- run(action);
- }
-
- public void run(IAction action) {
- IJavaElement element = getSelectedElement();
- if(element != null) {
- RenameSupport renameSupport = null;
- try {
- switch(element.getElementType()) {
- case IJavaElement.TYPE:
- renameSupport= RenameSupport.create((IType)element, element.getElementName(), RenameSupport.UPDATE_REFERENCES);
- break;
- case IJavaElement.METHOD:
- renameSupport= RenameSupport.create((IMethod)element, element.getElementName(), RenameSupport.UPDATE_REFERENCES);
- break;
- case IJavaElement.PACKAGE_FRAGMENT:
- renameSupport= RenameSupport.create((IPackageFragment)element, element.getElementName(), RenameSupport.UPDATE_REFERENCES);
- break;
- }
- if(renameSupport != null) {
- renameSupport.openDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- PlatformStatusLineUtil.clearStatusLine();
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- else {
- PlatformStatusLineUtil.displayErrorMessage(JSPUIMessages.JSPRenameElementAction_0); //$NON-NLS-1$
- PlatformStatusLineUtil.addOneTimeClearListener();
- }
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- PlatformStatusLineUtil.clearStatusLine();
- }
-
- public void init(IViewPart view) {
- // do nothing
- }
-
- private IJavaElement getSelectedElement() {
- IJavaElement element = null;
- if (fEditor instanceof ITextEditor) {
- IJavaElement[] elements = JSPJavaSelectionProvider.getSelection((ITextEditor)fEditor);
- if (elements.length == 1)
- element = elements[0];
- }
- return element;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameParticipant.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameParticipant.java
deleted file mode 100644
index 5bbf86f500..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameParticipant.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2011 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.ui.internal.java.refactoring;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-import org.eclipse.ltk.core.refactoring.TextChange;
-import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
-import org.eclipse.ltk.core.refactoring.participants.ISharableParticipant;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant;
-import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor;
-import org.eclipse.ltk.core.refactoring.participants.RenameArguments;
-import org.eclipse.ltk.core.refactoring.participants.RenameParticipant;
-import org.eclipse.text.edits.TextEdit;
-
-/**
- * Abstract {@link ISharableParticipant} {@link RenameParticipant} for editing JSP documents
- */
-public abstract class JSPRenameParticipant extends RenameParticipant implements ISharableParticipant {
- /**
- * The name of this participant.
- * Should be initialized by implementers in {@link #initialize(Object)}
- */
- protected String fName;
-
- /**
- * A map of {@link IJavaElement} names to pairs of {@link IJavaElement}s
- * and their associated {@link RenameArguments} that have been added to
- * this {@link ISharableParticipant}.
- *
- * key: {@link String} - Element name<br/>
- * value: {@link ElementAndArgumentsPair}
- */
- private Map fElementAndArgumentPairs;
-
- /**
- * When new changes are being safely created {@link #getTextChange(Object)}
- * is called first to check for existing {@link TextChange}s, but those
- * results do not usually include the changes that have been created thus far
- * locally by this {@link RenameParticipant}. This is to keep track of those
- * changes so the overridden version of {@link #getTextChange(Object)}s will take
- * these local {@link TextChange}s into account.
- */
- private Map fLocalTextChanges;
-
- /**
- * Groups an {@link IJavaElement} with its associated {@link RenameArguments}
- * that have been added to this {@link ISharableParticipant}
- */
- private class ElementAndArgumentsPair {
- protected IJavaElement fElement;
- protected RenameArguments fArgs;
-
- public ElementAndArgumentsPair(IJavaElement element, RenameArguments args) {
- this.fElement = element;
- this.fArgs = args;
- }
- }
-
- /**
- * <p>Do local initialization. This is done here instead of in an implementation of
- * {@link RefactoringParticipant#initialize(java.lang.Object)} because implementers
- * of this class are not expected to have to call super when they implement
- * {@link RefactoringParticipant#initialize(java.lang.Object)}</p>
- *
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(
- * org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor, java.lang.Object,
- * org.eclipse.ltk.core.refactoring.participants.RefactoringArguments)
- */
- public boolean initialize(RefactoringProcessor processor, Object element,
- RefactoringArguments arguments) {
-
- this.fElementAndArgumentPairs = new HashMap();
- this.addElement(element, arguments);
- this.fLocalTextChanges = new HashMap();
- this.fName = ""; //$NON-NLS-1$
-
- return super.initialize(processor, element, arguments);
- }
-
- /**
- * <p>When an element is added to this {@link ISharableParticipant} it must be
- * a {@link IJavaElement} and be a legal element type ({@link #isLegalElementType(IJavaElement)}
- * and the given arguments must be {@link RenameArguments}. Also the new <code>element</code>
- * will not be added if and {@link IJavaElement} of that name has already been added to
- * this {@link ISharableParticipant}. This protects against elements being added more
- * then once.</p>
- *
- * @see org.eclipse.ltk.core.refactoring.participants.ISharableParticipant#addElement(java.lang.Object,
- * org.eclipse.ltk.core.refactoring.participants.RefactoringArguments)
- */
- public void addElement(Object element, RefactoringArguments arguments) {
- if(element instanceof IJavaElement &&
- isLegalElementType((IJavaElement)element) &&
- arguments instanceof RenameArguments) {
-
- //don't add elements that have already been added
- String elementName = ((IJavaElement)element).getElementName();
- if(!this.fElementAndArgumentPairs.containsKey(elementName)) {
- this.fElementAndArgumentPairs.put(elementName,
- new ElementAndArgumentsPair((IJavaElement)element, (RenameArguments)arguments));
- }
- }
- }
-
- /**
- * <p>As of now the conditions are always {@link RefactoringStatus#OK}</p>
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#checkConditions(
- * org.eclipse.core.runtime.IProgressMonitor, org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext)
- */
- public RefactoringStatus checkConditions(IProgressMonitor pm, CheckConditionsContext context) {
- return new RefactoringStatus();
- }
-
- /**
- *
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#createChange(
- * org.eclipse.core.runtime.IProgressMonitor)
- */
- public Change createChange(IProgressMonitor pm) throws CoreException {
- this.getTextChange(""); //$NON-NLS-1$
-
- //create one multi change to contain all new created changes
- CompositeChange multiChange = new CompositeChange(JSPUIMessages.JSP_changes);
-
- //for each element get the changes for it and add it to the multi change
- Iterator iter = fElementAndArgumentPairs.values().iterator();
- while(iter.hasNext()) {
- ElementAndArgumentsPair elemArgsPair = (ElementAndArgumentsPair)iter.next();
- Change[] changes = createChangesFor(elemArgsPair.fElement, elemArgsPair.fArgs.getNewName(), pm);
-
- /* add all new text changes to the local list of text changes so that
- * future iterations through the while loop will be aware of already
- * existing changes
- */
- for(int i = 0; i < changes.length; ++i) {
- if(changes[i] instanceof TextChange) {
- fLocalTextChanges.put(((TextChange)changes[i]).getModifiedElement(), changes[i]);
- }
- }
-
- if(changes.length > 0) {
- multiChange.addAll(changes);
- }
- }
-
- //unless there are actually new changes return null
- Change result = null;
- if(multiChange.getChildren().length > 0) {
- result = multiChange;
- }
-
- return result;
- }
-
- /**
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getName()
- */
- public String getName() {
- return fName;
- }
-
- /**
- * <p>Overridden to include locally created {@link TextChange}s that have not yet be returned by
- * {@link #createChange(IProgressMonitor)}.</p>
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#getTextChange(java.lang.Object)
- */
- public TextChange getTextChange(Object element) {
- TextChange existingChange = (TextChange)fLocalTextChanges.get(element);
- if(existingChange == null) {
- existingChange = super.getTextChange(element);
- }
-
- return existingChange;
- }
-
- /**
- *
- * @param element the {@link IJavaElement} to create new changes for
- * @param newName the new name of the given {@link IJavaElement}
- *
- * @return any newly created {@link Change}s. It is important to note
- * that while no NEW {@link Change}s maybe returned it is possible that
- * new {@link TextEdit}s will still added to existing {@link Change}s.
- */
- protected Change[] createChangesFor(IJavaElement element, String newName, IProgressMonitor monitor) {
- Change[] changes;
- BasicRefactorSearchRequestor requestor = getSearchRequestor(element, newName);
- if(requestor != null) {
- JSPSearchSupport support = JSPSearchSupport.getInstance();
- support.searchRunnable(element, new JSPSearchScope(), requestor, monitor);
- changes = requestor.getChanges(this);
- } else {
- changes = new Change[0];
- }
-
- return changes;
- }
-
- /**
- * <p>Should be implemented to return the {@link BasicRefactorSearchRequestor} associated
- * with the implementers {@link JSPRenameParticipantParticipant}.</p>
- *
- * @param element the {@link IJavaElement} to create the {@link BasicRefactorSearchRequestor} from
- * @param newName the new name of the {@link IJavaElement} to use when
- * creating the {@link BasicRefactorSearchRequestor}
- *
- * @return a new {@link BasicRefactorSearchRequestor} based on the given parameters
- */
- protected abstract BasicRefactorSearchRequestor getSearchRequestor(IJavaElement element, String newName);
-
- /**
- * @param element check that this {@link IJavaElement} is of the type the
- * implementers {@link JSPRenameParticipant} is configured to deal with.
- *
- * @return <code>true</code> if the given {@link IJavaElement} is of a type
- * the implementers {@link JSPRenameParticipant} is configured to deal with,
- * <code>false</code> otherwise.
- */
- protected abstract boolean isLegalElementType(IJavaElement element);
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameUndoChange.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameUndoChange.java
deleted file mode 100644
index a34e67d85c..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPRenameUndoChange.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.ui.internal.java.refactoring;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ui.texteditor.ITextEditor;
-
-/**
- * <p>When undoing {@link JSPRenameChange}s need to be sure not only to perform
- * the UndoDocumentChange but to also save the JSP file otherwise one of two
- * unwanted things could happen:
- * <ul><li>an open editor with the file could be marked dirty</li>
- * <li>or if the changed file is not open in an editor then the changes will
- * not be saved to the file and thus not persist.</li></ul></p>
- *
- * <p>Therefore a {@link JSPRenameUndoChange} wraps another {@link Change} which
- * is considered the "undo change". When a perform is called on {@link JSPRenameUndoChange}
- * the perform is called on the wrapped "undo change", another {@link JSPRenameUndoChange}
- * is created as the "redo change" from the return of the perform on the "undo change"
- * and then most importantly the updated {@link IDocument} is saved to the {@link IFile}
- * if the JSP file is not open in an editor, or a save is called on the open {@link ITextEditor}
- * that is editing the changed JSP file.</p>
- */
-public class JSPRenameUndoChange extends JSPRenameChange {
- /**
- * The "undo change" being wrapped
- */
- private Change fUndoChange;
-
- /**
- * <p>Create the {@link JSPRenameUndoChange} from the {@link JSPRenameChange}
- * that created the undo change and the undo change itself.</p>
- *
- * @param originalChange the {@link JSPRenameChange} that created the <code>undoChange</code>
- * @param undoChange the undo change to be wrapped by this {@link JSPRenameUndoChange}
- */
- public JSPRenameUndoChange(JSPRenameChange originalChange, Change undoChange) {
- super(originalChange);
- fUndoChange = undoChange;
- }
-
- /**
- * <p>See {@link JSPRenameUndoChange} class description for more details.</p>
- *
- * @return a {@link JSPRenameUndoChange} wrapping the "redo change" returned by the
- * call to {@link Change#perform(IProgressMonitor)} on the wrapped "undo change".
- *
- * @see JSPRenameUndoChange
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameChange#perform(org.eclipse.core.runtime.IProgressMonitor)
- */
- public Change perform(IProgressMonitor pm) throws CoreException {
- //apply edit
- Change redoChange = fUndoChange.perform(pm);
- redoChange = new JSPRenameUndoChange(this, redoChange);
-
- //save the file
- saveJSPFile(this.fJSPFile, this.getJSPDoc());
-
- return redoChange;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveChange.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveChange.java
deleted file mode 100644
index b60baadad4..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveChange.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.ui.internal.java.refactoring;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-
-/**
- * <p><b>Note:</b> This class is not used internally any longer and will
- * be removed at some point.</p>
- *
- * @deprecated
- */
-public class JSPTypeMoveChange extends Change {
-
- /**
- * @deprecated
- */
- public static Change[] createChangesFor(IType type, String newName) {
-
- JSPSearchSupport support = JSPSearchSupport.getInstance();
- // should be handled by JSPIndexManager
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3036
- // support.indexWorkspaceAndWait();
-
- JSPTypeMoveRequestor requestor = new JSPTypeMoveRequestor(type, newName);
- support.searchRunnable(type, new JSPSearchScope(), requestor);
-
- return requestor.getChanges();
- }
-
- public String getName() {
- return JSPUIMessages.JSP_changes; //$NON-NLS-1$
- }
-
- public void initializeValidationData(IProgressMonitor pm) {
- // pa_TODO implement
- // must be implemented to decide correct value of isValid
- }
-
- public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException {
- // pa_TODO implement
- // This method must ensure that the change object is still valid.
- // This is in particular interesting when performing an undo change
- // since the workspace could have changed since the undo change has
- // been created.
- return new RefactoringStatus();
- }
-
- public Change perform(IProgressMonitor pm) throws CoreException {
- // TODO return the "undo" change here
- return null;
- }
-
- public Object getModifiedElement() {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveParticipant.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveParticipant.java
deleted file mode 100644
index 4ac0bb05c5..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveParticipant.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.ui.internal.java.refactoring;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IType;
-
-/**
- * {@link JSPMoveParticipant} used to update JSP documents when a Java type is moved.
- */
-public class JSPTypeMoveParticipant extends JSPMoveParticipant {
-
- /**
- * Initializes the name of this participant to the name of the {@link IType}
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
- */
- protected boolean initialize(Object element) {
- boolean success = false;
- if(element instanceof IType) {
- super.fName =((IType)element).getElementName();
- success = true;
- }
- return success;
- }
-
- /**
- * @return a {@link JSPTypeMoveRequestor}
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPMoveParticipant#getSearchRequestor(org.eclipse.jdt.core.IJavaElement, java.lang.String)
- */
- protected BasicRefactorSearchRequestor getSearchRequestor(
- IJavaElement element, String newName) {
-
- BasicRefactorSearchRequestor searchRequestor = null;
-
- if(isLegalElementType(element)) {
- searchRequestor = new JSPTypeMoveRequestor(element, newName);
- }
-
- return searchRequestor;
- }
-
- /**
- * <p>Legal types are:
- * <ul><li>{@link IType}</li></ul></p>
- *
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant#isLegalElementType(org.eclipse.jdt.core.IJavaElement)
- */
- protected boolean isLegalElementType(IJavaElement element) {
- return (element instanceof IType);
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveRequestor.java
deleted file mode 100644
index bd9c8c07f9..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeMoveRequestor.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.ui.internal.java.refactoring;
-
-import java.text.MessageFormat;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.search.SearchMatch;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
-import org.eclipse.jst.jsp.core.internal.java.search.JavaSearchDocumentDelegate;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-
-/**
- * @author pavery
- */
-public class JSPTypeMoveRequestor extends BasicRefactorSearchRequestor {
-
- /**
- * @param element
- * @param newName
- */
- public JSPTypeMoveRequestor(IJavaElement element, String newPackage) {
- super(element, newPackage);
- }
-
- /**
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.BasicRefactorSearchRequestor#getRenameText(org.eclipse.jst.jsp.core.internal.java.search.JavaSearchDocumentDelegate, org.eclipse.jdt.core.search.SearchMatch)
- */
- protected String getRenameText(JavaSearchDocumentDelegate searchDoc, SearchMatch javaMatch) {
-
- String renameText = getElement().getElementName();
-
- JSPTranslation trans = searchDoc.getJspTranslation();
- String matchText = trans.getJavaText().substring(javaMatch.getOffset(), javaMatch.getOffset() + javaMatch.getLength());
-
- // if it's an import or jsp:useBean, we need to add the package name as well
- if(trans.isImport(javaMatch.getOffset()) || trans.isUseBean(javaMatch.getOffset()) || isFullyQualified(matchText)) {
- if(!getNewName().equals("")) //$NON-NLS-1$
- // getNewName() is the pkg name
- renameText = getNewName() + "." + renameText; //$NON-NLS-1$
- }
-
- //if the rename text is the same as the match text then, don't want to bother renaming anything
- if(renameText.equals(matchText)) {
- renameText = null;
- }
-
- return renameText;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.BasicRefactorSearchRequestor#getDescription()
- */
- protected String getDescription() {
-
- String typeName = getElement().getElementName();
- String newName = getNewName();
- String description = MessageFormat.format(JSPUIMessages.BasicRefactorSearchRequestor_2, new String[]{typeName, newName}); //$NON-NLS-1$
- return description;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameChange.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameChange.java
deleted file mode 100644
index e5ea96c03c..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameChange.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.ui.internal.java.refactoring;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.ltk.core.refactoring.Change;
-import org.eclipse.ltk.core.refactoring.RefactoringStatus;
-
-/**
- * <p><b>Note:</b> This class is not used internally any longer and will
- * be removed at some point.</p>
- *
- * @deprecated
- */
-public class JSPTypeRenameChange extends Change {
-
- /**
- * @deprecated
- */
- public static Change[] createChangesFor(IType type, String newName) {
- JSPSearchSupport support = JSPSearchSupport.getInstance();
-
- // should be handled by JSPIndexManager
- // https://w3.opensource.ibm.com/bugzilla/show_bug.cgi?id=3036
- // support.indexWorkspaceAndWait();
-
-
- JSPTypeRenameRequestor requestor = new JSPTypeRenameRequestor(type, newName);
- support.searchRunnable(type, new JSPSearchScope(), requestor);
-
- return requestor.getChanges();
- }
-
- public String getName() {
- return JSPUIMessages.JSP_changes; //$NON-NLS-1$
- }
-
- public void initializeValidationData(IProgressMonitor pm) {
- // pa_TODO implement
- // must be implemented to decide correct value of isValid
- }
-
- public RefactoringStatus isValid(IProgressMonitor pm) throws CoreException {
- // pa_TODO implement
- // This method must ensure that the change object is still valid.
- // This is in particular interesting when performing an undo change
- // since the workspace could have changed since the undo change has
- // been created.
- return new RefactoringStatus();
- }
-
- public Change perform(IProgressMonitor pm) throws CoreException {
- // TODO return the "undo" change here
- return null;
- }
-
- public Object getModifiedElement() {
- // TODO Auto-generated method stub
- return null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameParticipant.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameParticipant.java
deleted file mode 100644
index db2e95b504..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameParticipant.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.ui.internal.java.refactoring;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IType;
-
-/**
- * {@link JSPRenameParticipant} used to update JSP documents when a Java type is renamed
- */
-public class JSPTypeRenameParticipant extends JSPRenameParticipant {
-
-
- /**
- * Initializes the name of this participant to the name of the {@link IType}
- *
- * @see org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant#initialize(java.lang.Object)
- */
- protected boolean initialize(Object element) {
- boolean success = false;
- if(element instanceof IType) {
- super.fName = ((IType)element).getElementName();
- success = true;
- }
- return success;
- }
-
- /**
- * @return a {@link JSPTypeRenameRequestor}
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant#getSearchRequestor(org.eclipse.jdt.core.IJavaElement, java.lang.String)
- */
- protected BasicRefactorSearchRequestor getSearchRequestor(IJavaElement element, String newName) {
-
- BasicRefactorSearchRequestor searchRequestor = null;
-
- if(isLegalElementType(element)) {
- searchRequestor = new JSPTypeRenameRequestor((IType)element, newName);
- }
-
- return searchRequestor;
- }
-
- /**
- * <p>Legal types are:
- * <ul><li>{@link IType}</li></ul></p>
-
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant#isLegalElementType(org.eclipse.jdt.core.IJavaElement)
- */
- protected boolean isLegalElementType(IJavaElement element) {
- return (element instanceof IType);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameRequestor.java
deleted file mode 100644
index a3417538ad..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/JSPTypeRenameRequestor.java
+++ /dev/null
@@ -1,69 +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.jst.jsp.ui.internal.java.refactoring;
-
-import java.text.MessageFormat;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.search.SearchMatch;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
-import org.eclipse.jst.jsp.core.internal.java.search.JavaSearchDocumentDelegate;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-
-/**
- * Creates document change(s) for a type rename.
- * Changes are created for every type "match" in the workspace
- * @author pavery
- */
-public class JSPTypeRenameRequestor extends BasicRefactorSearchRequestor {
-
- public JSPTypeRenameRequestor(IType type, String newName) {
- super(type, newName);
- }
-
- private IType getType() {
- return (IType)getElement();
- }
-
- protected String getRenameText(JavaSearchDocumentDelegate searchDoc, SearchMatch javaMatch) {
-
- String renameText = getNewName();
-
- String pkg = getType().getPackageFragment().getElementName();
- IJavaElement parent = getType().getParent();
- String parentName = (parent != null) ? parent.getElementName() : null;
- JSPTranslation trans = searchDoc.getJspTranslation();
- String matchText = trans.getJavaText().substring(javaMatch.getOffset(), javaMatch.getOffset() + javaMatch.getLength());
-
- // if it's an import or jsp:useBean or fully qualified type, we need to add the package name as well
- // else if starts with parent name such as "MyClass.Enum" then need to add the parent name as well
- if(trans.isImport(javaMatch.getOffset()) || isFullyQualified(matchText)) {
- if(!pkg.equals("")) //$NON-NLS-1$
- renameText = pkg + "." + renameText; //$NON-NLS-1$
- } else if(parentName != null && matchText.startsWith(parentName)) {
- renameText = parentName + "." + renameText; //$NON-NLS-1$
- }
- return renameText;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.jst.jsp.ui.internal.java.refactoring.BasicRefactorSearchRequestor#getDescription()
- */
- protected String getDescription() {
-
- String typeName = getElement().getElementName();
- String newName = getNewName();
- String description = MessageFormat.format(JSPUIMessages.BasicRefactorSearchRequestor_4, new String[]{typeName, newName}); //$NON-NLS-1$
- return description;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/MoveElementHandler.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/MoveElementHandler.java
deleted file mode 100644
index 21abbf0ed8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/MoveElementHandler.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.ui.internal.java.refactoring;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-
-/**
- * A handler that launches JDT move element wizard
- *
- * Still relies heavily on internal API
- * will change post 3.0 with public move support
- * https://bugs.eclipse.org/bugs/show_bug.cgi?id=61817
- */
-public class MoveElementHandler extends AbstractHandler {
-// private IEditorPart fEditor;
-
- public Object execute(ExecutionEvent arg0) throws ExecutionException {
- // no-op until we know how we're supposed to use this
- // eclipse 3.2M5
- // public move support: https://bugs.eclipse.org/bugs/show_bug.cgi?id=61817
-
-// IJavaElement[] elements = getSelectedElements();
-// if (elements.length > 0) {
-//
-// // need to check if it's movable
-// try {
-// JavaMoveProcessor processor = JavaMoveProcessor.create(getResources(elements), elements);
-//
-// Shell parent = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
-// MoveRefactoring refactoring = new MoveRefactoring(processor);
-//
-// RefactoringWizard wizard = createWizard(refactoring);
-//
-// /*
-// * We want to get the shell from the refactoring dialog but
-// * it's not known at this point, so we pass the wizard and
-// * then, once the dialog is open, we will have access to its
-// * shell.
-// */
-//
-// processor.setCreateTargetQueries(new CreateTargetQueries(wizard));
-// processor.setReorgQueries(new ReorgQueries(wizard));
-// // String openRefactoringWizMsg =
-// // RefactoringMessages.getString("OpenRefactoringWizardAction.refactoring");
-// // //$NON-NLS-1$
-// String openRefactoringWizMsg = JSPUIMessages.MoveElementWizard; // "Move
-// // the
-// // selected
-// // elements";
-// // //$NON-NLS-1$
-// new RefactoringStarter().activate(refactoring, wizard, parent, openRefactoringWizMsg, true);
-//
-// PlatformStatusLineUtil.clearStatusLine();
-//
-// }
-// catch (JavaModelException e) {
-// Logger.logException(e);
-// }
-// }
-// else {
-// PlatformStatusLineUtil.displayErrorMessage(JSPUIMessages.JSPMoveElementAction_0); //$NON-NLS-1$
-// }
- return null;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/RenameElementHandler.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/RenameElementHandler.java
deleted file mode 100644
index 20399f96b4..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/refactoring/RenameElementHandler.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 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.ui.internal.java.refactoring;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.core.IField;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IMethod;
-import org.eclipse.jdt.core.IPackageFragment;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.ui.refactoring.RenameSupport;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.HandlerUtil;
-import org.eclipse.ui.texteditor.ITextEditor;
-import org.eclipse.wst.sse.ui.internal.util.PlatformStatusLineUtil;
-
-public class RenameElementHandler extends AbstractHandler {
- private IEditorPart fEditor;
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
- fEditor = HandlerUtil.getActiveEditor(event);
-
- IJavaElement element = getSelectedElement();
- if(element != null) {
- RenameSupport renameSupport = null;
- try {
- switch(element.getElementType()) {
- case IJavaElement.TYPE:
- renameSupport= RenameSupport.create((IType)element, element.getElementName(), RenameSupport.UPDATE_REFERENCES);
- break;
- case IJavaElement.METHOD:
- renameSupport= RenameSupport.create((IMethod)element, element.getElementName(), RenameSupport.UPDATE_REFERENCES);
- break;
- case IJavaElement.PACKAGE_FRAGMENT:
- renameSupport= RenameSupport.create((IPackageFragment)element, element.getElementName(), RenameSupport.UPDATE_REFERENCES);
- break;
- case IJavaElement.FIELD:
- renameSupport = RenameSupport.create((IField)element, element.getElementName(), RenameSupport.UPDATE_REFERENCES);
- break;
- }
- if(renameSupport != null) {
- renameSupport.openDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- PlatformStatusLineUtil.clearStatusLine();
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- else {
- PlatformStatusLineUtil.displayErrorMessage(JSPUIMessages.JSPRenameElementAction_0); //$NON-NLS-1$
- PlatformStatusLineUtil.addOneTimeClearListener();
- }
-
- return null;
- }
-
- private IJavaElement getSelectedElement() {
- IJavaElement element = null;
- if (fEditor != null) {
- ITextEditor editor = (ITextEditor) ((fEditor instanceof ITextEditor) ? fEditor : fEditor.getAdapter(ITextEditor.class));
- if (editor != null) {
- IJavaElement[] elements = JSPJavaSelectionProvider.getSelection(editor);
- if (elements.length == 1)
- element = elements[0];
- }
- }
- return element;
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/BasicJSPSearchRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/BasicJSPSearchRequestor.java
deleted file mode 100644
index 1acb7befe0..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/BasicJSPSearchRequestor.java
+++ /dev/null
@@ -1,141 +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.jst.jsp.ui.internal.java.search;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.search.SearchDocument;
-import org.eclipse.jdt.core.search.SearchMatch;
-import org.eclipse.jdt.core.search.SearchParticipant;
-import org.eclipse.jdt.core.search.SearchRequestor;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.core.internal.java.JSPTranslation;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.core.internal.java.search.JavaSearchDocumentDelegate;
-
-/**
- * Accepts matches from JSPSearchSupport.search(...) request.
- * Adapts the results from java to JSP and displays in the SearchResultView.
- *
- * @author pavery
- */
-public class BasicJSPSearchRequestor extends SearchRequestor {
-
- // for debugging
- private 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$
- }
-
- /**
- * Maps java search coordinates to corresponding JSP coordinates.
- * Adds the matches to the Search Results view.
- * @see org.eclipse.jdt.core.search.SearchRequestor#acceptSearchMatch(org.eclipse.jdt.core.search.SearchMatch)
- */
- public void acceptSearchMatch(SearchMatch match) throws CoreException {
-
- if(JSPSearchSupport.getInstance().isCanceled())
- return;
-
- String matchDocumentPath = match.getResource().getFullPath().toString();
- SearchDocument searchDoc = JSPSearchSupport.getInstance().getSearchDocument(matchDocumentPath);
-
- if (searchDoc != null && searchDoc instanceof JavaSearchDocumentDelegate) {
- JavaSearchDocumentDelegate javaSearchDoc = (JavaSearchDocumentDelegate)searchDoc;
- int jspStart = javaSearchDoc.getJspOffset(match.getOffset());
- int jspEnd = javaSearchDoc.getJspOffset(match.getOffset() + match.getLength());
-
- JSPTranslation trans = javaSearchDoc.getJspTranslation();
- String jspText = trans.getJspText();
- String javaText = javaSearchDoc.getJavaText();
-
- if (DEBUG)
- displayDebugInfo(match, jspStart, jspEnd, jspText, javaText);
-
- if (jspStart > -1 && jspEnd > -1)
- addSearchMatch(new Document(trans.getJspText()), javaSearchDoc.getFile(), jspStart, jspEnd, jspText);
- }
- }
-
- /**
- * @param searchDoc
- * @param jspStart
- * @param jspEnd
- * @param jspTranslation
- * @param jspText
- * @throws CoreException
- */
- protected void addSearchMatch(IDocument jspDocument, IFile jspFile, int jspStart, int jspEnd, String jspText) {
- // implement in subclass
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jdt.core.search.SearchRequestor#beginReporting()
- */
- public void beginReporting() {
-
- if (DEBUG)
- System.out.println("JSP Search requestor: beginReporting()"); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.jdt.core.search.SearchRequestor#endReporting()
- */
- public void endReporting() {
-
- if (DEBUG)
- System.out.println("JSP Search requestor: endReporting()"); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.jdt.core.search.SearchRequestor#enterParticipant(org.eclipse.jdt.core.search.SearchParticipant)
- */
- public void enterParticipant(SearchParticipant participant) {
-
- if (DEBUG)
- System.out.println("JSP Search requestor: enterParticipant()"); //$NON-NLS-1$
- }
-
- /**
- * @see org.eclipse.jdt.core.search.SearchRequestor#exitParticipant(org.eclipse.jdt.core.search.SearchParticipant)
- */
- public void exitParticipant(SearchParticipant participant) {
-
- if (DEBUG)
- System.out.println("JSP Search requestor: exitParticipant()"); //$NON-NLS-1$
- }
-
- /**
- * For debug.
- * @param origMatch
- * @param jspStart
- * @param jspEnd
- * @param jspText
- * @param javaText
- */
- private void displayDebugInfo(SearchMatch origMatch, int jspStart, int jspEnd, String jspText, String javaText) {
-
- if (origMatch == null || jspStart == -1 || jspEnd == -1 || jspEnd < jspStart || jspText == null || javaText == null)
- return;
-
- System.out.println("+-----------------------------------------+"); //$NON-NLS-1$
- System.out.println("accept possible match [jspDoc: " + origMatch.getResource().getFullPath().toOSString() + " " + origMatch.getOffset() + ":" + origMatch.getOffset() + origMatch.getLength() + "]?"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- System.out.println("match info:"); //$NON-NLS-1$
- System.out.println("the java text is:" + javaText.substring(origMatch.getOffset(), origMatch.getOffset() + origMatch.getLength())); //$NON-NLS-1$
- System.out.println("java search match translates to jsp coords [start: " + jspStart + " end:" + jspEnd + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- System.out.println(" the jsp text is:" + jspText.substring(jspStart, jspEnd)); //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesActionDelegate.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesActionDelegate.java
deleted file mode 100644
index 8897deb294..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesActionDelegate.java
+++ /dev/null
@@ -1,37 +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.ui.internal.java.search;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.wst.html.ui.internal.search.HTMLFindOccurrencesProcessor;
-import org.eclipse.wst.sse.ui.internal.search.FindOccurrencesActionDelegate;
-
-/**
- * Sets up FindOccurrencesActionDelegate for jsp find occurrences processors
- */
-public class JSPFindOccurrencesActionDelegate extends FindOccurrencesActionDelegate {
- private List fProcessors;
-
- protected List getProcessors() {
- if (fProcessors == null) {
- fProcessors = new ArrayList();
- HTMLFindOccurrencesProcessor htmlProcessor = new HTMLFindOccurrencesProcessor();
- fProcessors.add(htmlProcessor);
- JSPFindOccurrencesProcessor jspProcessor = new JSPFindOccurrencesProcessor();
- fProcessors.add(jspProcessor);
- }
- return fProcessors;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesProcessor.java
deleted file mode 100644
index 50fff8f4d8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPFindOccurrencesProcessor.java
+++ /dev/null
@@ -1,124 +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.ui.internal.java.search;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITextSelection;
-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.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.core.text.IJSPPartitions;
-import org.eclipse.search.ui.ISearchQuery;
-import org.eclipse.search.ui.NewSearchUI;
-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.ui.internal.search.FindOccurrencesProcessor;
-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.regions.DOMRegionContext;
-
-/**
- * Configures a FindOccurrencesProcessor with JSP partitions and regions
- */
-public class JSPFindOccurrencesProcessor extends FindOccurrencesProcessor {
-
- public boolean findOccurrences(IDocument document, ITextSelection textSelection, IFile file) {
- boolean findOccurrences = false;
-
- // determine if action should be enabled or not
- if (document instanceof IStructuredDocument) {
- IStructuredDocument structuredDocument = (IStructuredDocument) document;
- IStructuredDocumentRegion sdRegion = structuredDocument.getRegionAtCharacterOffset(textSelection.getOffset());
- if (sdRegion != null) {
- ITextRegion r = sdRegion.getRegionAtCharacterOffset(textSelection.getOffset());
- if (r != null) {
- String type = r.getType();
- if (enabledForRegionType(type)) {
- String matchText = sdRegion.getText(r);
-
- if (matchText != null && type != null) {
- JSPSearchQuery searchQuery = (JSPSearchQuery) getSearchQuery(file, structuredDocument, matchText, type, textSelection);
- findOccurrences = true;
- if (searchQuery != null) {
- if(searchQuery.getSearchText() == null || searchQuery.getSearchText().length() == 0)
- findOccurrences = false;
- else
- {
- // first of all activate the view
- NewSearchUI.activateSearchResultView();
-
- if (searchQuery.canRunInBackground())
- NewSearchUI.runQueryInBackground(searchQuery);
- else
- NewSearchUI.runQueryInForeground(null, searchQuery);
- }
- }
- }
- }
- }
- }
- }
- return findOccurrences;
- }
-
- protected String[] getPartitionTypes() {
- return new String[]{IJSPPartitions.JSP_DEFAULT, IJSPPartitions.JSP_CONTENT_JAVA};
- }
-
- protected String[] getRegionTypes() {
- return new String[]{DOMRegionContext.BLOCK_TEXT, DOMJSPRegionContexts.JSP_CONTENT};
- }
-
- protected ISearchQuery getSearchQuery(IFile file, IStructuredDocument document, String regionText, String regionType, ITextSelection textSelection) {
- return new JSPSearchQuery(file, getJavaElement(document, textSelection));
- }
-
- private IJavaElement getJavaElement(IDocument document, ITextSelection textSelection) {
- IJavaElement[] elements = getJavaElementsForCurrentSelection(document, textSelection);
- return elements.length > 0 ? elements[0] : null;
- }
-
- /**
- * uses JSPTranslation to get currently selected Java elements.
- *
- * @return currently selected IJavaElements
- */
- private IJavaElement[] getJavaElementsForCurrentSelection(IDocument document, ITextSelection selection) {
- IJavaElement[] elements = new IJavaElement[0];
- // get JSP translation object for this viewer's document
- IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- try {
- if (model != null && model instanceof IDOMModel) {
- IDOMDocument xmlDoc = ((IDOMModel) model).getDocument();
- JSPTranslationAdapter adapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
- if (adapter != null) {
- JSPTranslation translation = adapter.getJSPTranslation();
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=102211
- elements = translation.getElementsFromJspRange(selection.getOffset(), selection.getOffset() + selection.getLength());
- }
- }
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- return elements;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPOccurrencesSearchResult.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPOccurrencesSearchResult.java
deleted file mode 100644
index e39e4beae8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPOccurrencesSearchResult.java
+++ /dev/null
@@ -1,29 +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.ui.internal.java.search;
-
-import org.eclipse.search.ui.ISearchQuery;
-import org.eclipse.search.ui.text.Match;
-import org.eclipse.wst.sse.ui.internal.search.OccurrencesSearchResult;
-
-/**
- * @author pavery
- */
-public class JSPOccurrencesSearchResult extends OccurrencesSearchResult {
-
- public JSPOccurrencesSearchResult(ISearchQuery query) {
- super(query);
- }
-
- public Match[] getMatches() {
- return super.getMatches();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchQuery.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchQuery.java
deleted file mode 100644
index 76399eb11a..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchQuery.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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.ui.internal.java.search;
-
-import java.text.MessageFormat;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.search.SearchDocument;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.wst.sse.ui.internal.search.BasicSearchQuery;
-
-/**
- * Implementation of <code>ISearchQuery</code> for <code>IJavaElement</code>s in JSP files.
- *
- * @author pavery
- */
-public class JSPSearchQuery extends BasicSearchQuery {
-
- /** the IJavaElement we are searching for in the file **/
- private IJavaElement fElement = null;
-
- public JSPSearchQuery(IFile file, IJavaElement element) {
- super(file);
- super.setResult(new JSPOccurrencesSearchResult(this));
- this.fElement = element;
- }
-
- public IJavaElement getJavaElement() {
- return this.fElement;
- }
-
- // for access by inner class
- public JSPSearchQuery getInstance() {
- return this;
- }
-
- protected IStatus doQuery(IProgressMonitor monitor) {
- IStatus status = Status.OK_STATUS;
- try {
- JSPSearchSupport support = JSPSearchSupport.getInstance();
- // index the file
- SearchDocument delegate = support.addJspFile(getFile());
-
- String scopePath = delegate.getPath();
- JSPSearchScope singleFileScope = new JSPSearchScope(new String[]{getFile().getFullPath().toString(), scopePath});
-
- // perform a searchs
- // by passing in this jsp search query, requstor can add matches
- support.searchRunnable(getJavaElement(), singleFileScope, new JSPSingleFileSearchRequestor(getInstance()), monitor);
- }
- catch (Exception e){
- status = new Status(IStatus.ERROR, "org.eclipse.wst.sse.ui", IStatus.OK, "", null); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return status;
- }
-
- /**
- * @see org.eclipse.search.ui.ISearchQuery#getLabel()
- */
- public String getLabel() {
- String label = JSPUIMessages.OccurrencesSearchQuery_0; //$NON-NLS-1$
- String[] args = {getSearchText(), "" + super.getMatchCount(), getFilename()};
- return MessageFormat.format(label, args);
- }
-
- private String getFilename() {
- String filename = JSPUIMessages.OccurrencesSearchQuery_2;
- if(getFile() != null)
- filename = getFile().getName();
- return filename;
- }
-
- protected String getSearchText() {
- if(fElement != null)
- return fElement.getElementName();
- return "";
- }
-
- public boolean canRerun() {
-
- return false;
- }
-
- /**
- * @see org.eclipse.search.ui.ISearchQuery#canRunInBackground()
- */
- public boolean canRunInBackground() {
- return true;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchRequestor.java
deleted file mode 100644
index 2cb4ae19d2..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSearchRequestor.java
+++ /dev/null
@@ -1,81 +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.ui.internal.java.search;
-
-import java.util.HashMap;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jdt.ui.search.ISearchRequestor;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.search.ui.NewSearchUI;
-import org.eclipse.search.ui.text.Match;
-
-
-/**
- * @author pavery
- */
-public class JSPSearchRequestor extends BasicJSPSearchRequestor {
-
- private ISearchRequestor fJavaRequestor = null;
-
- public JSPSearchRequestor() {
- super();
- }
-
- public JSPSearchRequestor(ISearchRequestor javaRequestor) {
- // need to report matches to javaRequestor
- this.fJavaRequestor = javaRequestor;
- }
-
-
- protected void addSearchMatch(IDocument jspDocument, IFile jspFile, int jspStart, int jspEnd, String jspText) {
-
- if(!jspFile.exists())
- return;
-
- int lineNumber = -1;
- try {
- lineNumber = jspDocument.getLineOfOffset(jspStart);
- } catch (BadLocationException e) {
- Logger.logException("offset: " + Integer.toString(jspStart), e); //$NON-NLS-1$
- }
- createSearchMarker(jspFile, jspStart, jspEnd, lineNumber);
-
- if(this.fJavaRequestor != null) {
- Match match = new Match(jspFile, jspStart, jspEnd - jspStart);
- this.fJavaRequestor.reportMatch(match);
- }
- }
-
- /**
- * @param jspFile
- * @param jspStart
- * @param jspEnd
- */
- private void createSearchMarker(IFile jspFile, int jspStart, int jspEnd, int lineNumber) {
-
- try {
- IMarker marker = jspFile.createMarker(NewSearchUI.SEARCH_MARKER);
- HashMap attributes = new HashMap(4);
- attributes.put(IMarker.CHAR_START, new Integer(jspStart));
- attributes.put(IMarker.CHAR_END, new Integer(jspEnd));
- attributes.put(IMarker.LINE_NUMBER, new Integer(lineNumber));
- marker.setAttributes(attributes);
-
- } catch (CoreException e) {
- Logger.logException(e);
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSingleFileSearchRequestor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSingleFileSearchRequestor.java
deleted file mode 100644
index ce0792bdc2..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/JSPSingleFileSearchRequestor.java
+++ /dev/null
@@ -1,38 +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.jst.jsp.ui.internal.java.search;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.jface.text.IDocument;
-
-
-/**
- * <p>
- * Special requestor that adds search results for single file search
- * (Used for JSPFindOccurrences action).
- * It groups each match as it's own result.
- * </p>
- *
- * @author pavery
- */
-public class JSPSingleFileSearchRequestor extends BasicJSPSearchRequestor {
-
- private JSPSearchQuery fQuery = null;
-
- public JSPSingleFileSearchRequestor(JSPSearchQuery query) {
- this.fQuery = query;
- }
-
- protected void addSearchMatch(IDocument jspDocument, IFile jspFile, int jspStart, int jspEnd, String jspText) {
- // add match to JSP query...
- this.fQuery.addMatch(jspDocument, jspStart, jspEnd);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/ui/JSPMatchPresentation.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/ui/JSPMatchPresentation.java
deleted file mode 100644
index 74b1a26c91..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/ui/JSPMatchPresentation.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.ui.internal.java.search.ui;
-
-import org.eclipse.jdt.ui.search.IMatchPresentation;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.search.ui.text.Match;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.wst.sse.ui.internal.search.BasicSearchLabelProvider;
-
-/**
- * @author pavery
- */
-public class JSPMatchPresentation implements IMatchPresentation {
-
- /**
- * @see org.eclipse.jdt.ui.search.IMatchPresentation#createLabelProvider()
- */
- public ILabelProvider createLabelProvider() {
- return new BasicSearchLabelProvider();
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jdt.ui.search.IMatchPresentation#showMatch(org.eclipse.search.ui.text.Match, int, int, boolean)
- */
- public void showMatch(Match match, int currentOffset, int currentLength, boolean activate) throws PartInitException {
- // pa_TODO implement
-// Object obj = match.getElement();
- // show match in JSP editor
- if(activate) {
- // use show in target?
- }
- else {
- // just select
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/ui/JSPQueryParticipant.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/ui/JSPQueryParticipant.java
deleted file mode 100644
index 1cd9d31a43..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/java/search/ui/JSPQueryParticipant.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.ui.internal.java.search.ui;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.search.SearchPattern;
-import org.eclipse.jdt.core.search.SearchRequestor;
-import org.eclipse.jdt.ui.search.ElementQuerySpecification;
-import org.eclipse.jdt.ui.search.IMatchPresentation;
-import org.eclipse.jdt.ui.search.IQueryParticipant;
-import org.eclipse.jdt.ui.search.ISearchRequestor;
-import org.eclipse.jdt.ui.search.PatternQuerySpecification;
-import org.eclipse.jdt.ui.search.QuerySpecification;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchScope;
-import org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.java.search.JSPSearchRequestor;
-import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
-
-/**
- * @author pavery
- */
-public class JSPQueryParticipant implements IQueryParticipant {
-
- // for debugging
- private 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$
- }
- /**
- * @see org.eclipse.jdt.ui.search.IQueryParticipant#search(org.eclipse.jdt.ui.search.ISearchRequestor, org.eclipse.jdt.ui.search.QuerySpecification, org.eclipse.core.runtime.IProgressMonitor)
- */
- public void search(ISearchRequestor requestor, QuerySpecification querySpecification, IProgressMonitor monitor) throws CoreException {
-
- if(shouldSupplyJSPSearchResultsToJavaSearch()) {
- //indexIfNeeded();
-
- // do search based on the particular Java query
- if(querySpecification instanceof ElementQuerySpecification) {
- // element search (eg. from global find references in Java file)
- ElementQuerySpecification elementQuery = (ElementQuerySpecification)querySpecification;
- IJavaElement element = elementQuery.getElement();
-
- if(DEBUG)
- System.out.println("JSP Query Participant searching on ELEMENT: " + element); //$NON-NLS-1$
-
- SearchRequestor jspRequestor = new JSPSearchRequestor(requestor);
-
- // pa_TODO need to adapt JavaSearchScope to a JSPSearchScope
- JSPSearchSupport.getInstance().search(element, new JSPSearchScope(), jspRequestor, monitor);
-
- }
- else if(querySpecification instanceof PatternQuerySpecification) {
-
- // pattern search (eg. from Java search page)
- PatternQuerySpecification patternQuery = (PatternQuerySpecification)querySpecification;
- String pattern = patternQuery.getPattern();
-
- if(DEBUG)
- System.out.println("JSP Query Participant searching on PATTERN: " + pattern); //$NON-NLS-1$
-
- SearchRequestor jspRequestor = new JSPSearchRequestor(requestor);
-
- JSPSearchSupport.getInstance().search(pattern,
- new JSPSearchScope(),
- patternQuery.getSearchFor(),
- patternQuery.getLimitTo(),
- SearchPattern.R_PATTERN_MATCH,
- false,
- jspRequestor,
- monitor);
- }
- }
- }
-
- /**
- * @see org.eclipse.jdt.ui.search.IQueryParticipant#estimateTicks(org.eclipse.jdt.ui.search.QuerySpecification)
- */
- public int estimateTicks(QuerySpecification data) {
- // pa_TODO use project file counter from JSPSearchSupport...
- return 0;
- }
-
- /**
- * @see org.eclipse.jdt.ui.search.IQueryParticipant#getUIParticipant()
- */
- public IMatchPresentation getUIParticipant() {
- return new JSPMatchPresentation();
- }
-
- private boolean shouldSupplyJSPSearchResultsToJavaSearch() {
- return JSPUIPlugin.getDefault().getPreferenceStore().getBoolean(JSPUIPreferenceNames.SUPPLY_JSP_SEARCH_RESULTS_TO_JAVA_SEARCH);
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPCompletionProposalCategoriesConfiguration.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPCompletionProposalCategoriesConfiguration.java
deleted file mode 100644
index 24b57c4dea..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPCompletionProposalCategoriesConfiguration.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.preferences;
-/*******************************************************************************
- * Copyright (c) 2010 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
- *******************************************************************************/
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.wst.sse.ui.preferences.AbstractCompletionProposalCategoriesConfiguration;
-
-/**
- * <p>The readable and writable completion proposal categories configuration
- * for the JSP content type</p>
- */
-public class JSPCompletionProposalCategoriesConfiguration extends AbstractCompletionProposalCategoriesConfiguration {
-
- /** the ID of the preference page where users can change the preferences */
- private static final String PREFERENCES_PAGE_ID = "org.eclipse.wst.sse.ui.preferences.jsp.contentassist"; //$NON-NLS-1$
-
- /**
- * <p>Creates the configuration</p>
- */
- public JSPCompletionProposalCategoriesConfiguration() {
- //nothing to do.
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.preferences.AbstractCompletionProposalCategoriesConfiguration#getPreferenceStore()
- */
- protected IPreferenceStore getPreferenceStore() {
- return JSPUIPlugin.getDefault().getPreferenceStore();
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter#hasAssociatedPropertiesPage()
- */
- public boolean hasAssociatedPropertiesPage() {
- return true;
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter#getPropertiesPageID()
- */
- public String getPropertiesPageID() {
- return PREFERENCES_PAGE_ID;
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.preferences.AbstractCompletionProposalCategoriesConfiguration#getShouldNotDisplayOnDefaultPagePrefKey()
- */
- protected String getShouldNotDisplayOnDefaultPagePrefKey() {
- return JSPUIPreferenceNames.CONTENT_ASSIST_DO_NOT_DISPLAY_ON_DEFAULT_PAGE;
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.preferences.AbstractCompletionProposalCategoriesConfiguration#getShouldNotDisplayOnOwnPagePrefKey()
- */
- protected String getShouldNotDisplayOnOwnPagePrefKey() {
- return JSPUIPreferenceNames.CONTENT_ASSIST_DO_NOT_DISPLAY_ON_OWN_PAGE;
- }
-
- protected String getPageSortOrderPrefKey() {
- return JSPUIPreferenceNames.CONTENT_ASSIST_OWN_PAGE_SORT_ORDER;
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.preferences.AbstractCompletionProposalCategoriesConfiguration#getDefaultPageSortOrderPrefKey()
- */
- protected String getDefaultPageSortOrderPrefKey() {
- return JSPUIPreferenceNames.CONTENT_ASSIST_DEFAULT_PAGE_SORT_ORDER;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceInitializer.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceInitializer.java
deleted file mode 100644
index 286616a333..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceInitializer.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 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.ui.internal.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ColorRegistry;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.style.IStyleConstantsJSP;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.html.ui.internal.style.IStyleConstantsHTML;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.ColorHelper;
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-
-/**
- * Sets default values for JSP UI preferences
- */
-public class JSPUIPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore store = JSPUIPlugin.getDefault().getPreferenceStore();
- ColorRegistry registry = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getColorRegistry();
-
- // setting the same as HTML
- store.setDefault(JSPUIPreferenceNames.AUTO_PROPOSE, true);
- store.setDefault(JSPUIPreferenceNames.AUTO_PROPOSE_CODE, "<=");//$NON-NLS-1$
-
- // JSP Style Preferences
- String NOBACKGROUNDBOLD = " | null | false"; //$NON-NLS-1$
- String JUSTITALIC = " | null | false | true"; //$NON-NLS-1$
- String styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.TAG_ATTRIBUTE_NAME, 127, 0, 127) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.TAG_ATTRIBUTE_NAME, styleValue);
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.TAG_ATTRIBUTE_VALUE, 42, 0, 255) + JUSTITALIC;
- store.setDefault(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE, styleValue);
-
- styleValue = "null" + NOBACKGROUNDBOLD; //$NON-NLS-1$
-
- // specified value is black; leaving as widget default
- store.setDefault(IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS, styleValue);
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.COMMENT_BORDER, 63, 95, 191) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.COMMENT_BORDER, styleValue);
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.COMMENT_TEXT, 63, 95, 191) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.COMMENT_TEXT, styleValue);
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.TAG_BORDER, 0, 128, 128) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.TAG_BORDER, styleValue);
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsXML.TAG_NAME, 63, 127, 127) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsXML.TAG_NAME, styleValue);
-
- styleValue = ColorHelper.findRGBString(registry, IStyleConstantsHTML.SCRIPT_AREA_BORDER, 191, 95, 63) + NOBACKGROUNDBOLD;
- store.setDefault(IStyleConstantsHTML.SCRIPT_AREA_BORDER, styleValue);
-
- styleValue = "null" + NOBACKGROUNDBOLD; //$NON-NLS-1$
- store.setDefault(IStyleConstantsJSP.JSP_CONTENT, styleValue);
-
- // set default new jsp file template to use in new file wizard
- /*
- * Need to find template name that goes with default template id (name
- * may change for different language)
- */
- store.setDefault(JSPUIPreferenceNames.NEW_FILE_TEMPLATE_ID, "org.eclipse.jst.jsp.ui.templates.jsphtml"); //$NON-NLS-1$
-
- // set default new jsp tag file template to use in new tag file wizard
- store.setDefault(JSPUIPreferenceNames.NEW_TAG_FILE_TEMPLATE_ID, "org.eclipse.jst.jsp.ui.templates.simpletag"); //$NON-NLS-1$
-
- store.setDefault(JSPUIPreferenceNames.TYPING_COMPLETE_EL_BRACES, true);
- store.setDefault(JSPUIPreferenceNames.TYPING_COMPLETE_SCRIPTLETS, true);
- store.setDefault(JSPUIPreferenceNames.TYPING_COMPLETE_COMMENTS, true);
- store.setDefault(JSPUIPreferenceNames.SUPPLY_JSP_SEARCH_RESULTS_TO_JAVA_SEARCH, true);
- store.setDefault(JSPUIPreferenceNames.TYPING_CLOSE_STRINGS, true);
- store.setDefault(JSPUIPreferenceNames.TYPING_CLOSE_BRACKETS, true);
-
- // Defaults for Content Assist preference page
- store.setDefault(JSPUIPreferenceNames.CONTENT_ASSIST_DO_NOT_DISPLAY_ON_DEFAULT_PAGE, "");
- store.setDefault(JSPUIPreferenceNames.CONTENT_ASSIST_DO_NOT_DISPLAY_ON_OWN_PAGE, "");
- store.setDefault(JSPUIPreferenceNames.CONTENT_ASSIST_DEFAULT_PAGE_SORT_ORDER,
- "org.eclipse.wst.html.ui.proposalCategory.htmlTags\0" +
- "org.eclipse.wst.xml.ui.proposalCategory.xmlTags\0" +
- "org.eclipse.wst.css.ui.proposalCategory.css\0" +
- "org.eclipse.jst.jsp.ui.proposalCategory.jsp\0" +
- "org.eclipse.jst.jsp.ui.proposalCategory.jspJava\0" +
- "org.eclipse.jst.jsp.ui.proposalCategory.jspTemplates\0" +
- "org.eclipse.wst.html.ui.proposalCategory.htmlTemplates\0" +
- "org.eclipse.wst.xml.ui.proposalCategory.xmlTemplates\0" +
- "org.eclipse.wst.css.ui.proposalCategory.cssTemplates");
- store.setDefault(JSPUIPreferenceNames.CONTENT_ASSIST_OWN_PAGE_SORT_ORDER,
- "org.eclipse.jst.jsp.ui.proposalCategory.jspTemplates\0" +
- "org.eclipse.wst.html.ui.proposalCategory.htmlTemplates\0" +
- "org.eclipse.wst.xml.ui.proposalCategory.xmlTemplates\0" +
- "org.eclipse.wst.css.ui.proposalCategory.cssTemplates\0" +
- "org.eclipse.wst.html.ui.proposalCategory.htmlTags\0" +
- "org.eclipse.wst.xml.ui.proposalCategory.xmlTags\0" +
- "org.eclipse.jst.jsp.ui.proposalCategory.jsp\0" +
- "org.eclipse.jst.jsp.ui.proposalCategory.jspJava\0" +
- "org.eclipse.wst.css.ui.proposalCategory.css");
- store.setDefault(JSPUIPreferenceNames.AUTO_IMPORT_INSERT, true);
- store.setDefault(JSPUIPreferenceNames.INSERT_SINGLE_SUGGESTION, true);
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceNames.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceNames.java
deleted file mode 100644
index 6586d4e9fc..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/JSPUIPreferenceNames.java
+++ /dev/null
@@ -1,187 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2012 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.ui.internal.preferences;
-
-/**
- * Preference keys for JSP UI
- */
-public class JSPUIPreferenceNames {
- /**
- * A named preference that controls if code assist gets auto activated.
- * <p>
- * Value is of type <code>Boolean</code>.
- * </p>
- */
- public static final String AUTO_PROPOSE = getAutoProposeKey();
-
- private static String getAutoProposeKey() {
- return "autoPropose";//$NON-NLS-1$
- }
-
- /**
- * A named preference that holds the characters that auto activate code
- * assist.
- * <p>
- * Value is of type <code>String</code>. All characters that trigger
- * auto code assist.
- * </p>
- */
- public static final String AUTO_PROPOSE_CODE = getAutoProposeCodeKey();
-
- private static String getAutoProposeCodeKey() {
- return "autoProposeCode";//$NON-NLS-1$
- }
-
- /**
- * The key to store customized templates.
- * <p>
- * Value is of type <code>String</code>.
- * </p>
- */
- public static final String TEMPLATES_KEY = getTemplatesKey();
-
- private static String getTemplatesKey() {
- return "org.eclipse.wst.sse.ui.custom_templates"; //$NON-NLS-1$
- }
-
- /**
- * The key to store the last template name used in new JSP file wizard.
- * Template name is stored instead of template id because user-created
- * templates do not have template ids.
- * <p>
- * Value is of type <code>String</code>.
- * </p>
- */
- public static final String NEW_FILE_TEMPLATE_NAME = "newFileTemplateName"; //$NON-NLS-1$
-
- /**
- * The initial template ID to be used in the new JSP file wizard. In the absence
- * of {@link NEW_FILE_TEMPLATE_NAME}, this ID is used to find a template name
- */
- public static final String NEW_FILE_TEMPLATE_ID = "newFileTemplateId"; //$NON-NLS-1$
-
- /**
- * The key to store the last template name used in new JSP Tag file wizard.
- * Template name is stored instead of template id because user-created
- * templates do not have template ids.
- * <p>
- * Value is of type <code>String</code>.
- * </p>
- */
- public static final String NEW_TAG_FILE_TEMPLATE_NAME = "newTagFileTemplateName"; //$NON-NLS-1$
-
- /**
- * The initial template ID to be used in the new JSP file wizard. In the absence
- * of {@link NEW_FILE_TEMPLATE_NAME}, this ID is used to find a template name
- */
- public static final String NEW_TAG_FILE_TEMPLATE_ID = "newTagFileTemplateId"; //$NON-NLS-1$
-
- /**
- * The key to store the option for auto-completing EL braces after entering
- * <code>${</code>
- * <p>
- * Value is of type <code>boolean</code>.
- * </p>
- */
- public static final String TYPING_COMPLETE_EL_BRACES = "typingCompleteElBraces"; //$NON-NLS-1$
-
- /**
- * The key to store the option for auto-completing scriptlets after entering
- * <code>&lt;%</code>
- * <p>
- * Value is of type <code>boolean</code>.
- * </p>
- */
- public static final String TYPING_COMPLETE_SCRIPTLETS = "typingCompleteScriptlets"; //$NON-NLS-1$
-
- /**
- * The key to store the option for auto-completing JSP comments after entering
- * <code>&lt;%--</code>
- * <p>
- * Value is of type <code>boolean</code>.
- * </p>
- */
- public static final String TYPING_COMPLETE_COMMENTS = "typingCompleteComments"; //$NON-NLS-1$
-
- /**
- * The key to store the option for auto-completing strings (" and ') while
- * typing.
- * <p>
- * Value is of type <code>boolean</code>.
- * </p>
- */
- public static final String TYPING_CLOSE_STRINGS = "closeStrings"; //$NON-NLS-1$
-
- /**
- * The key to store the option for auto-completing brackets ([ and () while
- * typing.
- * <p>
- * Value is of type <code>boolean</code>.
- * </p>
- */
- public static final String TYPING_CLOSE_BRACKETS = "closeBrackets"; //$NON-NLS-1$
-
- public static final String SUPPLY_JSP_SEARCH_RESULTS_TO_JAVA_SEARCH = "supplyJSPSearchResultsToJavaSearch"; //$NON-NLS-1$
-
- /**
- * <p>preference key used for saving which categories should not display on the default page</p>
- *
- * <p>Value is of type {@link String} consisting of
- * <tt>org.eclipse.wst.sse.ui.completionProposal/proposalCategory/@id</tt>s separated by the null
- * character (<tt>\0</tt>), ordered is ignored</p>
- */
- public static final String CONTENT_ASSIST_DO_NOT_DISPLAY_ON_DEFAULT_PAGE = "jsp_content_assist_display_on_default_page"; //$NON-NLS-1$
-
- /**
- * <p>preference key used for saving which categories should not display on their own page</p>
- *
- * <p>Value is of type {@link String} consisting of
- * <tt>org.eclipse.wst.sse.ui.completionProposal/proposalCategory/@id</tt>s separated by the null
- * character (<tt>\0</tt>), order is ignored</p>
- */
- public static final String CONTENT_ASSIST_DO_NOT_DISPLAY_ON_OWN_PAGE = "jsp_content_assist_display_on_own_page"; //$NON-NLS-1$
-
- /**
- * <p>preference key for saving the sort order of the categories when displaying them on their own page</p>
- *
- * <p>Value is of type {@link String} consisting of
- * <tt>org.eclipse.wst.sse.ui.completionProposal/proposalCategory/@id</tt>s separated by the null
- * character (<tt>\0</tt>) in the desired sort order.</p>
- */
- public static final String CONTENT_ASSIST_OWN_PAGE_SORT_ORDER= "jsp_content_assist_own_page_sort_order"; //$NON-NLS-1$
-
- /**
- * <p>preference key for saving the sort order of the categories when displaying them on the default page</p>
- *
- * <p>Value is of type {@link String} consisting of
- * <tt>org.eclipse.wst.sse.ui.completionProposal/proposalCategory/@id</tt>s separated by the null
- * character (<tt>\0</tt>) in the desired sort order.</p>
- */
- public static final String CONTENT_ASSIST_DEFAULT_PAGE_SORT_ORDER= "jsp_content_assist_default_page_sort_order"; //$NON-NLS-1$
-
- /**
- * <p>preference key to store the option for auto insertion of page imports</p>
- *
- * <p>
- * Value is of type <code>boolean</code>.
- * </p>
- */
- public static final String AUTO_IMPORT_INSERT = "autoImportinsertion"; //$NON-NLS-1$
-
- /**
- * <p>preference key to store the option for auto insertion of single suggestions</p>
- * <p>
- * Value is of type <code>boolean</code>
- * </p>
- */
- public static final String INSERT_SINGLE_SUGGESTION = "insertSingleSuggestion"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/AbstractPropertyPreferencePage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/AbstractPropertyPreferencePage.java
deleted file mode 100644
index 3d9615bfce..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/AbstractPropertyPreferencePage.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2010 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.ui.internal.preferences.ui;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.dialogs.ControlEnableState;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.dialogs.ListDialog;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.ui.dialogs.PropertyPage;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-import org.eclipse.ui.views.navigator.ResourceSorter;
-import org.eclipse.wst.sse.ui.internal.SSEUIMessages;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-
-/**
- * Based loosely on org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage
- */
-abstract class AbstractPropertyPreferencePage extends PropertyPage implements IWorkbenchPreferencePage {
- private static final boolean _debugPreferences = "true".equalsIgnoreCase(Platform.getDebugOption("org.eclipse.wst.sse.ui/preferences-properties")); //$NON-NLS-1$ //$NON-NLS-2$
- /*
- * Disable link data, prevents the display of a "workspace" or "project"
- * settings link to prevent recursive dialog launching
- */
- private static final Object DISABLE_LINK = "DISABLE_LINK"; //$NON-NLS-1$
-
- private Map fData = null;
-
- private Button fEnableProjectSettings;
-
- private Link fProjectSettingsLink;
-
- private Control fCommon;
-
- private ControlEnableState fEnablements;
-
- public AbstractPropertyPreferencePage() {
- super();
- }
-
- public final void applyData(Object data) {
- super.applyData(data);
- if (data instanceof Map) {
- fData = (Map) data;
- updateLinkEnablement();
- }
- }
-
- protected abstract Control createCommonContents(Composite composite);
-
- public final Control createContents(Composite parent) {
- Composite composite = new Composite(parent, SWT.NULL);
-
- GridLayout layout = new GridLayout();
- composite.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- composite.setLayoutData(data);
-
- Composite checkLinkComposite = new Composite(composite, SWT.NONE);
- checkLinkComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- checkLinkComposite.setLayout(new GridLayout(2, false));
-
- if (getProject() != null) {
- fEnableProjectSettings = new Button(checkLinkComposite, SWT.CHECK);
- fEnableProjectSettings.setText(SSEUIMessages.EnableProjectSettings);
- fEnableProjectSettings.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false));
- boolean enabledForProject = createPreferenceScopes()[0].getNode(getPreferenceNodeQualifier()).getBoolean(getProjectSettingsKey(), false);
- fEnableProjectSettings.setSelection(enabledForProject);
- }
- else {
- Label spacer = new Label(checkLinkComposite, SWT.CHECK);
- spacer.setLayoutData(new GridData());
- }
-
- fProjectSettingsLink = new Link(checkLinkComposite, SWT.NONE);
- fProjectSettingsLink.setLayoutData(new GridData(SWT.END, SWT.BEGINNING, true, false));
-
- /*
- * "element" should be a project, if null, link to per-project
- * properties
- */
- if (getProject() != null) {
- fProjectSettingsLink.setText("<a>" + SSEUIMessages.ConfigureWorkspaceSettings + "</a>"); //$NON-NLS-1$//$NON-NLS-2$
- }
- else {
- fProjectSettingsLink.setText("<a>" + SSEUIMessages.ConfigureProjectSettings + "</a>"); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- updateLinkEnablement();
-
- fProjectSettingsLink.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- widgetSelected(e);
- }
-
- public void widgetSelected(SelectionEvent e) {
- if (getProject() == null) {
- openProjectSettings();
- }
- else {
- openWorkspaceSettings();
- }
- }
-
- });
-
- if (getProject() != null) {
- Label line = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);
- line.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
- }
-
-// final Control common = createCommonContents(composite);
- fCommon = createCommonContents(composite);
-
- fCommon.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- if (fEnableProjectSettings != null) {
- SelectionAdapter selectionAdapter = new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- super.widgetSelected(e);
- enablePreferenceContent(fEnableProjectSettings.getSelection());
- }
- };
- selectionAdapter.widgetSelected(null);
- fEnableProjectSettings.addSelectionListener(selectionAdapter);
- }
-
- applyDialogFont(composite);
- return composite;
- }
-
- protected IScopeContext[] createPreferenceScopes() {
- IProject project = getProject();
- if (project != null) {
- return new IScopeContext[]{new ProjectScope(project), new InstanceScope(), new DefaultScope()};
- }
- return new IScopeContext[]{new InstanceScope(), new DefaultScope()};
- }
-
- protected abstract String getPreferenceNodeQualifier();
-
- protected abstract String getPreferencePageID();
-
- protected IProject getProject() {
- if (getElement() != null) {
- if (getElement() instanceof IProject) {
- return (IProject) getElement();
- }
- Object adapter = getElement().getAdapter(IProject.class);
- if (adapter instanceof IProject) {
- return (IProject) adapter;
- }
- adapter = getElement().getAdapter(IResource.class);
- if (adapter instanceof IProject) {
- return (IProject) adapter;
- }
- }
- return null;
- }
-
- protected abstract String getProjectSettingsKey();
-
- protected abstract String getPropertyPageID();
-
- protected boolean isElementSettingsEnabled() {
- return fEnableProjectSettings != null && fEnableProjectSettings.getSelection();
- }
-
- void openProjectSettings() {
- ListDialog dialog = new ListDialog(getShell()) {
-
- protected Control createDialogArea(Composite container) {
- Control area = super.createDialogArea(container);
- getTableViewer().setSorter(new ResourceSorter(ResourceSorter.NAME));
- return area;
- }
- };
- dialog.setMessage(SSEUIMessages.PropertyPreferencePage_02);
- dialog.setContentProvider(new IStructuredContentProvider() {
- public void dispose() {
- }
-
- public Object[] getElements(Object inputElement) {
- return ((IWorkspace) inputElement).getRoot().getProjects();
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- });
- dialog.setLabelProvider(new DecoratingLabelProvider(new WorkbenchLabelProvider(), SSEUIPlugin.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator()));
- dialog.setInput(ResourcesPlugin.getWorkspace());
- dialog.setTitle(SSEUIMessages.PropertyPreferencePage_01);
- if (dialog.open() == Window.OK) {
- Object[] result = dialog.getResult();
- if (result.length > 0) {
- IProject project = (IProject) dialog.getResult()[0];
- Map data = new HashMap();
- data.put(DISABLE_LINK, Boolean.TRUE);
- PreferencesUtil.createPropertyDialogOn(getShell(), project, getPropertyPageID(), new String[]{getPropertyPageID()}, data).open();
- }
- }
- }
-
- void openWorkspaceSettings() {
- Map data = new HashMap();
- data.put(DISABLE_LINK, Boolean.TRUE);
- PreferencesUtil.createPreferenceDialogOn(getShell(), getPreferencePageID(), new String[]{getPreferencePageID()}, data).open();
- }
-
- public boolean performOk() {
- boolean ok = super.performOk();
- IScopeContext[] preferenceScopes = createPreferenceScopes();
- if (getProject() != null) {
- if (isElementSettingsEnabled()) {
- if (_debugPreferences) {
- System.out.println(getClass().getName() + " setting " + getProjectSettingsKey() + " (" + true + ") in scope " + preferenceScopes[0].getName() + ":" + preferenceScopes[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
- preferenceScopes[0].getNode(getPreferenceNodeQualifier()).putBoolean(getProjectSettingsKey(), fEnableProjectSettings.getSelection());
- }
- else {
- if (_debugPreferences) {
- System.out.println(getClass().getName() + " removing " + getProjectSettingsKey() + " from scope " + preferenceScopes[0].getName() + ":" + preferenceScopes[0].getLocation()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- preferenceScopes[0].getNode(getPreferenceNodeQualifier()).remove(getProjectSettingsKey());
- }
- }
- return ok;
- }
-
- protected void performDefaults() {
- if(getProject() != null && fEnableProjectSettings != null) {
- fEnableProjectSettings.setSelection(false);
- enablePreferenceContent(false);
- }
- super.performDefaults();
- }
-
- private void updateLinkEnablement() {
- if (fData != null && fProjectSettingsLink != null) {
- fProjectSettingsLink.setEnabled(!Boolean.TRUE.equals(fData.get(DISABLE_LINK)));
- }
- }
-
- /**
- * Controls the enablement of the common content region
- * of a property or preference page
- *
- * @param enable the enabled state of the common content
- * area
- */
- protected void enablePreferenceContent(boolean enable) {
- if(enable) {
- if(fEnablements != null) {
- fEnablements.restore();
- fEnablements = null;
- }
- }
- else {
- if(fEnablements == null)
- fEnablements = ControlEnableState.disable(fCommon);
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPColorPage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPColorPage.java
deleted file mode 100644
index 2dd5a4c75b..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPColorPage.java
+++ /dev/null
@@ -1,170 +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.ui.internal.preferences.ui;
-
-import java.util.ArrayList;
-import java.util.Dictionary;
-import java.util.Hashtable;
-import java.util.Iterator;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.editor.IHelpContextIds;
-import org.eclipse.jst.jsp.ui.internal.style.IStyleConstantsJSP;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.html.ui.internal.style.IStyleConstantsHTML;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
-import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore.OverlayKey;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.StyledTextColorPicker;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.preferences.XMLColorPage;
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-
-/**
- * @deprecated
- */
-public class JSPColorPage extends XMLColorPage {
-
- /**
- * Overridden to set up StyledTextColorPicker differently
- */
- protected void createContentsForPicker(Composite parent) {
- // create the color picker
- fPicker = new JSPStyledTextColorPicker(parent, SWT.NULL);
- GridData data = new GridData(GridData.FILL_BOTH);
- fPicker.setLayoutData(data);
-
- fPicker.setPreferenceStore(fOverlayStore);
- setupPicker(fPicker);
-
- fPicker.setText(getSampleText());
- }
-
- /**
- * Set up all the style preference keys in the overlay store
- */
- protected OverlayKey[] createOverlayStoreKeys() {
- ArrayList overlayKeys = new ArrayList();
-
- ArrayList styleList = new ArrayList();
- initStyleList(styleList);
- Iterator i = styleList.iterator();
- while (i.hasNext()) {
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, (String)i.next()));
- }
-
- OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
- overlayKeys.toArray(keys);
- return keys;
- }
-
- public String getSampleText() {
- return JSPUIMessages.Sample_JSP_doc; //$NON-NLS-1$ = "<%@ page \n\tlanguage=\"java\" \n\tcontentType=\"text/html; charset=ISO-8859-1\"\n%>\n<jsp:include flush=\"true\" page=\"titleBar.jsp\"/>\n\n<%-- Use below tags ONLY for JSP 1.1 --%>\n<%\n\tSystem.out.println(\"Welcome!\");\n%>\n<%-- Use below tags ONLY for JSP 1.2 --%>\n<jsp:scriptlet>\n\tSystem.out.println(\"Welcome!\");\n</jsp:scriptlet>"
- }
-
- protected void initContextStyleMap(Dictionary contextStyleMap) {
-
- initCommonContextStyleMap(contextStyleMap);
- contextStyleMap.remove(DOMRegionContext.XML_CONTENT); // leave content between tags alone
- contextStyleMap.remove(DOMRegionContext.XML_DECLARATION_OPEN); // xml/html specific
- contextStyleMap.remove(DOMRegionContext.XML_DECLARATION_CLOSE); // xml/html specific
- contextStyleMap.remove(DOMRegionContext.XML_ELEMENT_DECLARATION); // xml/html specific
- contextStyleMap.remove(DOMRegionContext.XML_ELEMENT_DECL_CLOSE); // xml/html specific
-
- // contextStyleMap.put(XMLJSPRegionContexts.JSP_CONTENT, HTMLColorManager.SCRIPT_AREA);
- // contextStyleMap.put(XMLJSPRegionContexts.BLOCK_TEXT, HTMLColorManager.SCRIPT_AREA);
- contextStyleMap.put(DOMJSPRegionContexts.JSP_DECLARATION_OPEN, IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- contextStyleMap.put(DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN, IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- contextStyleMap.put(DOMJSPRegionContexts.JSP_EXPRESSION_OPEN, IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- contextStyleMap.put(DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN, IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- contextStyleMap.put(DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE, IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- contextStyleMap.put(DOMJSPRegionContexts.JSP_CLOSE, IStyleConstantsHTML.SCRIPT_AREA_BORDER);
-
- contextStyleMap.put(DOMJSPRegionContexts.JSP_CONTENT, IStyleConstantsJSP.JSP_CONTENT);
-
- contextStyleMap.put(DOMJSPRegionContexts.JSP_DIRECTIVE_NAME, IStyleConstantsXML.TAG_NAME);
- contextStyleMap.put(DOMJSPRegionContexts.JSP_ROOT_TAG_NAME, IStyleConstantsXML.TAG_NAME);
- contextStyleMap.put(DOMJSPRegionContexts.JSP_COMMENT_OPEN, IStyleConstantsXML.COMMENT_BORDER);
- contextStyleMap.put(DOMJSPRegionContexts.JSP_COMMENT_TEXT, IStyleConstantsXML.COMMENT_TEXT);
- contextStyleMap.put(DOMJSPRegionContexts.JSP_COMMENT_CLOSE, IStyleConstantsXML.COMMENT_BORDER);
-
- contextStyleMap.put(DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_DQUOTE, IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
- contextStyleMap.put(DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_SQUOTE, IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
- }
-
- protected void initDescriptions(Dictionary descriptions) {
- initCommonDescriptions(descriptions);
- descriptions.remove(IStyleConstantsXML.XML_CONTENT); // leave content between tags alone
- descriptions.remove(IStyleConstantsXML.DECL_BORDER); // xml/html specific
- descriptions.put(IStyleConstantsHTML.SCRIPT_AREA_BORDER, JSPUIMessages.JSP_Delimiters_UI_); //$NON-NLS-1$ = "JSP Delimiters"
- descriptions.put(IStyleConstantsJSP.JSP_CONTENT, JSPUIMessages.JSPColorPage_jsp_content);
- }
-
- protected void initStyleList(ArrayList list) {
- initCommonStyleList(list);
- list.remove(IStyleConstantsXML.XML_CONTENT); // leave content between tags alone
- list.remove(IStyleConstantsXML.DECL_BORDER); // xml/html specific
- list.add(IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- list.add(IStyleConstantsJSP.JSP_CONTENT);
- }
-
- protected void setupPicker(StyledTextColorPicker picker) {
- IModelManager mmanager = StructuredModelManager.getModelManager();
- picker.setParser(mmanager.createStructuredDocumentFor(ContentTypeIdForJSP.ContentTypeID_JSP).getParser());
-
- // create descriptions for highlighting types
- Dictionary descriptions = new Hashtable();
- initDescriptions(descriptions);
-
- // map region types to highlighting types
- Dictionary contextStyleMap = new Hashtable();
- initContextStyleMap(contextStyleMap);
-
- ArrayList styleList = new ArrayList();
- initStyleList(styleList);
-
- picker.setContextStyleMap(contextStyleMap);
- picker.setDescriptions(descriptions);
- picker.setStyleList(styleList);
-
- }
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
-
- Control c = super.createContents(parent);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(c, IHelpContextIds.JSP_PREFWEBX_STYLES_HELPID);
- return c;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return JSPUIPlugin.getDefault().getPreferenceStore();
- }
- /* (non-Javadoc)
- * @see org.eclipse.wst.sse.ui.preferences.ui.AbstractColorPage#savePreferences()
- */
- protected void savePreferences() {
- JSPUIPlugin.getDefault().savePluginPreferences();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPContentAssistPreferencePage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPContentAssistPreferencePage.java
deleted file mode 100644
index 3022a0a756..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPContentAssistPreferencePage.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010, 2012 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.ui.internal.preferences.ui;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.wst.sse.ui.internal.Logger;
-import org.eclipse.wst.sse.ui.internal.contentassist.CompletionProposoalCatigoriesConfigurationRegistry;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage;
-import org.eclipse.wst.sse.ui.preferences.CodeAssistCyclingConfigurationBlock;
-import org.eclipse.wst.sse.ui.preferences.ICompletionProposalCategoriesConfigurationWriter;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-
-/**
- * <p>Defines the preference page for allowing the user to change the content
- * assist preferences</p>
- */
-public class JSPContentAssistPreferencePage extends AbstractPreferencePage implements
- IWorkbenchPreferencePage {
-
- private static final String JSP_CONTENT_TYPE_ID = "org.eclipse.jst.jsp.core.jspsource"; //$NON-NLS-1$
-
- /* Checkbox to store Auto Insertion preference */
- private Button fAutoImport;
-
- /** configuration block for changing preference having to do with the content assist categories */
- private CodeAssistCyclingConfigurationBlock fConfigurationBlock;
-
- private Button fInsertSingleProposals;
-
- /**
- * @see org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- final Composite composite = super.createComposite(parent, 1);
-
- createContentsForAutoInsertionGroup(composite);
- createContentsForCyclingGroup(composite);
-
- setSize(composite);
- loadPreferences();
-
- return composite;
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage#performDefaults()
- */
- protected void performDefaults() {
- performDefaultsForAutoInsertionGroup();
- performDefaultsForCyclingGroup();
-
- validateValues();
- enableValues();
-
- super.performDefaults();
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage#initializeValues()
- */
- protected void initializeValues() {
- initializeValuesForAutoInsertionGroup();
- initializeValuesForCyclingGroup();
- }
-
- /**
- * @see org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage#storeValues()
- */
- protected void storeValues() {
- storeValuesForAutoInsertionGroup();
- storeValuesForCyclingGroup();
- }
-
- /**
- * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return JSPUIPlugin.getDefault().getPreferenceStore();
- }
-
- /**
- * <p>Create the contents for the content assist Auto Insertion preference group</p>
- * @param parent {@link Composite} parent of the group
- */
- private void createContentsForAutoInsertionGroup(Composite parent) {
- Group group = createGroup(parent, 2);
-
- group.setText(JSPUIMessages.JSPCodeAssist_Insertion);
-
- fAutoImport = createCheckBox(group, JSPUIMessages.JSPCodeAssist_Auto_Import);
- ((GridData) fAutoImport.getLayoutData()).horizontalSpan = 2;
-
- fInsertSingleProposals = createCheckBox(group, XMLUIMessages.Insert_single_proposals);
- ((GridData) fInsertSingleProposals.getLayoutData()).horizontalSpan = 2;
- }
-
- /**
- * <p>Create the contents for the content assist cycling preference group</p>
- * @param parent {@link Composite} parent of the group
- */
- private void createContentsForCyclingGroup(Composite parent) {
- ICompletionProposalCategoriesConfigurationWriter configurationWriter = CompletionProposoalCatigoriesConfigurationRegistry.getDefault().getWritableConfiguration(JSP_CONTENT_TYPE_ID);
-
- if(configurationWriter != null) {
- fConfigurationBlock = new CodeAssistCyclingConfigurationBlock(JSP_CONTENT_TYPE_ID, configurationWriter);
- fConfigurationBlock.createContents(parent, JSPUIMessages.Cycling_UI);
- } else {
- Logger.log(Logger.ERROR, "There should be an ICompletionProposalCategoriesConfigurationWriter" + //$NON-NLS-1$
- " specified for the JSP content type, but can't fine it, thus can't create user" + //$NON-NLS-1$
- " preference block for editing proposal categories preferences."); //$NON-NLS-1$
- }
- }
-
-
- /**
- * <p>Store the values for the auto insertion group</p>
- */
- private void storeValuesForAutoInsertionGroup() {
- getPreferenceStore().setValue(JSPUIPreferenceNames.AUTO_IMPORT_INSERT, (fAutoImport != null) ? fAutoImport.getSelection() : false);
- getPreferenceStore().setValue(JSPUIPreferenceNames.INSERT_SINGLE_SUGGESTION, (fInsertSingleProposals != null) ? fInsertSingleProposals.getSelection() : false);
- }
-
- /**
- * <p>Store the values for the cycling group</p>
- */
- private void storeValuesForCyclingGroup() {
- if (fConfigurationBlock != null) {
- fConfigurationBlock.storeValues();
- }
- }
-
- /**
- * <p>Initialize the values for the auto insertion group</p>
- */
- private void initializeValuesForAutoInsertionGroup() {
- initCheckbox(fAutoImport, JSPUIPreferenceNames.AUTO_IMPORT_INSERT);
- initCheckbox(fInsertSingleProposals, JSPUIPreferenceNames.INSERT_SINGLE_SUGGESTION);
- }
-
- /**
- * <p>Initialize the values for the cycling group</p>
- */
- private void initializeValuesForCyclingGroup() {
- if(fConfigurationBlock != null) {
- fConfigurationBlock.initializeValues();
- }
- }
-
- /**
- * <p>Load the defaults for the auto activation group</p>
- */
- private void performDefaultsForAutoInsertionGroup() {
- defaultCheckbox(fAutoImport, JSPUIPreferenceNames.AUTO_IMPORT_INSERT);
- defaultCheckbox(fInsertSingleProposals, JSPUIPreferenceNames.INSERT_SINGLE_SUGGESTION);
- }
-
- /**
- * <p>Load the defaults of the cycling group</p>
- */
- private void performDefaultsForCyclingGroup() {
- if(fConfigurationBlock != null) {
- fConfigurationBlock.performDefaults();
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPFilesPreferencePage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPFilesPreferencePage.java
deleted file mode 100644
index 1dd04258f4..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPFilesPreferencePage.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.ui.internal.preferences.ui;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.editor.IHelpContextIds;
-import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.xml.ui.internal.preferences.XMLFilesPreferencePage;
-
-public class JSPFilesPreferencePage extends XMLFilesPreferencePage {
- private Button fJSPSearchToJavaSearchButton;
-
- /**
- * <p><b>NOTE: </b>originally copied from {@link XMLFilesPreferencePage#createControl(Composite)}</p>
- *
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite parent) {
- Composite scrolledComposite = createScrolledComposite(parent);
- createContentsForCreatingGroup(scrolledComposite);
- createContentsForSearchGroup(scrolledComposite);
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(scrolledComposite, IHelpContextIds.JSP_PREFWEBX_FILES_HELPID);
-
- setSize(scrolledComposite);
- loadPreferences();
-
- return scrolledComposite;
- }
-
- /**
- * @param parent
- */
- private void createContentsForSearchGroup(Composite parent) {
- Group group = createGroup(parent, 1);
- group.setText(JSPUIMessages.JSPFilesPreferencePage_Search_group);
- fJSPSearchToJavaSearchButton = createCheckBox(group, JSPUIMessages.JSPFilesPreferencePage_Supply_JSP_search_to_Java_search);
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.preferences.XMLFilesPreferencePage#initializeValues()
- */
- protected void initializeValues() {
- super.initializeValues();
- initCheckbox(fJSPSearchToJavaSearchButton, JSPUIPreferenceNames.SUPPLY_JSP_SEARCH_RESULTS_TO_JAVA_SEARCH);
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.preferences.XMLFilesPreferencePage#performDefaults()
- */
- protected void performDefaults() {
- super.performDefaults();
- defaultCheckbox(fJSPSearchToJavaSearchButton, JSPUIPreferenceNames.SUPPLY_JSP_SEARCH_RESULTS_TO_JAVA_SEARCH);
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.preferences.XMLFilesPreferencePage#storeValues()
- */
- protected void storeValues() {
- super.storeValues();
- getPreferenceStore().setValue(JSPUIPreferenceNames.SUPPLY_JSP_SEARCH_RESULTS_TO_JAVA_SEARCH,
- (fJSPSearchToJavaSearchButton != null) ? fJSPSearchToJavaSearchButton.getSelection() : false);
- }
-
- /**
- * @see org.eclipse.jface.preference.PreferencePage#doGetPreferenceStore()
- */
- protected IPreferenceStore doGetPreferenceStore() {
- return JSPUIPlugin.getDefault().getPreferenceStore();
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.preferences.XMLFilesPreferencePage#getContentType()
- */
- protected IContentType getContentType() {
- return Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.preferences.XMLFilesPreferencePage#doSavePreferenceStore()
- */
- protected void doSavePreferenceStore() {
- JSPCorePlugin.getDefault().savePluginPreferences(); // model
- }
-
- /**
- * @see org.eclipse.wst.xml.ui.internal.preferences.XMLFilesPreferencePage#getModelPreferences()
- */
- protected Preferences getModelPreferences() {
- return JSPCorePlugin.getDefault().getPluginPreferences();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPSourcePreferencePage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPSourcePreferencePage.java
deleted file mode 100644
index 6176b4dee5..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPSourcePreferencePage.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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.ui.internal.preferences.ui;
-
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.dialogs.PreferenceLinkArea;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-
-public class JSPSourcePreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
- public void init(IWorkbench workbench) {
- // do nothing
- }
-
- protected Control createContents(Composite parent) {
- Composite composite = createComposite(parent, 1);
-
- new PreferenceLinkArea(composite, SWT.WRAP | SWT.MULTI, "org.eclipse.wst.sse.ui.preferences.editor", JSPUIMessages._UI_STRUCTURED_TEXT_EDITOR_PREFS_LINK,//$NON-NLS-1$
- (IWorkbenchPreferenceContainer) getContainer(), null).getControl().setLayoutData(GridDataFactory.fillDefaults().indent(5, 0).hint(150, SWT.DEFAULT).create());
- new Label(composite, SWT.NONE).setLayoutData(GridDataFactory.swtDefaults().create());
-
- Text label = new Text(composite, SWT.READ_ONLY);
- label.setText(JSPUIMessages.JSPSourcePreferencePage_0);
- GridData data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
- data.horizontalIndent = 0;
- label.setLayoutData(data);
-
- PreferenceLinkArea fileEditorsArea = new PreferenceLinkArea(composite, SWT.NONE, "org.eclipse.wst.html.ui.preferences.source", JSPUIMessages.JSPSourcePreferencePage_1,//$NON-NLS-1$
- (IWorkbenchPreferenceContainer) getContainer(), null);
-
- data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
- data.horizontalIndent = 5;
- fileEditorsArea.getControl().setLayoutData(data);
-
- PreferenceLinkArea contentTypeArea = new PreferenceLinkArea(composite, SWT.NONE, "org.eclipse.wst.sse.ui.preferences.xml.source", JSPUIMessages.JSPSourcePreferencePage_2,//$NON-NLS-1$
- (IWorkbenchPreferenceContainer) getContainer(), null);
-
- data = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
- data.horizontalIndent = 5;
- contentTypeArea.getControl().setLayoutData(data);
- return composite;
- }
-
- private Composite createComposite(Composite parent, int numColumns) {
- Composite composite = new Composite(parent, SWT.NULL);
-
- //GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- composite.setLayout(layout);
-
- //GridData
- GridData data = new GridData(GridData.FILL);
- data.horizontalIndent = 0;
- data.verticalAlignment = GridData.FILL;
- data.horizontalAlignment = GridData.FILL;
- composite.setLayoutData(data);
-
- return composite;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPStyledTextColorPicker.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPStyledTextColorPicker.java
deleted file mode 100644
index 19bd809d7c..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPStyledTextColorPicker.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.ui.internal.preferences.ui;
-
-import org.eclipse.jst.jsp.ui.internal.style.IStyleConstantsJSP;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.StyledTextColorPicker;
-
-/**
-* Overrides StyledTextColorPicker for special enablement behavior
-* for JSPContent (only background settable)
-**/
-public class JSPStyledTextColorPicker extends StyledTextColorPicker {
-
- public JSPStyledTextColorPicker(Composite parent, int style) {
- super(parent, style);
- }
-
- /**
- * Activate controls based on the given local color type.
- * Overridden to disable foreground color, bold.
- */
- protected void activate(String namedStyle) {
- super.activate(namedStyle);
-
- if(namedStyle == IStyleConstantsJSP.JSP_CONTENT) {
- fForeground.setEnabled(false);
- fBold.setEnabled(false);
- if (showItalic)
- fItalic.setEnabled(false);
- fForegroundLabel.setEnabled(false);
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPSyntaxColoringPage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPSyntaxColoringPage.java
deleted file mode 100644
index 8ea7515cd9..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPSyntaxColoringPage.java
+++ /dev/null
@@ -1,877 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2011 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.ui.internal.preferences.ui;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jface.preference.ColorSelector;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.ListViewer;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.editor.IHelpContextIds;
-import org.eclipse.jst.jsp.ui.internal.style.IStyleConstantsJSP;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.accessibility.ACC;
-import org.eclipse.swt.accessibility.AccessibleAdapter;
-import org.eclipse.swt.accessibility.AccessibleEvent;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.custom.StyledText;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.MouseListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.events.TraverseEvent;
-import org.eclipse.swt.events.TraverseListener;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.wst.html.ui.internal.style.IStyleConstantsHTML;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-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.ui.internal.SSEUIMessages;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore;
-import org.eclipse.wst.sse.ui.internal.preferences.OverlayPreferenceStore.OverlayKey;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractSyntaxColoringPage;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.ColorHelper;
-import org.eclipse.wst.sse.ui.internal.util.EditorUtility;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.XMLUIMessages;
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-
-import com.ibm.icu.text.Collator;
-
-/**
- * A preference page to configure our XML syntax color. It resembles the JDT
- * and CDT pages far more than our original color page while retaining the
- * extra "click-to-find" functionality.
- */
-public final class JSPSyntaxColoringPage extends AbstractSyntaxColoringPage implements IWorkbenchPreferencePage {
-
- private Button fBold;
- private Label fForegroundLabel;
- private Label fBackgroundLabel;
- private Button fClearStyle;
- private Map fContextToStyleMap;
- private Color fDefaultForeground = null;
- private Color fDefaultBackground = null;
- private IStructuredDocument fDocument;
- private ColorSelector fForegroundColorEditor;
- private ColorSelector fBackgroundColorEditor;
- private Button fItalic;
- private OverlayPreferenceStore fOverlayStore;
- private Button fStrike;
- private Collection fStylePreferenceKeys;
- private StructuredViewer fStylesViewer = null;
- private Map fStyleToDescriptionMap;
- private StyledText fText;
- private Button fUnderline;
- private ISourceViewer fPreviewViewer;
-
-
- // activate controls based on the given local color type
- private void activate(String namedStyle) {
- Color foreground = fDefaultForeground;
- Color background = fDefaultBackground;
- if (namedStyle == null) {
- fClearStyle.setEnabled(false);
- fBold.setEnabled(false);
- fItalic.setEnabled(false);
- fStrike.setEnabled(false);
- fUnderline.setEnabled(false);
- fForegroundLabel.setEnabled(false);
- fBackgroundLabel.setEnabled(false);
- fForegroundColorEditor.setEnabled(false);
- fBackgroundColorEditor.setEnabled(false);
- fBold.setSelection(false);
- fItalic.setSelection(false);
- fStrike.setSelection(false);
- fUnderline.setSelection(false);
- }
- else {
- TextAttribute attribute = getAttributeFor(namedStyle);
- fClearStyle.setEnabled(true);
- boolean enableBackgroundOnly = IStyleConstantsJSP.JSP_CONTENT.equals(namedStyle);
- fBold.setEnabled(!enableBackgroundOnly);
- fItalic.setEnabled(!enableBackgroundOnly);
- fStrike.setEnabled(!enableBackgroundOnly);
- fUnderline.setEnabled(!enableBackgroundOnly);
- fForegroundLabel.setEnabled(!enableBackgroundOnly);
- fForegroundColorEditor.setEnabled(!enableBackgroundOnly);
- fBackgroundLabel.setEnabled(true);
- fBackgroundColorEditor.setEnabled(true);
- fBold.setSelection((attribute.getStyle() & SWT.BOLD) != 0);
- fItalic.setSelection((attribute.getStyle() & SWT.ITALIC) != 0);
- fStrike.setSelection((attribute.getStyle() & TextAttribute.STRIKETHROUGH) != 0);
- fUnderline.setSelection((attribute.getStyle() & TextAttribute.UNDERLINE) != 0);
- if (attribute.getForeground() != null) {
- foreground = attribute.getForeground();
- }
- if (attribute.getBackground() != null) {
- background = attribute.getBackground();
- }
- }
-
- fForegroundColorEditor.setColorValue(foreground.getRGB());
- fBackgroundColorEditor.setColorValue(background.getRGB());
- }
-
- /**
- * Color the text in the sample area according to the current preferences
- */
- void applyStyles() {
- if (fText == null || fText.isDisposed())
- return;
- IStructuredDocumentRegion documentRegion = fDocument.getFirstStructuredDocumentRegion();
- while (documentRegion != null) {
- ITextRegionList regions = documentRegion.getRegions();
- for (int i = 0; i < regions.size(); i++) {
- ITextRegion currentRegion = regions.get(i);
- // lookup the local coloring type and apply it
- String namedStyle = (String) fContextToStyleMap.get(currentRegion.getType());
- if (namedStyle == null)
- continue;
- TextAttribute attribute = getAttributeFor(namedStyle);
- if (attribute == null)
- continue;
- StyleRange style = new StyleRange(documentRegion.getStartOffset(currentRegion), currentRegion.getTextLength(), attribute.getForeground(), attribute.getBackground(), attribute.getStyle());
- style.strikeout = (attribute.getStyle() & TextAttribute.STRIKETHROUGH) != 0;
- style.underline = (attribute.getStyle() & TextAttribute.UNDERLINE) != 0;
- fText.setStyleRange(style);
- }
- documentRegion = documentRegion.getNext();
- }
- }
-
- Button createCheckbox(Composite parent, String label) {
- Button button = new Button(parent, SWT.CHECK);
- button.setText(label);
- button.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- return button;
- }
-
- /**
- * Creates composite control and sets the default layout data.
- */
- private Composite createComposite(Composite parent, int numColumns) {
- Composite composite = new Composite(parent, SWT.NULL);
-
- // GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = numColumns;
- layout.makeColumnsEqualWidth = false;
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
-
- // GridData
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, false);
- composite.setLayoutData(data);
- return composite;
- }
-
- protected Control createContents(final Composite parent) {
- initializeDialogUnits(parent);
-
- fDefaultForeground = parent.getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
- fDefaultBackground = parent.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
- Composite pageComponent = createComposite(parent, 2);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(pageComponent, IHelpContextIds.JSP_PREFWEBX_STYLES_HELPID);
-
- Link link = new Link(pageComponent, SWT.WRAP);
- link.setText(SSEUIMessages.SyntaxColoring_Link);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- PreferencesUtil.createPreferenceDialogOn(parent.getShell(), e.text, null, null);
- }
- });
-
- GridData linkData= new GridData(SWT.FILL, SWT.BEGINNING, true, false, 2, 1);
- linkData.widthHint= 150; // only expand further if anyone else requires it
- link.setLayoutData(linkData);
-
- new Label(pageComponent, SWT.NONE).setLayoutData(new GridData());
- new Label(pageComponent, SWT.NONE).setLayoutData(new GridData());
-
- SashForm editor = new SashForm(pageComponent, SWT.VERTICAL);
- GridData gridData2 = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData2.horizontalSpan = 2;
- editor.setLayoutData(gridData2);
- SashForm top = new SashForm(editor, SWT.HORIZONTAL);
- Composite styleEditor = createComposite(top, 1);
- ((GridLayout) styleEditor.getLayout()).marginRight = 5;
- ((GridLayout) styleEditor.getLayout()).marginLeft = 0;
- createLabel(styleEditor, JSPUIMessages.SyntaxColoringPage_0);
- fStylesViewer = createStylesViewer(styleEditor);
- GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData.horizontalIndent = 0;
- Iterator iterator = fStyleToDescriptionMap.values().iterator();
- while (iterator.hasNext()) {
- gridData.widthHint = Math.max(gridData.widthHint, convertWidthInCharsToPixels(iterator.next().toString().length()));
- }
- gridData.heightHint = convertHeightInCharsToPixels(5);
- fStylesViewer.getControl().setLayoutData(gridData);
-
- Composite editingComposite = createComposite(top, 1);
- ((GridLayout) styleEditor.getLayout()).marginLeft = 5;
- createLabel(editingComposite, ""); //$NON-NLS-1$
- Button enabler = createCheckbox(editingComposite, JSPUIMessages.SyntaxColoringPage_2);
- enabler.setEnabled(false);
- enabler.setSelection(true);
- Composite editControls = createComposite(editingComposite, 2);
- ((GridLayout) editControls.getLayout()).marginLeft = 20;
-
- fForegroundLabel = createLabel(editControls, SSEUIMessages.Foreground_UI_);
- ((GridData) fForegroundLabel.getLayoutData()).verticalAlignment = SWT.CENTER;
- fForegroundLabel.setEnabled(false);
-
- fForegroundColorEditor = new ColorSelector(editControls);
- Button fForegroundColor = fForegroundColorEditor.getButton();
- GridData gd = new GridData(SWT.BEGINNING, SWT.FILL, false, false);
- fForegroundColor.setLayoutData(gd);
- fForegroundColorEditor.setEnabled(false);
- fForegroundColorEditor.getButton().getAccessible().addAccessibleListener(new AccessibleAdapter() {
- public void getName (final AccessibleEvent e) {
- e.result = SSEUIMessages.Foreground_Color_Selector_Button;
- }
- });
-
- fBackgroundLabel = createLabel(editControls, SSEUIMessages.Background_UI_);
- ((GridData) fBackgroundLabel.getLayoutData()).verticalAlignment = SWT.CENTER;
- fBackgroundLabel.setEnabled(false);
-
- fBackgroundColorEditor = new ColorSelector(editControls);
- Button fBackgroundColor = fBackgroundColorEditor.getButton();
- gd = new GridData(SWT.BEGINNING, SWT.FILL, false, false);
- fBackgroundColor.setLayoutData(gd);
- fBackgroundColorEditor.setEnabled(false);
- fBackgroundColorEditor.getButton().getAccessible().addAccessibleListener(new AccessibleAdapter() {
- public void getName (final AccessibleEvent e) {
- e.result = SSEUIMessages.Background_Color_Selector_Button;
- }
- });
-
- fBold = createCheckbox(editControls, JSPUIMessages.SyntaxColoringPage_3);
- fBold.setEnabled(false);
- ((GridData) fBold.getLayoutData()).horizontalSpan = 2;
- fItalic = createCheckbox(editControls, JSPUIMessages.SyntaxColoringPage_4);
- fItalic.setEnabled(false);
- ((GridData) fItalic.getLayoutData()).horizontalSpan = 2;
- fStrike = createCheckbox(editControls, JSPUIMessages.SyntaxColoringPage_5);
- fStrike.setEnabled(false);
- ((GridData) fStrike.getLayoutData()).horizontalSpan = 2;
- fUnderline = createCheckbox(editControls, JSPUIMessages.SyntaxColoringPage_6);
- fUnderline.setEnabled(false);
- ((GridData) fUnderline.getLayoutData()).horizontalSpan = 2;
- fClearStyle = new Button(editingComposite, SWT.PUSH);
- fClearStyle.setText(SSEUIMessages.Restore_Default_UI_); //$NON-NLS-1$ = "Restore Default"
- fClearStyle.setLayoutData(new GridData(SWT.BEGINNING));
- ((GridData) fClearStyle.getLayoutData()).horizontalIndent = 20;
- fClearStyle.setEnabled(false);
-
- Composite sampleArea = createComposite(editor, 1);
-
- ((GridLayout) sampleArea.getLayout()).marginLeft = 5;
- ((GridLayout) sampleArea.getLayout()).marginTop = 5;
- createLabel(sampleArea, SSEUIMessages.Sample_text__UI_); //$NON-NLS-1$ = "&Sample text:"
- fPreviewViewer = new SourceViewer(sampleArea, null, SWT.BORDER | SWT.LEFT_TO_RIGHT | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.READ_ONLY);
- fText = fPreviewViewer.getTextWidget();
- GridData gridData3 = new GridData(SWT.FILL, SWT.FILL, true, true);
- gridData3.widthHint = convertWidthInCharsToPixels(20);
- gridData3.heightHint = convertHeightInCharsToPixels(5);
- gridData3.horizontalSpan = 2;
- fText.setLayoutData(gridData3);
- fText.setEditable(false);
- fText.setFont(JFaceResources.getFont("org.eclipse.wst.sse.ui.textfont")); //$NON-NLS-1$
- fText.addKeyListener(getTextKeyListener());
- fText.addSelectionListener(getTextSelectionListener());
- fText.addMouseListener(getTextMouseListener());
- fText.addTraverseListener(getTraverseListener());
- setAccessible(fText, SSEUIMessages.Sample_text__UI_);
- fDocument = StructuredModelManager.getModelManager().createStructuredDocumentFor(ContentTypeIdForJSP.ContentTypeID_JSP);
- fDocument.set(getExampleText());
- initializeSourcePreviewColors(fPreviewViewer);
- fPreviewViewer.setDocument(fDocument);
-
- top.setWeights(new int[]{1, 1});
- editor.setWeights(new int[]{1, 1});
- PlatformUI.getWorkbench().getHelpSystem().setHelp(pageComponent, IHelpContextIds.JSP_PREFWEBX_STYLES_HELPID);
-
- fStylesViewer.setInput(getStylePreferenceKeys());
-
- applyStyles();
-
- fStylesViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- if (!event.getSelection().isEmpty()) {
- Object o = ((IStructuredSelection) event.getSelection()).getFirstElement();
- String namedStyle = o.toString();
- activate(namedStyle);
- if (namedStyle == null)
- return;
- }
- }
- });
-
- fForegroundColorEditor.addListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ColorSelector.PROP_COLORCHANGE)) {
- Object o = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement();
- String namedStyle = o.toString();
- String prefString = getOverlayStore().getString(namedStyle);
- String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
- if (stylePrefs != null) {
- String oldValue = stylePrefs[0];
- // open color dialog to get new color
- String newValue = ColorHelper.toRGBString(fForegroundColorEditor.getColorValue());
-
- if (!newValue.equals(oldValue)) {
- stylePrefs[0] = newValue;
- String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
- getOverlayStore().setValue(namedStyle, newPrefString);
- applyStyles();
- fText.redraw();
- }
- }
- }
- }
- });
-
- fBackgroundColorEditor.addListener(new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
- if (event.getProperty().equals(ColorSelector.PROP_COLORCHANGE)) {
- Object o = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement();
- String namedStyle = o.toString();
- String prefString = getOverlayStore().getString(namedStyle);
- String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
- if (stylePrefs != null) {
- String oldValue = stylePrefs[1];
- // open color dialog to get new color
- String newValue = ColorHelper.toRGBString(fBackgroundColorEditor.getColorValue());
-
- if (!newValue.equals(oldValue)) {
- stylePrefs[1] = newValue;
- String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
- getOverlayStore().setValue(namedStyle, newPrefString);
- applyStyles();
- fText.redraw();
- activate(namedStyle);
- }
- }
- }
- }
- });
-
- fBold.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- super.widgetSelected(e);
- // get current (newly old) style
- Object o = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement();
- String namedStyle = o.toString();
- String prefString = getOverlayStore().getString(namedStyle);
- String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
- if (stylePrefs != null) {
- String oldValue = stylePrefs[2];
- String newValue = String.valueOf(fBold.getSelection());
- if (!newValue.equals(oldValue)) {
- stylePrefs[2] = newValue;
- String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
- getOverlayStore().setValue(namedStyle, newPrefString);
- applyStyles();
- fText.redraw();
- }
- }
- }
- });
-
- fItalic.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- super.widgetSelected(e);
- // get current (newly old) style
- Object o = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement();
- String namedStyle = o.toString();
- String prefString = getOverlayStore().getString(namedStyle);
- String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
- if (stylePrefs != null) {
- String oldValue = stylePrefs[3];
- String newValue = String.valueOf(fItalic.getSelection());
- if (!newValue.equals(oldValue)) {
- stylePrefs[3] = newValue;
- String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
- getOverlayStore().setValue(namedStyle, newPrefString);
- applyStyles();
- fText.redraw();
- }
- }
- }
- });
-
- fStrike.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- super.widgetSelected(e);
- // get current (newly old) style
- Object o = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement();
- String namedStyle = o.toString();
- String prefString = getOverlayStore().getString(namedStyle);
- String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
- if (stylePrefs != null) {
- String oldValue = stylePrefs[4];
- String newValue = String.valueOf(fStrike.getSelection());
- if (!newValue.equals(oldValue)) {
- stylePrefs[4] = newValue;
- String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
- getOverlayStore().setValue(namedStyle, newPrefString);
- applyStyles();
- fText.redraw();
- }
- }
- }
- });
-
- fUnderline.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- super.widgetSelected(e);
- // get current (newly old) style
- Object o = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement();
- String namedStyle = o.toString();
- String prefString = getOverlayStore().getString(namedStyle);
- String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
- if (stylePrefs != null) {
- String oldValue = stylePrefs[5];
- String newValue = String.valueOf(fUnderline.getSelection());
- if (!newValue.equals(oldValue)) {
- stylePrefs[5] = newValue;
- String newPrefString = ColorHelper.packStylePreferences(stylePrefs);
- getOverlayStore().setValue(namedStyle, newPrefString);
- applyStyles();
- fText.redraw();
- }
- }
- }
- });
-
- fClearStyle.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- if (fStylesViewer.getSelection().isEmpty())
- return;
- String namedStyle = ((IStructuredSelection) fStylesViewer.getSelection()).getFirstElement().toString();
- getOverlayStore().setToDefault(namedStyle);
- applyStyles();
- fText.redraw();
- activate(namedStyle);
- }
- });
-
- return pageComponent;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractSyntaxColoringPage#getSourcePreviewViewer()
- */
- protected ISourceViewer getSourcePreviewViewer() {
- return fPreviewViewer;
- }
-
- private Label createLabel(Composite parent, String text) {
- Label label = new Label(parent, SWT.WRAP);
- label.setText(text);
- GridData data = new GridData(SWT.FILL, SWT.FILL, false, false);
- label.setLayoutData(data);
- label.setBackground(parent.getBackground());
- return label;
- }
-
- // protected Label createDescriptionLabel(Composite parent) {
- // return null;
- // }
-
- /**
- * Set up all the style preference keys in the overlay store
- */
- private OverlayKey[] createOverlayStoreKeys() {
- List overlayKeys = new ArrayList();
-
- Iterator i = getStylePreferenceKeys().iterator();
- while (i.hasNext()) {
- overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, (String) i.next()));
- }
-
- OverlayPreferenceStore.OverlayKey[] keys = new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
- overlayKeys.toArray(keys);
- return keys;
- }
-
- /**
- * Creates the List viewer where we see the various syntax element display
- * names--would it ever be a Tree like JDT's?
- *
- * @param parent
- * @return
- */
- private StructuredViewer createStylesViewer(Composite parent) {
- StructuredViewer stylesViewer = new ListViewer(parent, SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
- stylesViewer.setComparator(new ViewerComparator(Collator.getInstance()));
- stylesViewer.setLabelProvider(new LabelProvider() {
- public String getText(Object element) {
- Object description = fStyleToDescriptionMap.get(element);
- if (description != null)
- return description.toString();
- return super.getText(element);
- }
- });
- stylesViewer.setContentProvider(new ITreeContentProvider() {
- public void dispose() {
- }
-
- public Object[] getChildren(Object parentElement) {
- return getStylePreferenceKeys().toArray();
- }
-
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- public Object getParent(Object element) {
- return getStylePreferenceKeys();
- }
-
- public boolean hasChildren(Object element) {
- return false;
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
- });
- return stylesViewer;
- }
-
- public void dispose() {
- if (fOverlayStore != null) {
- fOverlayStore.stop();
- }
- super.dispose();
- }
-
- protected IPreferenceStore doGetPreferenceStore() {
- return JSPUIPlugin.getDefault().getPreferenceStore();
- }
-
- private TextAttribute getAttributeFor(String namedStyle) {
- TextAttribute ta = new TextAttribute(fDefaultForeground, fDefaultBackground, SWT.NORMAL);
-
- if (namedStyle != null && fOverlayStore != null) {
- // note: "namedStyle" *is* the preference key
- String prefString = getOverlayStore().getString(namedStyle);
- String[] stylePrefs = ColorHelper.unpackStylePreferences(prefString);
- if (stylePrefs != null) {
- RGB foreground = ColorHelper.toRGB(stylePrefs[0]);
- RGB background = ColorHelper.toRGB(stylePrefs[1]);
-
- int fontModifier = SWT.NORMAL;
-
- if (stylePrefs.length > 2) {
- boolean on = Boolean.valueOf(stylePrefs[2]).booleanValue();
- if (on)
- fontModifier = fontModifier | SWT.BOLD;
- }
- if (stylePrefs.length > 3) {
- boolean on = Boolean.valueOf(stylePrefs[3]).booleanValue();
- if (on)
- fontModifier = fontModifier | SWT.ITALIC;
- }
- if (stylePrefs.length > 4) {
- boolean on = Boolean.valueOf(stylePrefs[4]).booleanValue();
- if (on)
- fontModifier = fontModifier | TextAttribute.STRIKETHROUGH;
- }
- if (stylePrefs.length > 5) {
- boolean on = Boolean.valueOf(stylePrefs[5]).booleanValue();
- if (on)
- fontModifier = fontModifier | TextAttribute.UNDERLINE;
- }
-
- ta = new TextAttribute((foreground != null) ? EditorUtility.getColor(foreground) : null, (background != null) ? EditorUtility.getColor(background) : null, fontModifier);
- }
- }
- return ta;
- }
-
- private String getExampleText() {
- return JSPUIMessages.Sample_JSP_doc;
- }
-
- private String getNamedStyleAtOffset(int offset) {
- // ensure the offset is clean
- if (offset >= fDocument.getLength())
- return getNamedStyleAtOffset(fDocument.getLength() - 1);
- else if (offset < 0)
- return getNamedStyleAtOffset(0);
- IStructuredDocumentRegion documentRegion = fDocument.getFirstStructuredDocumentRegion();
- while (documentRegion != null && !documentRegion.containsOffset(offset)) {
- documentRegion = documentRegion.getNext();
- }
- if (documentRegion != null) {
- // find the ITextRegion's Context at this offset
- ITextRegion interest = documentRegion.getRegionAtCharacterOffset(offset);
- if (interest == null)
- return null;
- if (offset > documentRegion.getTextEndOffset(interest))
- return null;
- String regionContext = interest.getType();
- if (regionContext == null)
- return null;
- // find the named style (internal/selectable name) for that
- // context
- String namedStyle = (String) fContextToStyleMap.get(regionContext);
- if (namedStyle != null) {
- return namedStyle;
- }
- }
- return null;
- }
-
- private OverlayPreferenceStore getOverlayStore() {
- return fOverlayStore;
- }
-
- private Collection getStylePreferenceKeys() {
- if (fStylePreferenceKeys == null) {
- List styles = new ArrayList();
- styles.add(IStyleConstantsXML.TAG_BORDER);
- styles.add(IStyleConstantsXML.TAG_NAME);
- styles.add(IStyleConstantsXML.TAG_ATTRIBUTE_NAME);
- styles.add(IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS);
- styles.add(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
- styles.add(IStyleConstantsXML.COMMENT_BORDER);
- styles.add(IStyleConstantsXML.COMMENT_TEXT);
- styles.add(IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- styles.add(IStyleConstantsJSP.JSP_CONTENT);
- fStylePreferenceKeys = styles;
- }
- return fStylePreferenceKeys;
- }
-
- private KeyListener getTextKeyListener() {
- return new KeyListener() {
- public void keyPressed(KeyEvent e) {
- if (e.widget instanceof StyledText) {
- int x = ((StyledText) e.widget).getCaretOffset();
- selectColorAtOffset(x);
- }
- }
-
- public void keyReleased(KeyEvent e) {
- if (e.widget instanceof StyledText) {
- int x = ((StyledText) e.widget).getCaretOffset();
- selectColorAtOffset(x);
- }
- }
- };
- }
-
- private MouseListener getTextMouseListener() {
- return new MouseListener() {
- public void mouseDoubleClick(MouseEvent e) {
- }
-
- public void mouseDown(MouseEvent e) {
- }
-
- public void mouseUp(MouseEvent e) {
- if (e.widget instanceof StyledText) {
- int x = ((StyledText) e.widget).getCaretOffset();
- selectColorAtOffset(x);
- }
- }
- };
- }
-
- private SelectionListener getTextSelectionListener() {
- return new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- selectColorAtOffset(e.x);
- if (e.widget instanceof StyledText) {
- ((StyledText) e.widget).setSelection(e.x);
- }
- }
-
- public void widgetSelected(SelectionEvent e) {
- selectColorAtOffset(e.x);
- if (e.widget instanceof StyledText) {
- ((StyledText) e.widget).setSelection(e.x);
- }
- }
- };
- }
-
- private TraverseListener getTraverseListener() {
- return new TraverseListener() {
- /**
- * @see org.eclipse.swt.events.TraverseListener#keyTraversed(TraverseEvent)
- */
- public void keyTraversed(TraverseEvent e) {
- if (e.widget instanceof StyledText) {
- if ((e.detail == SWT.TRAVERSE_TAB_NEXT) || (e.detail == SWT.TRAVERSE_TAB_PREVIOUS))
- e.doit = true;
- }
- }
- };
- }
-
- public void init(IWorkbench workbench) {
- setDescription(SSEUIMessages.SyntaxColoring_Description);
-
- fStyleToDescriptionMap = new HashMap();
- fContextToStyleMap = new HashMap();
-
- initStyleToDescriptionMap();
- initRegionContextToStyleMap();
-
- fOverlayStore = new OverlayPreferenceStore(getPreferenceStore(), createOverlayStoreKeys());
- fOverlayStore.load();
- fOverlayStore.start();
- }
-
- private void initRegionContextToStyleMap() {
- fContextToStyleMap.put(DOMRegionContext.XML_COMMENT_OPEN, IStyleConstantsXML.COMMENT_BORDER);
- fContextToStyleMap.put(DOMRegionContext.XML_COMMENT_TEXT, IStyleConstantsXML.COMMENT_TEXT);
- fContextToStyleMap.put(DOMRegionContext.XML_COMMENT_CLOSE, IStyleConstantsXML.COMMENT_BORDER);
-
- fContextToStyleMap.put(DOMRegionContext.XML_TAG_OPEN, IStyleConstantsXML.TAG_BORDER);
- fContextToStyleMap.put(DOMRegionContext.XML_END_TAG_OPEN, IStyleConstantsXML.TAG_BORDER);
- fContextToStyleMap.put(DOMRegionContext.XML_TAG_NAME, IStyleConstantsXML.TAG_NAME);
- fContextToStyleMap.put(DOMRegionContext.XML_TAG_ATTRIBUTE_NAME, IStyleConstantsXML.TAG_ATTRIBUTE_NAME);
- fContextToStyleMap.put(DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS, IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS);
- fContextToStyleMap.put(DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE, IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
- fContextToStyleMap.put(DOMRegionContext.XML_TAG_CLOSE, IStyleConstantsXML.TAG_BORDER);
- fContextToStyleMap.put(DOMRegionContext.XML_EMPTY_TAG_CLOSE, IStyleConstantsXML.TAG_BORDER);
-
- fContextToStyleMap.put(DOMRegionContext.XML_CHAR_REFERENCE, IStyleConstantsXML.ENTITY_REFERENCE);
- fContextToStyleMap.put(DOMRegionContext.XML_ENTITY_REFERENCE, IStyleConstantsXML.ENTITY_REFERENCE);
- fContextToStyleMap.put(DOMRegionContext.XML_PE_REFERENCE, IStyleConstantsXML.ENTITY_REFERENCE);
-
- fContextToStyleMap.put(DOMJSPRegionContexts.JSP_DECLARATION_OPEN, IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- fContextToStyleMap.put(DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN, IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- fContextToStyleMap.put(DOMJSPRegionContexts.JSP_EXPRESSION_OPEN, IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- fContextToStyleMap.put(DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN, IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- fContextToStyleMap.put(DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE, IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- fContextToStyleMap.put(DOMJSPRegionContexts.JSP_CLOSE, IStyleConstantsHTML.SCRIPT_AREA_BORDER);
-
- fContextToStyleMap.put(DOMJSPRegionContexts.JSP_CONTENT, IStyleConstantsJSP.JSP_CONTENT);
-
- fContextToStyleMap.put(DOMJSPRegionContexts.JSP_DIRECTIVE_NAME, IStyleConstantsXML.TAG_NAME);
- fContextToStyleMap.put(DOMJSPRegionContexts.JSP_ROOT_TAG_NAME, IStyleConstantsXML.TAG_NAME);
- fContextToStyleMap.put(DOMJSPRegionContexts.JSP_COMMENT_OPEN, IStyleConstantsXML.COMMENT_BORDER);
- fContextToStyleMap.put(DOMJSPRegionContexts.JSP_COMMENT_TEXT, IStyleConstantsXML.COMMENT_TEXT);
- fContextToStyleMap.put(DOMJSPRegionContexts.JSP_COMMENT_CLOSE, IStyleConstantsXML.COMMENT_BORDER);
-
- fContextToStyleMap.put(DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_DQUOTE, IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
- fContextToStyleMap.put(DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_SQUOTE, IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
- }
-
- private void initStyleToDescriptionMap() {
- fStyleToDescriptionMap.put(IStyleConstantsXML.COMMENT_BORDER, XMLUIMessages.Comment_Delimiters_UI_); // =
- fStyleToDescriptionMap.put(IStyleConstantsXML.COMMENT_TEXT, XMLUIMessages.Comment_Content_UI_); // =
- fStyleToDescriptionMap.put(IStyleConstantsXML.TAG_BORDER, XMLUIMessages.Tag_Delimiters_UI_); // =
- fStyleToDescriptionMap.put(IStyleConstantsXML.TAG_NAME, XMLUIMessages.Tag_Names_UI_); // =
- fStyleToDescriptionMap.put(IStyleConstantsXML.TAG_ATTRIBUTE_NAME, XMLUIMessages.Attribute_Names_UI_); // =
- fStyleToDescriptionMap.put(IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS, XMLUIMessages.Attribute_Equals_UI_);
- fStyleToDescriptionMap.put(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE, XMLUIMessages.Attribute_Values_UI_); // =
- fStyleToDescriptionMap.put(IStyleConstantsXML.ENTITY_REFERENCE, XMLUIMessages.Entity_Reference_UI_); //$NON-NLS-1$ = "Entity References"
- fStyleToDescriptionMap.put(IStyleConstantsHTML.SCRIPT_AREA_BORDER, JSPUIMessages.JSP_Delimiters_UI_); //$NON-NLS-1$ = "JSP Delimiters"
- fStyleToDescriptionMap.put(IStyleConstantsJSP.JSP_CONTENT, JSPUIMessages.JSPColorPage_jsp_content);
- }
-
- protected void performDefaults() {
- super.performDefaults();
- getOverlayStore().loadDefaults();
- applyStyles();
- fStylesViewer.setSelection(StructuredSelection.EMPTY);
- activate(null);
- fText.redraw();
- }
-
- public boolean performOk() {
- getOverlayStore().propagate();
-
- JSPUIPlugin.getDefault().savePluginPreferences();
- SSEUIPlugin.getDefault().savePluginPreferences();
- return true;
- }
-
- private void selectColorAtOffset(int offset) {
- String namedStyle = getNamedStyleAtOffset(offset);
- if (namedStyle != null) {
- fStylesViewer.setSelection(new StructuredSelection(namedStyle));
- fStylesViewer.reveal(namedStyle);
- }
- else {
- fStylesViewer.setSelection(StructuredSelection.EMPTY);
- }
- activate(namedStyle);
- }
-
- /**
- * Specifically set the reporting name of a control for accessibility
- */
- private void setAccessible(Control control, String name) {
- if (control == null)
- return;
- final String n = name;
- control.getAccessible().addAccessibleListener(new AccessibleAdapter() {
- public void getName(AccessibleEvent e) {
- if (e.childID == ACC.CHILDID_SELF)
- e.result = n;
- }
- });
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPTemplatePreferencePage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPTemplatePreferencePage.java
deleted file mode 100644
index e5537ee31e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPTemplatePreferencePage.java
+++ /dev/null
@@ -1,165 +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.ui.internal.preferences.ui;
-
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.jface.text.templates.ContextTypeRegistry;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.ui.StructuredTextViewerConfigurationJSP;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.editor.IHelpContextIds;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.texteditor.templates.TemplatePreferencePage;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-
-
-/**
- * Preference page for JSP templates
- */
-public class JSPTemplatePreferencePage extends TemplatePreferencePage {
- class JSPEditTemplateDialog extends EditTemplateDialog {
- public JSPEditTemplateDialog(Shell parent, Template template, boolean edit, boolean isNameModifiable, ContextTypeRegistry registry) {
- super(parent, template, edit, isNameModifiable, registry);
- }
-
- protected SourceViewer createViewer(Composite parent) { SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
- StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationJSP();
-
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- return baseConfiguration.getConfiguredContentTypes(sourceViewer);
- }
-
- public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
- return baseConfiguration.getLineStyleProviders(sourceViewer, partitionType);
- }
-
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- ContentAssistant assistant = new ContentAssistant();
- assistant.enableAutoActivation(true);
- assistant.enableAutoInsert(true);
- assistant.setContentAssistProcessor(getTemplateProcessor(), IDocument.DEFAULT_CONTENT_TYPE);
- return assistant;
- }
- };
- return doCreateViewer(parent, sourceViewerConfiguration);
-}
- }
-
- public JSPTemplatePreferencePage() {
- JSPUIPlugin jspEditorPlugin = JSPUIPlugin.getDefault();
-
- setPreferenceStore(jspEditorPlugin.getPreferenceStore());
- setTemplateStore(jspEditorPlugin.getTemplateStore());
- setContextTypeRegistry(jspEditorPlugin.getTemplateContextRegistry());
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.IPreferencePage#performOk()
- */
- public boolean performOk() {
- boolean ok = super.performOk();
- JSPUIPlugin.getDefault().savePluginPreferences();
- return ok;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.texteditor.templates.TemplatePreferencePage#isShowFormatterSetting()
- */
- protected boolean isShowFormatterSetting() {
- // template formatting has not been implemented
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
- protected Control createContents(Composite ancestor) {
- Control c = super.createContents(ancestor);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(c, IHelpContextIds.JSP_PREFWEBX_TEMPLATES_HELPID);
- return c;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.texteditor.templates.TemplatePreferencePage#createViewer(org.eclipse.swt.widgets.Composite)
- */
- protected SourceViewer createViewer(Composite parent) {
- SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
- StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationJSP();
-
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- return baseConfiguration.getConfiguredContentTypes(sourceViewer);
- }
-
- public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
- return baseConfiguration.getLineStyleProviders(sourceViewer, partitionType);
- }
- };
- return doCreateViewer(parent, sourceViewerConfiguration);
- }
-
- SourceViewer doCreateViewer(Composite parent, SourceViewerConfiguration viewerConfiguration) {
- SourceViewer viewer = null;
- String contentTypeID = ContentTypeIdForJSP.ContentTypeID_JSP;
- viewer = new StructuredTextViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- viewer.getTextWidget().setFont(JFaceResources.getFont("org.eclipse.wst.sse.ui.textfont")); //$NON-NLS-1$
- IStructuredModel scratchModel = StructuredModelManager.getModelManager().createUnManagedStructuredModelFor(contentTypeID);
- IDocument document = scratchModel.getStructuredDocument();
- viewer.configure(viewerConfiguration);
- viewer.setDocument(document);
- return viewer;
- }
-
- /**
- * Creates the edit dialog. Subclasses may override this method to provide
- * a custom dialog.
- *
- * @param template
- * the template being edited
- * @param edit
- * whether the dialog should be editable
- * @param isNameModifiable
- * whether the template name may be modified
- * @return the created or modified template, or <code>null</code> if the
- * edition failed
- * @since 3.1
- */
- protected Template editTemplate(Template template, boolean edit, boolean isNameModifiable) {
- EditTemplateDialog dialog = new JSPEditTemplateDialog(getShell(), template, edit, isNameModifiable, getContextTypeRegistry());
- if (dialog.open() == Window.OK) {
- return dialog.getTemplate();
- }
- return null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPTypingPreferencePage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPTypingPreferencePage.java
deleted file mode 100644
index 4605944e16..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPTypingPreferencePage.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 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.ui.internal.preferences.ui;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractPreferencePage;
-
-public class JSPTypingPreferencePage extends AbstractPreferencePage {
-
- private Button fCloseBraces;
- private Button fCloseScriptlets;
- private Button fCloseComments;
- private Button fCloseStrings;
- private Button fCloseBrackets;
-
- protected Control createContents(Composite parent) {
- Composite composite = super.createComposite(parent, 1);
-
- createAutoComplete(composite);
- createJavaGroup(composite);
-
- setSize(composite);
- loadPreferences();
-
- return composite;
- }
-
- private void createAutoComplete(Composite parent) {
- Group group = createGroup(parent, 2);
-
- group.setText(JSPUIMessages.JSPTyping_Auto_Complete);
-
- fCloseBraces = createCheckBox(group, JSPUIMessages.JSPTyping_Complete_Braces);
- ((GridData) fCloseBraces.getLayoutData()).horizontalSpan = 2;
-
- fCloseComments = createCheckBox(group, JSPUIMessages.JSPTyping_Complete_Comments);
- ((GridData) fCloseComments.getLayoutData()).horizontalSpan = 2;
-
- fCloseScriptlets = createCheckBox(group, JSPUIMessages.JSPTyping_Complete_Scriptlets);
- ((GridData) fCloseScriptlets.getLayoutData()).horizontalSpan = 2;
- }
-
- private void createJavaGroup(Composite parent) {
- Group group = createGroup(parent, 2);
-
- group.setText(JSPUIMessages.JSPTyping_Java_Code);
-
- fCloseStrings = createCheckBox(group, JSPUIMessages.JSPTyping_Close_Strings);
- ((GridData) fCloseStrings.getLayoutData()).horizontalSpan = 2;
-
- fCloseBrackets = createCheckBox(group, JSPUIMessages.JSPTyping_Close_Brackets);
- ((GridData) fCloseBrackets.getLayoutData()).horizontalSpan = 2;
- }
-
- public boolean performOk() {
- boolean result = super.performOk();
-
- JSPUIPlugin.getDefault().savePluginPreferences();
-
- return result;
- }
-
- protected void initializeValues() {
- initCheckbox(fCloseBraces, JSPUIPreferenceNames.TYPING_COMPLETE_EL_BRACES);
- initCheckbox(fCloseScriptlets, JSPUIPreferenceNames.TYPING_COMPLETE_SCRIPTLETS);
- initCheckbox(fCloseComments, JSPUIPreferenceNames.TYPING_COMPLETE_COMMENTS);
- initCheckbox(fCloseStrings, JSPUIPreferenceNames.TYPING_CLOSE_STRINGS);
- initCheckbox(fCloseBrackets, JSPUIPreferenceNames.TYPING_CLOSE_BRACKETS);
- }
-
- protected void performDefaults() {
- defaultCheckbox(fCloseBraces, JSPUIPreferenceNames.TYPING_COMPLETE_EL_BRACES);
- defaultCheckbox(fCloseScriptlets, JSPUIPreferenceNames.TYPING_COMPLETE_SCRIPTLETS);
- defaultCheckbox(fCloseComments, JSPUIPreferenceNames.TYPING_COMPLETE_COMMENTS);
- defaultCheckbox(fCloseStrings, JSPUIPreferenceNames.TYPING_CLOSE_STRINGS);
- defaultCheckbox(fCloseBrackets, JSPUIPreferenceNames.TYPING_CLOSE_BRACKETS);
- }
-
- protected void storeValues() {
- getPreferenceStore().setValue(JSPUIPreferenceNames.TYPING_COMPLETE_EL_BRACES, (fCloseBraces != null) ? fCloseBraces.getSelection() : false);
- getPreferenceStore().setValue(JSPUIPreferenceNames.TYPING_COMPLETE_SCRIPTLETS, (fCloseScriptlets != null) ? fCloseScriptlets.getSelection() : false);
- getPreferenceStore().setValue(JSPUIPreferenceNames.TYPING_COMPLETE_COMMENTS, (fCloseComments != null) ? fCloseComments.getSelection() : false);
- getPreferenceStore().setValue(JSPUIPreferenceNames.TYPING_CLOSE_STRINGS, (fCloseStrings != null) ? fCloseStrings.getSelection() : false);
- getPreferenceStore().setValue(JSPUIPreferenceNames.TYPING_CLOSE_BRACKETS, (fCloseBrackets != null) ? fCloseBrackets.getSelection() : false);
- }
-
- protected IPreferenceStore doGetPreferenceStore() {
- return JSPUIPlugin.getDefault().getPreferenceStore();
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPValidationPreferencePage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPValidationPreferencePage.java
deleted file mode 100644
index 1727ac5584..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/preferences/ui/JSPValidationPreferencePage.java
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2011 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.ui.internal.preferences.ui;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.PixelConverter;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.editor.IHelpContextIds;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferenceLinkArea;
-import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
-import org.eclipse.wst.sse.core.internal.validate.ValidationMessage;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.AbstractValidationSettingsPage;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.ScrolledPageContent;
-
-public class JSPValidationPreferencePage extends AbstractValidationSettingsPage {
-
- /**
- *
- */
- private static final String PREFERENCE_NODE_QUALIFIER = JSPCorePlugin.getDefault().getBundle().getSymbolicName();
-
- private static final String SETTINGS_SECTION_NAME = "JSPValidationSeverities";//$NON-NLS-1$
-
- private static final int[] SEVERITIES = {ValidationMessage.ERROR, ValidationMessage.WARNING, ValidationMessage.IGNORE};
-
- // Should equal org.eclipse.jdt.internal.ui.preferences.ProblemSeveritiesPreferencePage.PREF_ID
- public static final String JAVA_SEVERITY_PREFERENCE_PAGE = "org.eclipse.jdt.ui.preferences.ProblemSeveritiesPreferencePage"; //$NON-NLS-1$
- // Should equal org.eclipse.jdt.internal.ui.preferences.ProblemSeveritiesPreferencePage.PROP_ID
- public static final String JAVA_SEVERITY_PROPERTY_PAGE = "org.eclipse.jdt.ui.propertyPages.ProblemSeveritiesPreferencePage"; //$NON-NLS-1$
- // Should equal org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage.DATA_NO_LINK
- public static final String DATA_NO_LINK= "PropertyAndPreferencePage.nolink"; //$NON-NLS-1$
-
- private PixelConverter fPixelConverter;
- private Button fValidateFragments;
-
- private boolean fOriginalValidateFragments;
-
- public JSPValidationPreferencePage() {
- super();
- }
-
- /**
- * @param parent
- * @param text
- * @return
- */
- private Button createCheckBox(Composite parent, String text) {
- Button c = new Button(parent, SWT.CHECK);
- c.setText(text);
- c.setLayoutData(GridDataFactory.fillDefaults().create());
- return c;
- }
-
- protected Control createCommonContents(Composite parent) {
- final Composite page = new Composite(parent, SWT.NULL);
-
- // GridLayout
- GridLayout layout = new GridLayout();
- layout.numColumns = 1;
- page.setLayout(layout);
-
- fPixelConverter = new PixelConverter(parent);
-
- Group filesGroup = new Group(page, SWT.NONE);
- filesGroup.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());
- filesGroup.setLayout(new GridLayout(1, false));
- filesGroup.setText(JSPUIMessages.JSPFilesPreferencePage_0);
- createFilesSection(filesGroup);
-
- // spacer
-// new Label(page, SWT.NONE).setLayoutData(GridDataFactory.fillDefaults().create());
-
- Group severitiesGroup = new Group(page, SWT.NONE);
- severitiesGroup.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
- severitiesGroup.setLayout(new GridLayout(1, false));
- severitiesGroup.setText(JSPUIMessages.JSPValidationPreferencePage_0);
- final Composite content = createValidationSection(severitiesGroup);
-
- GridData gridData = new GridData(GridData.FILL, GridData.FILL, true, true);
- gridData.heightHint = fPixelConverter.convertHeightInCharsToPixels(20);
- content.setLayoutData(gridData);
-
- return page;
- }
-
- /**
- * @param fragmentGroup
- */
- private void createFilesSection(Group fragmentGroup) {
- fValidateFragments = createCheckBox(fragmentGroup, JSPUIMessages.JSPFilesPreferencePage_1);
- PlatformUI.getWorkbench().getHelpSystem().setHelp(fValidateFragments, IHelpContextIds.JSP_PREFWEBX_FILES_HELPID);
- IScopeContext[] contexts = createPreferenceScopes();
- fOriginalValidateFragments = contexts[0].getNode(getPreferenceNodeQualifier()).getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, contexts[1].getNode(getPreferenceNodeQualifier()).getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true));
- fValidateFragments.setSelection(fOriginalValidateFragments);
- }
-
- private Composite createValidationSection(Composite page) {
- int nColumns = 3;
-
- final ScrolledPageContent spContent = new ScrolledPageContent(page);
-
- Composite composite = spContent.getBody();
-
- GridLayout layout = new GridLayout(nColumns, false);
- layout.marginHeight = 0;
- layout.marginWidth = 0;
- composite.setLayout(layout);
-
- Label description = new Label(composite, SWT.NONE);
- description.setText(JSPUIMessages.Validation_description);
- description.setFont(page.getFont());
-
- String[] errorWarningIgnoreLabels = new String[]{JSPUIMessages.Validation_Error, JSPUIMessages.Validation_Warning, JSPUIMessages.Validation_Ignore};
- Composite section;
-
- // begin directives section
- section = createStyleSectionWithContentComposite(composite, JSPUIMessages.VALIDATION_HEADER_DIRECTIVE, nColumns);
- addComboBox(section, JSPUIMessages.VALIDATION_DIRECTIVE_TAGLIB_UNRESOLVABLE_URI_OR_TAGDIR, JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_UNRESOLVABLE_URI_OR_TAGDIR, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_DIFFERENT_URIS, JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_DIFFERENT_URIS, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_SAME_URIS, JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_DUPLICATE_PREFIXES_SAME_URIS, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_DIRECTIVE_TAGLIB_MISSING_PREFIX, JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_MISSING_PREFIX, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_DIRECTIVE_TAGLIB_MISSING_URI_OR_TAGDIR, JSPCorePreferenceNames.VALIDATION_DIRECTIVE_TAGLIB_MISSING_URI_OR_TAGDIR, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_DIRECTIVE_INCLUDE_FILE_NOT_FOUND, JSPCorePreferenceNames.VALIDATION_DIRECTIVE_INCLUDE_FILE_NOT_FOUND, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_DIRECTIVE_INCLUDE_NO_FILE_SPECIFIED, JSPCorePreferenceNames.VALIDATION_DIRECTIVE_INCLUDE_NO_FILE_SPECIFIED, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_DIRECTIVE_ATTRIBUTE_DUPLICATE_NAME, JSPCorePreferenceNames.VALIDATION_DIRECTIVE_ATTRIBUTE_DUPLICATE_NAME, SEVERITIES, errorWarningIgnoreLabels, 0);
-// addComboBox(section, JSPUIMessages.VALIDATION_DIRECTIVE_PAGE_SUPERCLASS_NOT_FOUND, JSPCorePreferenceNames.VALIDATION_DIRECTIVE_PAGE_SUPERCLASS_NOT_FOUND, SEVERITIES, errorWarningIgnoreLabels, 0);
- // end directives section
-
- // begin custom actions section
- section = createStyleSectionWithContentComposite(composite, JSPUIMessages.VALIDATION_HEADER_CUSTOM_ACTIONS, nColumns);
- addComboBox(section, JSPUIMessages.VALIDATION_ACTIONS_SEVERITY_MISSING_REQUIRED_ATTRIBUTE, JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_MISSING_REQUIRED_ATTRIBUTE, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_ACTIONS_SEVERITY_UNKNOWN_ATTRIBUTE, JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_UNKNOWN_ATTRIBUTE, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_ACTIONS_SEVERITY_UNEXPECTED_RTEXPRVALUE, JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_UNEXPECTED_RTEXPRVALUE, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_ACTIONS_SEVERITY_NON_EMPTY_INLINE_TAG, JSPCorePreferenceNames.VALIDATION_ACTIONS_SEVERITY_NON_EMPTY_INLINE_TAG, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_TRANSLATION_TEI_VALIDATION_MESSAGE, JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_VALIDATION_MESSAGE, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_TRANSLATION_TEI_CLASS_NOT_FOUND, JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_NOT_FOUND, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_TRANSLATION_TEI_CLASS_NOT_INSTANTIATED, JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_NOT_INSTANTIATED, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_TRANSLATION_TEI_CLASS_RUNTIME_EXCEPTION, JSPCorePreferenceNames.VALIDATION_TRANSLATION_TEI_CLASS_RUNTIME_EXCEPTION, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND, JSPCorePreferenceNames.VALIDATION_TRANSLATION_TAG_HANDLER_CLASS_NOT_FOUND, SEVERITIES, errorWarningIgnoreLabels, 0);
- // end custom actions section
-
- // begin standard actions section
- section = createStyleSectionWithContentComposite(composite, JSPUIMessages.VALIDATION_HEADER_STANDARD_ACTIONS, nColumns);
- addComboBox(section, JSPUIMessages.VALIDATION_TRANSLATION_USEBEAN_INVALID_ID, JSPCorePreferenceNames.VALIDATION_TRANSLATION_USEBEAN_INVALID_ID, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_TRANSLATION_USBEAN_MISSING_TYPE_INFO, JSPCorePreferenceNames.VALIDATION_TRANSLATION_USBEAN_MISSING_TYPE_INFO, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_TRANSLATION_USEBEAN_AMBIGUOUS_TYPE_INFO, JSPCorePreferenceNames.VALIDATION_TRANSLATION_USEBEAN_AMBIGUOUS_TYPE_INFO, SEVERITIES, errorWarningIgnoreLabels, 0);
- // end standard actions section
-
- // begin Java severity override section
- section = createStyleSectionWithContentComposite(composite, JSPUIMessages.VALIDATION_HEADER_JAVA, nColumns);
- if (getProject() == null) {
- new PreferenceLinkArea(section, SWT.WRAP | SWT.MULTI | SWT.LEFT_TO_RIGHT, JAVA_SEVERITY_PREFERENCE_PAGE, JSPUIMessages.VALIDATION_JAVA_NOTICE, (IWorkbenchPreferenceContainer) getContainer(), null).getControl().setLayoutData(GridDataFactory.fillDefaults().span(2, 1).indent(0, 0).hint(150, SWT.DEFAULT).create());
- }
- else {
- final Map data = new HashMap();
- data.put(DATA_NO_LINK, Boolean.TRUE);
- Link link= new Link(section, SWT.WRAP | SWT.MULTI | SWT.LEFT_TO_RIGHT);
- link.setLayoutData(GridDataFactory.fillDefaults().span(2, 1).indent(0, 0).hint(150, SWT.DEFAULT).create());
- link.setText(JSPUIMessages.VALIDATION_JAVA_NOTICE);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer)getContainer();
- container.openPage(JAVA_SEVERITY_PROPERTY_PAGE, data);
- }
- });
- //new PreferenceLinkArea(section, SWT.WRAP | SWT.MULTI | SWT.LEFT_TO_RIGHT, JAVA_SEVERITY_PROPERTY_PAGE, JSPUIMessages.VALIDATION_JAVA_NOTICE, (IWorkbenchPreferenceContainer) getContainer(), data).getControl().setLayoutData(GridDataFactory.fillDefaults().span(2, 1).indent(0, 0).hint(150, SWT.DEFAULT).create());
- // open in same shell?
- // PreferencesUtil.createPropertyDialogOn(getShell(), getProject(), JAVA_SEVERITY_PROPERTY_PAGE, new String[] { JAVA_SEVERITY_PROPERTY_PAGE }, data).open();
- }
- int sectionIndent = convertWidthInCharsToPixels(2);
- addComboBox(section, JSPUIMessages.VALIDATION_JAVA_LOCAL_VARIABLE_NEVER_USED, JSPCorePreferenceNames.VALIDATION_JAVA_LOCAL_VARIABLE_NEVER_USED, SEVERITIES, errorWarningIgnoreLabels, sectionIndent);
- addComboBox(section, JSPUIMessages.VALIDATION_JAVA_ARGUMENT_IS_NEVER_USED, JSPCorePreferenceNames.VALIDATION_JAVA_ARGUMENT_IS_NEVER_USED, SEVERITIES, errorWarningIgnoreLabels, sectionIndent);
- addComboBox(section, JSPUIMessages.VALIDATION_JAVA_NULL_LOCAL_VARIABLE_REFERENCE, JSPCorePreferenceNames.VALIDATION_JAVA_NULL_LOCAL_VARIABLE_REFERENCE, SEVERITIES, errorWarningIgnoreLabels, sectionIndent);
- addComboBox(section, JSPUIMessages.VALIDATION_JAVA_POTENTIAL_NULL_LOCAL_VARIABLE_REFERENCE, JSPCorePreferenceNames.VALIDATION_JAVA_POTENTIAL_NULL_LOCAL_VARIABLE_REFERENCE, SEVERITIES, errorWarningIgnoreLabels, sectionIndent);
- addComboBox(section, JSPUIMessages.VALIDATION_JAVA_UNUSED_IMPORT, JSPCorePreferenceNames.VALIDATION_JAVA_UNUSED_IMPORT, SEVERITIES, errorWarningIgnoreLabels, sectionIndent);
- // end Java severity override section
-
- // begin EL section
- section = createStyleSectionWithContentComposite(composite, JSPUIMessages.VALIDATION_HEADER_EL, nColumns);
- addComboBox(section, JSPUIMessages.VALIDATION_EL_SYNTAX, JSPCorePreferenceNames.VALIDATION_EL_SYNTAX, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_EL_LEXER, JSPCorePreferenceNames.VALIDATION_EL_LEXER, SEVERITIES, errorWarningIgnoreLabels, 0);
- addComboBox(section, JSPUIMessages.VALIDATION_EL_FUNCTION_UNDEFINED, JSPCorePreferenceNames.VALIDATION_EL_FUNCTION_UNDEFINED, SEVERITIES, errorWarningIgnoreLabels, 0);
- // end EL section
-
- restoreSectionExpansionStates(getDialogSettings().getSection(SETTINGS_SECTION_NAME));
-
- return spContent;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.dialogs.DialogPage#dispose()
- */
- public void dispose() {
- storeSectionExpansionStates(getDialogSettings().addNewSection(SETTINGS_SECTION_NAME));
- super.dispose();
- }
-
- protected IDialogSettings getDialogSettings() {
- return JSPUIPlugin.getDefault().getDialogSettings();
- }
-
- protected String getPreferenceNodeQualifier() {
- return PREFERENCE_NODE_QUALIFIER;
- }
-
- protected String getPreferencePageID() {
- return "org.eclipse.jst.jsp.ui.preferences.validation";//$NON-NLS-1$
- }
-
- protected String getProjectSettingsKey() {
- return JSPCorePreferenceNames.VALIDATION_USE_PROJECT_SETTINGS;
- }
-
- protected String getPropertyPageID() {
- return "org.eclipse.jst.jsp.ui.propertyPage.project.validation";//$NON-NLS-1$
- }
-
- public void init(IWorkbench workbench) {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
- protected void performDefaults() {
- resetSeverities();
-
- IEclipsePreferences defaultContext = new DefaultScope().getNode(getPreferenceNodeQualifier());
- boolean validateFragments = defaultContext.getBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, true);
- fValidateFragments.setSelection(validateFragments);
-
- super.performDefaults();
- }
-
- protected boolean shouldRevalidateOnSettingsChange() {
- return fOriginalValidateFragments != fValidateFragments.getSelection() || super.shouldRevalidateOnSettingsChange();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jst.jsp.ui.internal.preferences.ui.AbstractValidationSettingsPage#storeValues()
- */
- protected void storeValues() {
- super.storeValues();
-
- IScopeContext[] contexts = createPreferenceScopes();
- boolean validateFragments = fValidateFragments.getSelection();
- contexts[0].getNode(getPreferenceNodeQualifier()).putBoolean(JSPCorePreferenceNames.VALIDATE_FRAGMENTS, validateFragments);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/registry/AdapterFactoryProviderForJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/registry/AdapterFactoryProviderForJSP.java
deleted file mode 100644
index 0ad8b15a7a..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/registry/AdapterFactoryProviderForJSP.java
+++ /dev/null
@@ -1,73 +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.jst.jsp.ui.internal.registry;
-
-import org.eclipse.jst.jsp.core.internal.modelhandler.ModelHandlerForJSP;
-import org.eclipse.wst.html.ui.internal.contentoutline.JFaceNodeAdapterFactoryForHTML;
-import org.eclipse.wst.sse.core.internal.PropagatingAdapter;
-import org.eclipse.wst.sse.core.internal.ltk.modelhandler.IDocumentTypeHandler;
-import org.eclipse.wst.sse.core.internal.model.FactoryRegistry;
-import org.eclipse.wst.sse.core.internal.provisional.INodeAdapterFactory;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.internal.contentoutline.IJFaceNodeAdapter;
-import org.eclipse.wst.sse.ui.internal.provisional.registry.AdapterFactoryProvider;
-import org.eclipse.wst.sse.ui.internal.util.Assert;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-public class AdapterFactoryProviderForJSP implements AdapterFactoryProvider {
-
- /*
- * @see AdapterFactoryProvider#addAdapterFactories(IStructuredModel)
- */
- public void addAdapterFactories(IStructuredModel structuredModel) {
- // these are the main factories, on model's factory registry
- addContentBasedFactories(structuredModel);
- // -------
- // Must update/add to propagating adapters here too
- addPropagatingAdapters(structuredModel);
- }
-
- protected void addContentBasedFactories(IStructuredModel structuredModel) {
- FactoryRegistry factoryRegistry = structuredModel.getFactoryRegistry();
- Assert.isNotNull(factoryRegistry, "Program Error: client caller must ensure model has factory registry"); //$NON-NLS-1$
- INodeAdapterFactory factory = null;
- factory = factoryRegistry.getFactoryFor(IJFaceNodeAdapter.class);
- if (factory == null) {
- factory = new JFaceNodeAdapterFactoryForHTML(IJFaceNodeAdapter.class, true);
- factoryRegistry.addFactory(factory);
- }
-
- ModelHandlerForJSP.ensureTranslationAdapterFactory(structuredModel);
- }
-
- protected void addPropagatingAdapters(IStructuredModel structuredModel) {
-
- if (structuredModel instanceof IDOMModel) {
- IDOMModel xmlModel = (IDOMModel) structuredModel;
- IDOMDocument document = xmlModel.getDocument();
- PropagatingAdapter propagatingAdapter = (PropagatingAdapter) document.getAdapterFor(PropagatingAdapter.class);
- if (propagatingAdapter != null) {
- // what to do?
- }
- }
- }
-
- /*
- * @see AdapterFactoryProvider#isFor(ContentTypeDescription)
- */
- public boolean isFor(IDocumentTypeHandler contentTypeDescription) {
- return (contentTypeDescription instanceof ModelHandlerForJSP);
- }
-
- public void reinitializeFactories(IStructuredModel structuredModel) {
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/IStyleConstantsJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/IStyleConstantsJSP.java
deleted file mode 100644
index 2b81bf80d4..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/IStyleConstantsJSP.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.eclipse.jst.jsp.ui.internal.style;
-
-public interface IStyleConstantsJSP {
- public static final String JSP_CONTENT = "jsp_content"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/LineStyleProviderForJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/LineStyleProviderForJSP.java
deleted file mode 100644
index d3c52adaf8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/LineStyleProviderForJSP.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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
- * Frits Jalvingh - contributions for bug 150794
- *******************************************************************************/
-package org.eclipse.jst.jsp.ui.internal.style;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.wst.html.ui.internal.style.IStyleConstantsHTML;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.ui.internal.provisional.style.AbstractLineStyleProvider;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-
-public class LineStyleProviderForJSP extends AbstractLineStyleProvider implements LineStyleProvider{
-
- private String fLanguage = null;
-
- // private static final String JAVA = "java"; //$NON-NLS-1$
- // private static 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$
-
- public LineStyleProviderForJSP() {
- super();
- }
-
- protected TextAttribute getAttributeFor(ITextRegion region) {
- /**
- * a method to centralize all the "sytle rules" for regions
- */
- TextAttribute result = null;
- // not sure why this is coming through null, but just to catch it
- if (region == null) {
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.CDATA_TEXT);
- }
- else {
-
- if (result == null) {
- String type = region.getType();
- if ((type == DOMJSPRegionContexts.JSP_SCRIPTLET_OPEN) || (type == DOMJSPRegionContexts.JSP_DECLARATION_OPEN) || (type == DOMJSPRegionContexts.JSP_EXPRESSION_OPEN) || (type == DOMJSPRegionContexts.JSP_DIRECTIVE_OPEN) || (type == DOMJSPRegionContexts.JSP_DIRECTIVE_CLOSE) || (type == DOMJSPRegionContexts.JSP_CLOSE)) {
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- }
- else if (type == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME || type == DOMJSPRegionContexts.JSP_ROOT_TAG_NAME) {
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_NAME);
- }
- else if ((type == DOMJSPRegionContexts.JSP_COMMENT_OPEN) || (type == DOMJSPRegionContexts.JSP_COMMENT_CLOSE)) {
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.COMMENT_BORDER);
- }
- else if (type == DOMJSPRegionContexts.JSP_COMMENT_TEXT) {
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.COMMENT_TEXT);
- }
- // ============ These are in common with XML --- (for XML form
- // of tags)
- // Note: this assume's this provider is only called for
- // true JSP Nodes. If its called for others, then this will
- // cause their tag names to be highlighted too!
- // Further checks could be done to prevent that, but doesn't
- // seem worth it, since if adpaters factories are working
- // right,
- // then wouldn't be needed.
- else if (type == DOMRegionContext.XML_TAG_NAME) {
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_NAME);
- }
- else if ((type == DOMRegionContext.XML_TAG_OPEN) || (type == DOMRegionContext.XML_END_TAG_OPEN) || (type == DOMRegionContext.XML_TAG_CLOSE) || (type == DOMRegionContext.XML_EMPTY_TAG_CLOSE)) {
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_BORDER);
- }
- else if (type == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME) {
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_ATTRIBUTE_NAME);
- }
- else if ((type == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) || (type == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_DQUOTE) || (type == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_SQUOTE)|| (type == DOMJSPRegionContexts.JSP_TAG_ATTRIBUTE_VALUE_DQUOTE) || (type == DOMJSPRegionContexts.JSP_TAG_ATTRIBUTE_VALUE_SQUOTE)) {
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
- }
- else if (type == DOMRegionContext.XML_TAG_ATTRIBUTE_EQUALS) {
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS);
- }
-
- // DMW: added 9/1/2002 Undefined color may need addjustment :)
- else if (type == DOMRegionContext.UNDEFINED)
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.XML_CONTENT);
-
- else if (type == DOMRegionContext.WHITE_SPACE)
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.XML_CONTENT);
- // DMW added 8/30/2002 -- should provide JSP specific
- // preference for "custom tag content" (both tag dependent,
- // BLOCKED_TEXT, and not, XML CONTENT)
- else if (type == DOMRegionContext.XML_CONTENT)
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.XML_CONTENT);
- else if (type == DOMRegionContext.BLOCK_TEXT)
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.CDATA_TEXT);
- else if (type == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_DQUOTE||type == DOMJSPRegionContexts.XML_TAG_ATTRIBUTE_VALUE_SQUOTE)
- result = (TextAttribute) getTextAttributes().get(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
- }
- }
- // default, return null to signal "not handled"
- // in which case, other factories should be tried
- return result;
- }
-
-
- protected IPreferenceStore getColorPreferences() {
- return JSPUIPlugin.getDefault().getPreferenceStore();
- }
-
- protected void loadColors() {
- addTextAttribute(IStyleConstantsXML.TAG_NAME);
- addTextAttribute(IStyleConstantsXML.TAG_BORDER);
- addTextAttribute(IStyleConstantsXML.TAG_ATTRIBUTE_NAME);
- addTextAttribute(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
- addTextAttribute(IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS);
- addTextAttribute(IStyleConstantsXML.COMMENT_BORDER);
- addTextAttribute(IStyleConstantsXML.COMMENT_TEXT);
- addTextAttribute(IStyleConstantsXML.CDATA_BORDER);
- addTextAttribute(IStyleConstantsXML.CDATA_TEXT);
- addTextAttribute(IStyleConstantsXML.DECL_BORDER);
- addTextAttribute(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID);
- addTextAttribute(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF);
- addTextAttribute(IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF);
- addTextAttribute(IStyleConstantsXML.DOCTYPE_NAME);
- addTextAttribute(IStyleConstantsXML.PI_CONTENT);
- addTextAttribute(IStyleConstantsXML.PI_BORDER);
- addTextAttribute(IStyleConstantsXML.XML_CONTENT);
- addTextAttribute(IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- }
-
- protected void handlePropertyChange(PropertyChangeEvent event) {
- String styleKey = null;
-
- if (event != null) {
- String prefKey = event.getProperty();
- // check if preference changed is a style preference
- if (IStyleConstantsXML.TAG_NAME.equals(prefKey)) {
- styleKey = IStyleConstantsXML.TAG_NAME;
- }
- else if (IStyleConstantsXML.TAG_BORDER.equals(prefKey)) {
- styleKey = IStyleConstantsXML.TAG_BORDER;
- }
- else if (IStyleConstantsXML.TAG_ATTRIBUTE_NAME.equals(prefKey)) {
- styleKey = IStyleConstantsXML.TAG_ATTRIBUTE_NAME;
- }
- else if (IStyleConstantsXML.TAG_ATTRIBUTE_VALUE.equals(prefKey)) {
- styleKey = IStyleConstantsXML.TAG_ATTRIBUTE_VALUE;
- }
- else if (IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS.equals(prefKey)) {
- styleKey = IStyleConstantsXML.TAG_ATTRIBUTE_EQUALS;
- }
- else if (IStyleConstantsXML.COMMENT_BORDER.equals(prefKey)) {
- styleKey = IStyleConstantsXML.COMMENT_BORDER;
- }
- else if (IStyleConstantsXML.COMMENT_TEXT.equals(prefKey)) {
- styleKey = IStyleConstantsXML.COMMENT_TEXT;
- }
- else if (IStyleConstantsXML.CDATA_BORDER.equals(prefKey)) {
- styleKey = IStyleConstantsXML.CDATA_BORDER;
- }
- else if (IStyleConstantsXML.CDATA_TEXT.equals(prefKey)) {
- styleKey = IStyleConstantsXML.CDATA_TEXT;
- }
- else if (IStyleConstantsXML.DECL_BORDER.equals(prefKey)) {
- styleKey = IStyleConstantsXML.DECL_BORDER;
- }
- else if (IStyleConstantsXML.DOCTYPE_EXTERNAL_ID.equals(prefKey)) {
- styleKey = IStyleConstantsXML.DOCTYPE_EXTERNAL_ID;
- }
- else if (IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF.equals(prefKey)) {
- styleKey = IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_PUBREF;
- }
- else if (IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF.equals(prefKey)) {
- styleKey = IStyleConstantsXML.DOCTYPE_EXTERNAL_ID_SYSREF;
- }
- else if (IStyleConstantsXML.DOCTYPE_NAME.equals(prefKey)) {
- styleKey = IStyleConstantsXML.DOCTYPE_NAME;
- }
- else if (IStyleConstantsXML.PI_CONTENT.equals(prefKey)) {
- styleKey = IStyleConstantsXML.PI_CONTENT;
- }
- else if (IStyleConstantsXML.PI_BORDER.equals(prefKey)) {
- styleKey = IStyleConstantsXML.PI_BORDER;
- }
- else if (IStyleConstantsXML.XML_CONTENT.equals(prefKey)) {
- styleKey = IStyleConstantsXML.XML_CONTENT;
- }
- else if (IStyleConstantsHTML.SCRIPT_AREA_BORDER.equals(prefKey)) {
- styleKey = IStyleConstantsHTML.SCRIPT_AREA_BORDER;
- }
- }
-
- if (styleKey != null) {
- // overwrite style preference with new value
- addTextAttribute(styleKey);
- super.handlePropertyChange(event);
- }
- }
-
- /**
- * Returns the language.
- *
- * @return String
- */
- public String getLanguage() {
- return fLanguage;
- }
-
- /**
- * Sets the language.
- *
- * @param language
- * The language to set
- */
- public void setLanguage(String language) {
- this.fLanguage = language;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/DoubleQuotedStringRule.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/DoubleQuotedStringRule.java
deleted file mode 100644
index eabb960039..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/DoubleQuotedStringRule.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Frits Jalvingh 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:
- * Frits Jalvingh - initial version (bugfix for 150794)
- *******************************************************************************/
-package org.eclipse.jst.jsp.ui.internal.style.java;
-
-import org.eclipse.jface.text.rules.ICharacterScanner;
-import org.eclipse.jface.text.rules.IPredicateRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.Token;
-
-/**
- * This rule matches the double-quoted strings present in JSP tag attributes. A double-quoted
- * strings starts with \" (two characters!) and ends with \" (two characters!) too. The sequence
- * \" is escaped by the horror \\\" (4 chars!?) as per the JSP spec.
- *
- * @author <a href="mailto:jal@etc.to">Frits Jalvingh</a>
- * Created on Aug 5, 2007
- */
-public class DoubleQuotedStringRule implements IPredicateRule {
- private IToken fToken;
- private int m_qc;
-
- public DoubleQuotedStringRule(IToken tok) {
- fToken = tok;
- }
- public IToken evaluate(ICharacterScanner scanner, boolean resume) {
- if(resume) {
- if(findEnd(scanner, m_qc))
- return fToken;
- } else {
- int c= scanner.read();
- if(c == '\\') {
- c = scanner.read();
- if(c == '"' || c == '\'') {
- if(findEnd(scanner, c))
- return fToken;
- }
- scanner.unread();
- }
- scanner.unread();
- }
- return Token.UNDEFINED;
- }
-
- private boolean findEnd(ICharacterScanner scanner, int qc) {
- m_qc = qc;
- int count = 0;
- int c;
- int nsl = 0;
- while((c= scanner.read()) != ICharacterScanner.EOF) {
- count++;
- if(c == '\\') {
- nsl++;
- if(nsl >= 4)
- nsl = 0;
- } else if(c == qc) {
- if(nsl == 1)
- return true;
- nsl = 0;
- } else
- nsl= 0;
- }
- while(--count >= 0)
- scanner.unread();
- return false;
- }
-
- public IToken getSuccessToken() {
- return fToken;
- }
-
- public IToken evaluate(ICharacterScanner scanner) {
- return evaluate(scanner, false);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/IStyleConstantsJSPJava.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/IStyleConstantsJSPJava.java
deleted file mode 100644
index 8ff7724075..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/IStyleConstantsJSPJava.java
+++ /dev/null
@@ -1,20 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.ui.internal.style.java;
-
-public interface IStyleConstantsJSPJava {
- String JAVA_KEYWORD = "keyword"; //$NON-NLS-1$
- String JAVA_SINGLE_LINE_COMMENT = "single_line_comment"; //$NON-NLS-1$
- String JAVA_STRING = "string"; //$NON-NLS-1$
- String JAVA_DEFAULT = "default"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaCodeScanner.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaCodeScanner.java
deleted file mode 100644
index 4e05aef1a7..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaCodeScanner.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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
- * Frits Jalvingh - contributions for bug 150794
- *******************************************************************************/
-package org.eclipse.jst.jsp.ui.internal.style.java;
-
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.text.rules.EndOfLineRule;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.MultiLineRule;
-import org.eclipse.jface.text.rules.SingleLineRule;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WordRule;
-
-/**
- * A Java code scanner.
- */
-class JavaCodeScanner extends org.eclipse.jface.text.rules.RuleBasedScanner {
- private IToken fKeywordToken;
- private IToken fTypeToken;
- private IToken fStringToken;
- private IToken fSingleLineCommentToken;
- private IToken fDefaultToken;
-
- private static String[] fgKeywords = {"abstract", //$NON-NLS-1$
- "break", //$NON-NLS-1$
- "case", "catch", "class", "continue", //$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- "default", "do", //$NON-NLS-2$//$NON-NLS-1$
- "else", "extends", //$NON-NLS-2$//$NON-NLS-1$
- "final", "finally", "for", //$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- "if", "implements", "import", "instanceof", "interface", //$NON-NLS-5$//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- "native", "new", //$NON-NLS-2$//$NON-NLS-1$
- "package", "private", "protected", "public", //$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- "return", //$NON-NLS-1$
- "static", "super", "switch", "synchronized", //$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- "this", "throw", "throws", "transient", "try", //$NON-NLS-5$//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- "volatile", //$NON-NLS-1$
- "while", //$NON-NLS-1$
- "strictfp",//$NON-NLS-1$
- };
- private static String[] fgTypes = {"void", "boolean", "char", "byte", "short", "int", "long", "float", "double"};//$NON-NLS-9$//$NON-NLS-8$//$NON-NLS-7$//$NON-NLS-6$//$NON-NLS-5$//$NON-NLS-4$//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
- private static String[] fgConstants = {"false", "null", "true"};//$NON-NLS-3$//$NON-NLS-2$//$NON-NLS-1$
-
- /**
- * Creates a Java code scanner
- */
- public JavaCodeScanner() {
- super();
- }
-
- public void initializeRules() {
- List rules = new ArrayList();
-
- // Add rule for multiple line comments.
- rules.add(new MultiLineRule("/*", "*/", fSingleLineCommentToken));//$NON-NLS-1$ //$NON-NLS-2$
-
- // Add rule for single line comments.
- rules.add(new EndOfLineRule("//", fSingleLineCommentToken));//$NON-NLS-1$
-
- // Add rule for strings and character constants.
- rules.add(new SingleLineRule("\"", "\"", fStringToken, '\\'));//$NON-NLS-2$//$NON-NLS-1$
- rules.add(new SingleLineRule("'", "'", fStringToken, '\\'));//$NON-NLS-2$//$NON-NLS-1$
-
- // Add generic whitespace rule.
- //rules.add(new WhitespaceRule(new JavaWhitespaceDetector()));
-
- // Add word rule for keywords, types, and constants.
- WordRule wordRule = new WordRule(new JavaWordDetector(), fDefaultToken);
- for (int i = 0; i < fgKeywords.length; i++)
- wordRule.addWord(fgKeywords[i], fKeywordToken);
- for (int i = 0; i < fgTypes.length; i++)
- wordRule.addWord(fgTypes[i], fTypeToken);
- for (int i = 0; i < fgConstants.length; i++)
- wordRule.addWord(fgConstants[i], fTypeToken);
- rules.add(wordRule);
-
- // Add the double-quoted string rule
- rules.add(new DoubleQuotedStringRule(fStringToken));
-
- IRule[] result = new IRule[rules.size()];
- rules.toArray(result);
- setRules(result);
- }
-
- public void setTokenData(String tokenKey, Object data) {
- if (tokenKey == IStyleConstantsJSPJava.JAVA_KEYWORD) {
- fKeywordToken = new Token(data);
- fTypeToken = new Token(data);
- } else if (tokenKey == IStyleConstantsJSPJava.JAVA_STRING) {
- fStringToken = new Token(data);
- } else if (tokenKey == IStyleConstantsJSPJava.JAVA_SINGLE_LINE_COMMENT) {
- fSingleLineCommentToken = new Token(data);
- } else if (tokenKey == IStyleConstantsJSPJava.JAVA_DEFAULT) {
- fDefaultToken = new Token(data);
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaColorProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaColorProvider.java
deleted file mode 100644
index d0a2386717..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaColorProvider.java
+++ /dev/null
@@ -1,82 +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.jst.jsp.ui.internal.style.java;
-
-import org.eclipse.jdt.ui.PreferenceConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.RGB;
-
-/**
- * Colors used in the Java editor
- */
-public class JavaColorProvider {
-
- // people should not be setting these, even though they are currently not final
- public static RGB MULTI_LINE_COMMENT = new RGB(128, 0, 0);
- public static RGB SINGLE_LINE_COMMENT = new RGB(128, 128, 0);
- public static RGB KEYWORD = new RGB(0, 0, 128);
- public static RGB TYPE = new RGB(0, 0, 128);
- public static RGB STRING = new RGB(0, 128, 0);
- public static RGB DEFAULT = new RGB(0, 0, 0);
- public static RGB JAVADOC_KEYWORD = new RGB(0, 128, 0);
- public static RGB JAVADOC_TAG = new RGB(128, 128, 128);
- public static RGB JAVADOC_LINK = new RGB(128, 128, 128);
- public static RGB JAVADOC_DEFAULT = new RGB(0, 128, 128);
-
- public static int MULTI_LINE_COMMENT_BOLD = SWT.NORMAL;
- public static int SINGLE_LINE_COMMENT_BOLD = SWT.NORMAL;
- public static int KEYWORD_BOLD = SWT.BOLD;
- public static int TYPE_BOLD = SWT.BOLD;
- public static int STRING_BOLD = SWT.NORMAL;
- public static int DEFAULT_BOLD = SWT.NORMAL;
- public static int JAVADOC_KEYWORD_BOLD = SWT.BOLD;
- public static int JAVADOC_TAG_BOLD = SWT.NORMAL;
- public static int JAVADOC_LINK_BOLD = SWT.NORMAL;
- public static int JAVADOC_DEFAULT_BOLD = SWT.NORMAL;
-
- private static JavaColorProvider fInstance = null;
-
- public static JavaColorProvider getInstance() {
- if (fInstance == null) {
- fInstance = new JavaColorProvider();
- }
- return fInstance;
- }
-
- /**
- * Use colors from JDT plugin
- */
- public void loadJavaColors() {
- IPreferenceStore jdtStore = PreferenceConstants.getPreferenceStore();
- MULTI_LINE_COMMENT = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR);
- SINGLE_LINE_COMMENT = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR);
- KEYWORD = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR);
- TYPE = KEYWORD;
- STRING = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_STRING_COLOR);
- DEFAULT = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR);
- JAVADOC_KEYWORD = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR);
- JAVADOC_TAG = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR);
- JAVADOC_LINK = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR);
- JAVADOC_DEFAULT = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR);
-
- MULTI_LINE_COMMENT_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_BOLD) ? SWT.BOLD : SWT.NORMAL;
- SINGLE_LINE_COMMENT_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD) ? SWT.BOLD : SWT.NORMAL;
- KEYWORD_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD) ? SWT.BOLD : SWT.NORMAL;
- TYPE_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD) ? SWT.BOLD : SWT.NORMAL;
- STRING_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_STRING_BOLD) ? SWT.BOLD : SWT.NORMAL;
- DEFAULT_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD) ? SWT.BOLD : SWT.NORMAL;
- JAVADOC_TAG_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_JAVADOC_TAG_BOLD) ? SWT.BOLD : SWT.NORMAL;
- JAVADOC_LINK_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_JAVADOC_LINKS_BOLD) ? SWT.BOLD : SWT.NORMAL;
- JAVADOC_DEFAULT_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_JAVADOC_DEFAULT_BOLD) ? SWT.BOLD : SWT.NORMAL;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaWhitespaceDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaWhitespaceDetector.java
deleted file mode 100644
index 663c81a8ea..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaWhitespaceDetector.java
+++ /dev/null
@@ -1,26 +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.jst.jsp.ui.internal.style.java;
-
-
-
-/**
- * A java aware white space detector.
- */
-public class JavaWhitespaceDetector implements org.eclipse.jface.text.rules.IWhitespaceDetector {
-
- /**
- * @see org.eclipse.jface.text.rules.IWhitespaceDetector#isWhitespace
- */
- public boolean isWhitespace(char c) {
- return Character.isWhitespace(c);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaWordDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaWordDetector.java
deleted file mode 100644
index 80f6378984..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/JavaWordDetector.java
+++ /dev/null
@@ -1,32 +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.jst.jsp.ui.internal.style.java;
-
-
-/**
- * A Java aware word detector.
- */
-public class JavaWordDetector implements org.eclipse.jface.text.rules.IWordDetector {
-
- /**
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordIdentifierPart
- */
- public boolean isWordPart(char c) {
- return Character.isJavaIdentifierPart(c);
- }
-
- /**
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordIdentifierStart
- */
- public boolean isWordStart(char c) {
- return Character.isJavaIdentifierStart(c);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/LineStyleProviderForJava.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/LineStyleProviderForJava.java
deleted file mode 100644
index 853af7caab..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/java/LineStyleProviderForJava.java
+++ /dev/null
@@ -1,324 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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
- * Frits Jalvingh - contributions for bug 150794
- *******************************************************************************/
-package org.eclipse.jst.jsp.ui.internal.style.java;
-
-import java.util.Collection;
-
-import org.eclipse.jdt.ui.PreferenceConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.style.IStyleConstantsJSP;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.wst.html.ui.internal.style.IStyleConstantsHTML;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.ui.internal.provisional.style.AbstractLineStyleProvider;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-
-// Note: many of the methods in this class were based on (or copied from) those
-// found in the example Java Editor
-public class LineStyleProviderForJava extends AbstractLineStyleProvider implements LineStyleProvider{
-
- /** The scanner it uses */
- private JavaCodeScanner fScanner;
-
- public LineStyleProviderForJava() {
- super();
- fScanner = new JavaCodeScanner();
- loadColors(); // Make sure we have rules before we start parsing
- }
-
- /**
- * Adds style information to the given text presentation.
- *
- * @param presentation the text presentation to be extended
- * @param offset the offset of the range to be styled
- * @param length the length of the range to be styled
- * @param attr the attribute describing the style of the range to be styled
- */
- private void addRange(Collection presentation, int offset, int length, TextAttribute attr) {
- // support for user defined backgroud for JSP scriptlet regions
- TextAttribute ta = (TextAttribute)getTextAttributes().get(IStyleConstantsJSP.JSP_CONTENT);
- Color bgColor = ta.getBackground();
- if (bgColor == null)
- bgColor = attr.getBackground();
- StyleRange result = new StyleRange(offset, length, attr.getForeground(), bgColor, attr.getStyle());
- if((attr.getStyle() & TextAttribute.STRIKETHROUGH) != 0) {
- result.strikeout = true;
- }
- if((attr.getStyle() & TextAttribute.UNDERLINE) != 0) {
- result.underline = true;
- }
- presentation.add(result);
- }
-
- /**
- * Looks up the colorKey in the preference store and adds the style
- * information to list of TextAttributes
- *
- * @param colorKey
- */
- private void addJavaTextAttribute(String colorKey) {
- IPreferenceStore store = getJavaColorPreferences();
- if (store != null && colorKey != null) {
- TextAttribute ta = null;
- if (colorKey == IStyleConstantsJSPJava.JAVA_KEYWORD) {
- // keyword
- RGB foreground = PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR);
- boolean bold = store.getBoolean(PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD);
- boolean italics = store.getBoolean(PreferenceConstants.EDITOR_JAVA_KEYWORD_ITALIC);
- boolean strikethrough = store.getBoolean(PreferenceConstants.EDITOR_JAVA_KEYWORD_STRIKETHROUGH);
- boolean underline = store.getBoolean(PreferenceConstants.EDITOR_JAVA_KEYWORD_UNDERLINE);
- int style = SWT.NORMAL;
- if (bold) {
- style = style | SWT.BOLD;
- }
- if (italics) {
- style = style | SWT.ITALIC;
- }
- if (strikethrough) {
- style = style | TextAttribute.STRIKETHROUGH;
- }
- if (underline) {
- style = style | TextAttribute.UNDERLINE;
- }
-
- ta = createTextAttribute(foreground, null, style);
- } else if (colorKey == IStyleConstantsJSPJava.JAVA_STRING) {
- // string
- RGB foreground = PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_STRING_COLOR);
- boolean bold = store.getBoolean(PreferenceConstants.EDITOR_STRING_BOLD);
- boolean italics = store.getBoolean(PreferenceConstants.EDITOR_STRING_ITALIC);
- boolean strikethrough = store.getBoolean(PreferenceConstants.EDITOR_STRING_STRIKETHROUGH);
- boolean underline = store.getBoolean(PreferenceConstants.EDITOR_STRING_UNDERLINE);
- int style = SWT.NORMAL;
- if (bold) {
- style = style | SWT.BOLD;
- }
- if (italics) {
- style = style | SWT.ITALIC;
- }
- if (strikethrough) {
- style = style | TextAttribute.STRIKETHROUGH;
- }
- if (underline) {
- style = style | TextAttribute.UNDERLINE;
- }
-
- ta = createTextAttribute(foreground, null, style);
- } else if (colorKey == IStyleConstantsJSPJava.JAVA_SINGLE_LINE_COMMENT) {
- // single line comment
- RGB foreground = PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR);
- boolean bold = store.getBoolean(PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD);
- boolean italics = store.getBoolean(PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_ITALIC);
- boolean strikethrough = store.getBoolean(PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_STRIKETHROUGH);
- boolean underline = store.getBoolean(PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_UNDERLINE);
- int style = SWT.NORMAL;
- if (bold) {
- style = style | SWT.BOLD;
- }
- if (italics) {
- style = style | SWT.ITALIC;
- }
- if (strikethrough) {
- style = style | TextAttribute.STRIKETHROUGH;
- }
- if (underline) {
- style = style | TextAttribute.UNDERLINE;
- }
-
- ta = createTextAttribute(foreground, null, style);
- } else if (colorKey == IStyleConstantsJSPJava.JAVA_DEFAULT) {
- // default
- RGB foreground = PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR);
- boolean bold = store.getBoolean(PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD);
- boolean italics = store.getBoolean(PreferenceConstants.EDITOR_JAVA_DEFAULT_ITALIC);
- boolean strikethrough = store.getBoolean(PreferenceConstants.EDITOR_JAVA_DEFAULT_STRIKETHROUGH);
- boolean underline = store.getBoolean(PreferenceConstants.EDITOR_JAVA_DEFAULT_UNDERLINE);
- int style = SWT.NORMAL;
- if (bold) {
- style = style | SWT.BOLD;
- }
- if (italics) {
- style = style | SWT.ITALIC;
- }
- if (strikethrough) {
- style = style | TextAttribute.STRIKETHROUGH;
- }
- if (underline) {
- style = style | TextAttribute.UNDERLINE;
- }
-
- ta = createTextAttribute(foreground, null, style);
- }
- if (ta != null) {
- getTextAttributes().put(colorKey, ta);
- fScanner.setTokenData(colorKey, ta);
- }
- }
- }
-
- /**
- * Returns a text attribute encoded in the given token. If the token's
- * data is not <code>null</code> and a text attribute it is assumed that
- * it is the encoded text attribute. It returns the default text attribute
- * if there is no encoded text attribute found.
- *
- * @param token the token whose text attribute is to be determined
- * @return the token's text attribute
- */
- private TextAttribute getTokenTextAttribute(IToken token) {
- TextAttribute ta = null;
-
- Object data = token.getData();
- if (data instanceof TextAttribute)
- ta = (TextAttribute)data;
- else {
- ta = (TextAttribute)getTextAttributes().get(IStyleConstantsJSPJava.JAVA_DEFAULT);
- }
- return ta;
- }
-
- protected void loadColors() {
- addTextAttribute(IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- addTextAttribute(IStyleConstantsXML.TAG_ATTRIBUTE_NAME);
- addTextAttribute(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
- addTextAttribute(IStyleConstantsJSP.JSP_CONTENT);
-
- addJavaTextAttribute(IStyleConstantsJSPJava.JAVA_KEYWORD);
- addJavaTextAttribute(IStyleConstantsJSPJava.JAVA_STRING);
- addJavaTextAttribute(IStyleConstantsJSPJava.JAVA_SINGLE_LINE_COMMENT);
- addJavaTextAttribute(IStyleConstantsJSPJava.JAVA_DEFAULT);
-
- fScanner.initializeRules();
- }
-
- protected void handlePropertyChange(PropertyChangeEvent event) {
- String styleKey = null;
- String javaStyleKey = null;
-
- if (event != null) {
- String prefKey = event.getProperty();
- // check if preference changed is a style preference
- if (IStyleConstantsHTML.SCRIPT_AREA_BORDER.equals(prefKey)) {
- styleKey = IStyleConstantsHTML.SCRIPT_AREA_BORDER;
- }
- else if (IStyleConstantsXML.TAG_ATTRIBUTE_NAME.equals(prefKey)) {
- styleKey = IStyleConstantsXML.TAG_ATTRIBUTE_NAME;
- }
- else if (IStyleConstantsXML.TAG_ATTRIBUTE_VALUE.equals(prefKey)) {
- styleKey = IStyleConstantsXML.TAG_ATTRIBUTE_VALUE;
- } else if (IStyleConstantsJSP.JSP_CONTENT.equals(prefKey)) {
- styleKey = IStyleConstantsJSP.JSP_CONTENT;
- } else if (PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR.equals(prefKey) || (PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD.equals(prefKey))|| (PreferenceConstants.EDITOR_JAVA_KEYWORD_ITALIC.equals(prefKey))) {
- javaStyleKey = IStyleConstantsJSPJava.JAVA_KEYWORD;
- } else if (PreferenceConstants.EDITOR_STRING_COLOR.equals(prefKey) || (PreferenceConstants.EDITOR_STRING_BOLD.equals(prefKey))|| (PreferenceConstants.EDITOR_STRING_ITALIC.equals(prefKey))) {
- javaStyleKey = IStyleConstantsJSPJava.JAVA_STRING;
- } else if (PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR.equals(prefKey) || (PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD.equals(prefKey))|| (PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_ITALIC.equals(prefKey))) {
- javaStyleKey = IStyleConstantsJSPJava.JAVA_SINGLE_LINE_COMMENT;
- } else if (PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR.equals(prefKey) || (PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD.equals(prefKey))|| (PreferenceConstants.EDITOR_JAVA_DEFAULT_ITALIC.equals(prefKey))) {
- javaStyleKey = IStyleConstantsJSPJava.JAVA_DEFAULT;
- }
- }
-
- if (styleKey != null) {
- // overwrite style preference with new value
- addTextAttribute(styleKey);
- }
- if (javaStyleKey != null) {
- // overwrite style preference with new value
- addJavaTextAttribute(javaStyleKey);
- fScanner.initializeRules();
- }
- if (styleKey != null || javaStyleKey != null) {
- // force a full update of the text viewer
- fRecHighlighter.refreshDisplay();
- }
- }
-
- public boolean prepareRegions(ITypedRegion typedRegion, int ssssrequestedStart, int ssssrequestedLength, Collection holdResults) {
- boolean result = true;
- /* Initialize the text attributes. Also load the colors and initialize the rules of the scanner */
- getTextAttributes();
- try {
- // ideally, eventually, we'll have a "virtualDocument" we can
- // refer to, but for now ... we'll simple rescan the one region.
- // use simple adjustment (since "sub-content" starts at 0
- int lastStart = typedRegion.getOffset();
- int length = 0;
- IToken lastToken = Token.UNDEFINED;
- fScanner.setRange(getDocument(), lastStart, typedRegion.getLength());
- while (true) {
- IToken token = fScanner.nextToken();
- if (token.isEOF()) {
- if (!lastToken.isUndefined() && length != 0) {
- addRange(holdResults, lastStart, length, getTokenTextAttribute(lastToken));
- }
- break;
- }
- if (token.isWhitespace()) {
- length += fScanner.getTokenLength();
- continue;
- }
- if (lastToken.isUndefined()) {
- lastToken = token;
- length += fScanner.getTokenLength();
- continue;
- }
- if (token != lastToken) {
- addRange(holdResults, lastStart, length, getTokenTextAttribute(lastToken));
- lastToken = token;
- lastStart = fScanner.getTokenOffset();
- length = fScanner.getTokenLength();
- continue;
- }
- length += fScanner.getTokenLength();
- }
- } catch (Exception e) {
- // shouldn't happen, but we don't want it to stop other
- // highlighting, if it does.
- result = false;
- }
- return result;
- }
-
- protected IPreferenceStore getColorPreferences() {
- return JSPUIPlugin.getDefault().getPreferenceStore();
- }
-
- private IPreferenceStore getJavaColorPreferences() {
- return PreferenceConstants.getPreferenceStore();
- }
-
- protected void registerPreferenceManager() {
- getColorPreferences().addPropertyChangeListener(fPreferenceListener);
- getJavaColorPreferences().addPropertyChangeListener(fPreferenceListener);
- }
-
- protected void unRegisterPreferenceManager() {
- getColorPreferences().removePropertyChangeListener(fPreferenceListener);
- getJavaColorPreferences().removePropertyChangeListener(fPreferenceListener);
- }
-
- protected TextAttribute getAttributeFor(ITextRegion region) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/IStyleConstantsJSPEL.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/IStyleConstantsJSPEL.java
deleted file mode 100644
index b2c4829842..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/IStyleConstantsJSPEL.java
+++ /dev/null
@@ -1,18 +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
- * Jens Lukowski/Innoopract - initial renaming/restructuring
- *******************************************************************************/
-
-package org.eclipse.jst.jsp.ui.internal.style.jspel;
-
-public interface IStyleConstantsJSPEL {
- String EL_KEYWORD = "keyword"; //$NON-NLS-1$
- String EL_DEFAULT = "default"; //$NON-NLS-1$
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELCodeScanner.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELCodeScanner.java
deleted file mode 100644
index 7534b9bfd9..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELCodeScanner.java
+++ /dev/null
@@ -1,83 +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.jst.jsp.ui.internal.style.jspel;
-
-
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WhitespaceRule;
-import org.eclipse.jface.text.rules.WordRule;
-
-/**
- * A Java code scanner.
- */
-public class JSPELCodeScanner extends org.eclipse.jface.text.rules.RuleBasedScanner {
- private IToken fKeywordToken;
- private IToken fTypeToken;
- private IToken fDefaultToken;
-
- private static String[] fgKeywords = {
- "and", //$NON-NLS-1$
- "did", //$NON-NLS-1$
- "div", //$NON-NLS-1$
- "empty", //$NON-NLS-1$
- "eq", //$NON-NLS-1$
- "ge", //$NON-NLS-1$
- "gt", //$NON-NLS-1$
- "or", //$NON-NLS-1$
- "le", //$NON-NLS-1$
- "lt", //$NON-NLS-1$
- "mod", //$NON-NLS-1$
- "ne", //$NON-NLS-1$
- "not" //$NON-NLS-1$
- };
- private static String[] fgConstants = {"false", "true"};//$NON-NLS-2$//$NON-NLS-1$
-
- /**
- * Creates a Java code scanner
- */
- public JSPELCodeScanner() {
- super();
- }
-
- public void initializeRules() {
- List rules = new ArrayList();
-
- // Add generic whitespace rule.
- rules.add(new WhitespaceRule(new JSPELWhitespaceDetector()));
-
- // Add word rule for keywords, types, and constants.
- WordRule wordRule = new WordRule(new JSPELWordDetector(), fDefaultToken);
- for (int i = 0; i < fgKeywords.length; i++)
- wordRule.addWord(fgKeywords[i], fKeywordToken);
- for (int i = 0; i < fgConstants.length; i++)
- wordRule.addWord(fgConstants[i], fTypeToken);
- rules.add(wordRule);
-
- IRule[] result = new IRule[rules.size()];
- rules.toArray(result);
- setRules(result);
- }
-
- public void setTokenData(String tokenKey, Object data) {
- if (tokenKey == IStyleConstantsJSPEL.EL_KEYWORD) {
- fKeywordToken = new Token(data);
- fTypeToken = new Token(data);
- } else if (tokenKey == IStyleConstantsJSPEL.EL_DEFAULT) {
- fDefaultToken = new Token(data);
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELColorProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELColorProvider.java
deleted file mode 100644
index 01178a2da1..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELColorProvider.java
+++ /dev/null
@@ -1,102 +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.jst.jsp.ui.internal.style.jspel;
-
-import org.eclipse.jdt.ui.PreferenceConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.RGB;
-
-/**
- * Colors used in the Java editor
- */
-public class JSPELColorProvider {
-
- // people should not be setting these, even though they are currently not final
- public static RGB MULTI_LINE_COMMENT = new RGB(128, 0, 0);
- public static RGB SINGLE_LINE_COMMENT = new RGB(128, 128, 0);
- public static RGB KEYWORD = new RGB(0, 0, 128);
- public static RGB TYPE = new RGB(0, 0, 128);
- public static RGB STRING = new RGB(0, 128, 0);
- public static RGB DEFAULT = new RGB(0, 0, 0);
- public static RGB JAVADOC_KEYWORD = new RGB(0, 128, 0);
- public static RGB JAVADOC_TAG = new RGB(128, 128, 128);
- public static RGB JAVADOC_LINK = new RGB(128, 128, 128);
- public static RGB JAVADOC_DEFAULT = new RGB(0, 128, 128);
-
- public static int MULTI_LINE_COMMENT_BOLD = SWT.NORMAL;
- public static int SINGLE_LINE_COMMENT_BOLD = SWT.NORMAL;
- public static int KEYWORD_BOLD = SWT.BOLD;
- public static int TYPE_BOLD = SWT.BOLD;
- public static int STRING_BOLD = SWT.NORMAL;
- public static int DEFAULT_BOLD = SWT.NORMAL;
- public static int JAVADOC_KEYWORD_BOLD = SWT.BOLD;
- public static int JAVADOC_TAG_BOLD = SWT.NORMAL;
- public static int JAVADOC_LINK_BOLD = SWT.NORMAL;
- public static int JAVADOC_DEFAULT_BOLD = SWT.NORMAL;
-
- /**
- * @deprecated all editors use same
- */
- public static RGB EDITOR_BACKGROUND = new RGB(255, 255, 255);
- /**
- * @deprecated all editors use same
- */
- public static boolean EDITOR_CURRENT_LINE = true;
- /**
- * @deprecated all editors use same
- */
- public static RGB EDITOR_CURRENT_LINE_COLOR = new RGB(128, 128, 128);
-
- private static JSPELColorProvider fInstance = null;
-
- public static JSPELColorProvider getInstance() {
- if (fInstance == null) {
- fInstance = new JSPELColorProvider();
- }
- return fInstance;
- }
-
- /**
- * Use colors from JDT plugin
- */
- public void loadJavaColors() {
-
- IPreferenceStore jdtStore = PreferenceConstants.getPreferenceStore();
- MULTI_LINE_COMMENT = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_COLOR);
- SINGLE_LINE_COMMENT = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_COLOR);
- KEYWORD = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR);
- TYPE = KEYWORD;
- STRING = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_STRING_COLOR);
- DEFAULT = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR);
- JAVADOC_KEYWORD = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_JAVADOC_KEYWORD_COLOR);
- JAVADOC_TAG = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_JAVADOC_TAG_COLOR);
- JAVADOC_LINK = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_JAVADOC_LINKS_COLOR);
- JAVADOC_DEFAULT = PreferenceConverter.getColor(jdtStore, PreferenceConstants.EDITOR_JAVADOC_DEFAULT_COLOR);
-
- MULTI_LINE_COMMENT_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_MULTI_LINE_COMMENT_BOLD) ? SWT.BOLD : SWT.NORMAL;
- SINGLE_LINE_COMMENT_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_SINGLE_LINE_COMMENT_BOLD) ? SWT.BOLD : SWT.NORMAL;
- KEYWORD_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD) ? SWT.BOLD : SWT.NORMAL;
- TYPE_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD) ? SWT.BOLD : SWT.NORMAL;
- STRING_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_STRING_BOLD) ? SWT.BOLD : SWT.NORMAL;
- DEFAULT_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD) ? SWT.BOLD : SWT.NORMAL;
- JAVADOC_TAG_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_JAVADOC_TAG_BOLD) ? SWT.BOLD : SWT.NORMAL;
- JAVADOC_LINK_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_JAVADOC_LINKS_BOLD) ? SWT.BOLD : SWT.NORMAL;
- JAVADOC_DEFAULT_BOLD = jdtStore.getBoolean(PreferenceConstants.EDITOR_JAVADOC_DEFAULT_BOLD) ? SWT.BOLD : SWT.NORMAL;
-
-// EDITOR_BACKGROUND = new RGB(255, 255, 255);
-
-// IPreferenceStore sseStore = SSEUIPlugin.getDefault().getPreferenceStore();
-// EDITOR_CURRENT_LINE = sseStore.getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE);
-// EDITOR_CURRENT_LINE_COLOR = PreferenceConverter.getColor(sseStore, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELWhitespaceDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELWhitespaceDetector.java
deleted file mode 100644
index e8997007e4..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELWhitespaceDetector.java
+++ /dev/null
@@ -1,26 +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.jst.jsp.ui.internal.style.jspel;
-
-
-
-/**
- * A java aware white space detector.
- */
-public class JSPELWhitespaceDetector implements org.eclipse.jface.text.rules.IWhitespaceDetector {
-
- /**
- * @see org.eclipse.jface.text.rules.IWhitespaceDetector#isWhitespace
- */
- public boolean isWhitespace(char c) {
- return Character.isWhitespace(c);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELWordDetector.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELWordDetector.java
deleted file mode 100644
index a10a7ab0da..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/JSPELWordDetector.java
+++ /dev/null
@@ -1,32 +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.jst.jsp.ui.internal.style.jspel;
-
-
-/**
- * A Java aware word detector.
- */
-public class JSPELWordDetector implements org.eclipse.jface.text.rules.IWordDetector {
-
- /**
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordIdentifierPart
- */
- public boolean isWordPart(char c) {
- return Character.isJavaIdentifierPart(c);
- }
-
- /**
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordIdentifierStart
- */
- public boolean isWordStart(char c) {
- return Character.isJavaIdentifierStart(c);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/LineStyleProviderForJSPEL.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/LineStyleProviderForJSPEL.java
deleted file mode 100644
index 3be63566e5..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/style/jspel/LineStyleProviderForJSPEL.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.ui.internal.style.jspel;
-
-import java.util.Collection;
-
-import org.eclipse.jdt.ui.PreferenceConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.style.IStyleConstantsJSP;
-import org.eclipse.jst.jsp.ui.internal.style.java.IStyleConstantsJSPJava;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.wst.html.ui.internal.style.IStyleConstantsHTML;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.ui.internal.preferences.ui.ColorHelper;
-import org.eclipse.wst.sse.ui.internal.provisional.style.AbstractLineStyleProvider;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-import org.eclipse.wst.xml.ui.internal.style.IStyleConstantsXML;
-
-// Note: many of the methods in this class were based on (or copied from)
-// those
-// found in the example Java Editor
-public class LineStyleProviderForJSPEL extends AbstractLineStyleProvider implements LineStyleProvider {
-
- /** The scanner it uses */
- private JSPELCodeScanner fScanner;
-
- public LineStyleProviderForJSPEL() {
- super();
- fScanner = new JSPELCodeScanner();
- }
-
- /**
- * Adds style information to the given text presentation.
- *
- * @param presentation
- * the text presentation to be extended
- * @param offset
- * the offset of the range to be styled
- * @param length
- * the length of the range to be styled
- * @param attr
- * the attribute describing the style of the range to be styled
- */
- private void addRange(Collection presentation, int offset, int length, TextAttribute attr) {
- // support for user defined backgroud for JSP scriptlet regions
- String styleString = JSPUIPlugin.getDefault().getPreferenceStore().getString(IStyleConstantsJSP.JSP_CONTENT);
- String[] prefs = ColorHelper.unpackStylePreferences(styleString);
- Color bgColor = (prefs != null && prefs.length == 3 && prefs[1].startsWith("#") && Display.getCurrent() != null) //$NON-NLS-1$
- ? new Color(Display.getCurrent(), ColorHelper.toRGB(prefs[1])) : attr.getBackground();
-
- presentation.add(new StyleRange(offset, length, attr.getForeground(), bgColor, attr.getStyle()));
- }
-
- /**
- * Looks up the colorKey in the preference store and adds the style
- * information to list of TextAttributes
- *
- * @param colorKey
- */
- private void addJavaTextAttribute(String colorKey) {
- IPreferenceStore store = getJavaColorPreferences();
- if (store != null && colorKey != null) {
- TextAttribute ta = null;
- if (colorKey == IStyleConstantsJSPEL.EL_KEYWORD) {
- // keyword
- RGB foreground = PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR);
- boolean bold = store.getBoolean(PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD);
- boolean italics = store.getBoolean(PreferenceConstants.EDITOR_JAVA_KEYWORD_ITALIC);
- boolean strikethrough = store.getBoolean(PreferenceConstants.EDITOR_JAVA_KEYWORD_STRIKETHROUGH);
- boolean underline = store.getBoolean(PreferenceConstants.EDITOR_JAVA_KEYWORD_UNDERLINE);
- int style = SWT.NORMAL;
- if (bold) {
- style = style | SWT.BOLD;
- }
- if (italics) {
- style = style | SWT.ITALIC;
- }
- if (strikethrough) {
- style = style | TextAttribute.STRIKETHROUGH;
- }
- if (underline) {
- style = style | TextAttribute.UNDERLINE;
- }
-
- ta = createTextAttribute(foreground, null, style);
- } else if (colorKey == IStyleConstantsJSPEL.EL_DEFAULT) {
- // default
- RGB foreground = PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR);
- boolean bold = store.getBoolean(PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD);
- boolean italics = store.getBoolean(PreferenceConstants.EDITOR_JAVA_DEFAULT_ITALIC);
- boolean strikethrough = store.getBoolean(PreferenceConstants.EDITOR_JAVA_DEFAULT_STRIKETHROUGH);
- boolean underline = store.getBoolean(PreferenceConstants.EDITOR_JAVA_DEFAULT_UNDERLINE);
- int style = SWT.NORMAL;
- if (bold) {
- style = style | SWT.BOLD;
- }
- if (italics) {
- style = style | SWT.ITALIC;
- }
- if (strikethrough) {
- style = style | TextAttribute.STRIKETHROUGH;
- }
- if (underline) {
- style = style | TextAttribute.UNDERLINE;
- }
-
- ta = createTextAttribute(foreground, null, style);
- }
- if (ta != null) {
- getTextAttributes().put(colorKey, ta);
- fScanner.setTokenData(colorKey, ta);
- }
- }
- }
-
- /**
- * Returns a text attribute encoded in the given token. If the token's
- * data is not <code>null</code> and a text attribute it is assumed that
- * it is the encoded text attribute. It returns the default text attribute
- * if there is no encoded text attribute found.
- *
- * @param token
- * the token whose text attribute is to be determined
- * @return the token's text attribute
- */
- private TextAttribute getTokenTextAttribute(IToken token) {
- TextAttribute ta = null;
-
- Object data = token.getData();
- if (data instanceof TextAttribute)
- ta = (TextAttribute) data;
- else {
- ta = (TextAttribute) getTextAttributes().get(IStyleConstantsJSPJava.JAVA_DEFAULT);
- }
- return ta;
- }
-
- protected void loadColors() {
- addTextAttribute(IStyleConstantsHTML.SCRIPT_AREA_BORDER);
- addTextAttribute(IStyleConstantsXML.TAG_ATTRIBUTE_NAME);
- addTextAttribute(IStyleConstantsXML.TAG_ATTRIBUTE_VALUE);
-
- addJavaTextAttribute(IStyleConstantsJSPJava.JAVA_KEYWORD);
- addJavaTextAttribute(IStyleConstantsJSPJava.JAVA_DEFAULT);
-
- fScanner.initializeRules();
- }
-
- protected void handlePropertyChange(PropertyChangeEvent event) {
- String styleKey = null;
- String javaStyleKey = null;
-
- if (event != null) {
- String prefKey = event.getProperty();
- // check if preference changed is a style preference
- if (IStyleConstantsHTML.SCRIPT_AREA_BORDER.equals(prefKey)) {
- styleKey = IStyleConstantsHTML.SCRIPT_AREA_BORDER;
- } else if (IStyleConstantsXML.TAG_ATTRIBUTE_NAME.equals(prefKey)) {
- styleKey = IStyleConstantsXML.TAG_ATTRIBUTE_NAME;
- } else if (IStyleConstantsXML.TAG_ATTRIBUTE_VALUE.equals(prefKey)) {
- styleKey = IStyleConstantsXML.TAG_ATTRIBUTE_VALUE;
- } else if (PreferenceConstants.EDITOR_JAVA_KEYWORD_COLOR.equals(prefKey) || (PreferenceConstants.EDITOR_JAVA_KEYWORD_BOLD.equals(prefKey)) || (PreferenceConstants.EDITOR_JAVA_KEYWORD_ITALIC.equals(prefKey))) {
- javaStyleKey = IStyleConstantsJSPEL.EL_KEYWORD;
- } else if (PreferenceConstants.EDITOR_JAVA_DEFAULT_COLOR.equals(prefKey) || (PreferenceConstants.EDITOR_JAVA_DEFAULT_BOLD.equals(prefKey)) || (PreferenceConstants.EDITOR_JAVA_DEFAULT_ITALIC.equals(prefKey))) {
- javaStyleKey = IStyleConstantsJSPEL.EL_DEFAULT;
- }
- }
-
- if (styleKey != null) {
- // overwrite style preference with new value
- addTextAttribute(styleKey);
- }
- if (javaStyleKey != null) {
- // overwrite style preference with new value
- addJavaTextAttribute(javaStyleKey);
- fScanner.initializeRules();
- }
- if (styleKey != null || javaStyleKey != null) {
- // force a full update of the text viewer
- fRecHighlighter.refreshDisplay();
- }
- }
-
- public boolean prepareRegions(ITypedRegion typedRegion, int ssssrequestedStart, int ssssrequestedLength, Collection holdResults) {
- boolean result = true;
- try {
- // ideally, eventually, we'll have a "virtualDocument" we can
- // refer to, but for now ... we'll simple rescan the one region.
- // use simple adjustment (since "sub-content" starts at 0
- int offsetAdjustment = typedRegion.getOffset();
- String content = fDocument.get(typedRegion.getOffset(), typedRegion.getLength());
- IDocument document = new Document(content);
-
- int lastStart = 0;
- int length = 0;
- IToken lastToken = Token.UNDEFINED;
-
- int remainingLength = typedRegion.getLength();
- fScanner.setRange(document, lastStart, remainingLength);
-
- while (true) {
-
- IToken token = fScanner.nextToken();
-
- if (token.isEOF()) {
- if (!lastToken.isUndefined() && length != 0)
- addRange(holdResults, lastStart + offsetAdjustment, length, getTokenTextAttribute(lastToken));
- break;
- }
-
- if (token.isWhitespace()) {
- length += fScanner.getTokenLength();
- continue;
- }
-
- if (lastToken.isUndefined()) {
- lastToken = token;
- length += fScanner.getTokenLength();
- continue;
- }
-
- if (token != lastToken) {
- addRange(holdResults, lastStart + offsetAdjustment, length, getTokenTextAttribute(lastToken));
- lastToken = token;
- lastStart = fScanner.getTokenOffset();
- length = fScanner.getTokenLength();
- continue;
- }
-
- length += fScanner.getTokenLength();
- }
- } catch (BadLocationException e) {
- // shouldn't happen, but we don't want it to stop other
- // highlighting, if it does.
- result = false;
- }
- return result;
- }
-
- protected IPreferenceStore getColorPreferences() {
- return JSPUIPlugin.getDefault().getPreferenceStore();
- }
-
- private IPreferenceStore getJavaColorPreferences() {
- return PreferenceConstants.getPreferenceStore();
- }
-
- protected void registerPreferenceManager() {
- getColorPreferences().addPropertyChangeListener(fPreferenceListener);
- getJavaColorPreferences().addPropertyChangeListener(fPreferenceListener);
- }
-
- protected void unRegisterPreferenceManager() {
- getColorPreferences().removePropertyChangeListener(fPreferenceListener);
- getJavaColorPreferences().removePropertyChangeListener(fPreferenceListener);
- }
-
- protected TextAttribute getAttributeFor(ITextRegion region) {
- return null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPInformationProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPInformationProvider.java
deleted file mode 100644
index 327371b954..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPInformationProvider.java
+++ /dev/null
@@ -1,45 +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.ui.internal.taginfo;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.information.IInformationProvider;
-import org.eclipse.jface.text.information.IInformationProviderExtension;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-
-/**
- * Provides context help for JSP tags (Show tooltip description)
- *
- * @deprecated StructuredTextViewerConfiguration creates the appropriate
- * information provider
- */
-public class JSPInformationProvider implements IInformationProvider, IInformationProviderExtension {
- private ITextHover fTextHover = null;
-
- public JSPInformationProvider() {
- fTextHover = SSEUIPlugin.getDefault().getTextHoverManager().createBestMatchHover(new JSPTagInfoHoverProcessor());
- }
-
- public IRegion getSubject(ITextViewer textViewer, int offset) {
- return fTextHover.getHoverRegion(textViewer, offset);
- }
-
- public String getInformation(ITextViewer textViewer, IRegion subject) {
- return (String) getInformation2(textViewer, subject);
- }
-
- public Object getInformation2(ITextViewer textViewer, IRegion subject) {
- return fTextHover.getHoverInfo(textViewer, subject);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java
deleted file mode 100644
index 117ade2457..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocHoverProcessor.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.ui.internal.taginfo;
-
-import java.io.Reader;
-
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IMember;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jdt.ui.JavaElementLabels;
-import org.eclipse.jdt.ui.JavadocContentAccess;
-import org.eclipse.jface.internal.text.html.HTMLPrinter;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-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.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.ui.internal.taginfo.AbstractHoverProcessor;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-
-/**
- * Provides javadoc hover help documentation for java code inside JSPs
- */
-public class JSPJavaJavadocHoverProcessor extends AbstractHoverProcessor {
- /*
- * Bulk of the work was copied from
- * org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover
- */
- private final long LABEL_FLAGS = JavaElementLabels.ALL_FULLY_QUALIFIED | JavaElementLabels.M_PRE_RETURNTYPE | JavaElementLabels.M_PARAMETER_TYPES | JavaElementLabels.M_PARAMETER_NAMES | JavaElementLabels.M_EXCEPTIONS | JavaElementLabels.F_PRE_TYPE_SIGNATURE | JavaElementLabels.M_PRE_TYPE_PARAMETERS | JavaElementLabels.T_TYPE_PARAMETERS | JavaElementLabels.USE_RESOLVED;
- private final long LOCAL_VARIABLE_FLAGS = LABEL_FLAGS & ~JavaElementLabels.F_FULLY_QUALIFIED | JavaElementLabels.F_POST_QUALIFIED;
-
- protected String getHoverInfo(IJavaElement[] result) {
- StringBuffer buffer = new StringBuffer();
- int nResults = result.length;
- if (nResults == 0)
- return null;
-
- if (nResults > 1) {
-
- for (int i = 0; i < result.length; i++) {
- HTMLPrinter.startBulletList(buffer);
- IJavaElement curr = result[i];
- if (curr instanceof IMember || curr.getElementType() == IJavaElement.LOCAL_VARIABLE)
- HTMLPrinter.addBullet(buffer, getInfoText(curr));
- HTMLPrinter.endBulletList(buffer);
- }
-
- }
- else {
-
- IJavaElement curr = result[0];
- if (curr instanceof IMember) {
- IMember member = (IMember) curr;
- HTMLPrinter.addSmallHeader(buffer, getInfoText(member));
- Reader reader;
- try {
- reader = JavadocContentAccess.getHTMLContentReader(member, true, true);
- }
- catch (JavaModelException ex) {
- return null;
- }
- if (reader != null) {
- HTMLPrinter.addParagraph(buffer, reader);
- }
- }
- else if (curr.getElementType() == IJavaElement.LOCAL_VARIABLE || curr.getElementType() == IJavaElement.TYPE_PARAMETER)
- HTMLPrinter.addSmallHeader(buffer, getInfoText(curr));
- }
-
- if (buffer.length() > 0) {
- HTMLPrinter.insertPageProlog(buffer, 0);
- HTMLPrinter.addPageEpilog(buffer);
- return buffer.toString();
- }
-
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.ITextHover#getHoverInfo(org.eclipse.jface.text.ITextViewer,
- * org.eclipse.jface.text.IRegion)
- */
- public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
- // get JSP translation object for this viewer's document
- IDOMModel xmlModel = (IDOMModel) StructuredModelManager.getModelManager().getExistingModelForRead(textViewer.getDocument());
- try {
- if (xmlModel != null) {
- IDOMDocument xmlDoc = xmlModel.getDocument();
- JSPTranslationAdapter adapter = (JSPTranslationAdapter) xmlDoc.getAdapterFor(IJSPTranslation.class);
- if (adapter != null) {
- JSPTranslation translation = adapter.getJSPTranslation();
-
- IJavaElement[] result = translation.getElementsFromJspRange(hoverRegion.getOffset(), hoverRegion.getOffset() + hoverRegion.getLength());
- return translation.fixupMangledName(getHoverInfo(result));
- }
- }
- }
- finally {
- if (xmlModel != null)
- xmlModel.releaseFromRead();
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.text.ITextViewer,
- * int)
- */
- public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
- return JavaWordFinder.findWord(textViewer.getDocument(), offset);
- }
-
- private String getInfoText(IJavaElement member) {
- long flags = member.getElementType() == IJavaElement.LOCAL_VARIABLE ? LOCAL_VARIABLE_FLAGS : LABEL_FLAGS;
- String label = JavaElementLabels.getElementLabel(member, flags);
- StringBuffer buf = new StringBuffer();
- for (int i = 0; i < label.length(); i++) {
- char ch = label.charAt(i);
- if (ch == '<') {
- buf.append("&lt;"); //$NON-NLS-1$
- }
- else if (ch == '>') {
- buf.append("&gt;"); //$NON-NLS-1$
- }
- else {
- buf.append(ch);
- }
- }
- return buf.toString();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocInformationProvider.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocInformationProvider.java
deleted file mode 100644
index 6aa06f1c8e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPJavaJavadocInformationProvider.java
+++ /dev/null
@@ -1,46 +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.ui.internal.taginfo;
-
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextHover;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.information.IInformationProvider;
-import org.eclipse.jface.text.information.IInformationProviderExtension;
-import org.eclipse.wst.sse.ui.internal.SSEUIPlugin;
-
-/**
- * Provides javadoc context information for java code inside JSPs (Shows
- * tooltip description)
- *
- * @deprecated StructuredTextViewerConfiguration creates the appropriate
- * information provider
- */
-public class JSPJavaJavadocInformationProvider implements IInformationProvider, IInformationProviderExtension {
- private ITextHover fTextHover = null;
-
- public JSPJavaJavadocInformationProvider() {
- fTextHover = SSEUIPlugin.getDefault().getTextHoverManager().createBestMatchHover(new JSPJavaJavadocHoverProcessor());
- }
-
- public IRegion getSubject(ITextViewer textViewer, int offset) {
- return fTextHover.getHoverRegion(textViewer, offset);
- }
-
- public String getInformation(ITextViewer textViewer, IRegion subject) {
- return (String) getInformation2(textViewer, subject);
- }
-
- public Object getInformation2(ITextViewer textViewer, IRegion subject) {
- return fTextHover.getHoverInfo(textViewer, subject);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPTagInfoHoverProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPTagInfoHoverProcessor.java
deleted file mode 100644
index 9c2a7c2224..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JSPTagInfoHoverProcessor.java
+++ /dev/null
@@ -1,51 +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.jst.jsp.ui.internal.taginfo;
-
-
-
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.html.ui.internal.taginfo.HTMLTagInfoHoverProcessor;
-import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-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.provisional.document.IDOMNode;
-
-/**
- * Provides hover help documentation for JSP tags
- */
-public class JSPTagInfoHoverProcessor extends HTMLTagInfoHoverProcessor {
-
- protected String computeRegionHelp(IndexedRegion treeNode, IDOMNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
- String result = null;
-
- if (region == null)
- return null;
-
- String regionType = region.getType();
- if (regionType == DOMJSPRegionContexts.JSP_DIRECTIVE_NAME) {
- result = computeJSPDirHelp((IDOMNode) treeNode, parentNode, flatNode, region);
- }
- else
- result = super.computeRegionHelp(treeNode, parentNode, flatNode, region);
-
- return result;
- }
-
- /**
- * Computes the hover help for the jsp directive name
- * for now, treat jsp directives like any other tag name
- */
- protected String computeJSPDirHelp(IDOMNode xmlnode, IDOMNode parentNode, IStructuredDocumentRegion flatNode, ITextRegion region) {
- return computeTagNameHelp(xmlnode, parentNode, flatNode, region);
- }
-
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JavaWordFinder.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JavaWordFinder.java
deleted file mode 100644
index 2acc57949e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/JavaWordFinder.java
+++ /dev/null
@@ -1,71 +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.jst.jsp.ui.internal.taginfo;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-
-/**
- * Copied from org.eclipse.jdt.internal.ui.text.JavaWordFinder
- */
-class JavaWordFinder {
- public static IRegion findWord(IDocument document, int offset) {
- return findWord(document, offset, false);
- }
- public static IRegion findWord(IDocument document, int offset, boolean searchQualified) {
-
- int start= -1;
- int end= -1;
-
-
- try {
-
- int pos= offset;
- char c;
-
- while (pos >= 0) {
- c= document.getChar(pos);
- if (searchQualified ? !Character.isJavaIdentifierPart(c) && c != '.' : !Character.isJavaIdentifierPart(c))
- break;
- --pos;
- }
-
- start= pos;
-
- pos= offset;
- int length= document.getLength();
-
- while (pos < length) {
- c= document.getChar(pos);
- if (searchQualified ? !Character.isJavaIdentifierPart(c) && c != '.' : !Character.isJavaIdentifierPart(c))
- break;
- ++pos;
- }
-
- end= pos;
-
- } catch (BadLocationException x) {
- }
-
- if (start > -1 && end > -1) {
- if (start == offset && end == offset)
- return new Region(offset, 0);
- else if (start == offset)
- return new Region(start, end - start);
- else
- return new Region(start + 1, end - start - 1);
- }
-
- return null;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/XMLJavadocHoverProcessor.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/XMLJavadocHoverProcessor.java
deleted file mode 100644
index 75d6212117..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/taginfo/XMLJavadocHoverProcessor.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2001, 2009 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.ui.internal.taginfo;
-
-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.Path;
-import org.eclipse.jdt.core.IJavaElement;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.IPackageFragmentRoot;
-import org.eclipse.jdt.core.IType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jst.jsp.core.internal.Logger;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-
-
-
-/**
- * Provides hover help documentation for xml tags
- *
- * @see org.eclipse.jface.text.ITextHover
- */
-public class XMLJavadocHoverProcessor extends JSPJavaJavadocHoverProcessor {
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jst.jsp.ui.internal.taginfo.JSPJavaJavadocHoverProcessor
- * #getHoverInfo(org.eclipse.jface.text.ITextViewer,
- * org.eclipse.jface.text.IRegion)
- */
- public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
- String elementName = null;
- try {
- elementName = textViewer.getDocument().get(hoverRegion.getOffset(), hoverRegion.getLength());
- }
- catch (BadLocationException e) {
- return null;
- }
-
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForRead(textViewer.getDocument());
- if (model != null) {
- String baseLocation = model.getBaseLocation();
- // URL fixup from the taglib index record
- if (baseLocation.startsWith("jar:/file:")) {
- baseLocation = StringUtils.replace(baseLocation, "jar:/", "jar:");
- }
- /*
- * Handle opened TLD files from JARs on the Java Build Path by
- * finding a package fragment root for the same .jar file and
- * opening the class from there. Note that this might be from
- * a different Java project's build path than the TLD.
- */
- if (baseLocation.startsWith("jar:file:") && baseLocation.indexOf('!') > 9) {
- String baseFile = baseLocation.substring(9, baseLocation.indexOf('!'));
- IPath basePath = new Path(baseFile);
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
- for (int i = 0; i < projects.length; i++) {
- try {
- if (projects[i].isAccessible() && projects[i].hasNature(JavaCore.NATURE_ID)) {
- IJavaProject javaProject = JavaCore.create(projects[i]);
- if (javaProject.exists()) {
- IPackageFragmentRoot root = javaProject.findPackageFragmentRoot(basePath);
- if (root != null) {
- // TLDs don't reference method names
- IType type = javaProject.findType(elementName);
- if (type != null) {
- return getHoverInfo(new IJavaElement[]{type});
- }
- }
- }
- }
- }
- catch (CoreException e) {
- Logger.logException(e);
- }
- }
- }
- else {
- IPath basePath = new Path(baseLocation);
- if (basePath.segmentCount() > 1) {
- IJavaProject javaProject = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot().getProject(basePath.segment(0)));
- if (javaProject.exists()) {
- try {
- // TLDs don't reference method names
- IType type = javaProject.findType(elementName);
- if (type != null) {
- return getHoverInfo(new IJavaElement[]{type});
- }
- }
- catch (JavaModelException e) {
- Logger.logException(e);
- }
- }
- }
- }
- }
-
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.text.ITextHover#getHoverRegion(org.eclipse.jface.
- * text.ITextViewer, int)
- */
- public IRegion getHoverRegion(ITextViewer textViewer, int offset) {
- return JavaWordFinder.findWord(textViewer.getDocument(), offset, true);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/EncodingTemplateVariableResolverJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/EncodingTemplateVariableResolverJSP.java
deleted file mode 100644
index 23b1058209..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/EncodingTemplateVariableResolverJSP.java
+++ /dev/null
@@ -1,38 +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.ui.internal.templates;
-
-import org.eclipse.jface.text.templates.SimpleTemplateVariableResolver;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-
-
-public class EncodingTemplateVariableResolverJSP extends SimpleTemplateVariableResolver {
- private static final String ENCODING_TYPE = getEncodingType();
-
- private static String getEncodingType() {
- return "encoding"; //$NON-NLS-1$
- }
-
- /**
- * Creates a new encoding variable
- */
- public EncodingTemplateVariableResolverJSP() {
- super(ENCODING_TYPE, JSPUIMessages.Creating_files_encoding);
- }
-
- protected String resolve(TemplateContext context) {
- return JSPCorePlugin.getDefault().getPluginPreferences().getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/TemplateContextTypeIdsJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/TemplateContextTypeIdsJSP.java
deleted file mode 100644
index eec77f9e69..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/TemplateContextTypeIdsJSP.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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.ui.internal.templates;
-
-
-public class TemplateContextTypeIdsJSP {
-
- public static final String ALL = getAll();
-
- public static final String ATTRIBUTE = getAttribute();
-
- public static final String ATTRIBUTE_VALUE = getAttributeValue();
-
- public static final String NEW = getNew();
-
- public static final String TAG = getTag();
-
- public static final String NEW_TAG = "tag_new";
-
- private static String getAll() {
- return getPrefix() + "_all"; //$NON-NLS-1$
- }
-
- private static String getAttribute() {
- return getPrefix() + "_attribute"; //$NON-NLS-1$
- }
-
- private static String getAttributeValue() {
- return getPrefix() + "_attribute_value"; //$NON-NLS-1$
- }
-
- private static String getNew() {
- return getPrefix() + "_new"; //$NON-NLS-1$
- }
-
- private static String getPrefix() {
- return "jsp"; //$NON-NLS-1$
- }
-
- private static String getTag() {
- return getPrefix() + "_tag"; //$NON-NLS-1$
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/TemplateContextTypeJSP.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/TemplateContextTypeJSP.java
deleted file mode 100644
index baf57d226a..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/templates/TemplateContextTypeJSP.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2012 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.ui.internal.templates;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-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.jface.text.IDocument;
-import org.eclipse.jface.text.templates.DocumentTemplateContext;
-import org.eclipse.jface.text.templates.GlobalTemplateVariables;
-import org.eclipse.jface.text.templates.SimpleTemplateVariableResolver;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jface.text.templates.TemplateContextType;
-import org.eclipse.jface.text.templates.TemplateVariable;
-import org.eclipse.jst.jsp.core.internal.util.FacetModuleCoreSupport;
-import org.eclipse.jst.jsp.core.taglib.IJarRecord;
-import org.eclipse.jst.jsp.core.taglib.ITLDRecord;
-import org.eclipse.jst.jsp.core.taglib.ITaglibDescriptor;
-import org.eclipse.jst.jsp.core.taglib.ITaglibRecord;
-import org.eclipse.jst.jsp.core.taglib.TaglibIndex;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-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;
-
-/**
- * Base class for JSP template context types. Templates of this context type
- * apply to any place within JSP content type.
- */
-public class TemplateContextTypeJSP extends TemplateContextType {
- public TemplateContextTypeJSP() {
- super();
- addResolver(new GlobalTemplateVariables.Cursor());
- addResolver(new GlobalTemplateVariables.Date());
- addResolver(new GlobalTemplateVariables.Dollar());
- addResolver(new GlobalTemplateVariables.LineSelection());
- addResolver(new GlobalTemplateVariables.Time());
- addResolver(new GlobalTemplateVariables.User());
- addResolver(new GlobalTemplateVariables.WordSelection());
- addResolver(new GlobalTemplateVariables.Year());
- addResolver(new EncodingTemplateVariableResolverJSP());
- addResolver(new URITemplateResolver());
-
- }
-
- /**
- * Resolves the ${uri} Template Variable for a taglib directive providing
- * URIs from the taglib index
- *
- */
- class URITemplateResolver extends SimpleTemplateVariableResolver {
-
- protected URITemplateResolver() {
- super("uri", JSPUIMessages.Template_Taglib_URI); //$NON-NLS-1$
- }
-
- public void resolve(TemplateVariable variable, TemplateContext context) {
- if (context instanceof DocumentTemplateContext) {
- DocumentTemplateContext docContext = (DocumentTemplateContext) context;
- final IPath path = getPath(docContext.getDocument());
- if (path != null) {
- String[] uris = getURIs(TaglibIndex.getAvailableTaglibRecords(path), path);
- if (uris != null && uris.length > 0) {
- variable.setValues(uris);
- }
- }
-
- }
- }
-
- private String[] getURIs(ITaglibRecord[] records, IPath basePath) {
- if (records != null) {
- Set uris = new HashSet(records.length);
- for (int i = 0; i < records.length; i++) {
- final ITaglibRecord record = records[i];
- final ITaglibDescriptor descriptor = record.getDescriptor();
- String uri = null;
- switch (record.getRecordType()) {
- case ITaglibRecord.URL:
- uris.add(descriptor.getURI());
- break;
- case ITaglibRecord.JAR: {
- IPath location = ((IJarRecord) record).getLocation();
- IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(location);
- IPath localContextRoot = FacetModuleCoreSupport.computeWebContentRootPath(basePath);
- for (int fileNumber = 0; fileNumber < files.length; fileNumber++) {
- if (localContextRoot.isPrefixOf(files[fileNumber].getFullPath())) {
- uri = IPath.SEPARATOR +
- files[fileNumber].getFullPath().removeFirstSegments(localContextRoot.segmentCount()).toString();
- }
- else {
- uri = FacetModuleCoreSupport.getRuntimePath(files[fileNumber].getFullPath()).toString();
- }
- uris.add(uri);
- }
- break;
- }
- case ITaglibRecord.TLD: {
- uri = descriptor.getURI();
- if (uri == null || uri.trim().length() == 0) {
- IPath path = ((ITLDRecord) record).getPath();
- IPath localContextRoot = FacetModuleCoreSupport.computeWebContentRootPath(basePath);
- if (localContextRoot.isPrefixOf(path)) {
- uri = IPath.SEPARATOR + path.removeFirstSegments(localContextRoot.segmentCount()).toString();
- }
- else {
- uri = FacetModuleCoreSupport.getRuntimePath(path).toString();
- }
- }
- uris.add(uri);
- break;
- }
-
- }
- }
- String[] urisArray = (String[]) uris.toArray(new String[uris.size()]);
- Arrays.sort(urisArray);
- return urisArray;
- }
- return null;
- }
-
- private IPath getPath(IDocument iDoc) {
- IPath path = null;
- if (iDoc instanceof IStructuredDocument) {
- IStructuredDocument document = (IStructuredDocument) iDoc;
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getModelForRead(document);
- if (model != null) {
- String location = model.getBaseLocation();
- if (location != null) {
- path = new Path(location);
- }
- }
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- }
- return path;
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JSPDocumentRegionEdgeMatcher.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JSPDocumentRegionEdgeMatcher.java
deleted file mode 100644
index 275af275b8..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JSPDocumentRegionEdgeMatcher.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.ui.internal.text;
-
-import org.eclipse.jst.jsp.core.internal.regions.DOMJSPRegionContexts;
-import org.eclipse.wst.sse.ui.internal.text.DocumentRegionEdgeMatcher;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
-
-public class JSPDocumentRegionEdgeMatcher extends DocumentRegionEdgeMatcher {
-
- protected final static char[] BRACKETS = {'{', '}', '(', ')', '[', ']','"','"','\'','\'','<','>'};
-
- /**
- * @param validContexts
- * @param nextMatcher
- */
- public JSPDocumentRegionEdgeMatcher() {
- super(new String[]{DOMRegionContext.XML_TAG_NAME, DOMRegionContext.XML_COMMENT_TEXT, DOMJSPRegionContexts.JSP_COMMENT_TEXT, DOMJSPRegionContexts.JSP_DIRECTIVE_NAME, DOMJSPRegionContexts.JSP_ROOT_TAG_NAME, DOMRegionContext.XML_CDATA_TEXT, DOMRegionContext.XML_PI_OPEN, DOMRegionContext.XML_PI_CONTENT}, new JavaPairMatcher(BRACKETS));
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaCharacterPairInserter.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaCharacterPairInserter.java
deleted file mode 100644
index 0ce823ebdb..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaCharacterPairInserter.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.ui.internal.text;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.wst.sse.ui.typing.AbstractCharacterPairInserter;
-
-public class JavaCharacterPairInserter extends AbstractCharacterPairInserter implements IPropertyChangeListener {
-
- private boolean fCloseBrackets = true;
- private boolean fCloseStrings = true;
-
- protected boolean shouldPair(ISourceViewer viewer, char c) {
- IDocument document = viewer.getDocument();
- final Point selection = viewer.getSelectedRange();
- final int offset = selection.x;
- final int length = selection.y;
-
- try {
- IRegion startLine= document.getLineInformationOfOffset(offset);
- IRegion endLine= document.getLineInformationOfOffset(offset + length);
-
- JavaHeuristicScanner scanner = new JavaHeuristicScanner(document);
- int nextToken = scanner.nextToken(offset + length, endLine.getOffset() + endLine.getLength());
- String next = nextToken == Symbols.TokenEOF ? null : document.get(offset, scanner.getPosition() - offset).trim();
- int prevToken = scanner.previousToken(offset - 1, startLine.getOffset());
- int prevTokenOffset = scanner.getPosition() + 1;
- String previous = prevToken == Symbols.TokenEOF ? null : document.get(prevTokenOffset, offset - prevTokenOffset).trim();
-
- switch (c) {
- case '(':
- if (!fCloseBrackets || nextToken == Symbols.TokenLPAREN || nextToken == Symbols.TokenIDENT || next != null && next.length() > 1)
- return false;
- break;
-
- case '<':
- if (!fCloseBrackets || nextToken == Symbols.TokenLESSTHAN
- || prevToken != Symbols.TokenLBRACE
- && prevToken != Symbols.TokenRBRACE
- && prevToken != Symbols.TokenSEMICOLON
- && prevToken != Symbols.TokenSYNCHRONIZED
- && prevToken != Symbols.TokenSTATIC
- && (prevToken != Symbols.TokenIDENT || !isAngularIntroducer(previous))
- && prevToken != Symbols.TokenEOF)
- return false;
- break;
-
- case '[':
- if (!fCloseBrackets || nextToken == Symbols.TokenIDENT || next != null && next.length() > 1)
- return false;
- break;
-
- case '\'':
- case '"':
- if (!fCloseStrings || nextToken == Symbols.TokenIDENT
- || prevToken == Symbols.TokenIDENT
- || prevToken == Symbols.TokenSQUOTE
- || nextToken == Symbols.TokenSQUOTE
- || prevToken == Symbols.TokenDQUOTE
- || nextToken == Symbols.TokenDQUOTE
- || next != null && next.length() > 1
- || previous != null && previous.length() > 1)
- return false;
- break;
-
- default:
- return false;
- }
- } catch (BadLocationException e) {
- return false;
- }
- return true;
- }
-
- private boolean isAngularIntroducer(String identifier) {
- return identifier.length() > 0
- && (Character.isUpperCase(identifier.charAt(0))
- || identifier.startsWith("final") //$NON-NLS-1$
- || identifier.startsWith("public") //$NON-NLS-1$
- || identifier.startsWith("public") //$NON-NLS-1$
- || identifier.startsWith("protected") //$NON-NLS-1$
- || identifier.startsWith("private")); //$NON-NLS-1$
- }
-
- protected char getPair(char c) {
- switch (c) {
- case '\'':
- case '"':
- return c;
- case '(':
- return ')';
- case '[':
- return ']';
- case '<':
- return '>';
- default:
- throw new IllegalArgumentException();
- }
- }
-
- protected char getEscapeChar(char c) {
- switch (c) {
- case '\'':
- case '"':
- return '\\';
- default:
- return 0;
- }
- }
-
- public boolean hasPair(char c) {
- switch (c) {
- case '"':
- case '\'':
- case '[':
- case '(':
- case '<':
- return true;
- default:
- return false;
- }
- }
-
- public void initialize() {
- IPreferenceStore store = JSPUIPlugin.getInstance().getPreferenceStore();
- fCloseStrings = store.getBoolean(JSPUIPreferenceNames.TYPING_CLOSE_STRINGS);
- fCloseBrackets = store.getBoolean(JSPUIPreferenceNames.TYPING_CLOSE_BRACKETS);
- store.addPropertyChangeListener(this);
- }
-
- public void dispose() {
- JSPUIPlugin.getInstance().getPreferenceStore().removePropertyChangeListener(this);
- }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (JSPUIPreferenceNames.TYPING_CLOSE_BRACKETS.equals(event.getProperty()))
- fCloseBrackets = ((Boolean) event.getNewValue()).booleanValue();
- else if (JSPUIPreferenceNames.TYPING_CLOSE_STRINGS.equals(event.getProperty()))
- fCloseStrings = ((Boolean) event.getNewValue()).booleanValue();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaCodeReader.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaCodeReader.java
deleted file mode 100644
index 4b80238b04..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaCodeReader.java
+++ /dev/null
@@ -1,246 +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.jst.jsp.ui.internal.text;
-
-import java.io.IOException;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jst.jsp.ui.internal.derived.SingleCharReader;
-
-
-/**
- * Reads from a document either forwards or backwards. May be configured to
- * skip comments and strings.
- *
- * Copied from org.eclipse.jdt.internal.ui.text so we don't have to
- * depend on the org.eclipse.jdt.ui plugin.
- *
- * No modifications were made.
- */
-class JavaCodeReader extends SingleCharReader {
-
- /** The EOF character */
- public static final int EOF = -1;
-
- private boolean fSkipComments = false;
- private boolean fSkipStrings = false;
- private boolean fForward = false;
-
- private IDocument fDocument;
- private int fOffset;
-
- private int fEnd = -1;
- private int fCachedLineNumber = -1;
- private int fCachedLineOffset = -1;
-
-
- public JavaCodeReader() {
- }
-
- /**
- * Returns the offset of the last read character. Should only be called after read has been called.
- */
- public int getOffset() {
- return fForward ? fOffset - 1 : fOffset;
- }
-
- public void configureForwardReader(IDocument document, int offset, int length, boolean skipComments, boolean skipStrings) throws IOException {
- fDocument = document;
- fOffset = offset;
- fSkipComments = skipComments;
- fSkipStrings = skipStrings;
-
- fForward = true;
- fEnd = Math.min(fDocument.getLength(), fOffset + length);
- }
-
- public void configureBackwardReader(IDocument document, int offset, boolean skipComments, boolean skipStrings) throws IOException {
- fDocument = document;
- fOffset = offset;
- fSkipComments = skipComments;
- fSkipStrings = skipStrings;
-
- fForward = false;
- try {
- fCachedLineNumber = fDocument.getLineOfOffset(fOffset);
- }
- catch (BadLocationException x) {
- throw new IOException(x.getMessage());
- }
- }
-
- /*
- * @see Reader#close()
- */
- public void close() throws IOException {
- fDocument = null;
- }
-
- /*
- * @see SingleCharReader#read()
- */
- public int read() throws IOException {
- try {
- return fForward ? readForwards() : readBackwards();
- }
- catch (BadLocationException x) {
- throw new IOException(x.getMessage());
- }
- }
-
- private void gotoCommentEnd() throws BadLocationException {
- while (fOffset < fEnd) {
- char current = fDocument.getChar(fOffset++);
- if (current == '*') {
- if (fOffset < fEnd && fDocument.getChar(fOffset) == '/') {
- ++fOffset;
- return;
- }
- }
- }
- }
-
- private void gotoStringEnd(char delimiter) throws BadLocationException {
- while (fOffset < fEnd) {
- char current = fDocument.getChar(fOffset++);
- if (current == '\\') {
- // ignore escaped characters
- ++fOffset;
- }
- else if (current == delimiter) {
- return;
- }
- }
- }
-
- private void gotoLineEnd() throws BadLocationException {
- int line = fDocument.getLineOfOffset(fOffset);
- fOffset = fDocument.getLineOffset(line + 1);
- }
-
- private int readForwards() throws BadLocationException {
- while (fOffset < fEnd) {
- char current = fDocument.getChar(fOffset++);
-
- switch (current) {
- case '/' :
-
- if (fSkipComments && fOffset < fEnd) {
- char next = fDocument.getChar(fOffset);
- if (next == '*') {
- // a comment starts, advance to the comment end
- ++fOffset;
- gotoCommentEnd();
- continue;
- }
- else if (next == '/') {
- // '//'-comment starts, advance to the line end
- gotoLineEnd();
- continue;
- }
- }
-
- return current;
-
- case '"' :
- case '\'' :
-
- if (fSkipStrings) {
- gotoStringEnd(current);
- continue;
- }
-
- return current;
- }
-
- return current;
- }
-
- return EOF;
- }
-
- private void handleSingleLineComment() throws BadLocationException {
- int line = fDocument.getLineOfOffset(fOffset);
- if (line < fCachedLineNumber) {
- fCachedLineNumber = line;
- fCachedLineOffset = fDocument.getLineOffset(line);
- int offset = fOffset;
- while (fCachedLineOffset < offset) {
- char current = fDocument.getChar(offset--);
- if (current == '/' && fCachedLineOffset <= offset && fDocument.getChar(offset) == '/') {
- fOffset = offset;
- return;
- }
- }
- }
- }
-
- private void gotoCommentStart() throws BadLocationException {
- while (0 < fOffset) {
- char current = fDocument.getChar(fOffset--);
- if (current == '*' && 0 <= fOffset && fDocument.getChar(fOffset) == '/')
- return;
- }
- }
-
- private void gotoStringStart(char delimiter) throws BadLocationException {
- while (0 < fOffset) {
- char current = fDocument.getChar(fOffset);
- if (current == delimiter) {
- if (!(0 <= fOffset && fDocument.getChar(fOffset - 1) == '\\'))
- return;
- }
- --fOffset;
- }
- }
-
- private int readBackwards() throws BadLocationException {
-
- while (0 < fOffset) {
- --fOffset;
-
- handleSingleLineComment();
-
- char current = fDocument.getChar(fOffset);
- switch (current) {
- case '/' :
-
- if (fSkipComments && fOffset > 1) {
- char next = fDocument.getChar(fOffset - 1);
- if (next == '*') {
- // a comment ends, advance to the comment start
- fOffset -= 2;
- gotoCommentStart();
- continue;
- }
- }
-
- return current;
-
- case '"' :
- case '\'' :
-
- if (fSkipStrings) {
- --fOffset;
- gotoStringStart(current);
- continue;
- }
-
- return current;
- }
-
- return current;
- }
-
- return EOF;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaHeuristicScanner.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaHeuristicScanner.java
deleted file mode 100644
index e113c38744..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaHeuristicScanner.java
+++ /dev/null
@@ -1,956 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.ui.internal.text;
-
-//taken from package org.eclipse.jdt.internal.ui.text;
-
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.ITypedRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.TextUtilities;
-import org.eclipse.jface.text.TypedRegion;
-import org.eclipse.jst.jsp.core.text.IJSPPartitions;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredPartitioning;
-
-class JavaHeuristicScanner implements Symbols {
- /**
- * Returned by all methods when the requested position could not be found, or if a
- * {@link BadLocationException} was thrown while scanning.
- */
- public static final int NOT_FOUND= -1;
-
- /**
- * Special bound parameter that means either -1 (backward scanning) or
- * <code>fDocument.getLength()</code> (forward scanning).
- */
- public static final int UNBOUND= -2;
-
-
- /* character constants */
- private static final char LBRACE= '{';
- private static final char RBRACE= '}';
- private static final char LPAREN= '(';
- private static final char RPAREN= ')';
- private static final char SEMICOLON= ';';
- private static final char COLON= ':';
- private static final char COMMA= ',';
- private static final char LBRACKET= '[';
- private static final char RBRACKET= ']';
- private static final char QUESTIONMARK= '?';
- private static final char EQUAL= '=';
- private static final char LANGLE= '<';
- private static final char RANGLE= '>';
- private static final char SQUOTE = '\'';
- private static final char DQUOTE = '"';
-
- /**
- * Specifies the stop condition, upon which the <code>scanXXX</code> methods will decide whether
- * to keep scanning or not. This interface may implemented by clients.
- */
- private static abstract class StopCondition {
- /**
- * Instructs the scanner to return the current position.
- *
- * @param ch the char at the current position
- * @param position the current position
- * @param forward the iteration direction
- * @return <code>true</code> if the stop condition is met.
- */
- public abstract boolean stop(char ch, int position, boolean forward);
-
- /**
- * Asks the condition to return the next position to query. The default
- * is to return the next/previous position.
- *
- * @param position the position
- * @param forward <code>true</code> if next position should be returned
- * @return the next position to scan
- */
- public int nextPosition(int position, boolean forward) {
- return forward ? position + 1 : position - 1;
- }
- }
-
- /**
- * Stops upon a non-whitespace (as defined by {@link Character#isWhitespace(char)}) character.
- */
- private static class NonWhitespace extends StopCondition {
- /*
- * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char)
- */
- public boolean stop(char ch, int position, boolean forward) {
- return !Character.isWhitespace(ch);
- }
- }
-
- /**
- * Stops upon a non-whitespace character in the default partition.
- *
- * @see JavaHeuristicScanner.NonWhitespace
- */
- private final class NonWhitespaceDefaultPartition extends NonWhitespace {
- /*
- * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char)
- */
- public boolean stop(char ch, int position, boolean forward) {
- return super.stop(ch, position, true) && isDefaultPartition(position);
- }
-
- /*
- * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#nextPosition(int, boolean)
- */
- public int nextPosition(int position, boolean forward) {
- ITypedRegion partition= getPartition(position);
- if (fPartition.equals(partition.getType()))
- return super.nextPosition(position, forward);
-
- if (forward) {
- int end= partition.getOffset() + partition.getLength();
- if (position < end)
- return end;
- } else {
- int offset= partition.getOffset();
- if (position > offset)
- return offset - 1;
- }
- return super.nextPosition(position, forward);
- }
- }
-
- /**
- * Stops upon a non-java identifier (as defined by {@link Character#isJavaIdentifierPart(char)}) character.
- */
- private static class NonJavaIdentifierPart extends StopCondition {
- /*
- * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char)
- */
- public boolean stop(char ch, int position, boolean forward) {
- return !Character.isJavaIdentifierPart(ch);
- }
- }
-
- /**
- * Stops upon a non-java identifier character in the default partition.
- *
- * @see JavaHeuristicScanner.NonJavaIdentifierPart
- */
- private final class NonJavaIdentifierPartDefaultPartition extends NonJavaIdentifierPart {
- /*
- * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char)
- */
- public boolean stop(char ch, int position, boolean forward) {
- return super.stop(ch, position, true) || !isDefaultPartition(position);
- }
-
- /*
- * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#nextPosition(int, boolean)
- */
- public int nextPosition(int position, boolean forward) {
- ITypedRegion partition= getPartition(position);
- if (fPartition.equals(partition.getType()))
- return super.nextPosition(position, forward);
-
- if (forward) {
- int end= partition.getOffset() + partition.getLength();
- if (position < end)
- return end;
- } else {
- int offset= partition.getOffset();
- if (position > offset)
- return offset - 1;
- }
- return super.nextPosition(position, forward);
- }
- }
-
- /**
- * Stops upon a character in the default partition that matches the given character list.
- */
- private final class CharacterMatch extends StopCondition {
- private final char[] fChars;
-
- /**
- * Creates a new instance.
- * @param ch the single character to match
- */
- public CharacterMatch(char ch) {
- this(new char[] {ch});
- }
-
- /**
- * Creates a new instance.
- * @param chars the chars to match.
- */
- public CharacterMatch(char[] chars) {
- Assert.isNotNull(chars);
- Assert.isTrue(chars.length > 0);
- fChars= chars;
- Arrays.sort(chars);
- }
-
- /*
- * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#stop(char, int)
- */
- public boolean stop(char ch, int position, boolean forward) {
- return Arrays.binarySearch(fChars, ch) >= 0 && isDefaultPartition(position);
- }
-
- /*
- * @see org.eclipse.jdt.internal.ui.text.JavaHeuristicScanner.StopCondition#nextPosition(int, boolean)
- */
- public int nextPosition(int position, boolean forward) {
- ITypedRegion partition= getPartition(position);
- if (fPartition.equals(partition.getType()))
- return super.nextPosition(position, forward);
-
- if (forward) {
- int end= partition.getOffset() + partition.getLength();
- if (position < end)
- return end;
- } else {
- int offset= partition.getOffset();
- if (position > offset)
- return offset - 1;
- }
- return super.nextPosition(position, forward);
- }
- }
-
- /** The document being scanned. */
- private final IDocument fDocument;
- /** The partitioning being used for scanning. */
- private final String fPartitioning;
- /** The partition to scan in. */
- private final String fPartition;
-
- /* internal scan state */
-
- /** the most recently read character. */
- private char fChar;
- /** the most recently read position. */
- private int fPos;
- /**
- * The most recently used partition.
- * @since 3.2
- */
- private ITypedRegion fCachedPartition= new TypedRegion(-1, 0, "__no_partition_at_all"); //$NON-NLS-1$
-
- /* preset stop conditions */
- private final StopCondition fNonWSDefaultPart= new NonWhitespaceDefaultPartition();
- private final static StopCondition fNonWS= new NonWhitespace();
- private final StopCondition fNonIdent= new NonJavaIdentifierPartDefaultPartition();
-
- /**
- * Creates a new instance.
- *
- * @param document the document to scan
- * @param partitioning the partitioning to use for scanning
- * @param partition the partition to scan in
- */
- public JavaHeuristicScanner(IDocument document, String partitioning, String partition) {
- Assert.isLegal(document != null);
- Assert.isLegal(partitioning != null);
- Assert.isLegal(partition != null);
- fDocument= document;
- fPartitioning= partitioning;
- fPartition= partition;
- }
-
- /**
- * Calls <code>this(document, IJavaPartitions.JAVA_PARTITIONING, IDocument.DEFAULT_CONTENT_TYPE)</code>.
- *
- * @param document the document to scan.
- */
- public JavaHeuristicScanner(IDocument document) {
- this(document, IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING, IJSPPartitions.JSP_CONTENT_JAVA);
- }
-
- /**
- * Returns the most recent internal scan position.
- *
- * @return the most recent internal scan position.
- */
- public int getPosition() {
- return fPos;
- }
-
- /**
- * Returns the next token in forward direction, starting at <code>start</code>, and not extending
- * further than <code>bound</code>. The return value is one of the constants defined in {@link Symbols}.
- * After a call, {@link #getPosition()} will return the position just after the scanned token
- * (i.e. the next position that will be scanned).
- *
- * @param start the first character position in the document to consider
- * @param bound the first position not to consider any more
- * @return a constant from {@link Symbols} describing the next token
- */
- public int nextToken(int start, int bound) {
- int pos= scanForward(start, bound, fNonWSDefaultPart);
- if (pos == NOT_FOUND)
- return TokenEOF;
-
- fPos++;
-
- switch (fChar) {
- case LBRACE:
- return TokenLBRACE;
- case RBRACE:
- return TokenRBRACE;
- case LBRACKET:
- return TokenLBRACKET;
- case RBRACKET:
- return TokenRBRACKET;
- case LPAREN:
- return TokenLPAREN;
- case RPAREN:
- return TokenRPAREN;
- case SEMICOLON:
- return TokenSEMICOLON;
- case COMMA:
- return TokenCOMMA;
- case QUESTIONMARK:
- return TokenQUESTIONMARK;
- case EQUAL:
- return TokenEQUAL;
- case LANGLE:
- return TokenLESSTHAN;
- case RANGLE:
- return TokenGREATERTHAN;
- case SQUOTE:
- return TokenSQUOTE;
- case DQUOTE:
- return TokenDQUOTE;
- }
-
- // else
- if (Character.isJavaIdentifierPart(fChar)) {
- // assume an identifier or keyword
- int from= pos, to;
- pos= scanForward(pos + 1, bound, fNonIdent);
- if (pos == NOT_FOUND)
- to= bound == UNBOUND ? fDocument.getLength() : bound;
- else
- to= pos;
-
- String identOrKeyword;
- try {
- identOrKeyword= fDocument.get(from, to - from);
- } catch (BadLocationException e) {
- return TokenEOF;
- }
-
- return getToken(identOrKeyword);
-
-
- } else {
- // operators, number literals etc
- return TokenOTHER;
- }
- }
-
- /**
- * Returns the next token in backward direction, starting at <code>start</code>, and not extending
- * further than <code>bound</code>. The return value is one of the constants defined in {@link Symbols}.
- * After a call, {@link #getPosition()} will return the position just before the scanned token
- * starts (i.e. the next position that will be scanned).
- *
- * @param start the first character position in the document to consider
- * @param bound the first position not to consider any more
- * @return a constant from {@link Symbols} describing the previous token
- */
- public int previousToken(int start, int bound) {
- int pos= scanBackward(start, bound, fNonWSDefaultPart);
- if (pos == NOT_FOUND)
- return TokenEOF;
-
- fPos--;
-
- switch (fChar) {
- case LBRACE:
- return TokenLBRACE;
- case RBRACE:
- return TokenRBRACE;
- case LBRACKET:
- return TokenLBRACKET;
- case RBRACKET:
- return TokenRBRACKET;
- case LPAREN:
- return TokenLPAREN;
- case RPAREN:
- return TokenRPAREN;
- case SEMICOLON:
- return TokenSEMICOLON;
- case COLON:
- return TokenCOLON;
- case COMMA:
- return TokenCOMMA;
- case QUESTIONMARK:
- return TokenQUESTIONMARK;
- case EQUAL:
- return TokenEQUAL;
- case LANGLE:
- return TokenLESSTHAN;
- case RANGLE:
- return TokenGREATERTHAN;
- case SQUOTE:
- return TokenSQUOTE;
- case DQUOTE:
- return TokenDQUOTE;
- }
-
- // else
- if (Character.isJavaIdentifierPart(fChar)) {
- // assume an ident or keyword
- int from, to= pos + 1;
- pos= scanBackward(pos - 1, bound, fNonIdent);
- if (pos == NOT_FOUND)
- from= bound == UNBOUND ? 0 : bound + 1;
- else
- from= pos + 1;
-
- String identOrKeyword;
- try {
- identOrKeyword= fDocument.get(from, to - from);
- } catch (BadLocationException e) {
- return TokenEOF;
- }
-
- return getToken(identOrKeyword);
-
-
- } else {
- // operators, number literals etc
- return TokenOTHER;
- }
-
- }
-
- /**
- * Returns one of the keyword constants or <code>TokenIDENT</code> for a scanned identifier.
- *
- * @param s a scanned identifier
- * @return one of the constants defined in {@link Symbols}
- */
- private int getToken(String s) {
- Assert.isNotNull(s);
-
- switch (s.length()) {
- case 2:
- if ("if".equals(s)) //$NON-NLS-1$
- return TokenIF;
- if ("do".equals(s)) //$NON-NLS-1$
- return TokenDO;
- break;
- case 3:
- if ("for".equals(s)) //$NON-NLS-1$
- return TokenFOR;
- if ("try".equals(s)) //$NON-NLS-1$
- return TokenTRY;
- if ("new".equals(s)) //$NON-NLS-1$
- return TokenNEW;
- break;
- case 4:
- if ("case".equals(s)) //$NON-NLS-1$
- return TokenCASE;
- if ("else".equals(s)) //$NON-NLS-1$
- return TokenELSE;
- if ("enum".equals(s)) //$NON-NLS-1$
- return TokenENUM;
- if ("goto".equals(s)) //$NON-NLS-1$
- return TokenGOTO;
- break;
- case 5:
- if ("break".equals(s)) //$NON-NLS-1$
- return TokenBREAK;
- if ("catch".equals(s)) //$NON-NLS-1$
- return TokenCATCH;
- if ("class".equals(s)) //$NON-NLS-1$
- return TokenCLASS;
- if ("while".equals(s)) //$NON-NLS-1$
- return TokenWHILE;
- break;
- case 6:
- if ("return".equals(s)) //$NON-NLS-1$
- return TokenRETURN;
- if ("static".equals(s)) //$NON-NLS-1$
- return TokenSTATIC;
- if ("switch".equals(s)) //$NON-NLS-1$
- return TokenSWITCH;
- break;
- case 7:
- if ("default".equals(s)) //$NON-NLS-1$
- return TokenDEFAULT;
- if ("finally".equals(s)) //$NON-NLS-1$
- return TokenFINALLY;
- break;
- case 9:
- if ("interface".equals(s)) //$NON-NLS-1$
- return TokenINTERFACE;
- break;
- case 12:
- if ("synchronized".equals(s)) //$NON-NLS-1$
- return TokenSYNCHRONIZED;
- break;
- }
- return TokenIDENT;
- }
-
- /**
- * Returns the position of the closing peer character (forward search). Any scopes introduced by opening peers
- * are skipped. All peers accounted for must reside in the default partition.
- *
- * <p>Note that <code>start</code> must not point to the opening peer, but to the first
- * character being searched.</p>
- *
- * @param start the start position
- * @param openingPeer the opening peer character (e.g. '{')
- * @param closingPeer the closing peer character (e.g. '}')
- * @return the matching peer character position, or <code>NOT_FOUND</code>
- */
- public int findClosingPeer(int start, final char openingPeer, final char closingPeer) {
- return findClosingPeer(start, UNBOUND, openingPeer, closingPeer);
- }
-
- /**
- * Returns the position of the closing peer character (forward search). Any scopes introduced by opening peers
- * are skipped. All peers accounted for must reside in the default partition.
- *
- * <p>Note that <code>start</code> must not point to the opening peer, but to the first
- * character being searched.</p>
- *
- * @param start the start position
- * @param bound the bound
- * @param openingPeer the opening peer character (e.g. '{')
- * @param closingPeer the closing peer character (e.g. '}')
- * @return the matching peer character position, or <code>NOT_FOUND</code>
- */
- public int findClosingPeer(int start, int bound, final char openingPeer, final char closingPeer) {
- Assert.isLegal(start >= 0);
-
- try {
- CharacterMatch match= new CharacterMatch(new char[] {openingPeer, closingPeer});
- int depth= 1;
- start -= 1;
- while (true) {
- start= scanForward(start + 1, bound, match);
- if (start == NOT_FOUND)
- return NOT_FOUND;
-
- if (fDocument.getChar(start) == openingPeer)
- depth++;
- else
- depth--;
-
- if (depth == 0)
- return start;
- }
-
- } catch (BadLocationException e) {
- return NOT_FOUND;
- }
- }
-
- /**
- * Returns the position of the opening peer character (backward search). Any scopes introduced by closing peers
- * are skipped. All peers accounted for must reside in the default partition.
- *
- * <p>Note that <code>start</code> must not point to the closing peer, but to the first
- * character being searched.</p>
- *
- * @param start the start position
- * @param openingPeer the opening peer character (e.g. '{')
- * @param closingPeer the closing peer character (e.g. '}')
- * @return the matching peer character position, or <code>NOT_FOUND</code>
- */
- public int findOpeningPeer(int start, char openingPeer, char closingPeer) {
- return findOpeningPeer(start, UNBOUND, openingPeer, closingPeer);
- }
-
- /**
- * Returns the position of the opening peer character (backward search). Any scopes introduced by closing peers
- * are skipped. All peers accounted for must reside in the default partition.
- *
- * <p>Note that <code>start</code> must not point to the closing peer, but to the first
- * character being searched.</p>
- *
- * @param start the start position
- * @param bound the bound
- * @param openingPeer the opening peer character (e.g. '{')
- * @param closingPeer the closing peer character (e.g. '}')
- * @return the matching peer character position, or <code>NOT_FOUND</code>
- */
- public int findOpeningPeer(int start, int bound, char openingPeer, char closingPeer) {
- Assert.isLegal(start < fDocument.getLength());
-
- try {
- final CharacterMatch match= new CharacterMatch(new char[] {openingPeer, closingPeer});
- int depth= 1;
- start += 1;
- while (true) {
- start= scanBackward(start - 1, bound, match);
- if (start == NOT_FOUND)
- return NOT_FOUND;
-
- if (fDocument.getChar(start) == closingPeer)
- depth++;
- else
- depth--;
-
- if (depth == 0)
- return start;
- }
-
- } catch (BadLocationException e) {
- return NOT_FOUND;
- }
- }
-
- /**
- * Computes the surrounding block around <code>offset</code>. The search is started at the
- * beginning of <code>offset</code>, i.e. an opening brace at <code>offset</code> will not be
- * part of the surrounding block, but a closing brace will.
- *
- * @param offset the offset for which the surrounding block is computed
- * @return a region describing the surrounding block, or <code>null</code> if none can be found
- */
- public IRegion findSurroundingBlock(int offset) {
- if (offset < 1 || offset >= fDocument.getLength())
- return null;
-
- int begin= findOpeningPeer(offset - 1, LBRACE, RBRACE);
- int end= findClosingPeer(offset, LBRACE, RBRACE);
- if (begin == NOT_FOUND || end == NOT_FOUND)
- return null;
- return new Region(begin, end + 1 - begin);
- }
-
- /**
- * Finds the smallest position in <code>fDocument</code> such that the position is &gt;= <code>position</code>
- * and &lt; <code>bound</code> and <code>Character.isWhitespace(fDocument.getChar(pos))</code> evaluates to <code>false</code>
- * and the position is in the default partition.
- *
- * @param position the first character position in <code>fDocument</code> to be considered
- * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> &gt; <code>position</code>, or <code>UNBOUND</code>
- * @return the smallest position of a non-whitespace character in [<code>position</code>, <code>bound</code>) that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found
- */
- public int findNonWhitespaceForward(int position, int bound) {
- return scanForward(position, bound, fNonWSDefaultPart);
- }
-
- /**
- * Finds the smallest position in <code>fDocument</code> such that the position is &gt;= <code>position</code>
- * and &lt; <code>bound</code> and <code>Character.isWhitespace(fDocument.getChar(pos))</code> evaluates to <code>false</code>.
- *
- * @param position the first character position in <code>fDocument</code> to be considered
- * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> &gt; <code>position</code>, or <code>UNBOUND</code>
- * @return the smallest position of a non-whitespace character in [<code>position</code>, <code>bound</code>), or <code>NOT_FOUND</code> if none can be found
- */
- public int findNonWhitespaceForwardInAnyPartition(int position, int bound) {
- return scanForward(position, bound, fNonWS);
- }
-
- /**
- * Finds the highest position in <code>fDocument</code> such that the position is &lt;= <code>position</code>
- * and &gt; <code>bound</code> and <code>Character.isWhitespace(fDocument.getChar(pos))</code> evaluates to <code>false</code>
- * and the position is in the default partition.
- *
- * @param position the first character position in <code>fDocument</code> to be considered
- * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> &lt; <code>position</code>, or <code>UNBOUND</code>
- * @return the highest position of a non-whitespace character in (<code>bound</code>, <code>position</code>] that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found
- */
- public int findNonWhitespaceBackward(int position, int bound) {
- return scanBackward(position, bound, fNonWSDefaultPart);
- }
-
- /**
- * Finds the lowest position <code>p</code> in <code>fDocument</code> such that <code>start</code> &lt;= p &lt;
- * <code>bound</code> and <code>condition.stop(fDocument.getChar(p), p)</code> evaluates to <code>true</code>.
- *
- * @param start the first character position in <code>fDocument</code> to be considered
- * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> &gt; <code>start</code>, or <code>UNBOUND</code>
- * @param condition the <code>StopCondition</code> to check
- * @return the lowest position in [<code>start</code>, <code>bound</code>) for which <code>condition</code> holds, or <code>NOT_FOUND</code> if none can be found
- */
- public int scanForward(int start, int bound, StopCondition condition) {
- Assert.isLegal(start >= 0);
-
- if (bound == UNBOUND)
- bound= fDocument.getLength();
-
- Assert.isLegal(bound <= fDocument.getLength());
-
- try {
- fPos= start;
- while (fPos < bound) {
-
- fChar= fDocument.getChar(fPos);
- if (condition.stop(fChar, fPos, true))
- return fPos;
-
- fPos= condition.nextPosition(fPos, true);
- }
- } catch (BadLocationException e) {
- }
- return NOT_FOUND;
- }
-
-
- /**
- * Finds the lowest position in <code>fDocument</code> such that the position is &gt;= <code>position</code>
- * and &lt; <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code>
- * and the position is in the default partition.
- *
- * @param position the first character position in <code>fDocument</code> to be considered
- * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> &gt; <code>position</code>, or <code>UNBOUND</code>
- * @param ch the <code>char</code> to search for
- * @return the lowest position of <code>ch</code> in (<code>bound</code>, <code>position</code>] that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found
- */
- public int scanForward(int position, int bound, char ch) {
- return scanForward(position, bound, new CharacterMatch(ch));
- }
-
- /**
- * Finds the lowest position in <code>fDocument</code> such that the position is &gt;= <code>position</code>
- * and &lt; <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> for at least one
- * ch in <code>chars</code> and the position is in the default partition.
- *
- * @param position the first character position in <code>fDocument</code> to be considered
- * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> &gt; <code>position</code>, or <code>UNBOUND</code>
- * @param chars an array of <code>char</code> to search for
- * @return the lowest position of a non-whitespace character in [<code>position</code>, <code>bound</code>) that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found
- */
- public int scanForward(int position, int bound, char[] chars) {
- return scanForward(position, bound, new CharacterMatch(chars));
- }
-
- /**
- * Finds the highest position <code>p</code> in <code>fDocument</code> such that <code>bound</code> &lt; <code>p</code> &lt;= <code>start</code>
- * and <code>condition.stop(fDocument.getChar(p), p)</code> evaluates to <code>true</code>.
- *
- * @param start the first character position in <code>fDocument</code> to be considered
- * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> &lt; <code>start</code>, or <code>UNBOUND</code>
- * @param condition the <code>StopCondition</code> to check
- * @return the highest position in (<code>bound</code>, <code>start</code> for which <code>condition</code> holds, or <code>NOT_FOUND</code> if none can be found
- */
- public int scanBackward(int start, int bound, StopCondition condition) {
- if (bound == UNBOUND)
- bound= -1;
-
- Assert.isLegal(bound >= -1);
- Assert.isLegal(start < fDocument.getLength() );
-
- try {
- fPos= start;
- while (fPos > bound) {
-
- fChar= fDocument.getChar(fPos);
- if (condition.stop(fChar, fPos, false))
- return fPos;
-
- fPos= condition.nextPosition(fPos, false);
- }
- } catch (BadLocationException e) {
- }
- return NOT_FOUND;
- }
-
- /**
- * Finds the highest position in <code>fDocument</code> such that the position is &lt;= <code>position</code>
- * and &gt; <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> for at least one
- * ch in <code>chars</code> and the position is in the default partition.
- *
- * @param position the first character position in <code>fDocument</code> to be considered
- * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> &lt; <code>position</code>, or <code>UNBOUND</code>
- * @param ch the <code>char</code> to search for
- * @return the highest position of one element in <code>chars</code> in (<code>bound</code>, <code>position</code>] that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found
- */
- public int scanBackward(int position, int bound, char ch) {
- return scanBackward(position, bound, new CharacterMatch(ch));
- }
-
- /**
- * Finds the highest position in <code>fDocument</code> such that the position is &lt;= <code>position</code>
- * and &gt; <code>bound</code> and <code>fDocument.getChar(position) == ch</code> evaluates to <code>true</code> for at least one
- * ch in <code>chars</code> and the position is in the default partition.
- *
- * @param position the first character position in <code>fDocument</code> to be considered
- * @param bound the first position in <code>fDocument</code> to not consider any more, with <code>bound</code> &lt; <code>position</code>, or <code>UNBOUND</code>
- * @param chars an array of <code>char</code> to search for
- * @return the highest position of one element in <code>chars</code> in (<code>bound</code>, <code>position</code>] that resides in a Java partition, or <code>NOT_FOUND</code> if none can be found
- */
- public int scanBackward(int position, int bound, char[] chars) {
- return scanBackward(position, bound, new CharacterMatch(chars));
- }
-
- /**
- * Checks whether <code>position</code> resides in a default (Java) partition of <code>fDocument</code>.
- *
- * @param position the position to be checked
- * @return <code>true</code> if <code>position</code> is in the default partition of <code>fDocument</code>, <code>false</code> otherwise
- */
- public boolean isDefaultPartition(int position) {
- return fPartition.equals(getPartition(position).getType());
- }
-
- /**
- * Returns the partition at <code>position</code>.
- *
- * @param position the position to get the partition for
- * @return the partition at <code>position</code> or a dummy zero-length
- * partition if accessing the document fails
- */
- private ITypedRegion getPartition(int position) {
- if (!contains(fCachedPartition, position)) {
- Assert.isTrue(position >= 0);
- Assert.isTrue(position <= fDocument.getLength());
-
- try {
- fCachedPartition= TextUtilities.getPartition(fDocument, fPartitioning, position, false);
- } catch (BadLocationException e) {
- fCachedPartition= new TypedRegion(position, 0, "__no_partition_at_all"); //$NON-NLS-1$
- }
- }
-
- return fCachedPartition;
- }
-
- /**
- * Returns <code>true</code> if <code>region</code> contains <code>position</code>.
- *
- * @param region a region
- * @param position an offset
- * @return <code>true</code> if <code>region</code> contains <code>position</code>
- * @since 3.2
- */
- private boolean contains(IRegion region, int position) {
- int offset= region.getOffset();
- return offset <= position && position < offset + region.getLength();
- }
-
- /**
- * Checks if the line seems to be an open condition not followed by a block (i.e. an if, while,
- * or for statement with just one following statement, see example below).
- *
- * <pre>
- * if (condition)
- * doStuff();
- * </pre>
- *
- * <p>Algorithm: if the last non-WS, non-Comment code on the line is an if (condition), while (condition),
- * for( expression), do, else, and there is no statement after that </p>
- *
- * @param position the insert position of the new character
- * @param bound the lowest position to consider
- * @return <code>true</code> if the code is a conditional statement or loop without a block, <code>false</code> otherwise
- */
- public boolean isBracelessBlockStart(int position, int bound) {
- if (position < 1)
- return false;
-
- switch (previousToken(position, bound)) {
- case TokenDO:
- case TokenELSE:
- return true;
- case TokenRPAREN:
- position= findOpeningPeer(fPos, LPAREN, RPAREN);
- if (position > 0) {
- switch (previousToken(position - 1, bound)) {
- case TokenIF:
- case TokenFOR:
- case TokenWHILE:
- return true;
- }
- }
- }
-
- return false;
- }
-
- /**
- * Returns <code>true</code> if the document, when scanned backwards from <code>start</code>
- * appears to contain a class instance creation, i.e. a possibly qualified name preceded by a
- * <code>new</code> keyword. The <code>start</code> must be at the end of the type name, and
- * before any generic signature or constructor parameter list. The heuristic will return
- * <code>true</code> if <code>start</code> is at the following positions (|):
- *
- * <pre>
- * new java.util. ArrayList|&lt;String&gt;(10)
- * new ArrayList |(10)
- * new / * comment * / ArrayList |(10)
- * </pre>
- *
- * but not the following:
- *
- * <pre>
- * new java.util. ArrayList&lt;String&gt;(10)|
- * new java.util. ArrayList&lt;String&gt;|(10)
- * new ArrayList (10)|
- * ArrayList |(10)
- * </pre>
- *
- * @param start the position where the type name of the class instance creation supposedly ends
- * @param bound the first position in <code>fDocument</code> to not consider any more, with
- * <code>bound</code> &lt; <code>start</code>, or <code>UNBOUND</code>
- * @return <code>true</code> if the current position looks like after the type name of a class
- * instance creation
- * @since 3.2
- */
- public boolean looksLikeClassInstanceCreationBackward(int start, int bound) {
- int token= previousToken(start - 1, bound);
- if (token == Symbols.TokenIDENT) { // type name
- token= previousToken(getPosition(), bound);
- while (token == Symbols.TokenOTHER) { // dot of qualification
- token= previousToken(getPosition(), bound);
- if (token != Symbols.TokenIDENT) // qualification name
- return false;
- token= previousToken(getPosition(), bound);
- }
- return token == Symbols.TokenNEW;
- }
- return false;
- }
-
- /**
- * Returns <code>true</code> if <code>identifier</code> is probably a
- * type variable or type name, <code>false</code> if it is rather not.
- * This is a heuristic.
- *
- * @param identifier the identifier to check
- * @return <code>true</code> if <code>identifier</code> is probably a
- * type variable or type name, <code>false</code> if not
- * @since 3.2
- */
- public static boolean isGenericStarter(CharSequence identifier) {
- /* This heuristic allows any identifiers if they start with an upper
- * case. This will fail when a comparison is made with constants:
- *
- * if (MAX > foo)
- *
- * will try to find the matching '<' which will never come
- *
- * Also, it will fail on lower case types and type variables
- */
- int length= identifier.length();
- if (length > 0 && Character.isUpperCase(identifier.charAt(0))) {
- for (int i= 0; i < length; i++) {
- if (identifier.charAt(i) == '_')
- return false;
- }
- return true;
- }
- return false;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaPairMatcher.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaPairMatcher.java
deleted file mode 100644
index 66a0e66677..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/JavaPairMatcher.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2010 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.ui.internal.text;
-
-import java.io.IOException;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
-import org.eclipse.jface.text.source.ICharacterPairMatcher;
-
-
-/**
- * Helper class for match pairs of characters.
- *
- * Copied from org.eclipse.jdt.internal.ui.text so we don't have to
- * depend on the org.eclipse.jdt.ui plugin.
- *
- * No modifications were made.
- */
-class JavaPairMatcher implements ICharacterPairMatcher {
-
- protected char[] fPairs;
- protected IDocument fDocument;
- protected int fOffset;
-
- protected int fStartPos;
- protected int fEndPos;
- protected int fAnchor;
-
- protected JavaCodeReader fReader = new JavaCodeReader();
-
-
- public JavaPairMatcher(char[] pairs) {
- fPairs = pairs;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.ICharacterPairMatcher#match(org.eclipse.jface.text.IDocument, int)
- */
- public IRegion match(IDocument document, int offset) {
-
- fOffset = offset;
-
- if (fOffset < 0)
- return null;
-
- fDocument = document;
-
- if (fDocument != null && matchPairsAt() && fStartPos != fEndPos)
- return new Region(fStartPos, fEndPos - fStartPos + 1);
-
- return null;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.ICharacterPairMatcher#getAnchor()
- */
- public int getAnchor() {
- return fAnchor;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.source.ICharacterPairMatcher#dispose()
- */
- public void dispose() {
- clear();
- fDocument = null;
- fReader = null;
- }
-
- /*
- * @see org.eclipse.jface.text.source.ICharacterPairMatcher#clear()
- */
- public void clear() {
- if (fReader != null) {
- try {
- fReader.close();
- }
- catch (IOException x) {
- // ignore
- }
- }
- }
-
- protected boolean matchPairsAt() {
-
- int i;
- int pairIndex1 = fPairs.length;
- int pairIndex2 = fPairs.length;
-
- fStartPos = -1;
- fEndPos = -1;
-
- // get the chars preceding and following the start position
- try {
-
- char prevChar = fDocument.getChar(Math.max(fOffset - 1, 0));
- // modified behavior for http://dev.eclipse.org/bugs/show_bug.cgi?id=16879
- // char nextChar= fDocument.getChar(fOffset);
-
- // search for opening peer character next to the activation point
- for (i = 0; i < fPairs.length; i = i + 2) {
- // if (nextChar == fPairs[i]) {
- // fStartPos= fOffset;
- // pairIndex1= i;
- // } else
- if (prevChar == fPairs[i]) {
- fStartPos = fOffset - 1;
- pairIndex1 = i;
- }
- }
-
- // search for closing peer character next to the activation point
- for (i = 1; i < fPairs.length; i = i + 2) {
- if (prevChar == fPairs[i]) {
- fEndPos = fOffset - 1;
- pairIndex2 = i;
- }
- // else if (nextChar == fPairs[i]) {
- // fEndPos= fOffset;
- // pairIndex2= i;
- // }
- }
-
- /*
- * If match for previous character fails , look for next character now.
- * This is required for cases like <abc|>, cursor placed at |.
- */
- if (fEndPos == -1 && fStartPos == -1) {
- char nextChar = fDocument.getChar(Math.max(fOffset, 0));
- for (i = 0; i < fPairs.length; i = i + 2) {
- if (nextChar == fPairs[i]) {
- fStartPos = fOffset;
- pairIndex1 = i;
- }
- }
-
- for (i = 1; i < fPairs.length; i = i + 2) {
- if (nextChar == fPairs[i]) {
- fEndPos = fOffset;
- pairIndex2 = i;
- }
- }
- }
-
- if (fEndPos > -1) {
- fAnchor = RIGHT;
- fStartPos = searchForOpeningPeer(fEndPos, fPairs[pairIndex2 - 1], fPairs[pairIndex2], fDocument);
- if (fStartPos > -1)
- return true;
- else
- fEndPos = -1;
- }
- else if (fStartPos > -1) {
- fAnchor = LEFT;
- fEndPos = searchForClosingPeer(fStartPos, fPairs[pairIndex1], fPairs[pairIndex1 + 1], fDocument);
- if (fEndPos > -1)
- return true;
- else
- fStartPos = -1;
- }
-
- }
- catch (BadLocationException x) {
- }
- catch (IOException x) {
- }
-
- return false;
- }
-
- protected int searchForClosingPeer(int offset, int openingPeer, int closingPeer, IDocument document) throws IOException {
-
- fReader.configureForwardReader(document, offset + 1, document.getLength(), false, true);
-
- int stack = 1;
- int c = fReader.read();
- while (c != JavaCodeReader.EOF) {
- if (c == openingPeer && c != closingPeer)
- stack++;
- else if (c == closingPeer)
- stack--;
-
- if (stack == 0)
- return fReader.getOffset();
-
- c = fReader.read();
- }
-
- return -1;
- }
-
- protected int searchForOpeningPeer(int offset, int openingPeer, int closingPeer, IDocument document) throws IOException {
-
- fReader.configureBackwardReader(document, offset, false, true);
-
- int stack = 1;
- int c = fReader.read();
- while (c != JavaCodeReader.EOF) {
- if (c == closingPeer && c != openingPeer)
- stack++;
- else if (c == openingPeer)
- stack--;
-
- if (stack == 0)
- return fReader.getOffset();
-
- c = fReader.read();
- }
-
- return -1;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/Symbols.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/Symbols.java
deleted file mode 100644
index 171e99c724..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/text/Symbols.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.ui.internal.text;
-
-//taken from package org.eclipse.jdt.internal.ui.text;
-
-interface Symbols {
- int TokenEOF = -1;
- int TokenLBRACE = 1;
- int TokenRBRACE = 2;
- int TokenLBRACKET = 3;
- int TokenRBRACKET = 4;
- int TokenLPAREN = 5;
- int TokenRPAREN = 6;
- int TokenSEMICOLON = 7;
- int TokenOTHER = 8;
- int TokenCOLON = 9;
- int TokenQUESTIONMARK = 10;
- int TokenCOMMA = 11;
- int TokenEQUAL = 12;
- int TokenLESSTHAN = 13;
- int TokenGREATERTHAN = 14;
- int TokenSQUOTE = 15;
- int TokenDQUOTE = 16;
- int TokenIF = 109;
- int TokenDO = 1010;
- int TokenFOR = 1011;
- int TokenTRY = 1012;
- int TokenCASE = 1013;
- int TokenELSE = 1014;
- int TokenBREAK = 1015;
- int TokenCATCH = 1016;
- int TokenWHILE = 1017;
- int TokenRETURN = 1018;
- int TokenSTATIC = 1019;
- int TokenSWITCH = 1020;
- int TokenFINALLY = 1021;
- int TokenSYNCHRONIZED = 1022;
- int TokenGOTO = 1023;
- int TokenDEFAULT = 1024;
- int TokenNEW = 1025;
- int TokenCLASS = 1026;
- int TokenINTERFACE = 1027;
- int TokenENUM = 1028;
- int TokenIDENT = 2000;
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/HTMLValidationReporter.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/HTMLValidationReporter.java
deleted file mode 100644
index b0fabbb787..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/HTMLValidationReporter.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007, 2008 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.ui.internal.validation;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.wst.html.core.internal.validate.MessageFactory;
-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.validate.ErrorInfo;
-import org.eclipse.wst.sse.core.internal.validate.ValidationMessage;
-import org.eclipse.wst.sse.core.internal.validate.ValidationReporter;
-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.IValidator;
-
-/*
- * Copied from jsp.core's HTMLValidationReporter
- */
-class HTMLValidationReporter implements ValidationReporter {
- private IValidator owner = null;
- private IReporter reporter = null;
- private IFile file = null;
- private IStructuredModel model = null;
- private MessageFactory fFactory = null;
-
- /**
- */
- public HTMLValidationReporter(IValidator owner, IReporter reporter, IFile file, IStructuredModel model) {
- super();
- this.owner = owner;
- this.reporter = reporter;
- this.file = file;
- this.model = model;
- fFactory = new MessageFactory(file != null ? file.getProject() : null);
- }
-
- /**
- */
- public void clear() {
- if (this.file == null)
- return;
-
- if (this.reporter != null) {
- this.reporter.removeAllMessages(this.owner, this.file);
- }
-
- }
-
-
- /**
- */
- public void report(ValidationMessage message) {
- if (message == null || this.file == null || message.getSeverity() == ValidationMessage.IGNORE)
- return;
- IMessage mes = translateMessage(message);
-
- if (this.reporter != null) {
- this.reporter.addMessage(this.owner, mes);
- }
-
- }
-
- /**
- * Translate ValidationMessage to IMessage and generate result log
- */
- private IMessage translateMessage(ValidationMessage message) {
- int severity = IMessage.LOW_SEVERITY;
- switch (message.getSeverity()) {
- case ValidationMessage.ERROR :
- severity = IMessage.HIGH_SEVERITY;
- break;
- case ValidationMessage.WARNING :
- severity = IMessage.NORMAL_SEVERITY;
- break;
- case ValidationMessage.INFORMATION :
- break;
- default :
- break;
- }
-
- IMessage mes = new LocalizedMessage(severity, message.getMessage(), this.file);
- mes.setOffset(message.getOffset());
- mes.setLength(message.getLength());
- if (this.model != null) {
- IStructuredDocument flatModel = this.model.getStructuredDocument();
- if (flatModel != null) {
- int line = flatModel.getLineOfOffset(message.getOffset());
- mes.setLineNo(line + 1);
- }
- }
-
- return mes;
- }
-
- public void report(ErrorInfo info) {
- report(fFactory.createMessage(info));
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/JSPActionSourceValidator.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/JSPActionSourceValidator.java
deleted file mode 100644
index 0ab20f968e..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/JSPActionSourceValidator.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.ui.internal.validation;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-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.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-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.IRegion;
-import org.eclipse.jst.jsp.core.internal.contentproperties.JSPFContentProperties;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.validation.JSPActionValidator;
-import org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.FileBufferModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.internal.reconcile.validator.ISourceValidator;
-import org.eclipse.wst.validation.internal.ConfigurationManager;
-import org.eclipse.wst.validation.internal.ProjectConfiguration;
-import org.eclipse.wst.validation.internal.ValidationConfiguration;
-import org.eclipse.wst.validation.internal.ValidationRegistryReader;
-import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
-
-/**
- * Source validator (able to check partial document) that checks for: -
- * missing required attributes & undefined attributes in jsp action tags such
- * as jsp directives and jsp custom tags
- */
-public class JSPActionSourceValidator extends JSPActionValidator implements ISourceValidator {
- private IDocument fDocument;
- private boolean fEnableSourceValidation;
- private IContentType fJSPFContentType = null;
-
- public void connect(IDocument document) {
- fDocument = document;
-
- // special checks to see source validation should really execute
- IFile file = null;
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- 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();
- }
- }
- fEnableSourceValidation = (file != null && isBatchValidatorPreferenceEnabled(file) && shouldValidate(file) && fragmentCheck(file));
- }
-
- public void disconnect(IDocument document) {
- fDocument = null;
- }
-
- public void validate(IRegion dirtyRegion, IValidationContext helper, IReporter reporter) {
- if (helper == null || fDocument == null || !fEnableSourceValidation)
- return;
-
- if ((reporter != null) && (reporter.isCancelled() == true)) {
- throw new OperationCanceledException();
- }
-
- IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- if (model == null)
- return;
-
- try {
- ITextFileBuffer fb = FileBufferModelManager.getInstance().getBuffer(fDocument);
- if (fb == null)
- return;
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(fb.getLocation());
- if (file == null || !file.exists())
- return;
- performValidation(file, reporter, model, dirtyRegion);
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- }
-
- /**
- * Gets current validation configuration based on current project (which
- * is based on current document) or global configuration if project does
- * not override
- *
- * @return ValidationConfiguration
- */
- private ValidationConfiguration getValidationConfiguration(IFile file) {
- ValidationConfiguration configuration = null;
- if (file != null) {
- IProject project = file.getProject();
- if (project != null) {
- try {
- ProjectConfiguration projectConfiguration = ConfigurationManager.getManager().getProjectConfiguration(project);
- configuration = projectConfiguration;
- if (projectConfiguration == null || projectConfiguration.useGlobalPreference()) {
- configuration = ConfigurationManager.getManager().getGlobalConfiguration();
- }
- }
- catch (InvocationTargetException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- }
-
- return configuration;
- }
-
- /**
- * Checks if validator is enabled according in Validation preferences
- *
- * @param vmd
- * @return
- */
- private boolean isBatchValidatorPreferenceEnabled(IFile file) {
- if (file == null) {
- return true;
- }
-
- boolean enabled = true;
- ValidationConfiguration configuration = getValidationConfiguration(file);
- if (configuration != null) {
- org.eclipse.wst.validation.internal.ValidatorMetaData metadata = ValidationRegistryReader.getReader().getValidatorMetaData(JSPContentValidator.class.getName());
- if (metadata != null) {
- if (!configuration.isBuildEnabled(metadata) && !configuration.isManualEnabled(metadata))
- enabled = false;
- }
- }
- return enabled;
- }
-
- /**
- * 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) {
- // copied from JSPValidator
- 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;
- }
-
- /**
- * 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) {
- // copied from JSPValidator
- 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
- if (is != null)
- try {
- is.close();
- }
- catch (Exception e) {
- // not sure how to recover at this point
- }
- }
- return isFragment;
- }
-
- private boolean shouldValidate(IFile file) {
- // copied from JSPValidator
- 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;
- }
-
- /**
- * Returns JSP fragment content type
- *
- * @return jspf content type
- */
- private IContentType getJSPFContentType() {
- // copied from JSPValidator
- if (fJSPFContentType == null) {
- fJSPFContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSPFRAGMENT);
- }
- return fJSPFContentType;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/JSPContentSourceValidator.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/JSPContentSourceValidator.java
deleted file mode 100644
index bfbd890f5c..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/JSPContentSourceValidator.java
+++ /dev/null
@@ -1,393 +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.ui.internal.validation;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.filebuffers.ITextFileBuffer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-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.OperationCanceledException;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.QualifiedName;
-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.IRegion;
-import org.eclipse.jst.jsp.core.internal.contentproperties.JSPFContentProperties;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.validation.JSPContentValidator;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.wst.html.core.internal.document.HTMLDocumentTypeConstants;
-import org.eclipse.wst.html.core.internal.validate.HTMLValidationAdapterFactory;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.FileBufferModelManager;
-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.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.validate.ValidationAdapter;
-import org.eclipse.wst.sse.ui.internal.reconcile.validator.ISourceValidator;
-import org.eclipse.wst.validation.internal.ConfigurationManager;
-import org.eclipse.wst.validation.internal.ProjectConfiguration;
-import org.eclipse.wst.validation.internal.ValidationConfiguration;
-import org.eclipse.wst.validation.internal.ValidationRegistryReader;
-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.xml.core.internal.document.DocumentTypeAdapter;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.w3c.dom.Text;
-
-/**
- * Source validator for JSP content. This validator currently only validates
- * html content in jsp.
- */
-public class JSPContentSourceValidator extends JSPContentValidator implements ISourceValidator {
- /*
- * Most of this class was copied from the ISourceValidator aspects of
- * html.ui's HTMLValidator
- */
- private IDocument fDocument;
- private boolean fEnableSourceValidation;
- private IContentType fJSPFContentType = null;
-
- public void connect(IDocument document) {
- fDocument = document;
-
- // special checks to see source validation should really execute
- IFile file = null;
- IStructuredModel model = null;
- try {
- model = StructuredModelManager.getModelManager().getExistingModelForRead(document);
- 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();
- }
- }
- fEnableSourceValidation = (file != null && isBatchValidatorPreferenceEnabled(file) && shouldValidate(file) && fragmentCheck(file));
- }
-
- public void disconnect(IDocument document) {
- fDocument = null;
- }
-
- /**
- * This validate call is for the ISourceValidator partial document
- * validation approach
- *
- * @param dirtyRegion
- * @param helper
- * @param reporter
- * @see org.eclipse.wst.sse.ui.internal.reconcile.validator.ISourceValidator
- */
- public void validate(IRegion dirtyRegion, IValidationContext helper, IReporter reporter) {
- if (helper == null || fDocument == null || !fEnableSourceValidation)
- return;
-
- if ((reporter != null) && (reporter.isCancelled() == true)) {
- throw new OperationCanceledException();
- }
-
- IStructuredModel model = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- if (model == null)
- return; // error
-
- try {
-
- IDOMDocument document = null;
- if (model instanceof IDOMModel) {
- document = ((IDOMModel) model).getDocument();
- }
-
- if (document == null || !hasHTMLFeature(document))
- return; // ignore
-
- ITextFileBuffer fb = FileBufferModelManager.getInstance().getBuffer(fDocument);
- if (fb == null)
- return;
-
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(fb.getLocation());
- if (file == null || !file.exists())
- return;
-
- // this will be the wrong region if it's Text (instead of Element)
- // we don't know how to validate Text
- IndexedRegion ir = getCoveringNode(dirtyRegion); // model.getIndexedRegion(dirtyRegion.getOffset());
- if (ir instanceof Text) {
- while (ir != null && ir instanceof Text) {
- // it's assumed that this gets the IndexedRegion to
- // the right of the end offset
- ir = model.getIndexedRegion(ir.getEndOffset());
- }
- }
-
- if (ir instanceof INodeNotifier) {
-
- INodeAdapterFactory factory = HTMLValidationAdapterFactory.getInstance();
- ValidationAdapter adapter = (ValidationAdapter) factory.adapt((INodeNotifier) ir);
- if (adapter == null)
- return; // error
-
- if (reporter != null) {
- HTMLValidationReporter rep = null;
- rep = getReporter(reporter, file, (IDOMModel) model);
- rep.clear();
- adapter.setReporter(rep);
-
- Message mess = new LocalizedMessage(IMessage.LOW_SEVERITY, file.getFullPath().toString().substring(1));
- reporter.displaySubtask(this, mess);
- }
- adapter.validate(ir);
- }
- }
- finally {
- if (model != null)
- model.releaseFromRead();
- }
- }
-
- private IndexedRegion getCoveringNode(IRegion dirtyRegion) {
-
- IndexedRegion largestRegion = null;
- if (fDocument instanceof IStructuredDocument) {
- IStructuredDocumentRegion[] regions = ((IStructuredDocument) fDocument).getStructuredDocumentRegions(dirtyRegion.getOffset(), dirtyRegion.getLength());
- largestRegion = getLargest(regions);
- }
- return largestRegion;
- }
-
- private IndexedRegion getLargest(IStructuredDocumentRegion[] sdRegions) {
-
- if (sdRegions == null || sdRegions.length == 0)
- return null;
-
- IndexedRegion currentLargest = getCorrespondingNode(sdRegions[0]);
- for (int i = 0; i < sdRegions.length; i++) {
- if (!sdRegions[i].isDeleted()) {
- IndexedRegion corresponding = getCorrespondingNode(sdRegions[i]);
-
- if (currentLargest instanceof Text)
- currentLargest = corresponding;
-
- if (corresponding != null) {
- if (!(corresponding instanceof Text)) {
- if (corresponding.getStartOffset() <= currentLargest.getStartOffset() && corresponding.getEndOffset() >= currentLargest.getEndOffset())
- currentLargest = corresponding;
- }
- }
-
- }
- }
- return currentLargest;
- }
-
- protected IndexedRegion getCorrespondingNode(IStructuredDocumentRegion sdRegion) {
- IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fDocument);
- IndexedRegion indexedRegion = null;
- try {
- if (sModel != null)
- indexedRegion = sModel.getIndexedRegion(sdRegion.getStart());
- }
- finally {
- if (sModel != null)
- sModel.releaseFromRead();
- }
- return indexedRegion;
- }
-
- private boolean hasHTMLFeature(IDOMDocument document) {
- DocumentTypeAdapter adapter = (DocumentTypeAdapter) document.getAdapterFor(DocumentTypeAdapter.class);
- if (adapter == null)
- return false;
- return adapter.hasFeature(HTMLDocumentTypeConstants.HTML);
- }
-
- private HTMLValidationReporter getReporter(IReporter reporter, IFile file, IDOMModel model) {
- return new HTMLValidationReporter(this, reporter, file, model);
- }
-
- /**
- * Gets current validation configuration based on current project (which
- * is based on current document) or global configuration if project does
- * not override
- *
- * @return ValidationConfiguration
- */
- private ValidationConfiguration getValidationConfiguration(IFile file) {
- ValidationConfiguration configuration = null;
- if (file != null) {
- IProject project = file.getProject();
- if (project != null) {
- try {
- ProjectConfiguration projectConfiguration = ConfigurationManager.getManager().getProjectConfiguration(project);
- configuration = projectConfiguration;
- if (projectConfiguration == null || projectConfiguration.useGlobalPreference()) {
- configuration = ConfigurationManager.getManager().getGlobalConfiguration();
- }
- }
- catch (InvocationTargetException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- }
-
- return configuration;
- }
-
- /**
- * Checks if validator is enabled according in Validation preferences
- *
- * @param vmd
- * @return
- */
- private boolean isBatchValidatorPreferenceEnabled(IFile file) {
- if (file == null) {
- return true;
- }
-
- boolean enabled = true;
- ValidationConfiguration configuration = getValidationConfiguration(file);
- if (configuration != null) {
- org.eclipse.wst.validation.internal.ValidatorMetaData metadata = ValidationRegistryReader.getReader().getValidatorMetaData(JSPContentValidator.class.getName());
- if (metadata != null) {
- if (!configuration.isBuildEnabled(metadata) && !configuration.isManualEnabled(metadata))
- enabled = false;
- }
- }
- return enabled;
- }
-
- /**
- * 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) {
- // copied from JSPValidator
- 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;
- }
-
- /**
- * 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) {
- // copied from JSPValidator
- 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
- if (is != null)
- try {
- is.close();
- }
- catch (Exception e) {
- // not sure how to recover at this point
- }
- }
- return isFragment;
- }
-
- private boolean shouldValidate(IFile file) {
- // copied from JSPValidator
- 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;
- }
-
- /**
- * Returns JSP fragment content type
- *
- * @return jspf content type
- */
- private IContentType getJSPFContentType() {
- // copied from JSPValidator
- if (fJSPFContentType == null) {
- fJSPFContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSPFRAGMENT);
- }
- return fJSPFContentType;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/LocalizedMessage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/LocalizedMessage.java
deleted file mode 100644
index 1686e37095..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/validation/LocalizedMessage.java
+++ /dev/null
@@ -1,61 +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.ui.internal.validation;
-
-import java.util.Locale;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.wst.validation.internal.core.Message;
-
-/**
- * Simple implementation of Message all validators in package can use.
- */
-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);
- }
-
- public void setLocalizedMessage(String message) {
- _message = message;
- }
-
- public String getLocalizedMessage() {
- return _message;
- }
-
- public String getText() {
- return getLocalizedMessage();
- }
-
- public String getText(ClassLoader cl) {
- return getLocalizedMessage();
- }
-
- public String getText(Locale l) {
- return getLocalizedMessage();
- }
-
- public String getText(Locale l, ClassLoader cl) {
- return getLocalizedMessage();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/views/contentoutline/TLDContentOutlineConfiguration.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/views/contentoutline/TLDContentOutlineConfiguration.java
deleted file mode 100644
index 4444f59509..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/views/contentoutline/TLDContentOutlineConfiguration.java
+++ /dev/null
@@ -1,349 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 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.ui.internal.views.contentoutline;
-
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.TreeViewer;
-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.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.sse.ui.internal.contentoutline.PropertyChangeUpdateAction;
-import org.eclipse.wst.sse.ui.internal.contentoutline.PropertyChangeUpdateActionContributionItem;
-import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImageHelper;
-import org.eclipse.wst.sse.ui.internal.editor.EditorPluginImages;
-import org.eclipse.wst.xml.ui.views.contentoutline.XMLContentOutlineConfiguration;
-import org.w3c.dom.Element;
-import org.w3c.dom.EntityReference;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-public class TLDContentOutlineConfiguration extends XMLContentOutlineConfiguration {
-
- private class ContentLabelProvider implements ILabelProvider {
- ILabelProvider fParentProvider = null;
-
- ContentLabelProvider(ILabelProvider parent) {
- super();
- fParentProvider = parent;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse
- * .jface.viewers.ILabelProviderListener)
- */
- public void addListener(ILabelProviderListener listener) {
- fParentProvider.addListener(listener);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
- */
- public void dispose() {
- fParentProvider.dispose();
- }
-
- private String firstLineOf(String text) {
- if (text == null || text.length() < 1 || (text.indexOf('\r') < 0 && text.indexOf('\n') < 0)) {
- return text;
- }
-
- int start = 0;
- int maxLength = text.length();
- while (start < maxLength && text.charAt(start) == '\r' || text.charAt(start) == '\n')
- start++;
- int endN = text.indexOf('\n', start);
- int endR = text.indexOf('\r', start);
- // no more line delimiters
- if (endN < 0 && endR < 0) {
- if (start == 0) {
- // no leading line delimiters, return as-is
- return text;
- }
- else {
- // cut leading line delimiters
- return text.substring(start);
- }
- }
- if (endN < 0) {
- /* no \r cut leading line delimiters up to first \r */
- return text.substring(start, endR);
- }
- if (endR < 0) {
- /* no \r cut leading line delimiters up to first \n */
- return text.substring(start, endN);
- }
-
- /*
- * Both \n and \r, cut leading line delimiters up to whichever is
- * first
- */
- return text.substring(start, Math.min(endN, endR));
- }
-
- private String getContainedText(Node parent) {
- NodeList children = parent.getChildNodes();
- if (children.getLength() == 1) {
- return getValue(children.item(0));
- }
- 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(getValue(child));
- }
- child = child.getNextSibling();
- }
- return s.toString().trim();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
- */
- public Image getImage(Object element) {
- return fParentProvider.getImage(element);
- }
-
- /**
- * @param domElement
- * @return
- */
- private String getNameValue(Element domElement) {
- NodeList names = domElement.getElementsByTagName(JSP11TLDNames.NAME);
- String name = null;
- for (int i = 0; i < names.getLength() && (name == null || name.length() == 0); i++) {
- name = getContainedText(names.item(i));
- }
- return name;
- }
-
- /**
- * @param domElement
- * @return
- */
- private String getShortNameValue(Element domElement) {
- NodeList names = domElement.getElementsByTagName(JSP12TLDNames.SHORT_NAME);
- String name = null;
- for (int i = 0; i < names.getLength() && (name == null || name.length() == 0); i++) {
- name = getContainedText(names.item(i));
- }
- names = domElement.getElementsByTagName(JSP11TLDNames.SHORTNAME);
- for (int i = 0; i < names.getLength() && (name == null || name.length() == 0); i++) {
- name = getContainedText(names.item(i));
- }
- return name;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
- */
- public String getText(Object element) {
- if (fShowContentValues && element instanceof Element) {
- Element domElement = (Element) element;
- String name = domElement.getNodeName();
- boolean showName = JSP11TLDNames.TAG.equals(name);
- showName = showName || JSP11TLDNames.ATTRIBUTE.equals(name);
- if (showName) {
- String value = getNameValue(domElement);
- if (value != null && value.length() > 0) {
- /**
- * Currently not externalized since it's analagous to
- * a decorator.
- */
- return fParentProvider.getText(domElement) + " [" + firstLineOf(value) + "]"; //$NON-NLS-1$
- }
- }
-
- boolean showContents = JSP11TLDNames.NAME.equals(name);
- showContents = showContents || JSP11TLDNames.BODYCONTENT.equals(name);
- showContents = showContents || JSP12TLDNames.BODY_CONTENT.equals(name);
- showContents = showContents || JSP11TLDNames.TAGCLASS.equals(name);
- showContents = showContents || JSP12TLDNames.TAG_CLASS.equals(name);
- showContents = showContents || JSP11TLDNames.TEICLASS.equals(name);
- showContents = showContents || JSP12TLDNames.TEI_CLASS.equals(name);
- showContents = showContents || JSP11TLDNames.REQUIRED.equals(name);
- showContents = showContents || JSP11TLDNames.RTEXPRVALUE.equals(name);
- showContents = showContents || JSP11TLDNames.URI.equals(name);
- showContents = showContents || JSP11TLDNames.SHORTNAME.equals(name);
- showContents = showContents || JSP12TLDNames.SHORT_NAME.equals(name);
- showContents = showContents || JSP12TLDNames.DISPLAY_NAME.equals(name);
- showContents = showContents || JSP11TLDNames.JSPVERSION.equals(name);
- showContents = showContents || JSP12TLDNames.JSP_VERSION.equals(name);
- showContents = showContents || JSP11TLDNames.TLIBVERSION.equals(name);
- showContents = showContents || JSP12TLDNames.TLIB_VERSION.equals(name);
- showContents = showContents || JSP12TLDNames.LISTENER_CLASS.equals(name);
- showContents = showContents || JSP12TLDNames.VARIABLE_SCOPE.equals(name);
- showContents = showContents || JSP12TLDNames.VARIABLE_CLASS.equals(name);
- showContents = showContents || JSP12TLDNames.VARIABLE_DECLARE.equals(name);
- showContents = showContents || JSP12TLDNames.VARIABLE_NAME_FROM_ATTRIBUTE.equals(name);
- showContents = showContents || JSP12TLDNames.VARIABLE_NAME_GIVEN.equals(name);
- showContents = showContents || JSP12TLDNames.VALIDATOR_CLASS.equals(name);
- showContents = showContents || JSP12TLDNames.SMALL_ICON.equals(name);
- showContents = showContents || JSP12TLDNames.LARGE_ICON.equals(name);
-
- if (showContents) {
- return fParentProvider.getText(domElement) + ": " + getContainedText(domElement); //$NON-NLS-1$
- }
-
- if (JSP11TLDNames.TAGLIB.equals(name)) {
- String value = getShortNameValue(domElement);
- if (value != null && value.length() > 0) {
- /**
- * Currently not externalized since it's analagous to
- * a decorator.
- */
- return fParentProvider.getText(domElement) + " [" + value + "]"; //$NON-NLS-1$
- }
- }
- }
- return fParentProvider.getText(element);
- }
-
- private String getValue(Node n) {
- if (n == null)
- return ""; //$NON-NLS-1$
- String value = n.getNodeValue();
- if (value == null)
- return ""; //$NON-NLS-1$
- return value.trim();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java
- * .lang.Object, java.lang.String)
- */
- public boolean isLabelProperty(Object element, String property) {
- return fParentProvider.isLabelProperty(element, property);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org
- * .eclipse.jface.viewers.ILabelProviderListener)
- */
- public void removeListener(ILabelProviderListener listener) {
- fParentProvider.removeListener(listener);
- }
- }
-
- /**
- * Toggle action for whether or not to display element's first attribute
- */
- private class ToggleShowValueAction extends PropertyChangeUpdateAction {
- private TreeViewer fTreeViewer;
-
- public ToggleShowValueAction(IPreferenceStore store, String preference, TreeViewer treeViewer) {
- super(JSPUIMessages.TLDContentOutlineConfiguration_0, store, preference, true);
- setToolTipText(getText());
- // TODO: image needed
- setImageDescriptor(EditorPluginImageHelper.getInstance().getImageDescriptor(EditorPluginImages.IMG_OBJ_PROP_PS));
- fTreeViewer = treeViewer;
- update();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.texteditor.IUpdate#update()
- */
- public void update() {
- super.update();
- fShowContentValues = isChecked();
-
- // refresh the outline view
- fTreeViewer.refresh(true);
- }
- }
-
- /*
- * Preference key for Show Attributes
- */
- private final String OUTLINE_SHOW_VALUE_PREF = "outline-show-value"; //$NON-NLS-1$
-
- boolean fShowContentValues = true;
- ILabelProvider fLabelProvider = null;
-
- public TLDContentOutlineConfiguration() {
- super();
- }
-
- protected IContributionItem[] createMenuContributions(TreeViewer viewer) {
- IContributionItem[] items;
- IContributionItem showValueItem = new PropertyChangeUpdateActionContributionItem(new ToggleShowValueAction(getPreferenceStore(), OUTLINE_SHOW_VALUE_PREF, viewer));
-
- items = super.createMenuContributions(viewer);
- if (items == null) {
- items = new IContributionItem[]{showValueItem};
- }
- else {
- IContributionItem[] combinedItems = new IContributionItem[items.length + 1];
- System.arraycopy(items, 0, combinedItems, 0, items.length);
- combinedItems[items.length] = showValueItem;
- items = combinedItems;
- }
- return items;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.wst.xml.ui.views.contentoutline.XMLContentOutlineConfiguration
- * #getLabelProvider(org.eclipse.jface.viewers.TreeViewer)
- */
- public ILabelProvider getLabelProvider(TreeViewer viewer) {
- if (fLabelProvider == null) {
- fLabelProvider = new ContentLabelProvider(super.getLabelProvider(viewer));
- }
- return fLabelProvider;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration
- * #getPreferenceStore()
- */
- protected IPreferenceStore getPreferenceStore() {
- return JSPUIPlugin.getDefault().getPreferenceStore();
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPFileWizardPage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPFileWizardPage.java
deleted file mode 100644
index f660996e89..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPFileWizardPage.java
+++ /dev/null
@@ -1,280 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2011 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.ui.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-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.Preferences;
-import org.eclipse.core.runtime.content.IContentType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.core.internal.preferences.JSPCorePreferenceNames;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.util.FacetModuleCoreSupport;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-import org.eclipse.wst.html.ui.internal.HTMLUIMessages;
-
-class NewJSPFileWizardPage extends WizardNewFileCreationPage {
-
- private static final String defaultName = "NewFile"; //$NON-NLS-1$
- private IContentType fContentType;
- private List fValidExtensions = null;
-
- public NewJSPFileWizardPage(String pageName, IStructuredSelection selection) {
- super(pageName, selection);
- }
-
- public void createControl(Composite parent) {
- // inherit default container and name specification widgets
- super.createControl(parent);
- setFileName(computeDefaultFileName());
- setPageComplete(validatePage());
- }
-
- protected String computeDefaultFileName() {
- int count = 0;
- String fileName = addDefaultExtension(defaultName);
- IPath containerFullPath = getContainerFullPath();
- if (containerFullPath != null) {
- while (true) {
- IPath path = containerFullPath.append(fileName);
- if (ResourcesPlugin.getWorkspace().getRoot().exists(path)) {
- count++;
- fileName = addDefaultExtension(defaultName + count);
- }
- else {
- break;
- }
- }
- }
- return fileName;
- }
-
- /**
- * This method is overridden to set the selected folder to web contents
- * folder if the current selection is outside the web contents folder.
- */
- protected void initialPopulateContainerNameField() {
- super.initialPopulateContainerNameField();
-
- IPath fullPath = getContainerFullPath();
- IProject project = getProjectFromPath(fullPath);
- IPath[] webContentPaths = FacetModuleCoreSupport.getAcceptableRootPaths(project);
- for (int i = 0; webContentPaths != null && i < webContentPaths.length; i++) {
- if (!webContentPaths[i].isPrefixOf(fullPath)) {
- setContainerFullPath(webContentPaths[i]);
- break;
- }
- }
- }
-
- /**
- * This method is overriden to set additional validation specific to jsp
- * files.
- */
- protected boolean validatePage() {
- setMessage(null);
- setErrorMessage(null);
-
- if (!super.validatePage()) {
- return false;
- }
-
- String fileName = getFileName();
- IPath fullPath = getContainerFullPath();
- if ((fullPath != null) && (fullPath.isEmpty() == false) && (fileName != null)) {
- // check that filename does not contain invalid extension
- if (!extensionValidForContentType(fileName)) {
- setErrorMessage(NLS.bind(JSPUIMessages._ERROR_FILENAME_MUST_END_JSP, getValidExtensions().toString()));
- return false;
- }
- // no file extension specified so check adding default
- // extension doesn't equal a file that already exists
- if (fileName.lastIndexOf('.') == -1) {
- String newFileName = addDefaultExtension(fileName);
- IPath resourcePath = fullPath.append(newFileName);
-
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IStatus result = workspace.validatePath(resourcePath.toString(), IResource.FOLDER);
- if (!result.isOK()) {
- // path invalid
- setErrorMessage(result.getMessage());
- return false;
- }
-
- if ((workspace.getRoot().getFolder(resourcePath).exists() || workspace.getRoot().getFile(resourcePath).exists())) {
- setErrorMessage(JSPUIMessages.ResourceGroup_nameExists);
- return false;
- }
- }
-
- // get the IProject for the selection path
- IProject project = getProjectFromPath(fullPath);
- // if inside web project, check if inside webContent folder
- if (project != null) {
- if (!isJavaProject(project)) {
- setMessage(JSPUIMessages._WARNING_FILE_MUST_BE_INSIDE_JAVA_PROJECT, WARNING);
- }
- if (isDynamicWebProject(project)) {
- // check that the path is inside the webContent folder
- IPath[] webContentPaths = FacetModuleCoreSupport.getAcceptableRootPaths(project);
- boolean isPrefix = false;
- for (int i = 0; !isPrefix && i < webContentPaths.length; i++) {
- isPrefix |= webContentPaths[i].isPrefixOf(fullPath);
- }
- if (!isPrefix) {
- setMessage(HTMLUIMessages._WARNING_FOLDER_MUST_BE_INSIDE_WEB_CONTENT, WARNING);
- }
- }
- }
- }
-
- return true;
- }
-
- /**
- * Adds default extension to the filename
- *
- * @param filename
- * @return
- */
- String addDefaultExtension(String filename) {
- StringBuffer newFileName = new StringBuffer(filename);
-
- Preferences preference = JSPCorePlugin.getDefault().getPluginPreferences();
- String ext = preference.getString(JSPCorePreferenceNames.DEFAULT_EXTENSION);
-
- newFileName.append("."); //$NON-NLS-1$
- newFileName.append(ext);
-
- return newFileName.toString();
- }
-
- /**
- * Get content type associated with this new file wizard
- *
- * @return IContentType
- */
- private IContentType getContentType() {
- if (fContentType == null)
- fContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSP);
- return fContentType;
- }
-
- /**
- * Get list of valid extensions for JSP Content type
- *
- * @return
- */
- private List getValidExtensions() {
- if (fValidExtensions == null) {
- IContentType type = getContentType();
- fValidExtensions = new ArrayList(Arrays.asList(type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
- }
- return fValidExtensions;
- }
-
- /**
- * Verifies if fileName is valid name for content type. Takes base content
- * type into consideration.
- *
- * @param fileName
- * @return true if extension is valid for this content type
- */
- private boolean extensionValidForContentType(String fileName) {
- boolean valid = false;
-
- IContentType type = getContentType();
- // there is currently an extension
- if (fileName.lastIndexOf('.') != -1) {
- // check what content types are associated with current extension
- IContentType[] types = Platform.getContentTypeManager().findContentTypesFor(fileName);
- int i = 0;
- while (i < types.length && !valid) {
- valid = types[i].isKindOf(type);
- ++i;
- }
- }
- else
- valid = true; // no extension so valid
- return valid;
- }
-
- /**
- * Returns the project that contains the specified path
- *
- * @param path
- * the path which project is needed
- * @return IProject object. If path is <code>null</code> the return
- * value is also <code>null</code>.
- */
- private IProject getProjectFromPath(IPath path) {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IProject project = null;
-
- if (path != null) {
- if (workspace.validatePath(path.toString(), IResource.PROJECT).isOK()) {
- project = workspace.getRoot().getProject(path.toString());
- }
- else {
- project = workspace.getRoot().getFile(path).getProject();
- }
- }
-
- return project;
- }
-
- /**
- * Checks if the specified project is a web project.
- *
- * @param project
- * project to be checked
- * @return true if the project is web project, otherwise false
- */
- private boolean isDynamicWebProject(IProject project) {
- boolean is = FacetModuleCoreSupport.isDynamicWebProject(project);
- return is;
- }
-
- /**
- * Checks if the specified project is a type of java project.
- *
- * @param project
- * project to be checked (cannot be null)
- * @return true if the project is a type of java project, otherwise false
- */
- private boolean isJavaProject(IProject project) {
- boolean isJava = false;
- try {
- isJava = project.hasNature(JavaCore.NATURE_ID);
- }
- catch (CoreException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
-
- return isJava;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPTemplatesWizardPage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPTemplatesWizardPage.java
deleted file mode 100644
index e1b5b83054..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPTemplatesWizardPage.java
+++ /dev/null
@@ -1,522 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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.ui.internal.wizard;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.jface.text.templates.DocumentTemplateContext;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.text.templates.TemplateBuffer;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jface.text.templates.TemplateContextType;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.ui.StructuredTextViewerConfigurationJSP;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.editor.IHelpContextIds;
-import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
-import org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeIdsJSP;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-
-/**
- * Templates page in new file wizard. Allows users to select a new file
- * template to be applied in new file.
- *
- */
-public class NewJSPTemplatesWizardPage extends WizardPage {
-
- /**
- * Content provider for templates
- */
- private class TemplateContentProvider implements IStructuredContentProvider {
- /** The template store. */
- private TemplateStore fStore;
-
- /*
- * @see IContentProvider#dispose()
- */
- public void dispose() {
- fStore = null;
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object input) {
- return fStore.getTemplates(TemplateContextTypeIdsJSP.NEW);
- }
-
- /*
- * @see IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- fStore = (TemplateStore) newInput;
- }
- }
-
- /**
- * Label provider for templates.
- */
- private class TemplateLabelProvider extends LabelProvider implements ITableLabelProvider {
-
- /*
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object,
- * int)
- */
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- /*
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object,
- * int)
- */
- public String getColumnText(Object element, int columnIndex) {
- Template template = (Template) element;
-
- switch (columnIndex) {
- case 0 :
- return template.getName();
- case 1 :
- return template.getDescription();
- default :
- return ""; //$NON-NLS-1$
- }
- }
- }
-
- /** Last selected template name */
- private String fLastSelectedTemplateName;
- /** The viewer displays the pattern of selected template. */
- private SourceViewer fPatternViewer;
- /** The table presenting the templates. */
- private TableViewer fTableViewer;
- /** Template store used by this wizard page */
- private TemplateStore fTemplateStore;
- /** Checkbox for using templates. */
- private Button fUseTemplateButton;
-
- public NewJSPTemplatesWizardPage() {
- super("NewJSPTemplatesWizardPage", JSPUIMessages.NewJSPTemplatesWizardPage_0, null); //$NON-NLS-1$
- setDescription(JSPUIMessages.NewJSPTemplatesWizardPage_1);
- }
-
- /**
- * Correctly resizes the table so no phantom columns appear
- *
- * @param parent
- * the parent control
- * @param buttons
- * the buttons
- * @param table
- * the table
- * @param column1
- * the first column
- * @param column2
- * the second column
- * @param column3
- * the third column
- */
- private void configureTableResizing(final Composite parent, final Table table, final TableColumn column1, final TableColumn column2) {
- parent.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- Rectangle area = parent.getClientArea();
- Point preferredSize = table.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- int width = area.width - 2 * table.getBorderWidth();
- if (preferredSize.y > area.height) {
- // Subtract the scrollbar width from the total column
- // width
- // if a vertical scrollbar will be required
- Point vBarSize = table.getVerticalBar().getSize();
- width -= vBarSize.x;
- }
-
- Point oldSize = table.getSize();
- if (oldSize.x > width) {
- // table is getting smaller so make the columns
- // smaller first and then resize the table to
- // match the client area width
- column1.setWidth(width / 2);
- column2.setWidth(width / 2);
- table.setSize(width, area.height);
- }
- else {
- // table is getting bigger so make the table
- // bigger first and then make the columns wider
- // to match the client area width
- table.setSize(width, area.height);
- column1.setWidth(width / 2);
- column2.setWidth(width / 2);
- }
- }
- });
- }
-
- public void createControl(Composite ancestor) {
- Composite parent = new Composite(ancestor, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- parent.setLayout(layout);
-
- // create checkbox for user to use JSP Template
- fUseTemplateButton = new Button(parent, SWT.CHECK);
- fUseTemplateButton.setText(JSPUIMessages.NewJSPTemplatesWizardPage_4);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
- fUseTemplateButton.setLayoutData(data);
- fUseTemplateButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- enableTemplates();
- }
- });
-
- // create composite for Templates table
- Composite innerParent = new Composite(parent, SWT.NONE);
- GridLayout innerLayout = new GridLayout();
- innerLayout.numColumns = 2;
- innerLayout.marginHeight = 0;
- innerLayout.marginWidth = 0;
- innerParent.setLayout(innerLayout);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1);
- innerParent.setLayoutData(gd);
-
- Label label = new Label(innerParent, SWT.NONE);
- label.setText(JSPUIMessages.NewJSPTemplatesWizardPage_7);
- data = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
- label.setLayoutData(data);
-
- // create table that displays templates
- Table table = new Table(innerParent, SWT.BORDER | SWT.FULL_SELECTION);
-
- data = new GridData(GridData.FILL_BOTH);
- data.widthHint = convertWidthInCharsToPixels(2);
- data.heightHint = convertHeightInCharsToPixels(10);
- data.horizontalSpan = 2;
- table.setLayoutData(data);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- TableLayout tableLayout = new TableLayout();
- table.setLayout(tableLayout);
-
- TableColumn column1 = new TableColumn(table, SWT.NONE);
- column1.setText(JSPUIMessages.NewJSPTemplatesWizardPage_2);
-
- TableColumn column2 = new TableColumn(table, SWT.NONE);
- column2.setText(JSPUIMessages.NewJSPTemplatesWizardPage_3);
-
- fTableViewer = new TableViewer(table);
- fTableViewer.setLabelProvider(new TemplateLabelProvider());
- fTableViewer.setContentProvider(new TemplateContentProvider());
-
- fTableViewer.setSorter(new ViewerSorter() {
- public int compare(Viewer viewer, Object object1, Object object2) {
- if ((object1 instanceof Template) && (object2 instanceof Template)) {
- Template left = (Template) object1;
- Template right = (Template) object2;
- int result = left.getName().compareToIgnoreCase(right.getName());
- if (result != 0)
- return result;
- return left.getDescription().compareToIgnoreCase(right.getDescription());
- }
- return super.compare(viewer, object1, object2);
- }
-
- public boolean isSorterProperty(Object element, String property) {
- return true;
- }
- });
-
- fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- updateViewerInput();
- }
- });
-
- // create viewer that displays currently selected template's contents
- fPatternViewer = doCreateViewer(parent);
-
- fTemplateStore = JSPUIPlugin.getDefault().getTemplateStore();
- fTableViewer.setInput(fTemplateStore);
-
- // Create linked text to just to templates preference page
- Link link = new Link(parent, SWT.NONE);
- link.setText(JSPUIMessages.NewJSPTemplatesWizardPage_6);
- data = new GridData(SWT.END, SWT.FILL, true, false, 2, 1);
- link.setLayoutData(data);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- linkClicked();
- }
- });
-
-
- configureTableResizing(innerParent, table, column1, column2);
- loadLastSavedPreferences();
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.JSP_NEWWIZARD_TEMPLATE_HELPID);
- Dialog.applyDialogFont(parent);
- setControl(parent);
- }
-
- /**
- * Creates, configures and returns a source viewer to present the template
- * pattern on the preference page. Clients may override to provide a
- * custom source viewer featuring e.g. syntax coloring.
- *
- * @param parent
- * the parent control
- * @return a configured source viewer
- */
- private SourceViewer createViewer(Composite parent) {
- SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
- StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationJSP();
-
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- return baseConfiguration.getConfiguredContentTypes(sourceViewer);
- }
-
- public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
- return baseConfiguration.getLineStyleProviders(sourceViewer, partitionType);
- }
- };
- SourceViewer viewer = new StructuredTextViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- viewer.getTextWidget().setFont(JFaceResources.getFont("org.eclipse.wst.sse.ui.textfont")); //$NON-NLS-1$
- IStructuredModel scratchModel = StructuredModelManager.getModelManager().createUnManagedStructuredModelFor(ContentTypeIdForJSP.ContentTypeID_JSP);
- IDocument document = scratchModel.getStructuredDocument();
- viewer.configure(sourceViewerConfiguration);
- viewer.setDocument(document);
- return viewer;
- }
-
- private SourceViewer doCreateViewer(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(JSPUIMessages.NewJSPTemplatesWizardPage_5);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- label.setLayoutData(data);
-
- SourceViewer viewer = createViewer(parent);
- viewer.setEditable(false);
-
- Control control = viewer.getControl();
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- data.heightHint = convertHeightInCharsToPixels(5);
- // [261274] - source viewer was growing to fit the max line width of the template
- data.widthHint = convertWidthInCharsToPixels(2);
- control.setLayoutData(data);
-
- return viewer;
- }
-
- /**
- * Enable/disable controls in page based on fUseTemplateButton's current
- * state.
- */
- void enableTemplates() {
- boolean enabled = fUseTemplateButton.getSelection();
-
- if (!enabled) {
- // save last selected template
- Template template = getSelectedTemplate();
- if (template != null)
- fLastSelectedTemplateName = template.getName();
- else
- fLastSelectedTemplateName = ""; //$NON-NLS-1$
-
- fTableViewer.setSelection(null);
- }
- else {
- setSelectedTemplate(fLastSelectedTemplateName);
- }
-
- fTableViewer.getControl().setEnabled(enabled);
- fPatternViewer.getControl().setEnabled(enabled);
- }
-
- /**
- * Return the template preference page id
- *
- * @return
- */
- private String getPreferencePageId() {
- return "org.eclipse.wst.sse.ui.preferences.jsp.templates"; //$NON-NLS-1$
- }
-
- /**
- * Get the currently selected template.
- *
- * @return
- */
- private Template getSelectedTemplate() {
- Template template = null;
- IStructuredSelection selection = (IStructuredSelection) fTableViewer.getSelection();
-
- if (selection.size() == 1) {
- template = (Template) selection.getFirstElement();
- }
- return template;
- }
-
- /**
- * Returns template string to insert.
- *
- * @return String to insert or null if none is to be inserted
- */
- String getTemplateString() {
- String templateString = null;
-
- Template template = getSelectedTemplate();
- if (template != null) {
- TemplateContextType contextType = JSPUIPlugin.getDefault().getTemplateContextRegistry().getContextType(TemplateContextTypeIdsJSP.NEW);
- IDocument document = new Document();
- TemplateContext context = new DocumentTemplateContext(contextType, document, 0, 0);
- try {
- TemplateBuffer buffer = context.evaluate(template);
- templateString = buffer.getString();
- }
- catch (Exception e) {
- Logger.log(Logger.WARNING_DEBUG, "Could not create template for new jsp", e); //$NON-NLS-1$
- }
- }
-
- return templateString;
- }
-
- void linkClicked() {
- String pageId = getPreferencePageId();
- PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(), pageId, new String[]{pageId}, null);
- dialog.open();
- fTableViewer.refresh();
- }
-
- /**
- * Load the last template name used in New JSP File wizard.
- */
- private void loadLastSavedPreferences() {
- fLastSelectedTemplateName = ""; //$NON-NLS-1$
- boolean setSelection = false;
- String templateName = JSPUIPlugin.getDefault().getPreferenceStore().getString(JSPUIPreferenceNames.NEW_FILE_TEMPLATE_NAME);
- if (templateName == null || templateName.length() == 0) {
- templateName = JSPUIPlugin.getDefault().getPreferenceStore().getString(JSPUIPreferenceNames.NEW_FILE_TEMPLATE_ID);
- if (templateName != null && templateName.length() > 0) {
- Template template = fTemplateStore.findTemplateById(templateName);
- if (template != null) {
- fLastSelectedTemplateName = template.getName();
- setSelection = true;
- }
- }
- }
- else {
- fLastSelectedTemplateName = templateName;
- setSelection = true;
- }
- fUseTemplateButton.setSelection(setSelection);
- enableTemplates();
- }
-
- /**
- * Save template name used for next call to New JSP File wizard.
- */
- void saveLastSavedPreferences() {
- String templateName = ""; //$NON-NLS-1$
-
- Template template = getSelectedTemplate();
- if (template != null) {
- templateName = template.getName();
- }
-
- JSPUIPlugin.getDefault().getPreferenceStore().setValue(JSPUIPreferenceNames.NEW_FILE_TEMPLATE_NAME, templateName);
- JSPUIPlugin.getDefault().savePluginPreferences();
- }
-
- /**
- * Select a template in the table viewer given the template name. If
- * template name cannot be found or templateName is null, just select
- * first item in table. If no items in table select nothing.
- *
- * @param templateName
- */
- private void setSelectedTemplate(String templateName) {
- Object template = null;
-
- if (templateName != null && templateName.length() > 0) {
- // pick the last used template
- template = fTemplateStore.findTemplate(templateName, TemplateContextTypeIdsJSP.NEW);
- }
-
- // no record of last used template so just pick first element
- if (template == null) {
- // just pick first element
- template = fTableViewer.getElementAt(0);
- }
-
- if (template != null) {
- IStructuredSelection selection = new StructuredSelection(template);
- fTableViewer.setSelection(selection, true);
- }
- }
-
- /**
- * Updates the pattern viewer.
- */
- void updateViewerInput() {
- Template template = getSelectedTemplate();
- if (template != null) {
- fPatternViewer.getDocument().set(template.getPattern());
- }
- else {
- fPatternViewer.getDocument().set(""); //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPWizard.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPWizard.java
deleted file mode 100644
index f4a929aef4..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewJSPWizard.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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.ui.internal.wizard;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.OutputStreamWriter;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImageHelper;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImages;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-
-public class NewJSPWizard extends Wizard implements INewWizard {
- private NewJSPFileWizardPage fNewFilePage;
- private NewJSPTemplatesWizardPage fNewFileTemplatesPage;
- private IStructuredSelection fSelection;
- private Display fDisplay;
-
- private boolean fShouldOpenEditorOnFinish = true;
-
- public void createPageControls(Composite pageContainer) {
- fDisplay = pageContainer.getDisplay();
- super.createPageControls(pageContainer);
- }
-
- // https://bugs.eclipse.org/bugs/show_bug.cgi?id=248424
- public void setOpenEditorOnFinish(boolean openEditor) {
- this.fShouldOpenEditorOnFinish = openEditor;
- }
-
- public void addPages() {
- fNewFilePage = new NewJSPFileWizardPage("JSPWizardNewFileCreationPage", new StructuredSelection(IDE.computeSelectedResources(fSelection))); //$NON-NLS-1$
- fNewFilePage.setTitle(JSPUIMessages._UI_WIZARD_NEW_HEADING);
- fNewFilePage.setDescription(JSPUIMessages._UI_WIZARD_NEW_DESCRIPTION);
- addPage(fNewFilePage);
-
- fNewFileTemplatesPage = new NewJSPTemplatesWizardPage();
- addPage(fNewFileTemplatesPage);
- }
-
- private String applyLineDelimiter(IFile file, String text) {
- String lineDelimiter = Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, System.getProperty("line.separator"), new IScopeContext[] {new ProjectScope(file.getProject()), new InstanceScope() });//$NON-NLS-1$
- String convertedText = StringUtils.replace(text, "\r\n", "\n");
- convertedText = StringUtils.replace(convertedText, "\r", "\n");
- convertedText = StringUtils.replace(convertedText, "\n", lineDelimiter);
- return convertedText;
- }
-
- public void init(IWorkbench aWorkbench, IStructuredSelection aSelection) {
- fSelection = aSelection;
- setWindowTitle(JSPUIMessages._UI_WIZARD_NEW_TITLE);
-
- ImageDescriptor descriptor = JSPEditorPluginImageHelper.getInstance().getImageDescriptor(JSPEditorPluginImages.IMG_OBJ_WIZBAN_NEWJSPFILE);
- setDefaultPageImageDescriptor(descriptor);
- }
-
- private void openEditor(final IFile file) {
- if (file != null) {
- fDisplay.asyncExec(new Runnable() {
- public void run() {
- if (!PlatformUI.isWorkbenchRunning())
- return;
- try {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IDE.openEditor(page, file, true);
- }
- catch (PartInitException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- });
- }
- }
-
- public boolean performFinish() {
- boolean performedOK = false;
-
- // save user options for next use
- fNewFileTemplatesPage.saveLastSavedPreferences();
-
- // no file extension specified so add default extension
- String fileName = fNewFilePage.getFileName();
- if (fileName.lastIndexOf('.') == -1) {
- String newFileName = fNewFilePage.addDefaultExtension(fileName);
- fNewFilePage.setFileName(newFileName);
- }
-
- // create a new empty file
- IFile file = fNewFilePage.createNewFile();
-
- // if there was problem with creating file, it will be null, so make
- // sure to check
- if (file != null) {
- // put template contents into file
- String templateString = fNewFileTemplatesPage.getTemplateString();
- if (templateString != null) {
- templateString = applyLineDelimiter(file, templateString);
- // determine the encoding for the new file
- Preferences preference = JSPCorePlugin.getDefault().getPluginPreferences();
- String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
-
- try {
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- OutputStreamWriter outputStreamWriter = null;
- if (charSet == null || charSet.trim().equals("")) { //$NON-NLS-1$
- // just use default encoding
- outputStreamWriter = new OutputStreamWriter(outputStream);
- }
- else {
- outputStreamWriter = new OutputStreamWriter(outputStream, charSet);
- }
- outputStreamWriter.write(templateString);
- outputStreamWriter.flush();
- outputStreamWriter.close();
- ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
- file.setContents(inputStream, true, false, null);
- inputStream.close();
- }
- catch (Exception e) {
- Logger.log(Logger.WARNING_DEBUG, "Could not create contents for new JSP file", e); //$NON-NLS-1$
- }
- }
-
- // open the file in editor
- if (fShouldOpenEditorOnFinish)
- openEditor(file);
-
- // everything's fine
- performedOK = true;
- }
- return performedOK;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagFileWizardPage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagFileWizardPage.java
deleted file mode 100644
index d0bcb46d2b..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagFileWizardPage.java
+++ /dev/null
@@ -1,256 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 ,2008 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.ui.internal.wizard;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-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.content.IContentType;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.core.internal.util.FacetModuleCoreSupport;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
-
-class NewTagFileWizardPage extends WizardNewFileCreationPage {
-
- private IContentType fContentType;
- private List fValidExtensions = null;
-
- public NewTagFileWizardPage(String pageName, IStructuredSelection selection) {
- super(pageName, selection);
- }
-
- /**
- * This method is overriden to set the selected folder to web contents
- * folder if the current selection is outside the web contents folder.
- */
- protected void initialPopulateContainerNameField() {
- super.initialPopulateContainerNameField();
-
- IPath fullPath = getContainerFullPath();
- IProject project = getProjectFromPath(fullPath);
- IPath webContentPath = getWebContentPath(project);
-
- if (webContentPath != null && !webContentPath.isPrefixOf(fullPath)) {
- setContainerFullPath(webContentPath);
- }
- }
-
- /**
- * This method is overriden to set additional validation specific to jsp
- * files.
- */
- protected boolean validatePage() {
- setMessage(null);
- setErrorMessage(null);
-
- if (!super.validatePage()) {
- return false;
- }
-
- String fileName = getFileName();
- IPath fullPath = getContainerFullPath();
- if ((fullPath != null) && (fullPath.isEmpty() == false) && (fileName != null)) {
- // check that filename does not contain invalid extension
- if (!extensionValidForContentType(fileName)) {
- setErrorMessage(NLS.bind(JSPUIMessages._ERROR_FILENAME_MUST_END_JSP, getValidExtensions().toString()));
- return false;
- }
- // no file extension specified so check adding default
- // extension doesn't equal a file that already exists
- if (fileName.lastIndexOf('.') == -1) {
- String newFileName = addDefaultExtension(fileName);
- IPath resourcePath = fullPath.append(newFileName);
-
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IStatus result = workspace.validatePath(resourcePath.toString(), IResource.FOLDER);
- if (!result.isOK()) {
- // path invalid
- setErrorMessage(result.getMessage());
- return false;
- }
-
- if ((workspace.getRoot().getFolder(resourcePath).exists() || workspace.getRoot().getFile(resourcePath).exists())) {
- setErrorMessage(JSPUIMessages.ResourceGroup_nameExists);
- return false;
- }
- }
-
- // get the IProject for the selection path
- IProject project = getProjectFromPath(fullPath);
- if (project != null) {
- if (!isJavaProject(project)) {
- setMessage(JSPUIMessages._WARNING_FILE_MUST_BE_INSIDE_JAVA_PROJECT, WARNING);
- }
- // if inside web project, check if inside webContent folder
- /*
- if (isDynamicWebProject(project)) {
- // check that the path is inside the webContent folder
- IPath webContentPath = getWebContentPath(project).append("/WEB-INF/tags");
- if (!webContentPath.isPrefixOf(fullPath)) {
- setMessage(JSPUIMessages._WARNING_FOLDER_MUST_BE_INSIDE_WEB_CONTENT, WARNING);
- }
- }
- */
- }
- }
-
- return true;
- }
-
- /**
- * Adds default extension to the filename
- *
- * @param filename
- * @return
- */
- String addDefaultExtension(String filename) {
- StringBuffer newFileName = new StringBuffer(filename);
-
-// Preferences preference = JSPCorePlugin.getDefault().getPluginPreferences();
- String ext = "tag";//preference.getString(JSPCorePreferenceNames.DEFAULT_EXTENSION);
-
- newFileName.append("."); //$NON-NLS-1$
- newFileName.append(ext);
-
- return newFileName.toString();
- }
-
- /**
- * Get content type associated with this new file wizard
- *
- * @return IContentType
- */
- private IContentType getContentType() {
- if (fContentType == null)
- fContentType = Platform.getContentTypeManager().getContentType(ContentTypeIdForJSP.ContentTypeID_JSPTAG);
- return fContentType;
- }
-
- /**
- * Get list of valid extensions for JSP Content type
- *
- * @return
- */
- private List getValidExtensions() {
- if (fValidExtensions == null) {
- IContentType type = getContentType();
- fValidExtensions = new ArrayList(Arrays.asList(type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)));
- }
- return fValidExtensions;
- }
-
- /**
- * Verifies if fileName is valid name for content type. Takes base content
- * type into consideration.
- *
- * @param fileName
- * @return true if extension is valid for this content type
- */
- private boolean extensionValidForContentType(String fileName) {
- boolean valid = false;
-
- IContentType type = getContentType();
- // there is currently an extension
- if (fileName.lastIndexOf('.') != -1) {
- // check what content types are associated with current extension
- IContentType[] types = Platform.getContentTypeManager().findContentTypesFor(fileName);
- int i = 0;
- while (i < types.length && !valid) {
- valid = types[i].isKindOf(type);
- ++i;
- }
- }
- else
- valid = true; // no extension so valid
- return valid;
- }
-
- /**
- * Returns the project that contains the specified path
- *
- * @param path
- * the path which project is needed
- * @return IProject object. If path is <code>null</code> the return
- * value is also <code>null</code>.
- */
- private IProject getProjectFromPath(IPath path) {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IProject project = null;
-
- if (path != null) {
- if (workspace.validatePath(path.toString(), IResource.PROJECT).isOK()) {
- project = workspace.getRoot().getProject(path.toString());
- }
- else {
- project = workspace.getRoot().getFile(path).getProject();
- }
- }
-
- return project;
- }
-
- /**
- * Checks if the specified project is a web project.
- *
- * @param project
- * project to be checked
- * @return true if the project is web project, otherwise false
- */
- boolean isDynamicWebProject(IProject project) {
- boolean is = FacetModuleCoreSupport.isDynamicWebProject(project);
- return is;
- }
-
- /**
- * Checks if the specified project is a type of java project.
- *
- * @param project
- * project to be checked (cannot be null)
- * @return true if the project is a type of java project, otherwise false
- */
- private boolean isJavaProject(IProject project) {
- boolean isJava = false;
- try {
- isJava = project.hasNature(JavaCore.NATURE_ID);
- }
- catch (CoreException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
-
- return isJava;
- }
-
- /**
- * Returns the web contents folder of the specified project
- *
- * @param project
- * the project which web contents path is needed
- * @return IPath of the web contents folder
- */
- private IPath getWebContentPath(IProject project) {
- IPath path = FacetModuleCoreSupport.getWebContentRootPath(project);
- return path;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagTemplatesWizardPage.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagTemplatesWizardPage.java
deleted file mode 100644
index f5d01c891d..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagTemplatesWizardPage.java
+++ /dev/null
@@ -1,521 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2010 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.ui.internal.wizard;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.resource.JFaceResources;
-import org.eclipse.jface.text.Document;
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.jface.text.templates.DocumentTemplateContext;
-import org.eclipse.jface.text.templates.Template;
-import org.eclipse.jface.text.templates.TemplateBuffer;
-import org.eclipse.jface.text.templates.TemplateContext;
-import org.eclipse.jface.text.templates.TemplateContextType;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.jst.jsp.core.internal.provisional.contenttype.ContentTypeIdForJSP;
-import org.eclipse.jst.jsp.ui.StructuredTextViewerConfigurationJSP;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.editor.IHelpContextIds;
-import org.eclipse.jst.jsp.ui.internal.preferences.JSPUIPreferenceNames;
-import org.eclipse.jst.jsp.ui.internal.templates.TemplateContextTypeIdsJSP;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ControlAdapter;
-import org.eclipse.swt.events.ControlEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Link;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration;
-import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
-import org.eclipse.wst.sse.ui.internal.provisional.style.LineStyleProvider;
-
-/**
- * Templates page in new file wizard. Allows users to select a new file
- * template to be applied in new file.
- *
- */
-public class NewTagTemplatesWizardPage extends WizardPage {
-
- /**
- * Content provider for templates
- */
- private class TemplateContentProvider implements IStructuredContentProvider {
- /** The template store. */
- private TemplateStore fStore;
-
- /*
- * @see IContentProvider#dispose()
- */
- public void dispose() {
- fStore = null;
- }
-
- /*
- * @see IStructuredContentProvider#getElements(Object)
- */
- public Object[] getElements(Object input) {
- return fStore.getTemplates(TemplateContextTypeIdsJSP.NEW_TAG);
- }
-
- /*
- * @see IContentProvider#inputChanged(Viewer, Object, Object)
- */
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- fStore = (TemplateStore) newInput;
- }
- }
-
- /**
- * Label provider for templates.
- */
- private class TemplateLabelProvider extends LabelProvider implements ITableLabelProvider {
-
- /*
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object,
- * int)
- */
- public Image getColumnImage(Object element, int columnIndex) {
- return null;
- }
-
- /*
- * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object,
- * int)
- */
- public String getColumnText(Object element, int columnIndex) {
- Template template = (Template) element;
-
- switch (columnIndex) {
- case 0 :
- return template.getName();
- case 1 :
- return template.getDescription();
- default :
- return ""; //$NON-NLS-1$
- }
- }
- }
-
- /** Last selected template name */
- private String fLastSelectedTemplateName;
- /** The viewer displays the pattern of selected template. */
- private SourceViewer fPatternViewer;
- /** The table presenting the templates. */
- private TableViewer fTableViewer;
- /** Template store used by this wizard page */
- private TemplateStore fTemplateStore;
- /** Checkbox for using templates. */
- private Button fUseTemplateButton;
-
- public NewTagTemplatesWizardPage() {
- super("NewJSPTemplatesWizardPage", JSPUIMessages.NewTagTemplatesWizardPage_0, null); //$NON-NLS-1$
- setDescription(JSPUIMessages.NewTagTemplatesWizardPage_1);
- }
-
- /**
- * Correctly resizes the table so no phantom columns appear
- *
- * @param parent
- * the parent control
- * @param buttons
- * the buttons
- * @param table
- * the table
- * @param column1
- * the first column
- * @param column2
- * the second column
- * @param column3
- * the third column
- */
- private void configureTableResizing(final Composite parent, final Table table, final TableColumn column1, final TableColumn column2) {
- parent.addControlListener(new ControlAdapter() {
- public void controlResized(ControlEvent e) {
- Rectangle area = parent.getClientArea();
- Point preferredSize = table.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- int width = area.width - 2 * table.getBorderWidth();
- if (preferredSize.y > area.height) {
- // Subtract the scrollbar width from the total column
- // width
- // if a vertical scrollbar will be required
- Point vBarSize = table.getVerticalBar().getSize();
- width -= vBarSize.x;
- }
-
- Point oldSize = table.getSize();
- if (oldSize.x > width) {
- // table is getting smaller so make the columns
- // smaller first and then resize the table to
- // match the client area width
- column1.setWidth(width / 2);
- column2.setWidth(width / 2);
- table.setSize(width, area.height);
- }
- else {
- // table is getting bigger so make the table
- // bigger first and then make the columns wider
- // to match the client area width
- table.setSize(width, area.height);
- column1.setWidth(width / 2);
- column2.setWidth(width / 2);
- }
- }
- });
- }
-
- public void createControl(Composite ancestor) {
- Composite parent = new Composite(ancestor, SWT.NONE);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- parent.setLayout(layout);
-
- // create checkbox for user to use JSP Template
- fUseTemplateButton = new Button(parent, SWT.CHECK);
- fUseTemplateButton.setText(JSPUIMessages.NewTagTemplatesWizardPage_4);
- GridData data = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
- fUseTemplateButton.setLayoutData(data);
- fUseTemplateButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- enableTemplates();
- }
- });
-
- // create composite for Templates table
- Composite innerParent = new Composite(parent, SWT.NONE);
- GridLayout innerLayout = new GridLayout();
- innerLayout.numColumns = 2;
- innerLayout.marginHeight = 0;
- innerLayout.marginWidth = 0;
- innerParent.setLayout(innerLayout);
- GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1);
- innerParent.setLayoutData(gd);
-
- Label label = new Label(innerParent, SWT.NONE);
- label.setText(JSPUIMessages.NewTagTemplatesWizardPage_7);
- data = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1);
- label.setLayoutData(data);
-
- // create table that displays templates
- Table table = new Table(innerParent, SWT.BORDER | SWT.FULL_SELECTION);
-
- data = new GridData(GridData.FILL_BOTH);
- data.widthHint = convertWidthInCharsToPixels(2);
- data.heightHint = convertHeightInCharsToPixels(10);
- data.horizontalSpan = 2;
- table.setLayoutData(data);
- table.setHeaderVisible(true);
- table.setLinesVisible(true);
- TableLayout tableLayout = new TableLayout();
- table.setLayout(tableLayout);
-
- TableColumn column1 = new TableColumn(table, SWT.NONE);
- column1.setText(JSPUIMessages.NewTagTemplatesWizardPage_2);
-
- TableColumn column2 = new TableColumn(table, SWT.NONE);
- column2.setText(JSPUIMessages.NewTagTemplatesWizardPage_3);
-
- fTableViewer = new TableViewer(table);
- fTableViewer.setLabelProvider(new TemplateLabelProvider());
- fTableViewer.setContentProvider(new TemplateContentProvider());
-
- fTableViewer.setSorter(new ViewerSorter() {
- public int compare(Viewer viewer, Object object1, Object object2) {
- if ((object1 instanceof Template) && (object2 instanceof Template)) {
- Template left = (Template) object1;
- Template right = (Template) object2;
- int result = left.getName().compareToIgnoreCase(right.getName());
- if (result != 0)
- return result;
- return left.getDescription().compareToIgnoreCase(right.getDescription());
- }
- return super.compare(viewer, object1, object2);
- }
-
- public boolean isSorterProperty(Object element, String property) {
- return true;
- }
- });
-
- fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent e) {
- updateViewerInput();
- }
- });
-
- // create viewer that displays currently selected template's contents
- fPatternViewer = doCreateViewer(parent);
-
- fTemplateStore = JSPUIPlugin.getDefault().getTemplateStore();
- fTableViewer.setInput(fTemplateStore);
-
- // Create linked text to just to templates preference page
- Link link = new Link(parent, SWT.NONE);
- link.setText(JSPUIMessages.NewTagTemplatesWizardPage_6);
- data = new GridData(SWT.END, SWT.FILL, true, false, 2, 1);
- link.setLayoutData(data);
- link.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- linkClicked();
- }
- });
-
- configureTableResizing(innerParent, table, column1, column2);
- loadLastSavedPreferences();
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IHelpContextIds.JSP_NEWWIZARD_TEMPLATE_HELPID);
- Dialog.applyDialogFont(parent);
- setControl(parent);
- }
-
- /**
- * Creates, configures and returns a source viewer to present the template
- * pattern on the preference page. Clients may override to provide a
- * custom source viewer featuring e.g. syntax coloring.
- *
- * @param parent
- * the parent control
- * @return a configured source viewer
- */
- private SourceViewer createViewer(Composite parent) {
- SourceViewerConfiguration sourceViewerConfiguration = new StructuredTextViewerConfiguration() {
- StructuredTextViewerConfiguration baseConfiguration = new StructuredTextViewerConfigurationJSP();
-
- public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
- return baseConfiguration.getConfiguredContentTypes(sourceViewer);
- }
-
- public LineStyleProvider[] getLineStyleProviders(ISourceViewer sourceViewer, String partitionType) {
- return baseConfiguration.getLineStyleProviders(sourceViewer, partitionType);
- }
- };
- SourceViewer viewer = new StructuredTextViewer(parent, null, null, false, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- viewer.getTextWidget().setFont(JFaceResources.getFont("org.eclipse.wst.sse.ui.textfont")); //$NON-NLS-1$
- IStructuredModel scratchModel = StructuredModelManager.getModelManager().createUnManagedStructuredModelFor(ContentTypeIdForJSP.ContentTypeID_JSPTAG);
- IDocument document = scratchModel.getStructuredDocument();
- viewer.configure(sourceViewerConfiguration);
- viewer.setDocument(document);
- return viewer;
- }
-
- private SourceViewer doCreateViewer(Composite parent) {
- Label label = new Label(parent, SWT.NONE);
- label.setText(JSPUIMessages.NewTagTemplatesWizardPage_5);
- GridData data = new GridData();
- data.horizontalSpan = 2;
- label.setLayoutData(data);
-
- SourceViewer viewer = createViewer(parent);
- viewer.setEditable(false);
-
- Control control = viewer.getControl();
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- data.heightHint = convertHeightInCharsToPixels(5);
- // [261274] - source viewer was growing to fit the max line width of the template
- data.widthHint = convertWidthInCharsToPixels(2);
- control.setLayoutData(data);
-
- return viewer;
- }
-
- /**
- * Enable/disable controls in page based on fUseTemplateButton's current
- * state.
- */
- void enableTemplates() {
- boolean enabled = fUseTemplateButton.getSelection();
-
- if (!enabled) {
- // save last selected template
- Template template = getSelectedTemplate();
- if (template != null)
- fLastSelectedTemplateName = template.getName();
- else
- fLastSelectedTemplateName = ""; //$NON-NLS-1$
-
- fTableViewer.setSelection(null);
- }
- else {
- setSelectedTemplate(fLastSelectedTemplateName);
- }
-
- fTableViewer.getControl().setEnabled(enabled);
- fPatternViewer.getControl().setEnabled(enabled);
- }
-
- /**
- * Return the template preference page id
- *
- * @return
- */
- private String getPreferencePageId() {
- return "org.eclipse.wst.sse.ui.preferences.jsp.templates"; //$NON-NLS-1$
- }
-
- /**
- * Get the currently selected template.
- *
- * @return
- */
- private Template getSelectedTemplate() {
- Template template = null;
- IStructuredSelection selection = (IStructuredSelection) fTableViewer.getSelection();
-
- if (selection.size() == 1) {
- template = (Template) selection.getFirstElement();
- }
- return template;
- }
-
- /**
- * Returns template string to insert.
- *
- * @return String to insert or null if none is to be inserted
- */
- String getTemplateString() {
- String templateString = null;
-
- Template template = getSelectedTemplate();
- if (template != null) {
- TemplateContextType contextType = JSPUIPlugin.getDefault().getTemplateContextRegistry().getContextType(TemplateContextTypeIdsJSP.NEW_TAG);
- IDocument document = new Document();
- TemplateContext context = new DocumentTemplateContext(contextType, document, 0, 0);
- try {
- TemplateBuffer buffer = context.evaluate(template);
- templateString = buffer.getString();
- }
- catch (Exception e) {
- Logger.log(Logger.WARNING_DEBUG, "Could not create template for new jsp tag", e); //$NON-NLS-1$
- }
- }
-
- return templateString;
- }
-
- void linkClicked() {
- String pageId = getPreferencePageId();
- PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn(getShell(), pageId, new String[]{pageId}, null);
- dialog.open();
- fTableViewer.refresh();
- }
-
- /**
- * Load the last template name used in New JSP File wizard.
- */
- private void loadLastSavedPreferences() {
- fLastSelectedTemplateName = ""; //$NON-NLS-1$
- boolean setSelection = false;
- String templateName = JSPUIPlugin.getDefault().getPreferenceStore().getString(JSPUIPreferenceNames.NEW_TAG_FILE_TEMPLATE_NAME);
- if (templateName == null || templateName.length() == 0) {
- templateName = JSPUIPlugin.getDefault().getPreferenceStore().getString(JSPUIPreferenceNames.NEW_TAG_FILE_TEMPLATE_ID);
- if (templateName != null && templateName.length() > 0) {
- Template template = fTemplateStore.findTemplateById(templateName);
- if (template != null) {
- fLastSelectedTemplateName = template.getName();
- setSelection = true;
- }
- }
- }
- else {
- fLastSelectedTemplateName = templateName;
- setSelection = true;
- }
- fUseTemplateButton.setSelection(setSelection);
- enableTemplates();
- }
-
- /**
- * Save template name used for next call to New JSP File wizard.
- */
- void saveLastSavedPreferences() {
- String templateName = ""; //$NON-NLS-1$
-
- Template template = getSelectedTemplate();
- if (template != null) {
- templateName = template.getName();
- }
-
- JSPUIPlugin.getDefault().getPreferenceStore().setValue(JSPUIPreferenceNames.NEW_TAG_FILE_TEMPLATE_NAME, templateName);
- JSPUIPlugin.getDefault().savePluginPreferences();
- }
-
- /**
- * Select a template in the table viewer given the template name. If
- * template name cannot be found or templateName is null, just select
- * first item in table. If no items in table select nothing.
- *
- * @param templateName
- */
- private void setSelectedTemplate(String templateName) {
- Object template = null;
-
- if (templateName != null && templateName.length() > 0) {
- // pick the last used template
- template = fTemplateStore.findTemplate(templateName, TemplateContextTypeIdsJSP.NEW_TAG);
- }
-
- // no record of last used template so just pick first element
- if (template == null) {
- // just pick first element
- template = fTableViewer.getElementAt(0);
- }
-
- if (template != null) {
- IStructuredSelection selection = new StructuredSelection(template);
- fTableViewer.setSelection(selection, true);
- }
- }
-
- /**
- * Updates the pattern viewer.
- */
- void updateViewerInput() {
- Template template = getSelectedTemplate();
- if (template != null) {
- fPatternViewer.getDocument().set(template.getPattern());
- }
- else {
- fPatternViewer.getDocument().set(""); //$NON-NLS-1$
- }
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagWizard.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagWizard.java
deleted file mode 100644
index 382714c93c..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/internal/wizard/NewTagWizard.java
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 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.ui.internal.wizard;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.OutputStreamWriter;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jst.jsp.core.internal.JSPCorePlugin;
-import org.eclipse.jst.jsp.ui.internal.JSPUIMessages;
-import org.eclipse.jst.jsp.ui.internal.Logger;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImageHelper;
-import org.eclipse.jst.jsp.ui.internal.editor.JSPEditorPluginImages;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.wst.sse.core.internal.encoding.CommonEncodingPreferenceNames;
-import org.eclipse.wst.sse.core.utils.StringUtils;
-
-public class NewTagWizard extends Wizard implements INewWizard {
- private NewTagFileWizardPage fNewFilePage;
- private NewTagTemplatesWizardPage fNewFileTemplatesPage;
- private IStructuredSelection fSelection;
-
- public void addPages() {
- fNewFilePage = new NewTagFileWizardPage("TagWizardNewFileCreationPage", new StructuredSelection(IDE.computeSelectedResources(fSelection))); //$NON-NLS-1$
- fNewFilePage.setTitle(JSPUIMessages._UI_WIZARD_TAG_NEW_HEADING);
- fNewFilePage.setDescription(JSPUIMessages._UI_WIZARD_TAG_NEW_DESCRIPTION);
- addPage(fNewFilePage);
-
- fNewFileTemplatesPage = new NewTagTemplatesWizardPage();
- addPage(fNewFileTemplatesPage);
- }
-
- private String applyLineDelimiter(IFile file, String text) {
- String lineDelimiter = Platform.getPreferencesService().getString(Platform.PI_RUNTIME, Platform.PREF_LINE_SEPARATOR, System.getProperty("line.separator"), new IScopeContext[] {new ProjectScope(file.getProject()), new InstanceScope() });//$NON-NLS-1$
- String convertedText = StringUtils.replace(text, "\r\n", "\n");
- convertedText = StringUtils.replace(convertedText, "\r", "\n");
- convertedText = StringUtils.replace(convertedText, "\n", lineDelimiter);
- return convertedText;
- }
-
- public void init(IWorkbench aWorkbench, IStructuredSelection aSelection) {
- fSelection = aSelection;
- setWindowTitle(JSPUIMessages._UI_WIZARD_TAG_NEW_TITLE);
-
- ImageDescriptor descriptor = JSPEditorPluginImageHelper.getInstance().getImageDescriptor(JSPEditorPluginImages.IMG_OBJ_WIZBAN_NEWTAGFILE);
- setDefaultPageImageDescriptor(descriptor);
- }
-
- private void openEditor(final IFile file) {
- if (file != null) {
- getShell().getDisplay().asyncExec(new Runnable() {
- public void run() {
- try {
- IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- IDE.openEditor(page, file, true);
- }
- catch (PartInitException e) {
- Logger.log(Logger.WARNING_DEBUG, e.getMessage(), e);
- }
- }
- });
- }
- }
-
- public boolean performFinish() {
- boolean performedOK = false;
-
- // save user options for next use
- fNewFileTemplatesPage.saveLastSavedPreferences();
-
- // no file extension specified so add default extension
- String fileName = fNewFilePage.getFileName();
- if (fileName.lastIndexOf('.') == -1) {
- String newFileName = fNewFilePage.addDefaultExtension(fileName);
- fNewFilePage.setFileName(newFileName);
- }
-
- // create a new empty file
- IFile file = fNewFilePage.createNewFile();
-
- // if there was problem with creating file, it will be null, so make
- // sure to check
- if (file != null) {
- // put template contents into file
- String templateString = fNewFileTemplatesPage.getTemplateString();
- if (templateString != null) {
- templateString = applyLineDelimiter(file, templateString);
- // determine the encoding for the new file
- Preferences preference = JSPCorePlugin.getDefault().getPluginPreferences();
- String charSet = preference.getString(CommonEncodingPreferenceNames.OUTPUT_CODESET);
-
- try {
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- OutputStreamWriter outputStreamWriter = null;
- if (charSet == null || charSet.trim().equals("")) { //$NON-NLS-1$
- // just use default encoding
- outputStreamWriter = new OutputStreamWriter(outputStream);
- }
- else {
- outputStreamWriter = new OutputStreamWriter(outputStream, charSet);
- }
- outputStreamWriter.write(templateString);
- outputStreamWriter.flush();
- outputStreamWriter.close();
- ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
- file.setContents(inputStream, true, false, null);
- inputStream.close();
- }
- catch (Exception e) {
- Logger.log(Logger.WARNING_DEBUG, "Could not create contents for new Tag file", e); //$NON-NLS-1$
- }
- }
-
- // open the file in editor
- openEditor(file);
-
- // everything's fine
- performedOK = true;
- }
- return performedOK;
- }
-
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/views/contentoutline/JSPContentOutlineConfiguration.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/views/contentoutline/JSPContentOutlineConfiguration.java
deleted file mode 100644
index 2318b727e1..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/views/contentoutline/JSPContentOutlineConfiguration.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2011 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.ui.views.contentoutline;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jst.jsp.ui.internal.JSPUIPlugin;
-import org.eclipse.jst.jsp.ui.internal.actions.JSPNodeActionManager;
-import org.eclipse.wst.html.ui.views.contentoutline.HTMLContentOutlineConfiguration;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.xml.ui.internal.contentoutline.XMLNodeActionManager;
-
-/**
- * Configuration for outline view page which shows JSP content.
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration
- * @since 1.0
- */
-public class JSPContentOutlineConfiguration extends HTMLContentOutlineConfiguration {
-
- // private static final String ATT_CLASS = "class"; //$NON-NLS-1$
-
- // TODO: Automate the loading of a real configuration based on the model
- // type at
- // creation time; clear on unConfigure so that a new embedded
- // configuration can
- // be used
- // private StructuredContentOutlineConfiguration fEmbeddedConfiguration =
- // null;
- private static final String OUTLINE_FILTER_PREF = "org.eclipse.jst.jsp.ui.OutlinePage"; //$NON-NLS-1$
- /**
- * Create new instance of JSPContentOutlineConfiguration
- */
- public JSPContentOutlineConfiguration() {
- // Must have empty constructor to createExecutableExtension
- super();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.wst.sse.ui.views.contentoutline.ContentOutlineConfiguration#getPreferenceStore()
- */
- protected IPreferenceStore getPreferenceStore() {
- return JSPUIPlugin.getDefault().getPreferenceStore();
- }
-
- protected XMLNodeActionManager createNodeActionManager(TreeViewer treeViewer) {
- return new JSPNodeActionManager((IStructuredModel) treeViewer.getInput(), treeViewer);
- }
-
- public String getOutlineFilterTarget(){
- return OUTLINE_FILTER_PREF ;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/views/contentoutline/JSPImportDirectiveFilter.java b/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/views/contentoutline/JSPImportDirectiveFilter.java
deleted file mode 100644
index e4d11f311f..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/src/org/eclipse/jst/jsp/ui/views/contentoutline/JSPImportDirectiveFilter.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2011 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.ui.views.contentoutline;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.jst.jsp.core.internal.contentmodel.tld.provisional.JSP20TLDNames;
-import org.eclipse.jst.jsp.core.internal.provisional.JSP11Namespace;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-public class JSPImportDirectiveFilter extends ViewerFilter {
-
-
- /*
- * @see ViewerFilter
- */
- public boolean select(Viewer viewer, Object parent, Object element) {
- if (element instanceof Node){
- Node node = (Node)element;
- if (node.getNodeName().equalsIgnoreCase(JSP11Namespace.ElementName.DIRECTIVE_PAGE)){
- final NamedNodeMap nodeMap = node.getAttributes();
- for (int i=0;i <nodeMap.getLength();i++){
- final Node attr = nodeMap.item(i);
- if (attr != null && JSP20TLDNames.IMPORT.equalsIgnoreCase(attr.getNodeName()))
- return false;
- }
- }
- }
- return true;
- }
-}
diff --git a/bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.properties b/bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.properties
deleted file mode 100644
index 187c4c52e6..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.properties
+++ /dev/null
@@ -1,64 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2012 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
-###############################################################################
-Templates.jspscriptlet.name=JSP scriptlet
-Templates.jspscriptlet.desc=JSP scriptlet <%..%>
-Templates.jspscriptlet.content=<% ${cursor} %>
-Templates.jsphiddencomment.name=JSP hidden comment
-Templates.jsphiddencomment.desc=JSP hidden comment <%-- --%>
-Templates.jsphiddencomment.content=<%-- ${cursor} --%>
-Templates.jspdeclaration.name=JSP declaration(s)
-Templates.jspdeclaration.desc=JSP declaration(s) <%!..%>
-Templates.jspdeclaration.content=<%! ${cursor} %>
-Templates.jspexpression.name=JSP expression
-Templates.jspexpression.desc=JSP expression <%=..%>
-Templates.jspexpression.content=<%= ${cursor} %>
-Templates.jspincludedirective.name=JSP include directive
-Templates.jspincludedirective.desc=JSP include directive
-Templates.jspincludedirective.content=<%@ include file="${cursor}" %>
-Templates.jsppagedirective.name=JSP page directive
-Templates.jsppagedirective.desc=JSP page directive
-Templates.jsppagedirective.content=<%@ page contentType="text/html; charset=${encoding}" %>
-Templates.jsptaglibdirective.name=JSP taglib directive
-Templates.jsptaglibdirective.desc=JSP taglib directive
-Templates.jsptaglibdirective.content=<%@ taglib uri="${uri}" prefix="${cursor}" %>
-Templates.jsphtml.name=New JSP File (html)
-Templates.jsphtml.desc=JSP with html markup
-Templates.jsphtml.content=<%@ page language="java" contentType="text/html; charset=${encoding}"\n pageEncoding="${encoding}"%>\n<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=${encoding}">\n<title>Insert title here</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.jspxhtml.name=New JSP File (xhtml)
-Templates.jspxhtml.desc=JSP with xhtml markup
-Templates.jspxhtml.content=<?xml version="1.0" encoding="${encoding}" ?>\n<%@ page language="java" contentType="text/html; charset=${encoding}"\n pageEncoding="${encoding}"%>\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml">\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />\n<title>Insert title here</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>
-Templates.jspxhtmlxml.name=New JSP File (xhtml, xml syntax)
-Templates.jspxhtmlxml.desc=JSP with xhtml markup and xml style syntax
-Templates.jspxhtmlxml.content=<?xml version="1.0" encoding="${encoding}" ?>\n<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">\n <jsp:directive.page language="java"\n contentType="text/html; charset=${encoding}" pageEncoding="${encoding}" />\n <jsp:text>\n <![CDATA[ <?xml version="1.0" encoding="${encoding}" ?> ]]>\n </jsp:text>\n <jsp:text>\n <![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ]]>\n </jsp:text>\n<html xmlns="http://www.w3.org/1999/xhtml">\n<head>\n<meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />\n<title>Insert title here</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>\n</jsp:root>
-
-Templates.jsp20xhtmlxml.name=New JSP File (xhtml, xml syntax, JSP 2.0)
-Templates.jsp20xhtmlxml.desc=JSP with JSP 2.0 specific tags, xhtml markup and xml style syntax
-Templates.jsp20xhtmlxml.content=<?xml version="1.0" encoding="${encoding}" ?>\n<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">\n\t<jsp:directive.page contentType="text/html; charset=${encoding}" \n\t\tpageEncoding="${encoding}" session="false"/>\n\t<jsp:output doctype-root-element="html"\n\t\tdoctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"\n\t\tdoctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"\n\t\tomit-xml-declaration="true" />\n<html xmlns="http://www.w3.org/1999/xhtml">\n<head>\n<title>Insert title here</title>\n</head>\n<body>\n${cursor}\n</body>\n</html>\n</jsp:root>
-
-Templates.jsptagdirective.name=Tag file tag directive
-Templates.jsptagdirective.desc=Tag file tag directive
-Templates.jsptagdirective.content=<%@ tag display-name="${cursor}" description="" small-icon="" %>
-
-Templates.jspvariabledirective.name=Tag variable directive
-Templates.jspvariabledirective.desc=Tag variable directive
-Templates.jspvariabledirective.content=<%@ variable variable-class="${cursor}" description="" %>
-
-Templates.jspattributedirective.name=Tag attribute directive
-Templates.jspattributedirective.desc=Tag attribute directive
-Templates.jspattributedirective.content=<%@ attribute name="${cursor}" description="" required="false" type="" %>
-
-Templates.simpletag.name=New Tag File
-Templates.simpletag.desc=New JSP Tag File
-Templates.simpletag.content=<%@ tag language="java" pageEncoding="${encoding}"%>\n
-
-Templates.simpletagx.name=New TagX File
-Templates.simpletagx.desc=New JSP TagX File
-Templates.simpletagx.content=<jsp:directive.tag language="java" pageEncoding="${encoding}"/>\n
diff --git a/bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.xml b/bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.xml
deleted file mode 100644
index c95a802276..0000000000
--- a/bundles/org.eclipse.jst.jsp.ui/templates/jspdefault-templates.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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
- *******************************************************************************/
- -->
-<templates>
-
-<template name="%Templates.jspscriptlet.name" description="%Templates.jspscriptlet.desc" id="org.eclipse.jst.jsp.ui.templates.jspscriptlet" context="jsp_tag" enabled="true">%Templates.jspscriptlet.content</template>
-
-<template name="%Templates.jsphiddencomment.name" description="%Templates.jsphiddencomment.desc" id="org.eclipse.jst.jsp.ui.templates.jsphiddencomment" context="jsp_tag" enabled="true">%Templates.jsphiddencomment.content</template>
-
-<template name="%Templates.jspdeclaration.name" description="%Templates.jspdeclaration.desc" id="org.eclipse.jst.jsp.ui.templates.jspdeclaration" context="jsp_tag" enabled="true">%Templates.jspdeclaration.content</template>
-
-<template name="%Templates.jspexpression.name" description="%Templates.jspexpression.desc" id="org.eclipse.jst.jsp.ui.templates.jspexpression" context="jsp_all" enabled="true">%Templates.jspexpression.content</template>
-
-<template name="%Templates.jspincludedirective.name" description="%Templates.jspincludedirective.desc" id="org.eclipse.jst.jsp.ui.templates.jspincludedirective" context="jsp_tag" enabled="true">%Templates.jspincludedirective.content</template>
-
-<template name="%Templates.jsppagedirective.name" description="%Templates.jsppagedirective.desc" id="org.eclipse.jst.jsp.ui.templates.jsppagedirective" context="jsp_tag" enabled="true">%Templates.jsppagedirective.content</template>
-
-<template name="%Templates.jsptaglibdirective.name" description="%Templates.jsptaglibdirective.desc" id="org.eclipse.jst.jsp.ui.templates.jsptaglibdirective" context="jsp_tag" enabled="true">%Templates.jsptaglibdirective.content</template>
-
-<template name="%Templates.jsphtml.name" description="%Templates.jsphtml.desc" id="org.eclipse.jst.jsp.ui.templates.jsphtml" context="jsp_new" enabled="true">%Templates.jsphtml.content</template>
-
-<template name="%Templates.jspxhtml.name" description="%Templates.jspxhtml.desc" id="org.eclipse.jst.jsp.ui.templates.jspxhtml" context="jsp_new" enabled="true">%Templates.jspxhtml.content</template>
-
-<template name="%Templates.jspxhtmlxml.name" description="%Templates.jspxhtmlxml.desc" id="org.eclipse.jst.jsp.ui.templates.jspxhtmlxml" context="jsp_new" enabled="true">%Templates.jspxhtmlxml.content</template>
-
-<template name="%Templates.jsp20xhtmlxml.name" description="%Templates.jsp20xhtmlxml.desc" id="org.eclipse.jst.jsp.ui.templates.jsp20xhtmlxml" context="jsp_new" enabled="true">%Templates.jsp20xhtmlxml.content</template>
-
-<template name="%Templates.jsptagdirective.name" description="%Templates.jsptagdirective.desc" id="org.eclipse.jst.jsp.ui.templates.jsptagdirective" context="jsp_tag" enabled="true">%Templates.jsptagdirective.content</template>
-
-<template name="%Templates.jspvariabledirective.name" description="%Templates.jspvariabledirective.desc" id="org.eclipse.jst.jsp.ui.templates.jspvariabledirective" context="jsp_tag" enabled="true">%Templates.jspvariabledirective.content</template>
-
-<template name="%Templates.jspattributedirective.name" description="%Templates.jspattributedirective.desc" id="org.eclipse.jst.jsp.ui.templates.jspattributedirective" context="jsp_tag" enabled="true">%Templates.jspattributedirective.content</template>
-
-<template name="%Templates.simpletag.name" description="%Templates.simpletag.desc" id="org.eclipse.jst.jsp.ui.templates.simpletag" context="tag_new" enabled="true">%Templates.simpletag.content</template>
-
-<template name="%Templates.simpletagx.name" description="%Templates.simpletagx.desc" id="org.eclipse.jst.jsp.ui.templates.simpletagx" context="tag_new" enabled="true">%Templates.simpletagx.content</template>
-
-</templates>
diff --git a/bundles/org.eclipse.jst.standard.schemas/.cvsignore b/bundles/org.eclipse.jst.standard.schemas/.cvsignore
deleted file mode 100644
index c14487ceac..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-build.xml
diff --git a/bundles/org.eclipse.jst.standard.schemas/.project b/bundles/org.eclipse.jst.standard.schemas/.project
deleted file mode 100644
index 07974e92bb..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/.project
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.jst.standard.schemas</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <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>
- </natures>
-</projectDescription>
diff --git a/bundles/org.eclipse.jst.standard.schemas/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.jst.standard.schemas/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 7b5c092cf8..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Tue Feb 09 17:53:02 EST 2010
-encoding/<project>=ISO-8859-1
-eclipse.preferences.version=1
-encoding//dtdsAndSchemas/web-facelettaglibrary_2_0.xsd=UTF8
diff --git a/bundles/org.eclipse.jst.standard.schemas/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.jst.standard.schemas/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index d4ac9ad702..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,15 +0,0 @@
-#Sat Apr 28 09:28:31 EDT 2007
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.deprecated=1
-compilers.p.missing-packages=1
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-resource=0
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.use-project=true
-eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.jst.standard.schemas/META-INF/MANIFEST.MF b/bundles/org.eclipse.jst.standard.schemas/META-INF/MANIFEST.MF
deleted file mode 100644
index 84a8845d50..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,7 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name.0
-Bundle-SymbolicName: org.eclipse.jst.standard.schemas;singleton:=true
-Bundle-Version: 1.2.0.qualifier
-Bundle-Vendor: %Bundle-Vendor.0
-Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.jst.standard.schemas/about.html b/bundles/org.eclipse.jst.standard.schemas/about.html
deleted file mode 100644
index bd6b3085d3..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/about.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<title>About</title>
-</head>
-
-<body>
-<p>January, 2010</p>
-<h3>License</h3>
-<p>The Eclipse Foundation makes available all content in this
-plug-in (&quot;Content&quot;). Unless otherwise indicated below, the
-Content is provided to you under the terms and conditions of the Eclipse
-Public License Version 1.0 (&quot;EPL&quot;). 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, &quot;Program&quot; 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
-(&quot;Redistributor&quot;) 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>
-<h3>Third Party Content</h3>
-<p>The Content includes items that have been sourced from third
-parties as set out below. If you did not receive this Content directly
-from the Eclipse Foundation, the following is provided for informational
-purposes only, and you should look to the Redistributor's license for
-terms and conditions of use.</p>
-<h4>Appserv Commons schemas and DTDs v2_b33 (Subset)</h4>
-<p>Your use of the Appserv Commons schemas and DTDs is subject to
-the terms and conditions of the Common Development and Distribution
-License v1.0. A copy of the license is contained in the file <a
- href="about_files/CDDLv1.0.txt">LICENSE.txt</a> and is also available
-at <a href="https://glassfish.dev.java.net/public/CDDLv1.0.html">https://glassfish.dev.java.net/public/CDDLv1.0.html</a>.
-</p>
-<p>The source for the schemas and DTDs is available on the Glassfish
-community website at <a
- href="https://glassfish.dev.java.net/public/downloadsindex.html">https://glassfish.dev.java.net/</a>.
-</p>
-
-<h4>Java Server Faces 1.2 Schema and DTDs (Subset)</h4>
-<p>Your use of the Java Server Faces schemas and DTDs is subject to
-the terms and conditions of the Common Development and Distribution
-License v1.0. A copy of the license is contained in the file <a
- href="about_files/CDDLv1.0.txt">LICENSE.txt</a> and is also available
-at <a href="https://glassfish.dev.java.net/public/CDDLv1.0.html">https://glassfish.dev.java.net/public/CDDLv1.0.html</a>.
-</p>
-<p>The source for the schemas and DTDs is available on the Java
-Server Faces project page on the Glassfish community website at <a
- href="https://javaserverfaces.dev.java.net">https://javaserverfaces.dev.java.net/</a>.
-</p>
-
-<h4>Java Persistence API XML Schemas</h4>
-<p>Your use of the Java Persistence API XML Schemas (orm_1_0.xsd,
-persistence_1_0.xsd) is subject to the terms and conditions of the
-Common Development and Distribution License v1.0. A copy of the license
-is contained in the file <a href="about_files/CDDLv1.0.txt">LICENSE.txt</a>
-and is also available at <a
- href="https://glassfish.dev.java.net/public/CDDLv1.0.html">https://glassfish.dev.java.net/public/CDDLv1.0.html</a>.
-</p>
-<p>The original source for the schemas is available on <a
- href="http://java.sun.com/xml/ns/persistence/">http://java.sun.com/xml/ns/persistence/</a>.
-</p>
-
-<h4>Java EE 6 XML Schemas</h4>
-<p>Your use of the Java EE 6 XML Schemas (application_6.xsd,
-application-client-6.xsd, connector_1_6.xsd, ejb-jar_3_1.xsd,
-javaee_6.xsd, javaee_web_services_1_3.xsd,
-javaee_web_services_client_1_3.xsd, jsp_2_2.xsd, web-app_3_0.xsd,
-web-common_3_0.xsd, web-fragment_3_0.xsd) is subject to the terms and
-conditions of the Common Development and Distribution License v1.0. A
-copy of the license is contained in the file <a
- href="about_files/CDDLv1.0.txt">LICENSE.txt</a> and is also available
-at <a href="https://glassfish.dev.java.net/public/CDDLv1.0.html">https://glassfish.dev.java.net/public/CDDLv1.0.html</a>.
-</p>
-<p>The original source for the schemas is available on <a
- href="http://java.sun.com/xml/ns/javaee/">http://java.sun.com/xml/ns/javaee/</a>.
-</p>
-
-<h4>Java Server Faces 2.0 Schema</h4>
-<p>Your use of the Java Server Faces 2.0 schemas is subject to the
-terms and conditions of the Common Development and Distribution License
-v1.0. A copy of the license is contained in the file <a
- href="about_files/CDDLv1.0.txt">LICENSE.txt</a> and is also available
-at <a href="https://glassfish.dev.java.net/public/CDDLv1.0.html">https://glassfish.dev.java.net/public/CDDLv1.0.html</a>.
-</p>
-<p>The source for the schema is available on the Java Server Faces
-project page on the Glassfish community website at <a
- href="https://javaserverfaces.dev.java.net">https://javaserverfaces.dev.java.net/</a>.
-</p>
-
-</body>
-</html>
diff --git a/bundles/org.eclipse.jst.standard.schemas/about_files/CDDLv1.0.txt b/bundles/org.eclipse.jst.standard.schemas/about_files/CDDLv1.0.txt
deleted file mode 100644
index 1154e0aeec..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/about_files/CDDLv1.0.txt
+++ /dev/null
@@ -1,119 +0,0 @@
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications.
-
-1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
-
-1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
-
-1.4. Executable means the Covered Software in any form other than Source Code.
-
-1.5. Initial Developer means the individual or entity that first makes Original Software available under this License.
-
-1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
-
-1.7. License means this document.
-
-1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
-
-1.9. Modifications means the Source Code and Executable form of any of the following:
-
-A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
-
-B. Any new file that contains any part of the Original Software or previous Modification; or
-
-C. Any new file that is contributed or otherwise made available under the terms of this License.
-
-1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License.
-
-1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
-
-1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
-
-1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a)áthe power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b)áownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
-
-2. License Grants.
-
-2.1. The Initial Developer Grant.
-Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
-(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
-(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
-(c) The licenses granted in Sectionsá2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
-(d) Notwithstanding Sectioná2.1(b) above, no patent license is granted: (1)áfor code that You delete from the Original Software, or (2)áfor infringements caused by: (i)áthe modification of the Original Software, or (ii)áthe combination of the Original Software with other software or devices.
-
-2.2. Contributor Grant.
-Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
-(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
-(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1)áModifications made by that Contributor (or portions thereof); and (2)áthe combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
-(c) The licenses granted in Sectionsá2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
-(d) Notwithstanding Sectioná2.2(b) above, no patent license is granted: (1)áfor any code that Contributor has deleted from the Contributor Version; (2)áfor infringements caused by: (i)áthird party modifications of Contributor Version, or (ii)áthe combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3)áunder Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-4.1. New Versions.
-Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a)árename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b)áotherwise make it clear that the license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION.
-
-6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sectionsá2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant.
-
-6.3. In the event of termination under Sectionsá6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a commercial item, as that term is defined in 48áC.F.R.á2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. á252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48áC.F.R.á12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
-
-NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
-The GlassFish code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California.
-
-
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/about_files/LICENSE.txt b/bundles/org.eclipse.jst.standard.schemas/about_files/LICENSE.txt
deleted file mode 100644
index 1154e0aeec..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/about_files/LICENSE.txt
+++ /dev/null
@@ -1,119 +0,0 @@
-COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0
-
-1. Definitions.
-
-1.1. Contributor means each individual or entity that creates or contributes to the creation of Modifications.
-
-1.2. Contributor Version means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor.
-
-1.3. Covered Software means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof.
-
-1.4. Executable means the Covered Software in any form other than Source Code.
-
-1.5. Initial Developer means the individual or entity that first makes Original Software available under this License.
-
-1.6. Larger Work means a work which combines Covered Software or portions thereof with code not governed by the terms of this License.
-
-1.7. License means this document.
-
-1.8. Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
-
-1.9. Modifications means the Source Code and Executable form of any of the following:
-
-A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications;
-
-B. Any new file that contains any part of the Original Software or previous Modification; or
-
-C. Any new file that is contributed or otherwise made available under the terms of this License.
-
-1.10. Original Software means the Source Code and Executable form of computer software code that is originally released under this License.
-
-1.11. Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
-
-1.12. Source Code means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code.
-
-1.13. You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a)áthe power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b)áownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
-
-2. License Grants.
-
-2.1. The Initial Developer Grant.
-Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license:
-(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and
-(b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof).
-(c) The licenses granted in Sectionsá2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License.
-(d) Notwithstanding Sectioná2.1(b) above, no patent license is granted: (1)áfor code that You delete from the Original Software, or (2)áfor infringements caused by: (i)áthe modification of the Original Software, or (ii)áthe combination of the Original Software with other software or devices.
-
-2.2. Contributor Grant.
-Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
-(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and
-(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1)áModifications made by that Contributor (or portions thereof); and (2)áthe combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
-(c) The licenses granted in Sectionsá2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party.
-(d) Notwithstanding Sectioná2.2(b) above, no patent license is granted: (1)áfor any code that Contributor has deleted from the Contributor Version; (2)áfor infringements caused by: (i)áthird party modifications of Contributor Version, or (ii)áthe combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3)áunder Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor.
-
-3. Distribution Obligations.
-
-3.1. Availability of Source Code.
-
-Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange.
-
-3.2. Modifications.
-
-The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License.
-
-3.3. Required Notices.
-You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer.
-
-3.4. Application of Additional Terms.
-You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
-
-3.5. Distribution of Executable Versions.
-You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipients rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer.
-
-3.6. Larger Works.
-You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software.
-
-4. Versions of the License.
-
-4.1. New Versions.
-Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License.
-
-4.2. Effect of New Versions.
-
-You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward.
-4.3. Modified Versions.
-
-When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a)árename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b)áotherwise make it clear that the license contains terms which differ from this License.
-
-5. DISCLAIMER OF WARRANTY.
-
-COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-6. TERMINATION.
-
-6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
-
-6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as Participant) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sectionsá2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant.
-
-6.3. In the event of termination under Sectionsá6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination.
-
-7. LIMITATION OF LIABILITY.
-
-UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-8. U.S. GOVERNMENT END USERS.
-
-The Covered Software is a commercial item, as that term is defined in 48áC.F.R.á2.101 (Oct. 1995), consisting of commercial computer software (as that term is defined at 48 C.F.R. á252.227-7014(a)(1)) and commercial computer software documentation as such terms are used in 48áC.F.R.á12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License.
-
-9. MISCELLANEOUS.
-
-This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdictions conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software.
-
-10. RESPONSIBILITY FOR CLAIMS.
-
-As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
-
-NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
-The GlassFish code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California.
-
-
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/build.properties b/bundles/org.eclipse.jst.standard.schemas/build.properties
deleted file mode 100644
index bb81a90e7f..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- dtdsAndSchemas/,\
- plugin.properties,\
- about.html,\
- about_files/
-src.includes = dtdsAndSchemas/,\
- about.html,\
- about_files/
-generateSourceBundle=false
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_1_2.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_1_2.dtd
deleted file mode 100644
index 6c58cc9363..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_1_2.dtd
+++ /dev/null
@@ -1,292 +0,0 @@
-<!--
-Copyright 1999 Sun Microsystems, Inc. 901 San Antonio Road,
-Palo Alto, CA 94303, U.S.A. All rights reserved.
-
-This product or document is protected by copyright and distributed
-under licenses restricting its use, copying, distribution, and
-decompilation. No part of this product or documentation may be
-reproduced in any form by any means without prior written authorization
-of Sun and its licensors, if any.
-
-Third party software, including font technology, is copyrighted and
-licensed from Sun suppliers.
-
-Sun, Sun Microsystems, the Sun Logo, Solaris, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail and Enterprise JavaBeans,
-are trademarks or registered trademarks of Sun Microsystems, Inc in the U.S.
-and other countries.
-
-All SPARC trademarks are used under license and are trademarks
-or registered trademarks of SPARC International, Inc.
-in the U.S. and other countries. Products bearing SPARC
-trademarks are based upon an architecture developed by Sun Microsystems, Inc.
-
-PostScript is a registered trademark of Adobe Systems, Inc.
-
-
-Federal Acquisitions: Commercial Software - Government Users Subject to
-Standard License Terms and Conditions.
-
-
-
-DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED
-CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
-IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT
-TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY
-INVALID.
-
-_________________________________________________________________________
-Copyright 1999 Sun Microsystems, Inc.,
-901 San Antonio Road, Palo Alto, CA 94303, Etats-Unis.
-Tous droits re'serve's.
-
-
-Ce produit ou document est prote'ge' par un copyright et distribue' avec
-des licences qui en restreignent l'utilisation, la copie, la distribution,
-et la de'compilation. Aucune partie de ce produit ou de sa documentation
-associe'e ne peut e^tre reproduite sous aucune forme, par quelque moyen
-que ce soit, sans l'autorisation pre'alable et e'crite de Sun et de ses
-bailleurs de licence, s'il y en a.
-
-Le logiciel de'tenu par des tiers, et qui comprend la technologie
-relative aux polices de caracte`res, est prote'ge' par un copyright
-et licencie' par des fournisseurs de Sun.
-
-Sun, Sun Microsystems, le logo Sun, Solaris, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail, et Enterprise JavaBeans,
-sont des marques de fabrique ou des marques de'pose'es de Sun
-Microsystems, Inc. aux Etats-Unis et dans d'autres pays.
-
-Toutes les marques SPARC sont utilise'es sous licence et sont
-des marques de fabrique ou des marques de'pose'es de SPARC
-International, Inc. aux Etats-Unis et dans
-d'autres pays. Les produits portant les marques SPARC sont
-base's sur une architecture de'veloppe'e par Sun Microsystems, Inc.
-
-Postcript est une marque enregistre'e d'Adobe Systems Inc.
-
-LA DOCUMENTATION EST FOURNIE "EN L'ETAT" ET TOUTES AUTRES CONDITIONS,
-DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES,
-DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT
-TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L'APTITUDE
-A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE CONTREFACON.
--->
-
-<!--
-The application-client element is the root element of an application client
-deployment descriptor.
-The application client deployment descriptor describes the EJB components and
-external resources referenced by the application client.
--->
-<!ELEMENT application-client (icon?, display-name, description?, env-entry*,
-ejb-ref*, resource-ref*)>
-
-<!--
-The description element is used to provide text describing the parent element.
-The description element should include any information that the
-application-client file producer wants to provide to the consumer of the
-application-client file (i.e., to the Deployer). Typically, the tools used by
-the application-client file consumer will display the description when
-processing the parent element that contains the description.
--->
-<!ELEMENT description (#PCDATA)>
-
-<!--
-The display-name element contains a short name that is intended to be displayed
-by tools.
--->
-<!ELEMENT display-name (#PCDATA)>
-
-<!--
-The ejb-link element is used in the ejb-ref element to specify that an EJB
-reference is linked to an enterprise bean in the encompassing J2EE Application
-package. The value of the ejb-link element must be the ejb-name of an enterprise
-bean in the same J2EE Application package. Used in: ejb-ref
-Example: <ejb-link>EmployeeRecord</ejb-link>
--->
-<!ELEMENT ejb-link (#PCDATA)>
-
-<!--
-The ejb-ref element is used for the declaration of a reference to an enterprise
-bean's home. The declaration consists of an optional description; the EJB
-reference name used in the code of the referencing application client; the
-expected type of the referenced enterprise bean; the expected home and remote
-interfaces of the referenced enterprise bean; and an optional ejb-link
-information. The optional ejb-link element is used to specify the referenced
-enterprise bean.
--->
-<!ELEMENT ejb-ref (description?, ejb-ref-name, ejb-ref-type, home, remote,
-ejb-link?)>
-
-<!--
-The ejb-ref-name element contains the name of an EJB reference. The EJB
-reference is an entry in the application client's environment. It is recommended
-that name is prefixed with "ejb/". Used in: ejb-ref
-Example: <ejb-ref-name>ejb/Payroll</ejb-ref-name>
--->
-<!ELEMENT ejb-ref-name (#PCDATA)>
-
-<!--
-The ejb-ref-type element contains the expected type of the referenced enterprise
-bean. The ejb-ref-type element must be one of the following:
-<ejb-ref-type>Entity</ejb-ref-type>
-<ejb-ref-type>Session</ejb-ref-type>
-Used in: ejb-ref
--->
-<!ELEMENT ejb-ref-type (#PCDATA)>
-
-<!--
-The env-entry element contains the declaration of an application client's
-environment entries. The declaration consists of an optional description, the
-name of the environment entry, and an optional value.
--->
-<!ELEMENT env-entry (description?, env-entry-name, env-entry-type,
-env-entry-value?)>
-
-<!--
-The env-entry-name element contains the name of an application client's
-environment entry. Used in: env-entry
-Example: <env-entry-name>EmployeeAppDB</env-entry-name>
--->
-<!ELEMENT env-entry-name (#PCDATA)>
-
-<!--
-The env-entry-type element contains the fully-qualified Java type of the
-environment entry value that is expected by the application client's code. The
-following are the legal values of env-entry-type: java.lang.Boolean,
-java.lang.String, java.lang.Integer, java.lang.Double, java.lang.Byte,
-java.lang.Short, java.lang.Long, and java.lang.Float.
-
-Used in: env-entry
-
-Example:
-<env-entry-type>java.lang.Boolean</env-entry-type>
--->
-<!ELEMENT env-entry-type (#PCDATA)>
-
-<!--
-The env-entry-value element contains the value of an application client's
-environment entry. The value must be a String that is valid for the constructor
-of the specified type that takes a single String parameter.
-
-Used in: env-entry
-
-Example:
-<env-entry-value>/datasources/MyDatabase</env-entry-value>
--->
-<!ELEMENT env-entry-value (#PCDATA)>
-
-<!--
-The home element contains the fully-qualified name of the enterprise bean's home
-interface.
-Used in: ejb-ref
-Example: <home>com.aardvark.payroll.PayrollHome</home>
--->
-<!ELEMENT home (#PCDATA)>
-
-<!--
-The icon element contains a small-icon and large-icon element which specify the
-URIs for a small and a large GIF or JPEG icon image used to represent the
-application client in a GUI tool.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-
-<!--
-The large-icon element contains the name of a file containing a large (32 x 32)
-icon image. The file name is a relative path within the application-client jar
-file. The image must be either in the JPEG or GIF format, and the file name must
-end with the suffix ".jpg" or ".gif" respectively. The icon can be used by
-tools.
-Example:
-<large-icon>lib/images/employee-service-icon32x32.jpg</large-icon>
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
-The remote element contains the fully-qualified name of the enterprise bean's
-remote interface.
-Used in: ejb-ref
-Example:
-<remote>com.wombat.empl.EmployeeService</remote>
--->
-<!ELEMENT remote (#PCDATA)>
-
-<!--
-The res-auth element specifies whether the enterprise bean code signs on
-programmatically to the resource manager, or whether the Container will sign on
-to the resource manager on behalf of the bean. In the latter case, the Container
-uses information that is supplied by the Deployer.
-The value of this element must be one of the two following:
-<res-auth>Application</res-auth>
-<res-auth>Container</res-auth>
--->
-<!ELEMENT res-auth (#PCDATA)>
-
-<!--
-The res-ref-name element specifies the name of the resource factory reference
-name. The resource factory reference name is the name of the application
-client's environment entry whose value contains the JNDI name of the data
-source.
-Used in: resource-ref
--->
-<!ELEMENT res-ref-name (#PCDATA)>
-
-<!--
-The res-type element specifies the type of the data source. The type is
-specified by the Java interface (or class) expected to be implemented by the
-data source.
-Used in: resource-ref
--->
-<!ELEMENT res-type (#PCDATA)>
-
-<!--
-The resource-ref element contains a declaration of application clients's
-reference to an external resource. It consists of an optional description, the
-resource factory reference name, the indication of the resource factory type
-expected by the application client's code, and the type of authentication (bean
-or container).
-
-Example:
-<resource-ref>
-<res-ref-name>EmployeeAppDB</res-ref-name>
-<res-type>javax.sql.DataSource</res-type>
-<res-auth>Container</res-auth>
-</resource-ref>
--->
-<!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth)>
-<!--
-The small-icon element contains the name of a file containing a small (16 x 16)
-icon image. The file name is a relative path within the application-client jar
-file. The image must be either in the JPEG or GIF format, and the file name must
-end with the suffix ".jpg" or ".gif" respectively. The icon can be used by
-tools.
-Example:
-<small-icon>lib/images/employee-service-icon16x16.jpg</small-icon>
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
-The ID mechanism is to allow tools to easily make tool-specific references to
-the elements of the deployment descriptor.
- -->
-<!ATTLIST application-client id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST ejb-link id ID #IMPLIED>
-<!ATTLIST ejb-ref id ID #IMPLIED>
-<!ATTLIST ejb-ref-name id ID #IMPLIED>
-<!ATTLIST ejb-ref-type id ID #IMPLIED>
-<!ATTLIST env-entry id ID #IMPLIED>
-<!ATTLIST env-entry-name id ID #IMPLIED>
-<!ATTLIST env-entry-type id ID #IMPLIED>
-<!ATTLIST env-entry-value id ID #IMPLIED>
-<!ATTLIST home id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST remote id ID #IMPLIED>
-<!ATTLIST res-auth id ID #IMPLIED>
-<!ATTLIST res-ref-name id ID #IMPLIED>
-<!ATTLIST res-type id ID #IMPLIED>
-<!ATTLIST resource-ref id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_1_3.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_1_3.dtd
deleted file mode 100644
index f9d456d504..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_1_3.dtd
+++ /dev/null
@@ -1,506 +0,0 @@
-<!--
-Copyright (c) 2000 Sun Microsystems, Inc.,
-901 San Antonio Road,
-Palo Alto, California 94303, U.S.A.
-All rights reserved.
-
-Sun Microsystems, Inc. has intellectual property rights relating to
-technology embodied in the product that is described in this document.
-In particular, and without limitation, these intellectual property
-rights may include one or more of the U.S. patents listed at
-http://www.sun.com/patents and one or more additional patents or
-pending patent applications in the U.S. and in other countries.
-
-This document and the product to which it pertains are distributed
-under licenses restricting their use, copying, distribution, and
-decompilation. This document may be reproduced and distributed but may
-not be changed without prior written authorization of Sun and its
-licensors, if any.
-
-Third-party software, including font technology, is copyrighted and
-licensed from Sun suppliers.
-
-Sun, Sun Microsystems, the Sun logo, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail and and
-Enterprise JavaBeans are trademarks or registered trademarks of Sun
-Microsystems, Inc. in the U.S. and other countries.
-
-Federal Acquisitions: Commercial Software - Government Users Subject to
-Standard License Terms and Conditions.
-
-DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED
-CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
-WARRANTY OF MERCHANTABILITY, FITNESS FOR FOR A PARTICULAR PURPOSE OR
-NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH
-DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
-
-
-_________________________________________________________________________
-
-Copyright (c) 2000 Sun Microsystems, Inc.,
-901 San Antonio Road,
-Palo Alto, California 94303, E'tats-Unis.
-Tous droits re'serve's.
-
-Sun Microsystems, Inc. a les droits de proprie'te' intellectuels
-relatants a` la technologie incorpore'e dans le produit qui est de'crit
-dans ce document. En particulier, et sans la limitation, ces droits de
-proprie'te' intellectuels peuvent inclure un ou plus des brevets
-ame'ricains e'nume're's a` http://www.sun.com/patents et un ou les
-brevets plus supple'mentaires ou les applications de brevet en attente
-dans les E'tats-Unis et dans les autres pays.
-
-Ce produit ou document est prote'ge' par un copyright et distribue'
-avec des licences qui en restreignent l'utilisation, la copie, la
-distribution, et la de'compilation. Ce documention associe n peut
-e^tre reproduite et distribuer, par quelque moyen que ce soit, sans
-l'autorisation pre'alable et e'crite de Sun et de ses bailleurs de
-licence, le cas e'che'ant.
-
-Le logiciel de'tenu par des tiers, et qui comprend la technologie
-relative aux polices de caracte`res, est prote'ge' par un copyright et
-licencie' par des fournisseurs de Sun.
-
-Sun, Sun Microsystems, le logo Sun, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail et and
-Enterprise JavaBeans sont des marques de fabrique ou des marques
-de'pose'es de Sun Microsystems, Inc. aux E'tats-Unis et dans d'autres
-pays.
-
-LA DOCUMENTATION EST FOURNIE "EN L'E'TAT" ET TOUTES AUTRES CONDITIONS,
-DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT
-EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS
-NOTAMMENT TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A
-L'APTITUDE A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE
-CONTREFAC,ON.
--->
-
-<!--
-This is the XML DTD for the J2EE 1.3 application client deployment
-descriptor. All J2EE 1.3 application client deployment descriptors
-must include a DOCTYPE of the following form:
-
- <!DOCTYPE application-client PUBLIC
- "-//Sun Microsystems, Inc.//DTD J2EE Application Client 1.3//EN"
- "http://java.sun.com/dtd/application-client_1_3.dtd">
-
--->
-
-<!--
-The following conventions apply to all J2EE deployment descriptor
-elements unless indicated otherwise.
-
-- In elements that contain PCDATA, leading and trailing whitespace
- in the data may be ignored.
-
-- In elements whose value is an "enumerated type", the value is
- case sensitive.
-
-- In elements that specify a pathname to a file within the same
- JAR file, relative filenames (i.e., those not starting with "/")
- are considered relative to the root of the JAR file's namespace.
- Absolute filenames (i.e., those starting with "/") also specify
- names in the root of the JAR file's namespace. In general, relative
- names are preferred. The exception is .war files where absolute
- names are preferred for consistency with the servlet API.
--->
-
-
-<!--
-The application-client element is the root element of an application
-client deployment descriptor. The application client deployment
-descriptor describes the EJB components and external resources
-referenced by the application client.
--->
-<!ELEMENT application-client (icon?, display-name, description?,
- env-entry*, ejb-ref*, resource-ref*, resource-env-ref*,
- callback-handler?)>
-
-<!--
-The callback-handler element names a class provided by the
-application. The class must have a no args constructor and must
-implement the javax.security.auth.callback.CallbackHandler interface.
-The class will be instantiated by the application client container and
-used by the container to collect authentication information from the
-user.
-
-Used in: application-client
--->
-<!ELEMENT callback-handler (#PCDATA)>
-
-<!--
-The description element is used to provide text describing the parent
-element. The description element should include any information that
-the application client jar file producer wants to provide to the consumer of
-the application client jar file (i.e., to the Deployer). Typically, the tools
-used by the application client jar file consumer will display the description
-when processing the parent element that contains the description.
-
-Used in: application-client, ejb-ref, env-entry, resource-env-ref,
-resource-ref
--->
-<!ELEMENT description (#PCDATA)>
-
-<!--
-The display-name element contains a short name that is intended to be
-displayed by tools. The display name need not be unique.
-
-Used in: application-client
-
-Example:
-
-<display-name>Employee Self Service</display-name>
--->
-<!ELEMENT display-name (#PCDATA)>
-
-<!--
-The ejb-link element is used in the ejb-ref element
-to specify that an EJB reference is linked to an
-enterprise bean.
-
-The name in the ejb-link element is composed of a
-path name specifying the ejb-jar containing the referenced enterprise
-bean with the ejb-name of the target bean appended and separated from
-the path name by "#". The path name is relative to the jar file
-containing the application client that is referencing the enterprise bean.
-This allows multiple enterprise beans with the same ejb-name to be
-uniquely identified.
-
-Used in: ejb-ref
-
-Examples:
-
- <ejb-link>EmployeeRecord</ejb-link>
-
- <ejb-link>../products/product.jar#ProductEJB</ejb-link>
-
--->
-<!ELEMENT ejb-link (#PCDATA)>
-
-<!--
-The ejb-ref element is used for the declaration of a reference to
-an enterprise bean's home. The declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of
- the application client that's referencing the enterprise bean
- - the expected type of the referenced enterprise bean
- - the expected home and remote interfaces of the referenced
- enterprise bean
- - optional ejb-link information, used to specify the referenced
- enterprise bean
-
-Used in: application-client
--->
-<!ELEMENT ejb-ref (description?, ejb-ref-name, ejb-ref-type,
- home, remote, ejb-link?)>
-
-<!--
-The ejb-ref-name element contains the name of an EJB reference. The
-EJB reference is an entry in the application client's environment and is
-relative to the java:comp/env context. The name must be unique
-within the application client.
-
-It is recommended that name is prefixed with "ejb/".
-
-Used in: ejb-ref
-
-Example:
-
-<ejb-ref-name>ejb/Payroll</ejb-ref-name>
--->
-<!ELEMENT ejb-ref-name (#PCDATA)>
-
-<!--
-The ejb-ref-type element contains the expected type of the
-referenced enterprise bean.
-
-The ejb-ref-type element must be one of the following:
-
- <ejb-ref-type>Entity</ejb-ref-type>
- <ejb-ref-type>Session</ejb-ref-type>
-
-Used in: ejb-ref
--->
-<!ELEMENT ejb-ref-type (#PCDATA)>
-
-<!--
-The env-entry element contains the declaration of an application client's
-environment entry. The declaration consists of an optional
-description, the name of the environment entry, and an optional
-value. If a value is not specified, one must be supplied
-during deployment.
-
-Used in: application-client
--->
-<!ELEMENT env-entry (description?, env-entry-name, env-entry-type,
- env-entry-value?)>
-
-<!--
-The env-entry-name element contains the name of an application client's
-environment entry. The name is a JNDI name relative to the
-java:comp/env context. The name must be unique within an application client.
-
-Used in: env-entry
-
-Example:
-
-<env-entry-name>minAmount</env-entry-name>
--->
-<!ELEMENT env-entry-name (#PCDATA)>
-
-<!--
-The env-entry-type element contains the fully-qualified Java type of
-the environment entry value that is expected by the application client's
-code.
-
-The following are the legal values of env-entry-type:
-
- java.lang.Boolean
- java.lang.Byte
- java.lang.Character
- java.lang.String
- java.lang.Short
- java.lang.Integer
- java.lang.Long
- java.lang.Float
- java.lang.Double
-
-
-Used in: env-entry
-
-Example:
-
-<env-entry-type>java.lang.Boolean</env-entry-type>
--->
-<!ELEMENT env-entry-type (#PCDATA)>
-
-<!--
-The env-entry-value element contains the value of an application client's
-environment entry. The value must be a String that is valid for the
-constructor of the specified type that takes a single String
-parameter, or for java.lang.Character, a single character.
-
-Used in: env-entry
-
-Example:
-
-<env-entry-value>100.00</env-entry-value>
--->
-<!ELEMENT env-entry-value (#PCDATA)>
-
-<!--
-The home element contains the fully-qualified name of the enterprise
-bean's home interface.
-
-Used in: ejb-ref
-
-Example:
-
-<home>com.aardvark.payroll.PayrollHome</home>
--->
-<!ELEMENT home (#PCDATA)>
-
-<!--
-The icon element contains small-icon and large-icon elements that
-specify the file names for small and a large GIF or JPEG icon images
-used to represent the parent element in a GUI tool.
-
-Used in: application-client
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-
-<!--
-The large-icon element contains the name of a file
-containing a large (32 x 32) icon image. The file
-name is a relative path within the application client's
-jar file.
-
-The image may be either in the JPEG or GIF format.
-The icon can be used by tools.
-
-Used in: icon
-
-Example:
-
-<large-icon>employee-service-icon32x32.jpg</large-icon>
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
-The remote element contains the fully-qualified name of the enterprise
-bean's remote interface.
-
-Used in: ejb-ref
-
-Example:
-
-<remote>com.wombat.empl.EmployeeService</remote>
--->
-<!ELEMENT remote (#PCDATA)>
-
-<!--
-The res-auth element specifies whether the application client code signs
-on programmatically to the resource manager, or whether the Container
-will sign on to the resource manager on behalf of the application client. In the
-latter case, the Container uses information that is supplied by the
-Deployer.
-
-The value of this element must be one of the two following:
-
- <res-auth>Application</res-auth>
- <res-auth>Container</res-auth>
-
-Used in: resource-ref
--->
-<!ELEMENT res-auth (#PCDATA)>
-
-<!--
-The res-ref-name element specifies the name of a resource manager
-connection factory reference. The name is a JNDI name relative to the
-java:comp/env context. The name must be unique within an application client.
-
-Used in: resource-ref
--->
-<!ELEMENT res-ref-name (#PCDATA)>
-
-<!--
-The res-sharing-scope element specifies whether connections obtained
-through the given resource manager connection factory reference can be
-shared. The value of this element, if specified, must be one of the
-two following:
-
- <res-sharing-scope>Shareable</res-sharing-scope>
- <res-sharing-scope>Unshareable</res-sharing-scope>
-
-The default value is Shareable.
-
-Used in: resource-ref
--->
-<!ELEMENT res-sharing-scope (#PCDATA)>
-
-<!--
-The res-type element specifies the type of the data source. The type
-is specified by the fully qualified Java language class or interface
-expected to be implemented by the data source.
-
-Used in: resource-ref
--->
-<!ELEMENT res-type (#PCDATA)>
-
-<!--
-The resource-env-ref element contains a declaration of an application client's
-reference to an administered object associated with a resource
-in the application client's environment. It consists of an optional
-description, the resource environment reference name, and an
-indication of the resource environment reference type expected by
-the application client code.
-
-Used in: application-client
-
-Example:
-
-<resource-env-ref>
- <resource-env-ref-name>jms/StockQueue</resource-env-ref-name>
- <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
-</resource-env-ref>
--->
-<!ELEMENT resource-env-ref (description?, resource-env-ref-name,
- resource-env-ref-type)>
-
-<!--
-The resource-env-ref-name element specifies the name of a resource
-environment reference; its value is the environment entry name used in
-the application client code. The name is a JNDI name relative to the
-java:comp/env context and must be unique within an application client.
-
-Used in: resource-env-ref
--->
-<!ELEMENT resource-env-ref-name (#PCDATA)>
-
-<!--
-The resource-env-ref-type element specifies the type of a resource
-environment reference. It is the fully qualified name of a Java
-language class or interface.
-
-Used in: resource-env-ref
--->
-<!ELEMENT resource-env-ref-type (#PCDATA)>
-
-<!--
-The resource-ref element contains a declaration of an application client's
-reference to an external resource. It consists of an optional
-description, the resource manager connection factory reference name,
-the indication of the resource manager connection factory type
-expected by the application client code, the type of authentication
-(Application or Container), and an optional specification of the
-shareability of connections obtained from the resource (Shareable or
-Unshareable).
-
-Used in: application-client
-
-Example:
-
- <resource-ref>
- <res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
--->
-<!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth,
- res-sharing-scope?)>
-
-<!--
-The small-icon element contains the name of a file
-containing a small (16 x 16) icon image. The file
-name is a relative path within the application client's
-jar file.
-
-The image may be either in the JPEG or GIF format.
-The icon can be used by tools.
-
-Used in: icon
-
-Example:
-
-<small-icon>employee-service-icon16x16.jpg</small-icon>
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
-The ID mechanism is to allow tools that produce additional deployment
-information (i.e., information beyond the standard deployment
-descriptor information) to store the non-standard information in a
-separate file, and easily refer from these tool-specific files to the
-information in the standard deployment descriptor.
-
-Tools are not allowed to add the non-standard information into the
-standard deployment descriptor.
--->
-
-<!ATTLIST application-client id ID #IMPLIED>
-<!ATTLIST callback-handler id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST ejb-link id ID #IMPLIED>
-<!ATTLIST ejb-ref id ID #IMPLIED>
-<!ATTLIST ejb-ref-name id ID #IMPLIED>
-<!ATTLIST ejb-ref-type id ID #IMPLIED>
-<!ATTLIST env-entry id ID #IMPLIED>
-<!ATTLIST env-entry-name id ID #IMPLIED>
-<!ATTLIST env-entry-type id ID #IMPLIED>
-<!ATTLIST env-entry-value id ID #IMPLIED>
-<!ATTLIST home id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST remote id ID #IMPLIED>
-<!ATTLIST res-auth id ID #IMPLIED>
-<!ATTLIST res-ref-name id ID #IMPLIED>
-<!ATTLIST res-sharing-scope id ID #IMPLIED>
-<!ATTLIST res-type id ID #IMPLIED>
-<!ATTLIST resource-env-ref id ID #IMPLIED>
-<!ATTLIST resource-env-ref-name id ID #IMPLIED>
-<!ATTLIST resource-env-ref-type id ID #IMPLIED>
-<!ATTLIST resource-ref id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_1_4.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_1_4.xsd
deleted file mode 100644
index ec889717a5..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_1_4.xsd
+++ /dev/null
@@ -1,267 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/j2ee"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.4">
- <xsd:annotation>
- <xsd:documentation>
- @(#)application-client_1_4.xsds 1.17 02/11/03
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2002 Sun Microsystems, Inc., 901 San Antonio
- Road, Palo Alto, California 94303, U.S.A. All rights
- reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- This is the XML Schema for the application client 1.4
- deployment descriptor. The deployment descriptor must
- be named "META-INF/application-client.xml" in the
- application client's jar file. All application client
- deployment descriptors must indicate the application
- client schema by using the J2EE namespace:
-
- http://java.sun.com/xml/ns/j2ee
-
- and indicate the version of the schema by
- using the version element as shown below:
-
- <application-client xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd"
- version="1.4">
- ...
- </application-client>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for J2EE
- namespace with the following location:
-
- http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all J2EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="j2ee_1_4.xsd"/>
-
-
-<!-- **************************************************** -->
-
-
- <xsd:element name="application-client" type="j2ee:application-clientType">
- <xsd:annotation>
- <xsd:documentation>
-
- The application-client element is the root element of an
- application client deployment descriptor. The application
- client deployment descriptor describes the EJB components
- and external resources referenced by the application
- client.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:unique name="env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of an
- application client's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The name must
- be unique within an application client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:env-entry"/>
- <xsd:field xpath="j2ee:env-entry-name"/>
- </xsd:unique>
-
- <xsd:unique name="ejb-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the application
- client's environment and is relative to the
- java:comp/env context. The name must be unique within the
- application client.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:ejb-ref"/>
- <xsd:field xpath="j2ee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="res-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference.The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within an application client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:resource-ref"/>
- <xsd:field xpath="j2ee:res-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="resource-env-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name of
- a resource environment reference; its value is the
- environment entry name used in the application client
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- application client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:resource-env-ref"/>
- <xsd:field xpath="j2ee:resource-env-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="message-destination-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies the
- name of a message destination reference; its value is
- the message destination reference name used in the
- application client code. The name is a JNDI name
- relative to the java:comp/env context and must be unique
- within an application client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:message-destination-ref"/>
- <xsd:field xpath="j2ee:message-destination-ref-name"/>
- </xsd:unique>
- </xsd:element>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="application-clientType">
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="env-entry"
- type="j2ee:env-entryType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref"
- type="j2ee:ejb-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:group ref="j2ee:service-refGroup"/>
- <xsd:element name="resource-ref"
- type="j2ee:resource-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref"
- type="j2ee:resource-env-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref"
- type="j2ee:message-destination-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="callback-handler"
- type="j2ee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The callback-handler element names a class provided by
- the application. The class must have a no args
- constructor and must implement the
- javax.security.auth.callback.CallbackHandler
- interface. The class will be instantiated by the
- application client container and used by the container
- to collect authentication information from the user.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="message-destination"
- type="j2ee:message-destinationType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
-
- <xsd:attribute name="version"
- type="j2ee:dewey-versionType"
- fixed="1.4"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 1.4.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:attribute>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_5.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_5.xsd
deleted file mode 100644
index e740827b74..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_5.xsd
+++ /dev/null
@@ -1,304 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="5">
- <xsd:annotation>
- <xsd:documentation>
- @(#)application-client_5.xsds 1.26 02/17/06
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003-2005 Sun Microsystems, Inc.
- 4150 Network Circle
- Santa Clara, California 95054
- U.S.A
- All rights reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- This is the XML Schema for the application client 5
- deployment descriptor. The deployment descriptor must
- be named "META-INF/application-client.xml" in the
- application client's jar file. All application client
- deployment descriptors must indicate the application
- client schema by using the Java EE namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and indicate the version of the schema by
- using the version element as shown below:
-
- <application-client xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/application-client_5.xsd"
- version="5">
- ...
- </application-client>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for Java EE
- namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/application-client_5.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all Java EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_5.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:element name="application-client" type="javaee:application-clientType">
- <xsd:annotation>
- <xsd:documentation>
-
- The application-client element is the root element of an
- application client deployment descriptor. The application
- client deployment descriptor describes the EJB components
- and external resources referenced by the application
- client.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:unique name="env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of an
- application client's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The name must
- be unique within an application client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:env-entry"/>
- <xsd:field xpath="javaee:env-entry-name"/>
- </xsd:unique>
-
- <xsd:unique name="ejb-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the application
- client's environment and is relative to the
- java:comp/env context. The name must be unique within the
- application client.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="res-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference.The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within an application client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-ref"/>
- <xsd:field xpath="javaee:res-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="resource-env-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name of
- a resource environment reference; its value is the
- environment entry name used in the application client
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- application client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-env-ref"/>
- <xsd:field xpath="javaee:resource-env-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="message-destination-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies the
- name of a message destination reference; its value is
- the message destination reference name used in the
- application client code. The name is a JNDI name
- relative to the java:comp/env context and must be unique
- within an application client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:message-destination-ref"/>
- <xsd:field xpath="javaee:message-destination-ref-name"/>
- </xsd:unique>
- </xsd:element>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="application-clientType">
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="env-entry"
- type="javaee:env-entryType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref"
- type="javaee:ejb-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:group ref="javaee:service-refGroup"/>
- <xsd:element name="resource-ref"
- type="javaee:resource-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref"
- type="javaee:resource-env-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref"
- type="javaee:message-destination-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="persistence-unit-ref"
- type="javaee:persistence-unit-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="post-construct"
- type="javaee:lifecycle-callbackType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="pre-destroy"
- type="javaee:lifecycle-callbackType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="callback-handler"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The callback-handler element names a class provided by
- the application. The class must have a no args
- constructor and must implement the
- javax.security.auth.callback.CallbackHandler
- interface. The class will be instantiated by the
- application client container and used by the container
- to collect authentication information from the user.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="message-destination"
- type="javaee:message-destinationType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
-
- <xsd:attribute name="version"
- type="javaee:dewey-versionType"
- fixed="5"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 5.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:attribute>
-
- <xsd:attribute name="metadata-complete" type="xsd:boolean">
- <xsd:annotation>
- <xsd:documentation>
-
- The metadata-complete attribute defines whether this
- deployment descriptor and other related deployment
- descriptors for this module (e.g., web service
- descriptors) are complete, or whether the class
- files available to this module and packaged with
- this application should be examined for annotations
- that specify deployment information.
-
- If metadata-complete is set to "true", the deployment
- tool must ignore any annotations that specify deployment
- information, which might be present in the class files
- of the application.
-
- If metadata-complete is not specified or is set to
- "false", the deployment tool must examine the class
- files of the application for annotations, as
- specified by the specifications.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:attribute>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_6.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_6.xsd
deleted file mode 100644
index 4a8e5e9e3b..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application-client_6.xsd
+++ /dev/null
@@ -1,311 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="6">
- <xsd:annotation>
- <xsd:documentation>
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
-
- The contents of this file are subject to the terms of either the
- GNU General Public License Version 2 only ("GPL") or the Common
- Development and Distribution License("CDDL") (collectively, the
- "License"). You may not use this file except in compliance with
- the License. You can obtain a copy of the License at
- https://glassfish.dev.java.net/public/CDDL+GPL.html or
- glassfish/bootstrap/legal/LICENSE.txt. See the License for the
- specific language governing permissions and limitations under the
- License.
-
- When distributing the software, include this License Header
- Notice in each file and include the License file at
- glassfish/bootstrap/legal/LICENSE.txt. Sun designates this
- particular file as subject to the "Classpath" exception as
- provided by Sun in the GPL Version 2 section of the License file
- that accompanied this code. If applicable, add the following
- below the License Header, with the fields enclosed by brackets []
- replaced by your own identifying information:
- "Portions Copyrighted [year] [name of copyright owner]"
-
- Contributor(s):
-
- If you wish your version of this file to be governed by only the
- CDDL or only the GPL Version 2, indicate your decision by adding
- "[Contributor] elects to include this software in this
- distribution under the [CDDL or GPL Version 2] license." If you
- don't indicate a single choice of license, a recipient has the
- option to distribute your version of this file under either the
- CDDL, the GPL Version 2 or to extend the choice of license to its
- licensees as provided above. However, if you add GPL Version 2
- code and therefore, elected the GPL Version 2 license, then the
- option applies only if the new code is made subject to such
- option by the copyright holder.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- This is the XML Schema for the application client 6
- deployment descriptor. The deployment descriptor must
- be named "META-INF/application-client.xml" in the
- application client's jar file. All application client
- deployment descriptors must indicate the application
- client schema by using the Java EE namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and indicate the version of the schema by
- using the version element as shown below:
-
- <application-client xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/application-client_6.xsd"
- version="6">
- ...
- </application-client>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for Java EE
- namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/application-client_6.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all Java EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_6.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:element name="application-client"
- type="javaee:application-clientType">
- <xsd:annotation>
- <xsd:documentation>
-
- The application-client element is the root element of an
- application client deployment descriptor. The application
- client deployment descriptor describes the EJB components
- and external resources referenced by the application
- client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:unique name="env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of an
- application client's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The name must
- be unique within an application client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:env-entry"/>
- <xsd:field xpath="javaee:env-entry-name"/>
- </xsd:unique>
- <xsd:unique name="ejb-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the application
- client's environment and is relative to the
- java:comp/env context. The name must be unique within the
- application client.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
- <xsd:unique name="res-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference.The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within an application client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-ref"/>
- <xsd:field xpath="javaee:res-ref-name"/>
- </xsd:unique>
- <xsd:unique name="resource-env-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name of
- a resource environment reference; its value is the
- environment entry name used in the application client
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- application client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-env-ref"/>
- <xsd:field xpath="javaee:resource-env-ref-name"/>
- </xsd:unique>
- <xsd:unique name="message-destination-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies the
- name of a message destination reference; its value is
- the message destination reference name used in the
- application client code. The name is a JNDI name
- relative to the java:comp/env context and must be unique
- within an application client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:message-destination-ref"/>
- <xsd:field xpath="javaee:message-destination-ref-name"/>
- </xsd:unique>
- </xsd:element>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="application-clientType">
- <xsd:sequence>
- <xsd:element name="module-name"
- type="javaee:string"
- minOccurs="0"/>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="env-entry"
- type="javaee:env-entryType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref"
- type="javaee:ejb-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:group ref="javaee:service-refGroup"/>
- <xsd:element name="resource-ref"
- type="javaee:resource-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref"
- type="javaee:resource-env-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref"
- type="javaee:message-destination-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="persistence-unit-ref"
- type="javaee:persistence-unit-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="post-construct"
- type="javaee:lifecycle-callbackType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="pre-destroy"
- type="javaee:lifecycle-callbackType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="callback-handler"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The callback-handler element names a class provided by
- the application. The class must have a no args
- constructor and must implement the
- javax.security.auth.callback.CallbackHandler
- interface. The class will be instantiated by the
- application client container and used by the container
- to collect authentication information from the user.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="message-destination"
- type="javaee:message-destinationType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="data-source"
- type="javaee:data-sourceType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="version"
- type="javaee:dewey-versionType"
- fixed="6"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 6.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="metadata-complete"
- type="xsd:boolean">
- <xsd:annotation>
- <xsd:documentation>
-
- The metadata-complete attribute defines whether this
- deployment descriptor and other related deployment
- descriptors for this module (e.g., web service
- descriptors) are complete, or whether the class
- files available to this module and packaged with
- this application should be examined for annotations
- that specify deployment information.
-
- If metadata-complete is set to "true", the deployment
- tool must ignore any annotations that specify deployment
- information, which might be present in the class files
- of the application.
-
- If metadata-complete is not specified or is set to
- "false", the deployment tool must examine the class
- files of the application for annotations, as
- specified by the specifications.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_1_2.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_1_2.dtd
deleted file mode 100644
index 67573627b2..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_1_2.dtd
+++ /dev/null
@@ -1,197 +0,0 @@
-<!--
-Copyright 1999 Sun Microsystems, Inc. 901 San Antonio Road,
-Palo Alto, CA 94303, U.S.A. All rights reserved.
-
-This product or document is protected by copyright and distributed
-under licenses restricting its use, copying, distribution, and
-decompilation. No part of this product or documentation may be
-reproduced in any form by any means without prior written authorization
-of Sun and its licensors, if any.
-
-Third party software, including font technology, is copyrighted and
-licensed from Sun suppliers.
-
-Sun, Sun Microsystems, the Sun Logo, Solaris, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail and Enterprise JavaBeans,
-are trademarks or registered trademarks of Sun Microsystems, Inc in the U.S.
-and other countries.
-
-All SPARC trademarks are used under license and are trademarks
-or registered trademarks of SPARC International, Inc.
-in the U.S. and other countries. Products bearing SPARC
-trademarks are based upon an architecture developed by Sun Microsystems, Inc.
-
-PostScript is a registered trademark of Adobe Systems, Inc.
-
-
-Federal Acquisitions: Commercial Software - Government Users Subject to
-Standard License Terms and Conditions.
-
-
-
-DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED
-CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
-IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT
-TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY
-INVALID.
-
-_________________________________________________________________________
-Copyright 1999 Sun Microsystems, Inc.,
-901 San Antonio Road, Palo Alto, CA 94303, Etats-Unis.
-Tous droits re'serve's.
-
-
-Ce produit ou document est prote'ge' par un copyright et distribue' avec
-des licences qui en restreignent l'utilisation, la copie, la distribution,
-et la de'compilation. Aucune partie de ce produit ou de sa documentation
-associe'e ne peut e^tre reproduite sous aucune forme, par quelque moyen
-que ce soit, sans l'autorisation pre'alable et e'crite de Sun et de ses
-bailleurs de licence, s'il y en a.
-
-Le logiciel de'tenu par des tiers, et qui comprend la technologie
-relative aux polices de caracte`res, est prote'ge' par un copyright
-et licencie' par des fournisseurs de Sun.
-
-Sun, Sun Microsystems, le logo Sun, Solaris, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail, et Enterprise JavaBeans,
-sont des marques de fabrique ou des marques de'pose'es de Sun
-Microsystems, Inc. aux Etats-Unis et dans d'autres pays.
-
-Toutes les marques SPARC sont utilise'es sous licence et sont
-des marques de fabrique ou des marques de'pose'es de SPARC
-International, Inc. aux Etats-Unis et dans
-d'autres pays. Les produits portant les marques SPARC sont
-base's sur une architecture de'veloppe'e par Sun Microsystems, Inc.
-
-Postcript est une marque enregistre'e d'Adobe Systems Inc.
-
-LA DOCUMENTATION EST FOURNIE "EN L'ETAT" ET TOUTES AUTRES CONDITIONS,
-DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES,
-DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT
-TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L'APTITUDE
-A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE CONTREFACON.
--->
-
-<!--
-The alt-dd element specifies an optional URI to the post-assembly version of the
-deployment descriptor file for a particular J2EE module. The URI must specify
-the full pathname of the deployment descriptor file relative to the
-application's root directory. If alt-dd is not specified, the deployer must read
-the deployment descriptor from the default location and file name required by
-the respective component specification.
--->
-<!ELEMENT alt-dd (#PCDATA)>
-
-<!--
-The application element is the root element of a J2EE application deployment
-descriptor.
--->
-<!ELEMENT application (icon?, display-name, description?, module+,
-security-role*)>
-
-<!--
-The context-root element specifies the context root of a web application
--->
-<!ELEMENT context-root (#PCDATA)>
-
-<!--
-The description element provides a human readable description of the
-application. The description element should include any information that the
-application assembler wants to provide the deployer.
--->
-<!ELEMENT description (#PCDATA)>
-
-<!--
-The display-name element specifies an application name.
-The application name is assigned to the application by the application assembler
-and is used to identify the application to the deployer at deployment time.
--->
-<!ELEMENT display-name (#PCDATA)>
-
-<!--
-The ejb element specifies the URI of a ejb-jar, relative to the top level of the
-application package.
--->
-<!ELEMENT ejb (#PCDATA)>
-
-<!--
-The icon element contains a small-icon and large-icon element which specify the
-URIs for a small and a large GIF or JPEG icon image to represent the application
-in a GUI.
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-
-<!--
-The java element specifies the URI of a java application client module, relative
-to the top level of the application package.
--->
-<!ELEMENT java (#PCDATA)>
-
-<!--
-The large-icon element specifies the URI for a large GIF or JPEG icon image to
-represent the application in a GUI.
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
-The module element represents a single J2EE module and contains an ejb, java, or
-web element, which indicates the module type and contains a path to the module
-file, and an optional alt-dd element, which specifies an optional URI to the
-post-assembly version of the deployment descriptor.
-The application deployment descriptor must have one module element for each J2EE
-module in the application package.
--->
-<!ELEMENT module ((ejb | java | web), alt-dd?)>
-
-<!--
-The role-name element contains the name of a security role.
--->
-<!ELEMENT role-name (#PCDATA)>
-
-<!--
-The security-role element contains the definition of a security role which is
-global to the application. The definition consists of a description of the
-security role, and the security role name. The descriptions at this level
-override those in the component level security-role definitions and must be the
-descriptions tool display to the deployer.
--->
-<!ELEMENT security-role (description?, role-name)>
-
-<!--
-The small-icon element specifies the URI for a small GIF or JPEG icon image to
-represent the application in a GUI.
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
-The web element contains the web-uri and context-root of a web application
-module.
--->
-<!ELEMENT web (web-uri, context-root)>
-
-<!--
-The web-uri element specifies the URI of a web application file, relative to the
-top level of the application package.
--->
-<!ELEMENT web-uri (#PCDATA)>
-
-<!--
-The ID mechanism is to allow tools to easily make tool-specific references to
-the elements of the deployment descriptor.
- -->
-<!ATTLIST alt-dd id ID #IMPLIED>
-<!ATTLIST application id ID #IMPLIED>
-<!ATTLIST context-root id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST ejb id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST java id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST module id ID #IMPLIED>
-<!ATTLIST role-name id ID #IMPLIED>
-<!ATTLIST security-role id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST web id ID #IMPLIED>
-<!ATTLIST web-uri id ID #IMPLIED>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_1_3.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_1_3.dtd
deleted file mode 100644
index 22a49aca1e..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_1_3.dtd
+++ /dev/null
@@ -1,312 +0,0 @@
-<!--
-Copyright (c) 2000 Sun Microsystems, Inc.,
-901 San Antonio Road,
-Palo Alto, California 94303, U.S.A.
-All rights reserved.
-
-Sun Microsystems, Inc. has intellectual property rights relating to
-technology embodied in the product that is described in this document.
-In particular, and without limitation, these intellectual property
-rights may include one or more of the U.S. patents listed at
-http://www.sun.com/patents and one or more additional patents or
-pending patent applications in the U.S. and in other countries.
-
-This document and the product to which it pertains are distributed
-under licenses restricting their use, copying, distribution, and
-decompilation. This document may be reproduced and distributed but may
-not be changed without prior written authorization of Sun and its
-licensors, if any.
-
-Third-party software, including font technology, is copyrighted and
-licensed from Sun suppliers.
-
-Sun, Sun Microsystems, the Sun logo, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail and and
-Enterprise JavaBeans are trademarks or registered trademarks of Sun
-Microsystems, Inc. in the U.S. and other countries.
-
-Federal Acquisitions: Commercial Software - Government Users Subject to
-Standard License Terms and Conditions.
-
-DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED
-CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
-WARRANTY OF MERCHANTABILITY, FITNESS FOR FOR A PARTICULAR PURPOSE OR
-NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH
-DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
-
-
-_________________________________________________________________________
-
-Copyright (c) 2000 Sun Microsystems, Inc.,
-901 San Antonio Road,
-Palo Alto, California 94303, E'tats-Unis.
-Tous droits re'serve's.
-
-Sun Microsystems, Inc. a les droits de proprie'te' intellectuels
-relatants a` la technologie incorpore'e dans le produit qui est de'crit
-dans ce document. En particulier, et sans la limitation, ces droits de
-proprie'te' intellectuels peuvent inclure un ou plus des brevets
-ame'ricains e'nume're's a` http://www.sun.com/patents et un ou les
-brevets plus supple'mentaires ou les applications de brevet en attente
-dans les E'tats-Unis et dans les autres pays.
-
-Ce produit ou document est prote'ge' par un copyright et distribue'
-avec des licences qui en restreignent l'utilisation, la copie, la
-distribution, et la de'compilation. Ce documention associe n peut
-e^tre reproduite et distribuer, par quelque moyen que ce soit, sans
-l'autorisation pre'alable et e'crite de Sun et de ses bailleurs de
-licence, le cas e'che'ant.
-
-Le logiciel de'tenu par des tiers, et qui comprend la technologie
-relative aux polices de caracte`res, est prote'ge' par un copyright et
-licencie' par des fournisseurs de Sun.
-
-Sun, Sun Microsystems, le logo Sun, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail et and
-Enterprise JavaBeans sont des marques de fabrique ou des marques
-de'pose'es de Sun Microsystems, Inc. aux E'tats-Unis et dans d'autres
-pays.
-
-LA DOCUMENTATION EST FOURNIE "EN L'E'TAT" ET TOUTES AUTRES CONDITIONS,
-DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT
-EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS
-NOTAMMENT TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A
-L'APTITUDE A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE
-CONTREFAC,ON.
--->
-
-<!--
-This is the XML DTD for the J2EE 1.3 application deployment
-descriptor. All J2EE 1.3 application deployment descriptors
-must include a DOCTYPE of the following form:
-
- <!DOCTYPE application PUBLIC
- "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
- "http://java.sun.com/dtd/application_1_3.dtd">
-
--->
-
-<!--
-The following conventions apply to all J2EE deployment descriptor
-elements unless indicated otherwise.
-
-- In elements that contain PCDATA, leading and trailing whitespace
- in the data may be ignored.
-
-- In elements whose value is an "enumerated type", the value is
- case sensitive.
-
-- In elements that specify a pathname to a file within the same
- JAR file, relative filenames (i.e., those not starting with "/")
- are considered relative to the root of the JAR file's namespace.
- Absolute filenames (i.e., those starting with "/") also specify
- names in the root of the JAR file's namespace. In general, relative
- names are preferred. The exception is .war files where absolute
- names are preferred for consistency with the servlet API.
--->
-
-
-<!--
-The application element is the root element of a J2EE application
-deployment descriptor.
--->
-<!ELEMENT application (icon?, display-name, description?, module+,
- security-role*)>
-
-<!--
-The alt-dd element specifies an optional URI to the post-assembly
-version of the deployment descriptor file for a particular J2EE module.
-The URI must specify the full pathname of the deployment descriptor
-file relative to the application's root directory. If alt-dd is not
-specified, the deployer must read the deployment descriptor from the
-default location and file name required by the respective component
-specification.
-
-Used in: module
--->
-<!ELEMENT alt-dd (#PCDATA)>
-
-<!--
-The connector element specifies the URI of a resource adapter archive
-file, relative to the top level of the application package.
-
-Used in: module
--->
-<!ELEMENT connector (#PCDATA)>
-
-<!--
-The context-root element specifies the context root of a web
-application.
-
-Used in: web
--->
-<!ELEMENT context-root (#PCDATA)>
-
-<!--
-The description element is used to provide text describing the parent
-element. The description element should include any information that
-the application ear file producer wants to provide to the consumer of
-the application ear file (i.e., to the Deployer). Typically, the tools
-used by the application ear file consumer will display the description
-when processing the parent element that contains the description.
-
-Used in: application, security-role
--->
-<!ELEMENT description (#PCDATA)>
-
-<!--
-The display-name element contains a short name that is intended to be
-displayed by tools. The display name need not be unique.
-
-Used in: application
-
-Example:
-
-<display-name>Employee Self Service</display-name>
--->
-<!ELEMENT display-name (#PCDATA)>
-
-<!--
-The ejb element specifies the URI of an ejb-jar, relative to the top
-level of the application package.
-
-Used in: module
--->
-<!ELEMENT ejb (#PCDATA)>
-
-<!--
-The icon element contains small-icon and large-icon elements that
-specify the file names for small and a large GIF or JPEG icon images
-used to represent the parent element in a GUI tool.
-
-Used in: application
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-
-<!--
-The java element specifies the URI of a java application client module,
-relative to the top level of the application package.
-
-Used in: module
--->
-<!ELEMENT java (#PCDATA)>
-
-<!--
-The large-icon element contains the name of a file
-containing a large (32 x 32) icon image. The file
-name is a relative path within the application's
-ear file.
-
-The image may be either in the JPEG or GIF format.
-The icon can be used by tools.
-
-Used in: icon
-
-Example:
-
-<large-icon>employee-service-icon32x32.jpg</large-icon>
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
-The module element represents a single J2EE module and contains a
-connector, ejb, java, or web element, which indicates the module type
-and contains a path to the module file, and an optional alt-dd element,
-which specifies an optional URI to the post-assembly version of the
-deployment descriptor.
-
-The application deployment descriptor must have one module element for
-each J2EE module in the application package.
-
-Used in: application
--->
-<!ELEMENT module ((connector | ejb | java | web), alt-dd?)>
-
-<!--
-The role-name element contains the name of a security role.
-
-The name must conform to the lexical rules for an NMTOKEN.
-
-Used in: security-role
--->
-<!ELEMENT role-name (#PCDATA)>
-
-<!--
-The security-role element contains the definition of a security
-role. The definition consists of an optional description of the
-security role, and the security role name.
-
-Used in: application
-
-Example:
-
- <security-role>
- <description>
- This role includes all employees who are authorized
- to access the employee service application.
- </description>
- <role-name>employee</role-name>
- </security-role>
--->
-<!ELEMENT security-role (description?, role-name)>
-
-<!--
-The small-icon element contains the name of a file
-containing a small (16 x 16) icon image. The file
-name is a relative path within the application's
-ear file.
-
-The image may be either in the JPEG or GIF format.
-The icon can be used by tools.
-
-Used in: icon
-
-Example:
-
-<small-icon>employee-service-icon16x16.jpg</small-icon>
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
-The web element contains the web-uri and context-root of a web
-application module.
-
-Used in: module
--->
-<!ELEMENT web (web-uri, context-root)>
-
-<!--
-The web-uri element specifies the URI of a web application file,
-relative to the top level of the application package.
-
-Used in: web
--->
-<!ELEMENT web-uri (#PCDATA)>
-
-<!--
-The ID mechanism is to allow tools that produce additional deployment
-information (i.e., information beyond the standard deployment
-descriptor information) to store the non-standard information in a
-separate file, and easily refer from these tool-specific files to the
-information in the standard deployment descriptor.
-
-Tools are not allowed to add the non-standard information into the
-standard deployment descriptor.
--->
-
-<!ATTLIST alt-dd id ID #IMPLIED>
-<!ATTLIST application id ID #IMPLIED>
-<!ATTLIST connector id ID #IMPLIED>
-<!ATTLIST context-root id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST ejb id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST java id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST module id ID #IMPLIED>
-<!ATTLIST role-name id ID #IMPLIED>
-<!ATTLIST security-role id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST web id ID #IMPLIED>
-<!ATTLIST web-uri id ID #IMPLIED>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_1_4.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_1_4.xsd
deleted file mode 100644
index c458cfd5dd..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_1_4.xsd
+++ /dev/null
@@ -1,315 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/j2ee"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.4">
- <xsd:annotation>
- <xsd:documentation>
- @(#)application_1_4.xsds 1.13 02/11/03
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
- Road, Palo Alto, California 94303, U.S.A. All rights
- reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- This is the XML Schema for the application 1.4 deployment
- descriptor. The deployment descriptor must be named
- "META-INF/application.xml" in the application's ear file.
- All application deployment descriptors must indicate
- the application schema by using the J2EE namespace:
-
- http://java.sun.com/xml/ns/j2ee
-
- and indicate the version of the schema by
- using the version element as shown below:
-
- <application xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
- version="1.4">
- ...
- </application>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for J2EE
- namespace with the following location:
-
- http://java.sun.com/xml/ns/j2ee/application_1_4.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all J2EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="j2ee_1_4.xsd"/>
-
-
-<!-- **************************************************** -->
-
-
- <xsd:element name="application" type="j2ee:applicationType">
- <xsd:annotation>
- <xsd:documentation>
-
- The application element is the root element of a J2EE
- application deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:unique name="context-root-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The context-root element content must be unique
- in the ear.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:module/j2ee:web"/>
- <xsd:field xpath="j2ee:context-root"/>
- </xsd:unique>
-
- <xsd:unique name="security-role-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-role-name element content
- must be unique in the ear.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:security-role"/>
- <xsd:field xpath="j2ee:role-name"/>
- </xsd:unique>
-
- </xsd:element>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="applicationType">
- <xsd:annotation>
- <xsd:documentation>
-
- The applicationType defines the structure of the
- application.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="module"
- type="j2ee:moduleType"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The application deployment descriptor must have one
- module element for each J2EE module in the
- application package. A module element is defined
- by moduleType definition.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="security-role"
- type="j2ee:security-roleType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="version"
- type="j2ee:dewey-versionType"
- fixed="1.4"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 1.4.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="moduleType">
- <xsd:annotation>
- <xsd:documentation>
-
- The moduleType defines a single J2EE module and contains a
- connector, ejb, java, or web element, which indicates the
- module type and contains a path to the module file, and an
- optional alt-dd element, which specifies an optional URI to
- the post-assembly version of the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:choice>
- <xsd:element name="connector"
- type="j2ee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The connector element specifies the URI of a
- resource adapter archive file, relative to the
- top level of the application package.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ejb"
- type="j2ee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb element specifies the URI of an ejb-jar,
- relative to the top level of the application
- package.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="java"
- type="j2ee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The java element specifies the URI of a java
- application client module, relative to the top
- level of the application package.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="web"
- type="j2ee:webType"/>
- </xsd:choice>
- <xsd:element name="alt-dd"
- type="j2ee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The alt-dd element specifies an optional URI to the
- post-assembly version of the deployment descriptor
- file for a particular J2EE module. The URI must
- specify the full pathname of the deployment
- descriptor file relative to the application's root
- directory. If alt-dd is not specified, the deployer
- must read the deployment descriptor from the default
- location and file name required by the respective
- component specification.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="webType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webType defines the web-uri and context-root of
- a web application module.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="web-uri"
- type="j2ee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The web-uri element specifies the URI of a web
- application file, relative to the top level of the
- application package.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="context-root"
- type="j2ee:string">
-
- <xsd:annotation>
- <xsd:documentation>
-
- The context-root element specifies the context root
- of a web application.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_5.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_5.xsd
deleted file mode 100644
index 4509662086..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_5.xsd
+++ /dev/null
@@ -1,336 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="5">
- <xsd:annotation>
- <xsd:documentation>
- @(#)application_5.xsds 1.17 08/05/05
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003-2005 Sun Microsystems, Inc.
- 4150 Network Circle
- Santa Clara, California 95054
- U.S.A
- All rights reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- This is the XML Schema for the application 5 deployment
- descriptor. The deployment descriptor must be named
- "META-INF/application.xml" in the application's ear file.
- All application deployment descriptors must indicate
- the application schema by using the Java EE namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and indicate the version of the schema by
- using the version element as shown below:
-
- <application xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/application_5.xsd"
- version="5">
- ...
- </application>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for Java EE
- namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/application_5.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all Java EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_5.xsd"/>
-
-
-<!-- **************************************************** -->
-
-
- <xsd:element name="application" type="javaee:applicationType">
- <xsd:annotation>
- <xsd:documentation>
-
- The application element is the root element of a Java EE
- application deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:unique name="context-root-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The context-root element content must be unique
- in the ear.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:module/javaee:web"/>
- <xsd:field xpath="javaee:context-root"/>
- </xsd:unique>
-
- <xsd:unique name="security-role-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-role-name element content
- must be unique in the ear.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:security-role"/>
- <xsd:field xpath="javaee:role-name"/>
- </xsd:unique>
-
- </xsd:element>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="applicationType">
- <xsd:annotation>
- <xsd:documentation>
-
- The applicationType defines the structure of the
- application.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="module"
- type="javaee:moduleType"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The application deployment descriptor must have one
- module element for each Java EE module in the
- application package. A module element is defined
- by moduleType definition.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="security-role"
- type="javaee:security-roleType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="library-directory"
- type="javaee:pathType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The library-directory element specifies the pathname
- of a directory within the application package, relative
- to the top level of the application package. All files
- named "*.jar" in this directory must be made available
- in the class path of all components included in this
- application package. If this element isn't specified,
- the directory named "lib" is searched. An empty element
- may be used to disable searching.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="version"
- type="javaee:dewey-versionType"
- fixed="5"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 5.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="moduleType">
- <xsd:annotation>
- <xsd:documentation>
-
- The moduleType defines a single Java EE module and contains a
- connector, ejb, java, or web element, which indicates the
- module type and contains a path to the module file, and an
- optional alt-dd element, which specifies an optional URI to
- the post-assembly version of the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:choice>
- <xsd:element name="connector"
- type="javaee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The connector element specifies the URI of a
- resource adapter archive file, relative to the
- top level of the application package.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ejb"
- type="javaee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb element specifies the URI of an ejb-jar,
- relative to the top level of the application
- package.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="java"
- type="javaee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The java element specifies the URI of a java
- application client module, relative to the top
- level of the application package.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="web"
- type="javaee:webType"/>
- </xsd:choice>
- <xsd:element name="alt-dd"
- type="javaee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The alt-dd element specifies an optional URI to the
- post-assembly version of the deployment descriptor
- file for a particular Java EE module. The URI must
- specify the full pathname of the deployment
- descriptor file relative to the application's root
- directory. If alt-dd is not specified, the deployer
- must read the deployment descriptor from the default
- location and file name required by the respective
- component specification.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="webType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webType defines the web-uri and context-root of
- a web application module.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="web-uri"
- type="javaee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The web-uri element specifies the URI of a web
- application file, relative to the top level of the
- application package.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="context-root"
- type="javaee:string">
-
- <xsd:annotation>
- <xsd:documentation>
-
- The context-root element specifies the context root
- of a web application.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_6.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_6.xsd
deleted file mode 100644
index 26111c6acf..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/application_6.xsd
+++ /dev/null
@@ -1,394 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="6">
- <xsd:annotation>
- <xsd:documentation>
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
-
- The contents of this file are subject to the terms of either the
- GNU General Public License Version 2 only ("GPL") or the Common
- Development and Distribution License("CDDL") (collectively, the
- "License"). You may not use this file except in compliance with
- the License. You can obtain a copy of the License at
- https://glassfish.dev.java.net/public/CDDL+GPL.html or
- glassfish/bootstrap/legal/LICENSE.txt. See the License for the
- specific language governing permissions and limitations under the
- License.
-
- When distributing the software, include this License Header
- Notice in each file and include the License file at
- glassfish/bootstrap/legal/LICENSE.txt. Sun designates this
- particular file as subject to the "Classpath" exception as
- provided by Sun in the GPL Version 2 section of the License file
- that accompanied this code. If applicable, add the following
- below the License Header, with the fields enclosed by brackets []
- replaced by your own identifying information:
- "Portions Copyrighted [year] [name of copyright owner]"
-
- Contributor(s):
-
- If you wish your version of this file to be governed by only the
- CDDL or only the GPL Version 2, indicate your decision by adding
- "[Contributor] elects to include this software in this
- distribution under the [CDDL or GPL Version 2] license." If you
- don't indicate a single choice of license, a recipient has the
- option to distribute your version of this file under either the
- CDDL, the GPL Version 2 or to extend the choice of license to its
- licensees as provided above. However, if you add GPL Version 2
- code and therefore, elected the GPL Version 2 license, then the
- option applies only if the new code is made subject to such
- option by the copyright holder.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- This is the XML Schema for the application 6 deployment
- descriptor. The deployment descriptor must be named
- "META-INF/application.xml" in the application's ear file.
- All application deployment descriptors must indicate
- the application schema by using the Java EE namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and indicate the version of the schema by
- using the version element as shown below:
-
- <application xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/application_6.xsd"
- version="6">
- ...
- </application>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for Java EE
- namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/application_6.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all Java EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_6.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:element name="application"
- type="javaee:applicationType">
- <xsd:annotation>
- <xsd:documentation>
-
- The application element is the root element of a Java EE
- application deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:unique name="context-root-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The context-root element content must be unique
- in the ear.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:module/javaee:web"/>
- <xsd:field xpath="javaee:context-root"/>
- </xsd:unique>
- <xsd:unique name="security-role-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-role-name element content
- must be unique in the ear.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:security-role"/>
- <xsd:field xpath="javaee:role-name"/>
- </xsd:unique>
- </xsd:element>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="applicationType">
- <xsd:annotation>
- <xsd:documentation>
-
- The applicationType defines the structure of the
- application.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="application-name"
- type="javaee:string"
- minOccurs="0"/>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="initialize-in-order"
- type="javaee:generic-booleanType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- If initialize-in-order is true, modules must be initialized
- in the order they're listed in this deployment descriptor,
- with the exception of application client modules, which can
- be initialized in any order.
- If initialize-in-order is not set or set to false, the order
- of initialization is unspecified and may be product-dependent.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="module"
- type="javaee:moduleType"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The application deployment descriptor must have one
- module element for each Java EE module in the
- application package. A module element is defined
- by moduleType definition.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="security-role"
- type="javaee:security-roleType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="library-directory"
- type="javaee:pathType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The library-directory element specifies the pathname
- of a directory within the application package, relative
- to the top level of the application package. All files
- named "*.jar" in this directory must be made available
- in the class path of all components included in this
- application package. If this element isn't specified,
- the directory named "lib" is searched. An empty element
- may be used to disable searching.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="env-entry"
- type="javaee:env-entryType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref"
- type="javaee:ejb-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-local-ref"
- type="javaee:ejb-local-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:group ref="javaee:service-refGroup"/>
- <xsd:element name="resource-ref"
- type="javaee:resource-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref"
- type="javaee:resource-env-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref"
- type="javaee:message-destination-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="persistence-context-ref"
- type="javaee:persistence-context-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="persistence-unit-ref"
- type="javaee:persistence-unit-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="message-destination"
- type="javaee:message-destinationType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="data-source"
- type="javaee:data-sourceType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="version"
- type="javaee:dewey-versionType"
- fixed="6"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 6.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="moduleType">
- <xsd:annotation>
- <xsd:documentation>
-
- The moduleType defines a single Java EE module and contains a
- connector, ejb, java, or web element, which indicates the
- module type and contains a path to the module file, and an
- optional alt-dd element, which specifies an optional URI to
- the post-assembly version of the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:choice>
- <xsd:element name="connector"
- type="javaee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The connector element specifies the URI of a
- resource adapter archive file, relative to the
- top level of the application package.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ejb"
- type="javaee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb element specifies the URI of an ejb-jar,
- relative to the top level of the application
- package.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="java"
- type="javaee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The java element specifies the URI of a java
- application client module, relative to the top
- level of the application package.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="web"
- type="javaee:webType"/>
- </xsd:choice>
- <xsd:element name="alt-dd"
- type="javaee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The alt-dd element specifies an optional URI to the
- post-assembly version of the deployment descriptor
- file for a particular Java EE module. The URI must
- specify the full pathname of the deployment
- descriptor file relative to the application's root
- directory. If alt-dd is not specified, the deployer
- must read the deployment descriptor from the default
- location and file name required by the respective
- component specification.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="webType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webType defines the web-uri and context-root of
- a web application module.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="web-uri"
- type="javaee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The web-uri element specifies the URI of a web
- application file, relative to the top level of the
- application package.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="context-root"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The context-root element specifies the context root
- of a web application.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/beans_1_0.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/beans_1_0.xsd
deleted file mode 100644
index 16109adf91..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/beans_1_0.xsd
+++ /dev/null
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
- <!--
- JBoss, Home of Professional Open Source Copyright 2008, Red Hat
- Middleware LLC, and individual contributors by the @authors tag.
- See the copyright.txt in the distribution for a full listing of
- individual contributors. Licensed under the Apache License,
- Version 2.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License
- at http://www.apache.org/licenses/LICENSE-2.0 Unless required by
- applicable law or agreed to in writing, software distributed under
- the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
- OR CONDITIONS OF ANY KIND, either express or implied. See the
- License for the specific language governing permissions and
- limitations under the License.
- -->
-
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified" targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee" version="1.0">
-
- <xs:annotation>
- <xs:documentation>
- Contexts and Dependency Injection (CDI) defines
- a set of complementary services that help improve the structure
- of application code. beans.xml is used to enable CDI services
- for the current bean archive as well as to enable named
- interceptors, decorators and alternatives for the current bean
- archive.
- </xs:documentation>
- </xs:annotation>
-
- <xs:element name="beans">
- <xs:annotation>
- <xs:documentation>
- Bean classes of enabled beans must be
- deployed in bean archives. A library jar, EJB jar,
- application client jar or rar archive is a bean archive if
- it has a file named beans.xml in the META-INF directory. The
- WEB-INF/classes directory of a war is a bean archive if
- there is a file named beans.xml in the WEB-INF directory of
- the war. A directory in the JVM classpath is a bean archive
- if it has a file named beans.xml in the META-INF directory.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:all>
- <xs:element ref="javaee:interceptors" minOccurs="0" />
- <xs:element ref="javaee:decorators" minOccurs="0" />
- <xs:element ref="javaee:alternatives" minOccurs="0" />
- </xs:all>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="interceptors">
- <xs:annotation>
- <xs:documentation>
- By default, a bean archive has no enabled
- interceptors bound via interceptor bindings. An interceptor
- must be explicitly enabled by listing its class under the
- &lt;interceptors&gt; element of the beans.xml file of the
- bean archive. The order of the interceptor declarations
- determines the interceptor ordering. Interceptors which
- occur earlier in the list are called first. If the same
- class is listed twice under the &lt;interceptors&gt;
- element, the container automatically detects the problem and
- treats it as a deployment problem.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="class" type="xs:string">
- <xs:annotation>
- <xs:documentation>
- Each child &lt;class&gt; element
- must specify the name of an interceptor class. If
- there is no class with the specified name, or if
- the class with the specified name is not an
- interceptor class, the container automatically
- detects the problem and treats it as a deployment
- problem.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:choice>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="decorators">
- <xs:annotation>
- <xs:documentation>
- By default, a bean archive has no enabled
- decorators. A decorator must be explicitly enabled by
- listing its bean class under the &lt;decorators&gt; element
- of the beans.xml file of the bean archive. The order of the
- decorator declarations determines the decorator ordering.
- Decorators which occur earlier in the list are called first.
- If the same class is listed twice under the
- &lt;decorators&gt; element, the container automatically
- detects the problem and treats it as a deployment problem.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="class" type="xs:string">
- <xs:annotation>
- <xs:documentation>
- Each child &lt;class&gt; element
- must specify the name of a decorator class. If
- there is no class with the specified name, or if
- the class with the specified name is not a
- decorator class, the container automatically
- detects the problem and treats it as a deployment
- problem.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:choice>
- </xs:complexType>
- </xs:element>
-
- <xs:element name="alternatives">
- <xs:annotation>
- <xs:documentation>
- An alternative is a bean that must be
- explicitly declared in the beans.xml file if it should be
- available for lookup, injection or EL resolution. By
- default, a bean archive has no selected alternatives. An
- alternative must be explicitly declared using the
- &lt;alternatives&gt; element of the beans.xml file of the
- bean archive. The &lt;alternatives&gt; element contains a
- list of bean classes and stereotypes. An alternative is
- selected for the bean archive if either: the alternative is
- a managed bean or session bean and the bean class of the
- bean is listed, or the alternative is a producer method,
- field or resource, and the bean class that declares the
- method or field is listed, or any @Alternative stereotype of
- the alternative is listed.
- </xs:documentation>
- </xs:annotation>
- <xs:complexType>
- <xs:choice minOccurs="0" maxOccurs="unbounded">
- <xs:element name="class" type="xs:string">
- <xs:annotation>
- <xs:documentation>
- Each child &lt;class&gt; element
- must specify the name of an alternative bean class.
- If there is no class with the specified name, or if
- the class with the specified name is not an
- alternative bean class, the container automatically
- detects the problem and treats it as a deployment
- problem. If the same class is listed twice under
- the &lt;alternatives&gt; element, the container
- automatically detects the problem and treats it as
- a deployment problem.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
-
- <xs:element name="stereotype" type="xs:string">
- <xs:annotation>
- <xs:documentation>
- Each child &lt;stereotype&gt;
- element must specify the name of an @Alternative
- stereotype annotation. If there is no annotation
- with the specified name, or the annotation is not
- an @Alternative stereotype, the container
- automatically detects the problem and treats it as
- a deployment problem. If the same stereotype is
- listed twice under the &lt;alternatives&gt;
- element, the container automatically detects the
- problem and treats it as a deployment problem.
- </xs:documentation>
- </xs:annotation>
- </xs:element>
- </xs:choice>
- </xs:complexType>
- </xs:element>
-
-</xs:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/connector_1_0.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/connector_1_0.dtd
deleted file mode 100644
index 1ab3b55a0d..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/connector_1_0.dtd
+++ /dev/null
@@ -1,557 +0,0 @@
-<!--
-Copyright 2000-2001 Sun Microsystems, Inc. 901 San Antonio Road,
-Palo Alto, CA 94303, U.S.A. All rights reserved.
-
-This product or document is protected by copyright and distributed
-under licenses restricting its use, copying, distribution, and
-decompilation. No part of this product or documentation may be
-reproduced in any form by any means without prior written authorization
-of Sun and its licensors, if any.
-
-Third party software, including font technology, is copyrighted and
-licensed from Sun suppliers.
-
-Sun, Sun Microsystems, the Sun Logo, Solaris, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail and Enterprise JavaBeans,
-are trademarks or registered trademarks of Sun Microsystems, Inc in the U.S.
-and other countries.
-
-All SPARC trademarks are used under license and are trademarks
-or registered trademarks of SPARC International, Inc.
-in the U.S. and other countries. Products bearing SPARC
-trademarks are based upon an architecture developed by Sun Microsystems, Inc.
-
-PostScript is a registered trademark of Adobe Systems, Inc.
-
-Federal Acquisitions: Commercial Software - Government Users Subject to
-Standard License Terms and Conditions.
-
-DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED
-CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
-IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT
-TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY
-INVALID.
-
-_________________________________________________________________________
-
-Copyright 2000-2001 Sun Microsystems, Inc.,
-901 San Antonio Road, Palo Alto, CA 94303, Etats-Unis.
-Tous droits re'serve's.
-
-
-Ce produit ou document est prote'ge' par un copyright et distribue' avec
-des licences qui en restreignent l'utilisation, la copie, la distribution,
-et la de'compilation. Aucune partie de ce produit ou de sa documentation
-associe'e ne peut e^tre reproduite sous aucune forme, par quelque moyen
-que ce soit, sans l'autorisation pre'alable et e'crite de Sun et de ses
-bailleurs de licence, s'il y en a.
-
-Le logiciel de'tenu par des tiers, et qui comprend la technologie
-relative aux polices de caracte`res, est prote'ge' par un copyright
-et licencie' par des fournisseurs de Sun.
-
-Sun, Sun Microsystems, le logo Sun, Solaris, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail, et Enterprise JavaBeans,
-sont des marques de fabrique ou des marques de'pose'es de Sun
-Microsystems, Inc. aux Etats-Unis et dans d'autres pays.
-
-Toutes les marques SPARC sont utilise'es sous licence et sont
-des marques de fabrique ou des marques de'pose'es de SPARC
-International, Inc. aux Etats-Unis et dans
-d'autres pays. Les produits portant les marques SPARC sont
-base's sur une architecture de'veloppe'e par Sun Microsystems, Inc.
-
-Postcript est une marque enregistre'e d'Adobe Systems Inc.
-
-LA DOCUMENTATION EST FOURNIE "EN L'ETAT" ET TOUTES AUTRES CONDITIONS,
-DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES,
-DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT
-TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L'APTITUDE
-A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE CONTREFACON.
--->
-
-<!--
-This is the XML DTD for the Connector 1.0 deployment descriptor.
-All Connector 1.0 deployment descriptors must include a DOCTYPE
-of the following form:
-
- <!DOCTYPE connector PUBLIC
- "-//Sun Microsystems, Inc.//DTD Connector 1.0//EN"
- "http://java.sun.com/dtd/connector_1_0.dtd">
-
--->
-
-<!--
-The following conventions apply to all J2EE deployment descriptor
-elements unless indicated otherwise.
-
-- In elements that contain PCDATA, leading and trailing whitespace
- in the data may be ignored.
-
-- In elements whose value is an "enumerated type", the value is
- case sensitive.
-
-- In elements that specify a pathname to a file within the same
- JAR file, relative filenames (i.e., those not starting with "/")
- are considered relative to the root of the JAR file's namespace.
- Absolute filenames (i.e., those starting with "/") also specify
- names in the root of the JAR file's namespace. In general, relative
- names are preferred. The exception is .war files where absolute
- names are preferred for consistency with the servlet API.
--->
-
-
-<!--
-The connector element is the root element of the deployment descriptor
-for the resource adapter. This element includes general information - vendor
-name, version, specification version supported, icon - about the
-resource adapter module. It also includes information specific to the
-implementation of the resource adapter library as specified through
-the element resourceadapter.
--->
-<!ELEMENT connector (display-name?, description?, icon?, vendor-name,
-spec-version, eis-type, version, license?, resourceadapter)>
-
-<!--
-The element authentication-mechanism specifies an authentication mechanism
-supported by the resource adapter. Note that this support is for
-the resource adapter and not for the underlying EIS instance. The
-optional description specifies any resource adapter specific requirement
-for the support of security contract and authentication mechanism.
-
-Note that BasicPassword mechanism type should support the
-javax.resource.spi.security.PasswordCredential interface.
-The Kerbv5 mechanism type should support the
-javax.resource.spi.security.GenericCredential interface.
-
-Used in: resourceadapter
--->
-<!ELEMENT authentication-mechanism (
-description?, authentication-mechanism-type, credential-interface)>
-
-<!--
-The element authentication-mechanism-type specifies type of an authentication
-mechanism.
-
-The example values are:
- <authentication-mechanism-type>BasicPassword
- </authentication-mechanism-type>
- <authentication-mechanism-type>Kerbv5
- </authentication-mechanism-type>
-
-Any additional security mechanisms are outside the scope of the
-Connector architecture specification.
-
-Used in: authentication-mechanism
--->
-<!ELEMENT authentication-mechanism-type (#PCDATA)>
-
-<!--
-The element config-property contains a declaration of a single
-configuration property for a ManagedConnectionFactory instance.
-
-Each ManagedConnectionFactory instance creates connections to a
-specific EIS instance based on the properties configured on the
-ManagedConnectionFactory instance. The configurable properties are
-specified only once in the deployment descriptor, even though a
-resource adapter can be used to configure multiple ManagedConnnection-
-Factory instances (that create connections to different instances of
-the same EIS).
-
-The declaration consists of an optional description, name, type
-and an optional value of the configuration property. If the resource
-adapter provider does not specify a value than the deployer is
-responsible for providing a valid value for a configuration property.
-
-Any bounds or well-defined values of properties should be described
-in the description element.
-
-Used in: resourceadapter
--->
-<!ELEMENT config-property (description?, config-property-name,
-config-property-type, config-property-value?)>
-
-<!--
-The element config-property-name contains the name of a configuration
-property.
-
-The connector architecture defines a set of well-defined properties
-all of type java.lang.String. These are as follows:
- <config-property-name>ServerName</config-property-name>
- <config-property-name>PortNumber</config-property-name>
- <config-property-name>UserName</config-property-name>
- <config-property-name>Password</config-property-name>
- <config-property-name>ConnectionURL</config-property-name>
-
-A resource adapter provider can extend this property set to include
-properties specific to the resource adapter and its underlying EIS.
-
-Used in: config-property
-
-Example: <config-property-name>ServerName</config-property-name>
--->
-<!ELEMENT config-property-name (#PCDATA)>
-
-<!--
-The element config-property-type contains the fully qualified Java
-type of a configuration property as required by ManagedConnection-
-Factory instance.
-
-The following are the legal values of config-property-type:
- java.lang.Boolean, java.lang.String, java.lang.Integer,
- java.lang.Double, java.lang.Byte, java.lang.Short,
- java.lang.Long, java.lang.Float, java.lang.Character
-
-Used in: config-property
-
-Example: <config-property-type>java.lang.String</config-property-type>
--->
-<!ELEMENT config-property-type (#PCDATA)>
-
-<!--
-The element config-property-value contains the value of a configuration
-entry.
-
-Used in: config-property
-
-Example: <config-property-value>WombatServer</config-property-value>
--->
-<!ELEMENT config-property-value (#PCDATA)>
-
-<!--
-The element connection-impl-class specifies the fully-qualified
-name of the Connection class that implements resource adapter
-specific Connection interface.
-
-Used in: resourceadapter
-
-Example: <connection-impl-class>com.wombat.ConnectionImpl
- </connection-impl-class>
--->
-<!ELEMENT connection-impl-class (#PCDATA)>
-
-<!--
-The element connection-interface specifies the fully-qualified
-name of the Connection interface supported by the resource
-adapter.
-
-Used in: resourceadapter
-
-Example: <connection-interface>javax.resource.cci.Connection
- </connection-interface>
--->
-<!ELEMENT connection-interface (#PCDATA)>
-
-<!--
-The element connectionfactory-impl-class specifies the fully-qualified
-name of the ConnectionFactory class that implements resource adapter
-specific ConnectionFactory interface.
-
-Used in: resourceadapter
-
-Example: <connectionfactory-impl-class>com.wombat.ConnectionFactoryImpl
- </connectionfactory-impl-class>
--->
-<!ELEMENT connectionfactory-impl-class (#PCDATA)>
-
-<!--
-The element connectionfactory-interface specifies the fully-qualified
-name of the ConnectionFactory interface supported by the resource
-adapter.
-
-Used in: resourceadapter
-
-Example: <connectionfactory-interface>com.wombat.ConnectionFactory
- </connectionfactory-interface>
-OR
-<connectionfactory-interface>javax.resource.cci.ConnectionFactory
- </connectionfactory-interface>
--->
-<!ELEMENT connectionfactory-interface (#PCDATA)>
-
-<!--
-The element credential-interface specifies the interface that the
-resource adapter implementation supports for the representation
-of the credentials. This element should be used by application server
-to find out the Credential interface it should use as part of the
-security contract.
-
-The possible values are:
- <credential-interface>javax.resource.spi.security.PasswordCredential
- </credential-interface>
- <credential-interface>javax.resource.spi.security.GenericCredential
- </credential-interface>
-
-Used in: authentication-mechanism
--->
-<!ELEMENT credential-interface (#PCDATA)>
-
-<!--
-The description element is used to provide text describing the parent
-element. The description element should include any information that
-the resource adapter rar file producer wants to provide to the consumer of
-the resource adapter rar file (i.e., to the Deployer). Typically, the tools
-used by the resource adapter rar file consumer will display the description
-when processing the parent element that contains the description.
-
-Used in: authentication-mechanism, config-property, connector, license,
-security-permission
--->
-<!ELEMENT description (#PCDATA)>
-
-<!--
-The display-name element contains a short name that is intended to be
-displayed by tools. The display name need not be unique.
-
-Used in: connector
-
-Example:
-
-<display-name>Employee Self Service</display-name>
--->
-<!ELEMENT display-name (#PCDATA)>
-
-<!--
-The element eis-type contains information about the type of the
-EIS. For example, the type of an EIS can be product name of EIS
-independent of any version info.
-
-This helps in identifying EIS instances that can be used with
-this resource adapter.
-
-Used in: connector
--->
-<!ELEMENT eis-type (#PCDATA)>
-
-<!--
-The icon element contains small-icon and large-icon elements that
-specify the file names for small and a large GIF or JPEG icon images
-used to represent the parent element in a GUI tool.
-
-Used in: connector
--->
-<!ELEMENT icon (small-icon?, large-icon?)>
-
-<!--
-The large-icon element contains the name of a file
-containing a large (32 x 32) icon image. The file
-name is a relative path within the resource adapter's
-rar file.
-
-The image may be either in the JPEG or GIF format.
-The icon can be used by tools.
-
-Used in: icon
-
-Example:
-
-<large-icon>employee-service-icon32x32.jpg</large-icon>
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
-The element license specifies licensing requirements for the resource
-adapter module. This element specifies whether a license is required
-to deploy and use this resource adapter, and an optional description
-of the licensing terms (examples: duration of license, number of
-connection restrictions).
-
-Used in: connector
--->
-<!ELEMENT license (description?, license-required)>
-
-<!--
-The element license-required specifies whether a license is required
-to deploy and use the resource adapter. This element must be one of
-the following:
-
- <license-required>true</license-required>
- <license-required>false</license-required>
-
-Used in: license
--->
-<!ELEMENT license-required (#PCDATA)>
-
-<!--
-The element managedconnectionfactory-class specifies the fully qualified
-name of the Java class that implements the javax.resource.spi.Managed-
-ConnectionFactory interface. This Java class is provided as part of
-resource adapter's implementation of connector architecture specified
-contracts.
-
-Used in: resourceadapter
-
-Example:
- <managedconnectionfactory-class>com.wombat.ManagedConnectionFactoryImpl
- </managedconnectionfactory-class>
--->
-<!ELEMENT managedconnectionfactory-class (#PCDATA)>
-
-<!--
-The element reauthentication-support specifies whether the resource
-adapter implementation supports re-authentication of existing Managed-
-Connection instance. Note that this information is for the resource
-adapter implementation and not for the underlying EIS instance.
-
-This element must be one of the following:
- <reauthentication-support>true</reauthentication-support>
- <reauthentication-support>false</reauthentication-support>
-Used in: resourceadapter
--->
-<!ELEMENT reauthentication-support (#PCDATA)>
-
-<!--
-The element resourceadapter specifies information about the resource
-adapter. The information includes fully-qualified names of
-class/interfaces required as part of the connector architecture
-specified contracts, level of transaction support provided,
-configurable properties for ManagedConnectionFactory instances,
-one or more authentication mechanisms supported and additional
-required security permissions.
-
-If there is no authentication-mechanism specified as part of
-resource adapter element then the resource adapter does not
-support any standard security authentication mechanisms as part
-of security contract. The application server ignores the security
-part of the system contracts in this case.
-
-Used in: connector
--->
-<!ELEMENT resourceadapter (
-managedconnectionfactory-class, connectionfactory-interface,
-connectionfactory-impl-class, connection-interface,
-connection-impl-class, transaction-support, config-property*,
-authentication-mechanism*, reauthentication-support, security-permission*
-)>
-
-<!--
-The element security permission specifies a security permission that
-is required by the resource adapter code.
-
-The security permission listed in the deployment descriptor are ones
-that are different from those required by the default permission set
-as specified in the connector specification. The optional description
-can mention specific reason that resource adapter requires a given
-security permission.
-
-Used in: resourceadapter
--->
-<!ELEMENT security-permission (description?, security-permission-spec)>
-
-<!--
-The element permission-spec specifies a security permission based
-on the Security policy file syntax. Refer to the following URL for
-Sun's implementation of the security permission specification:
-
-http:
-
-Used in: security-permission
--->
-<!ELEMENT security-permission-spec (#PCDATA)>
-
-<!--
-The small-icon element contains the name of a file
-containing a small (16 x 16) icon image. The file
-name is a relative path within the resource adapter's
-rar file.
-
-The image may be either in the JPEG or GIF format.
-The icon can be used by tools.
-
-Used in: icon
-
-Example:
-
-<small-icon>employee-service-icon16x16.jpg</small-icon>
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
-The element spec-version specifies the version of the connector
-architecture specification that is supported by this resource
-adapter. This information enables deployer to configure the resource
-adapter to support deployment and runtime requirements of the
-corresponding connector architecture specification.
-
-Used in: connector
-
-Example:
- <spec-version>1.0</spec-version>
--->
-<!ELEMENT spec-version (#PCDATA)>
-
-<!--
-The transaction-support element specifies the level of transaction
-support provided by the resource adapter.
-The value of transaction-support must be one of the following:
- <transaction-support>NoTransaction</transaction-support>
- <transaction-support>LocalTransaction</transaction-support>
- <transaction-support>XATransaction</transaction-support>
-
-Used in: resourceadapter
--->
-<!ELEMENT transaction-support (#PCDATA)>
-
-<!--
-The element vendor-name specifies the name of resource adapter provider
-vendor.
-
-Used in: connector
-
-Example:
- <vendor-name>Wombat Corp.</vendor-name>
--->
-<!ELEMENT vendor-name (#PCDATA)>
-
-<!--
-The element version specifies a string-based version of the
-resource adapter from the resource adapter provider.
-
-Used in: connector
-
-Example:
- <version>1.0</version>
--->
-<!ELEMENT version (#PCDATA)>
-
-<!--
-The ID mechanism is to allow tools that produce additional deployment
-information (i.e., information beyond the standard deployment
-descriptor information) to store the non-standard information in a
-separate file, and easily refer from these tool-specific files to the
-information in the standard deployment descriptor.
-
-Tools are not allowed to add the non-standard information into the
-standard deployment descriptor.
--->
-
-<!ATTLIST authentication-mechanism id ID #IMPLIED>
-<!ATTLIST authentication-mechanism-type id ID #IMPLIED>
-<!ATTLIST config-property id ID #IMPLIED>
-<!ATTLIST config-property-name id ID #IMPLIED>
-<!ATTLIST config-property-type id ID #IMPLIED>
-<!ATTLIST config-property-value id ID #IMPLIED>
-<!ATTLIST connection-impl-class id ID #IMPLIED>
-<!ATTLIST connection-interface id ID #IMPLIED>
-<!ATTLIST connectionfactory-impl-class id ID #IMPLIED>
-<!ATTLIST connectionfactory-interface id ID #IMPLIED>
-<!ATTLIST connector id ID #IMPLIED>
-<!ATTLIST credential-interface id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST eis-type id ID #IMPLIED>
-<!ATTLIST icon id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST license id ID #IMPLIED>
-<!ATTLIST license-required id ID #IMPLIED>
-<!ATTLIST managedconnectionfactory-class id ID #IMPLIED>
-<!ATTLIST reauthentication-support id ID #IMPLIED>
-<!ATTLIST resourceadapter id ID #IMPLIED>
-<!ATTLIST security-permission id ID #IMPLIED>
-<!ATTLIST security-permission-spec id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST spec-version id ID #IMPLIED>
-<!ATTLIST transaction-support id ID #IMPLIED>
-<!ATTLIST vendor-name id ID #IMPLIED>
-<!ATTLIST version id ID #IMPLIED>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/connector_1_5.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/connector_1_5.xsd
deleted file mode 100644
index 26d19129c4..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/connector_1_5.xsd
+++ /dev/null
@@ -1,1036 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/j2ee"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.5">
- <xsd:annotation>
- <xsd:documentation>
- @(#)connector_1_5.xsds 1.27 06/17/03
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
- Road, Palo Alto, California 94303, U.S.A. All rights
- reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- This is the XML Schema for the Connector 1.5 deployment
- descriptor. The deployment descriptor must be named
- "META-INF/ra.xml" in the connector's rar file. All Connector
- deployment descriptors must indicate the connector resource
- adapter schema by using the J2EE namespace:
-
- http://java.sun.com/xml/ns/j2ee
-
- and by indicating the version of the schema by
- using the version element as shown below:
-
- <connector xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd"
- version="1.5">
- ...
- </connector>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for J2EE
- namespace with the following location:
-
- http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all J2EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="j2ee_1_4.xsd"/>
-
-
-<!-- **************************************************** -->
-
-
- <xsd:element name="connector" type="j2ee:connectorType">
- <xsd:annotation>
- <xsd:documentation>
-
- The connector element is the root element of the deployment
- descriptor for the resource adapter. This element includes
- general information - vendor name, resource adapter version,
- icon - about the resource adapter module. It also includes
- information specific to the implementation of the resource
- adapter library as specified through the element
- resourceadapter.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="activationspecType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activationspecType specifies an activation
- specification. The information includes fully qualified
- Java class name of an activation specification and a set of
- required configuration property names.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="activationspec-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The element activationspec-class specifies the fully
- qualified Java class name of the activation
- specification class. This class must implement the
- javax.resource.spi.ActivationSpec interface. The
- implementation of this class is required to be a
- JavaBean.
-
- Example:
- <activationspec-class>com.wombat.ActivationSpecImpl
- </activationspec-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="required-config-property"
- type="j2ee:required-config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="adminobjectType">
- <xsd:annotation>
- <xsd:documentation>
-
- The adminobjectType specifies information about an
- administered object. Administered objects are specific to a
- messaging style or message provider. This contains
- information on the Java type of the interface implemented by
- an administered object, its Java class name and its
- configuration properties.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="adminobject-interface"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The element adminobject-interface specifies the
- fully qualified name of the Java type of the
- interface implemented by an administered object.
-
- Example:
- <adminobject-interface>javax.jms.Destination
- </adminobject-interface>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="adminobject-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The element adminobject-class specifies the fully
- qualified Java class name of an administered object.
-
- Example:
- <adminobject-class>com.wombat.DestinationImpl
- </adminobject-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="config-property"
- type="j2ee:config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="authentication-mechanismType">
- <xsd:annotation>
- <xsd:documentation>
-
- The authentication-mechanismType specifies an authentication
- mechanism supported by the resource adapter. Note that this
- support is for the resource adapter and not for the
- underlying EIS instance. The optional description specifies
- any resource adapter specific requirement for the support of
- security contract and authentication mechanism.
-
- Note that BasicPassword mechanism type should support the
- javax.resource.spi.security.PasswordCredential interface.
- The Kerbv5 mechanism type should support the
- org.ietf.jgss.GSSCredential interface or the deprecated
- javax.resource.spi.security.GenericCredential interface.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="authentication-mechanism-type"
- type="j2ee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The element authentication-mechanism-type specifies
- type of an authentication mechanism.
-
- The example values are:
-
- <authentication-mechanism-type>BasicPassword
- </authentication-mechanism-type>
-
- <authentication-mechanism-type>Kerbv5
- </authentication-mechanism-type>
-
- Any additional security mechanisms are outside the
- scope of the Connector architecture specification.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="credential-interface"
- type="j2ee:credential-interfaceType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="config-property-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The config-property-nameType contains the name of a
- configuration property.
-
- The connector architecture defines a set of well-defined
- properties all of type java.lang.String. These are as
- follows.
-
- ServerName
- PortNumber
- UserName
- Password
- ConnectionURL
-
- A resource adapter provider can extend this property set to
- include properties specific to the resource adapter and its
- underlying EIS.
-
- Possible values include
- ServerName
- PortNumber
- UserName
- Password
- ConnectionURL
-
- Example: <config-property-name>ServerName</config-property-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:xsdStringType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="config-property-typeType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The config-property-typeType contains the fully
- qualified Java type of a configuration property.
-
- The following are the legal values:
- java.lang.Boolean, java.lang.String, java.lang.Integer,
- java.lang.Double, java.lang.Byte, java.lang.Short,
- java.lang.Long, java.lang.Float, java.lang.Character
-
- Used in: config-property
-
- Example:
- <config-property-type>java.lang.String</config-property-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="java.lang.Boolean"/>
- <xsd:enumeration value="java.lang.String"/>
- <xsd:enumeration value="java.lang.Integer"/>
- <xsd:enumeration value="java.lang.Double"/>
- <xsd:enumeration value="java.lang.Byte"/>
- <xsd:enumeration value="java.lang.Short"/>
- <xsd:enumeration value="java.lang.Long"/>
- <xsd:enumeration value="java.lang.Float"/>
- <xsd:enumeration value="java.lang.Character"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="config-propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The config-propertyType contains a declaration of a single
- configuration property that may be used for providing
- configuration information.
-
- The declaration consists of an optional description, name,
- type and an optional value of the configuration property. If
- the resource adapter provider does not specify a value than
- the deployer is responsible for providing a valid value for
- a configuration property.
-
- Any bounds or well-defined values of properties should be
- described in the description element.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="config-property-name"
- type="j2ee:config-property-nameType"/>
- <xsd:element name="config-property-type"
- type="j2ee:config-property-typeType"/>
- <xsd:element name="config-property-value"
- type="j2ee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The element config-property-value contains the value
- of a configuration entry. Note, it is possible for a
- resource adapter deployer to override this
- configuration information during deployment.
-
- Example:
- <config-property-value>WombatServer</config-property-value>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="connection-definitionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The connection-definitionType defines a set of connection
- interfaces and classes pertaining to a particular connection
- type. This also includes configurable properties for
- ManagedConnectionFactory instances that may be produced out
- of this set.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="managedconnectionfactory-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The element managedconnectionfactory-class specifies
- the fully qualified name of the Java class that
- implements the
- javax.resource.spi.ManagedConnectionFactory interface.
- This Java class is provided as part of resource
- adapter's implementation of connector architecture
- specified contracts. The implementation of this
- class is required to be a JavaBean.
-
- Example:
- <managedconnectionfactory-class>
- com.wombat.ManagedConnectionFactoryImpl
- </managedconnectionfactory-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="config-property"
- type="j2ee:config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="connectionfactory-interface"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The element connectionfactory-interface specifies
- the fully qualified name of the ConnectionFactory
- interface supported by the resource adapter.
-
- Example:
- <connectionfactory-interface>com.wombat.ConnectionFactory
- </connectionfactory-interface>
-
- OR
-
- <connectionfactory-interface>javax.resource.cci.ConnectionFactory
- </connectionfactory-interface>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="connectionfactory-impl-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The element connectionfactory-impl-class specifies
- the fully qualified name of the ConnectionFactory
- class that implements resource adapter
- specific ConnectionFactory interface.
-
- Example:
-
- <connectionfactory-impl-class>com.wombat.ConnectionFactoryImpl
- </connectionfactory-impl-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="connection-interface"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The connection-interface element specifies the fully
- qualified name of the Connection interface supported
- by the resource adapter.
-
- Example:
-
- <connection-interface>javax.resource.cci.Connection
- </connection-interface>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="connection-impl-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The connection-impl-classType specifies the fully
- qualified name of the Connection class that
- implements resource adapter specific Connection
- interface. It is used by the connection-impl-class
- elements.
-
- Example:
-
- <connection-impl-class>com.wombat.ConnectionImpl
- </connection-impl-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="connectorType">
- <xsd:annotation>
- <xsd:documentation>
-
- The connectorType defines a resource adapter.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="vendor-name"
- type="j2ee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The element vendor-name specifies the name of
- resource adapter provider vendor.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="eis-type"
- type="j2ee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The element eis-type contains information about the
- type of the EIS. For example, the type of an EIS can
- be product name of EIS independent of any version
- info.
-
- This helps in identifying EIS instances that can be
- used with this resource adapter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="resourceadapter-version"
- type="j2ee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The element resourceadapter-version specifies a string-based version
- of the resource adapter from the resource adapter
- provider.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="license"
- type="j2ee:licenseType"
- minOccurs="0"/>
- <xsd:element name="resourceadapter"
- type="j2ee:resourceadapterType"/>
-
- </xsd:sequence>
- <xsd:attribute name="version"
- type="j2ee:dewey-versionType"
- fixed="1.5"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The version specifies the version of the
- connector architecture specification that is
- supported by this resource adapter. This information
- enables deployer to configure the resource adapter to
- support deployment and runtime requirements of the
- corresponding connector architecture specification.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="credential-interfaceType">
- <xsd:annotation>
- <xsd:documentation>
-
- The credential-interfaceType specifies the
- interface that the resource adapter implementation
- supports for the representation of the
- credentials. This element(s) that use this type,
- i.e. credential-interface, should be used by
- application server to find out the Credential
- interface it should use as part of the security
- contract.
-
- The possible values are:
-
- javax.resource.spi.security.PasswordCredential
- org.ietf.jgss.GSSCredential
- javax.resource.spi.security.GenericCredential
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:fully-qualified-classType">
- <xsd:enumeration
- value="javax.resource.spi.security.PasswordCredential"/>
- <xsd:enumeration
- value="org.ietf.jgss.GSSCredential"/>
- <xsd:enumeration
- value="javax.resource.spi.security.GenericCredential"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="inbound-resourceadapterType">
- <xsd:annotation>
- <xsd:documentation>
-
- The inbound-resourceadapterType specifies information
- about an inbound resource adapter. This contains information
- specific to the implementation of the resource adapter
- library as specified through the messageadapter element.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="messageadapter"
- type="j2ee:messageadapterType"
- minOccurs="0">
- <xsd:unique name="messagelistener-type-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The messagelistener-type element content must be
- unique in the messageadapter. Several messagelisteners
- can not use the same messagelistener-type.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:messagelistener"/>
- <xsd:field xpath="j2ee:messagelistener-type"/>
- </xsd:unique>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="licenseType">
- <xsd:annotation>
- <xsd:documentation>
-
- The licenseType specifies licensing requirements for the
- resource adapter module. This type specifies whether a
- license is required to deploy and use this resource adapter,
- and an optional description of the licensing terms
- (examples: duration of license, number of connection
- restrictions). It is used by the license element.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="license-required"
- type="j2ee:true-falseType">
- <xsd:annotation>
- <xsd:documentation>
-
- The element license-required specifies whether a
- license is required to deploy and use the
- resource adapter. This element must be one of
- the following, "true" or "false".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="messageadapterType">
- <xsd:annotation>
- <xsd:documentation>
-
- The messageadapterType specifies information about the
- messaging capabilities of the resource adapter. This
- contains information specific to the implementation of the
- resource adapter library as specified through the
- messagelistener element.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="messagelistener"
- type="j2ee:messagelistenerType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="messagelistenerType">
- <xsd:annotation>
- <xsd:documentation>
-
- The messagelistenerType specifies information about a
- specific message listener supported by the messaging
- resource adapter. It contains information on the Java type
- of the message listener interface and an activation
- specification.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="messagelistener-type"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The element messagelistener-type specifies the fully
- qualified name of the Java type of a message
- listener interface.
-
- Example:
-
- <messagelistener-type>javax.jms.MessageListener
- </messagelistener-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="activationspec"
- type="j2ee:activationspecType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="outbound-resourceadapterType">
- <xsd:annotation>
- <xsd:documentation>
-
- The outbound-resourceadapterType specifies information about
- an outbound resource adapter. The information includes fully
- qualified names of classes/interfaces required as part of
- the connector architecture specified contracts for
- connection management, level of transaction support
- provided, one or more authentication mechanisms supported
- and additional required security permissions.
-
- If there is no authentication-mechanism specified as part of
- resource adapter element then the resource adapter does not
- support any standard security authentication mechanisms as
- part of security contract. The application server ignores
- the security part of the system contracts in this case.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="connection-definition"
- type="j2ee:connection-definitionType"
- maxOccurs="unbounded"/>
- <xsd:element name="transaction-support"
- type="j2ee:transaction-supportType"/>
- <xsd:element name="authentication-mechanism"
- type="j2ee:authentication-mechanismType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="reauthentication-support"
- type="j2ee:true-falseType">
- <xsd:annotation>
- <xsd:documentation>
-
- The element reauthentication-support specifies
- whether the resource adapter implementation supports
- re-authentication of existing Managed- Connection
- instance. Note that this information is for the
- resource adapter implementation and not for the
- underlying EIS instance. This element must have
- either a "true" or "false" value.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="required-config-propertyType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The required-config-propertyType contains a declaration
- of a single configuration property used for specifying a
- required configuration property name. It is used
- by required-config-property elements.
-
- Example:
-
- <required-config-property>Destination</required-config-property>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="config-property-name"
- type="j2ee:config-property-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="resourceadapterType">
- <xsd:annotation>
- <xsd:documentation>
-
- The resourceadapterType specifies information about the
- resource adapter. The information includes fully qualified
- resource adapter Java class name, configuration properties,
- information specific to the implementation of the resource
- adapter library as specified through the
- outbound-resourceadapter and inbound-resourceadapter
- elements, and an optional set of administered objects.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="resourceadapter-class"
- type="j2ee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The element resourceadapter-class specifies the
- fully qualified name of a Java class that implements
- the javax.resource.spi.ResourceAdapter
- interface. This Java class is provided as part of
- resource adapter's implementation of connector
- architecture specified contracts. The implementation
- of this class is required to be a JavaBean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:element>
- <xsd:element name="config-property"
- type="j2ee:config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="outbound-resourceadapter"
- type="j2ee:outbound-resourceadapterType"
- minOccurs="0">
- <xsd:unique name="connectionfactory-interface-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The connectionfactory-interface element content
- must be unique in the outbound-resourceadapter.
- Multiple connection-definitions can not use the
- same connectionfactory-type.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:connection-definition"/>
- <xsd:field xpath="j2ee:connectionfactory-interface"/>
- </xsd:unique>
- </xsd:element>
- <xsd:element name="inbound-resourceadapter"
- type="j2ee:inbound-resourceadapterType"
- minOccurs="0"/>
- <xsd:element name="adminobject"
- type="j2ee:adminobjectType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="security-permission"
- type="j2ee:security-permissionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-permissionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-permissionType specifies a security
- permission that is required by the resource adapter code.
-
- The security permission listed in the deployment descriptor
- are ones that are different from those required by the
- default permission set as specified in the connector
- specification. The optional description can mention specific
- reason that resource adapter requires a given security
- permission.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="security-permission-spec"
- type="j2ee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The element security-permission-spec specifies a security
- permission based on the Security policy file
- syntax. Refer to the following URL for Sun's
- implementation of the security permission
- specification:
-
- http://java.sun.com/products/jdk/1.4/docs/guide/security/PolicyFiles.html#FileSyntax
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="transaction-supportType">
- <xsd:annotation>
- <xsd:documentation>
-
- The transaction-supportType specifies the level of
- transaction support provided by the resource adapter. It is
- used by transaction-support elements.
-
- The value must be one of the following:
-
- NoTransaction
- LocalTransaction
- XATransaction
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="NoTransaction"/>
- <xsd:enumeration value="LocalTransaction"/>
- <xsd:enumeration value="XATransaction"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/connector_1_6.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/connector_1_6.xsd
deleted file mode 100644
index 45d875c486..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/connector_1_6.xsd
+++ /dev/null
@@ -1,1261 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.6">
- <xsd:annotation>
- <xsd:documentation>
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
-
- The contents of this file are subject to the terms of either the
- GNU General Public License Version 2 only ("GPL") or the Common
- Development and Distribution License("CDDL") (collectively, the
- "License"). You may not use this file except in compliance with
- the License. You can obtain a copy of the License at
- https://glassfish.dev.java.net/public/CDDL+GPL.html or
- glassfish/bootstrap/legal/LICENSE.txt. See the License for the
- specific language governing permissions and limitations under the
- License.
-
- When distributing the software, include this License Header
- Notice in each file and include the License file at
- glassfish/bootstrap/legal/LICENSE.txt. Sun designates this
- particular file as subject to the "Classpath" exception as
- provided by Sun in the GPL Version 2 section of the License file
- that accompanied this code. If applicable, add the following
- below the License Header, with the fields enclosed by brackets []
- replaced by your own identifying information:
- "Portions Copyrighted [year] [name of copyright owner]"
-
- Contributor(s):
-
- If you wish your version of this file to be governed by only the
- CDDL or only the GPL Version 2, indicate your decision by adding
- "[Contributor] elects to include this software in this
- distribution under the [CDDL or GPL Version 2] license." If you
- don't indicate a single choice of license, a recipient has the
- option to distribute your version of this file under either the
- CDDL, the GPL Version 2 or to extend the choice of license to its
- licensees as provided above. However, if you add GPL Version 2
- code and therefore, elected the GPL Version 2 license, then the
- option applies only if the new code is made subject to such
- option by the copyright holder.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
-
- The contents of this file are subject to the terms of either the
- GNU General Public License Version 2 only ("GPL") or the Common
- Development and Distribution License("CDDL") (collectively, the
- "License"). You may not use this file except in compliance with
- the License. You can obtain a copy of the License at
- https://glassfish.dev.java.net/public/CDDL+GPL.html or
- glassfish/bootstrap/legal/LICENSE.txt. See the License for the
- specific language governing permissions and limitations under the
- License.
-
- When distributing the software, include this License Header
- Notice in each file and include the License file at
- glassfish/bootstrap/legal/LICENSE.txt. Sun designates this
- particular file as subject to the "Classpath" exception as
- provided by Sun in the GPL Version 2 section of the License file
- that accompanied this code. If applicable, add the following
- below the License Header, with the fields enclosed by brackets []
- replaced by your own identifying information:
- "Portions Copyrighted [year] [name of copyright owner]"
-
- Contributor(s):
-
- If you wish your version of this file to be governed by only the
- CDDL or only the GPL Version 2, indicate your decision by adding
- "[Contributor] elects to include this software in this
- distribution under the [CDDL or GPL Version 2] license." If you
- don't indicate a single choice of license, a recipient has the
- option to distribute your version of this file under either the
- CDDL, the GPL Version 2 or to extend the choice of license to its
- licensees as provided above. However, if you add GPL Version 2
- code and therefore, elected the GPL Version 2 license, then the
- option applies only if the new code is made subject to such
- option by the copyright holder.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- This is the XML Schema for the Connector 1.6 deployment
- descriptor. The deployment descriptor must be named
- "META-INF/ra.xml" in the connector's rar file. All Connector
- deployment descriptors must indicate the connector resource
- adapter schema by using the Java EE namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and by indicating the version of the schema by
- using the version element as shown below:
-
- <connector xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/connector_1_6.xsd"
- version="1.6">
- ...
- </connector>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for Java EE
- namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/connector_1_6.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all Java EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_6.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:element name="connector"
- type="javaee:connectorType">
- <xsd:annotation>
- <xsd:documentation>
-
- The connector element is the root element of the deployment
- descriptor for the resource adapter. This element includes
- general information - vendor name, resource adapter version,
- icon - about the resource adapter module. It also includes
- information specific to the implementation of the resource
- adapter library as specified through the element
- resourceadapter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="activationspecType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activationspecType specifies an activation
- specification. The information includes fully qualified
- Java class name of an activation specification and a set of
- required configuration property names.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="activationspec-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The element activationspec-class specifies the fully
- qualified Java class name of the activation
- specification class. This class must implement the
- javax.resource.spi.ActivationSpec interface. The
- implementation of this class is required to be a
- JavaBean.
-
- Example:
- <activationspec-class>com.wombat.ActivationSpecImpl
- </activationspec-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="required-config-property"
- type="javaee:required-config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The required-config-property element is deprecated since
- Connectors 1.6 specification. The resource adapter
- implementation is recommended to use the @NotNull
- Bean Validation annotation or its XML validation
- descriptor equivalent to indicate that a configuration
- property is required to be specified by the deployer.
- See the Connectors specification for more information.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="config-property"
- type="javaee:config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="adminobjectType">
- <xsd:annotation>
- <xsd:documentation>
-
- The adminobjectType specifies information about an
- administered object. Administered objects are specific to a
- messaging style or message provider. This contains
- information on the Java type of the interface implemented by
- an administered object, its Java class name and its
- configuration properties.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="adminobject-interface"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The element adminobject-interface specifies the
- fully qualified name of the Java type of the
- interface implemented by an administered object.
-
- Example:
- <adminobject-interface>javax.jms.Destination
- </adminobject-interface>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="adminobject-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The element adminobject-class specifies the fully
- qualified Java class name of an administered object.
-
- Example:
- <adminobject-class>com.wombat.DestinationImpl
- </adminobject-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="config-property"
- type="javaee:config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="authentication-mechanismType">
- <xsd:annotation>
- <xsd:documentation>
-
- The authentication-mechanismType specifies an authentication
- mechanism supported by the resource adapter. Note that this
- support is for the resource adapter and not for the
- underlying EIS instance. The optional description specifies
- any resource adapter specific requirement for the support of
- security contract and authentication mechanism.
-
- Note that BasicPassword mechanism type should support the
- javax.resource.spi.security.PasswordCredential interface.
- The Kerbv5 mechanism type should support the
- org.ietf.jgss.GSSCredential interface or the deprecated
- javax.resource.spi.security.GenericCredential interface.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="authentication-mechanism-type"
- type="javaee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The element authentication-mechanism-type specifies
- type of an authentication mechanism.
-
- The example values are:
-
- <authentication-mechanism-type>BasicPassword
- </authentication-mechanism-type>
-
- <authentication-mechanism-type>Kerbv5
- </authentication-mechanism-type>
-
- Any additional security mechanisms are outside the
- scope of the Connector architecture specification.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="credential-interface"
- type="javaee:credential-interfaceType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="config-property-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The config-property-nameType contains the name of a
- configuration property.
-
- The connector architecture defines a set of well-defined
- properties all of type java.lang.String. These are as
- follows.
-
- ServerName
- PortNumber
- UserName
- Password
- ConnectionURL
-
- A resource adapter provider can extend this property set to
- include properties specific to the resource adapter and its
- underlying EIS.
-
- Possible values include
- ServerName
- PortNumber
- UserName
- Password
- ConnectionURL
-
- Example: <config-property-name>ServerName</config-property-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:xsdStringType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="config-property-typeType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The config-property-typeType contains the fully
- qualified Java type of a configuration property.
-
- The following are the legal values:
- java.lang.Boolean, java.lang.String, java.lang.Integer,
- java.lang.Double, java.lang.Byte, java.lang.Short,
- java.lang.Long, java.lang.Float, java.lang.Character
-
- Used in: config-property
-
- Example:
- <config-property-type>java.lang.String</config-property-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="java.lang.Boolean"/>
- <xsd:enumeration value="java.lang.String"/>
- <xsd:enumeration value="java.lang.Integer"/>
- <xsd:enumeration value="java.lang.Double"/>
- <xsd:enumeration value="java.lang.Byte"/>
- <xsd:enumeration value="java.lang.Short"/>
- <xsd:enumeration value="java.lang.Long"/>
- <xsd:enumeration value="java.lang.Float"/>
- <xsd:enumeration value="java.lang.Character"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="config-propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The config-propertyType contains a declaration of a single
- configuration property that may be used for providing
- configuration information.
-
- The declaration consists of an optional description, name,
- type and an optional value of the configuration property. If
- the resource adapter provider does not specify a value than
- the deployer is responsible for providing a valid value for
- a configuration property.
-
- Any bounds or well-defined values of properties should be
- described in the description element.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="config-property-name"
- type="javaee:config-property-nameType"/>
- <xsd:element name="config-property-type"
- type="javaee:config-property-typeType"/>
- <xsd:element name="config-property-value"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The element config-property-value contains the value
- of a configuration entry. Note, it is possible for a
- resource adapter deployer to override this
- configuration information during deployment.
-
- Example:
- <config-property-value>WombatServer</config-property-value>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="config-property-ignore"
- type="javaee:true-falseType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The element config-property-ignore is used to specify
- whether the configuration tools must ignore considering the
- configuration property during auto-discovery of
- Configuration properties. See the Connector specification for
- more details. If unspecified, the container must not ignore
- the configuration property during auto-discovery.
- This element must be one of the following, "true" or "false".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="config-property-supports-dynamic-updates"
- type="javaee:true-falseType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The element config-property-supports-dynamic-updates is used to specify
- whether the configuration property allows its value to be updated, by
- application server's configuration tools, during the lifetime of
- the JavaBean instance. See the Connector specification for
- more details. If unspecified, the container must not dynamically
- reconfigure the property.
- This element must be one of the following, "true" or "false".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="config-property-confidential"
- type="javaee:true-falseType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The element config-property-confidential is used to specify
- whether the configuration property is confidential and
- recommends application server's configuration tools to use special
- visual aids for editing them. See the Connector specification for
- more details. If unspecified, the container must not treat the
- property as confidential.
- This element must be one of the following, "true" or "false".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="connection-definitionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The connection-definitionType defines a set of connection
- interfaces and classes pertaining to a particular connection
- type. This also includes configurable properties for
- ManagedConnectionFactory instances that may be produced out
- of this set.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="managedconnectionfactory-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The element managedconnectionfactory-class specifies
- the fully qualified name of the Java class that
- implements the
- javax.resource.spi.ManagedConnectionFactory interface.
- This Java class is provided as part of resource
- adapter's implementation of connector architecture
- specified contracts. The implementation of this
- class is required to be a JavaBean.
-
- Example:
- <managedconnectionfactory-class>
- com.wombat.ManagedConnectionFactoryImpl
- </managedconnectionfactory-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="config-property"
- type="javaee:config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="connectionfactory-interface"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The element connectionfactory-interface specifies
- the fully qualified name of the ConnectionFactory
- interface supported by the resource adapter.
-
- Example:
- <connectionfactory-interface>com.wombat.ConnectionFactory
- </connectionfactory-interface>
-
- OR
-
- <connectionfactory-interface>javax.resource.cci.ConnectionFactory
- </connectionfactory-interface>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="connectionfactory-impl-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The element connectionfactory-impl-class specifies
- the fully qualified name of the ConnectionFactory
- class that implements resource adapter
- specific ConnectionFactory interface.
-
- Example:
-
- <connectionfactory-impl-class>com.wombat.ConnectionFactoryImpl
- </connectionfactory-impl-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="connection-interface"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The connection-interface element specifies the fully
- qualified name of the Connection interface supported
- by the resource adapter.
-
- Example:
-
- <connection-interface>javax.resource.cci.Connection
- </connection-interface>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="connection-impl-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The connection-impl-classType specifies the fully
- qualified name of the Connection class that
- implements resource adapter specific Connection
- interface. It is used by the connection-impl-class
- elements.
-
- Example:
-
- <connection-impl-class>com.wombat.ConnectionImpl
- </connection-impl-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="connectorType">
- <xsd:annotation>
- <xsd:documentation>
-
- The connectorType defines a resource adapter.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="module-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The element module-name specifies the name of the
- resource adapter.
-
- If there is no module-name specified, the module-name
- is determined as defined in Section EE.8.1.1 and EE.8.1.2
- of the Java Platform, Enterprise Edition (Java EE)
- Specification, version 6.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="vendor-name"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The element vendor-name specifies the name of
- resource adapter provider vendor.
-
- If there is no vendor-name specified, the application
- server must consider the default "" (empty string) as
- the name of the resource adapter provider vendor.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="eis-type"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The element eis-type contains information about the
- type of the EIS. For example, the type of an EIS can
- be product name of EIS independent of any version
- info.
-
- This helps in identifying EIS instances that can be
- used with this resource adapter.
-
- If there is no eis-type specified, the application
- server must consider the default "" (empty string) as
- the type of the EIS.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="resourceadapter-version"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The element resourceadapter-version specifies a string-based version
- of the resource adapter from the resource adapter
- provider.
-
- If there is no resourceadapter-version specified, the application
- server must consider the default "" (empty string) as
- the version of the resource adapter.
-
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="license"
- type="javaee:licenseType"
- minOccurs="0"/>
- <xsd:element name="resourceadapter"
- type="javaee:resourceadapterType"/>
- <xsd:element name="required-work-context"
- type="javaee:fully-qualified-classType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The element required-work-context specifies a fully qualified class
- name that implements WorkContext interface, that the resource adapter
- requires the application server to support.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="version"
- type="javaee:dewey-versionType"
- fixed="1.6"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The version indicates the version of the schema to be used by the
- deployment tool. This element doesn't have a default, and the resource adapter
- developer/deployer is required to specify it. The element allows the deployment
- tool to choose which schema to validate the descriptor against.
-
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="metadata-complete"
- type="xsd:boolean">
- <xsd:annotation>
- <xsd:documentation>
-
- The metadata-complete attribute defines whether the deployment
- descriptor for the resource adapter module is complete, or whether
- the class files available to the module and packaged with the resource
- adapter should be examined for annotations that specify deployment
- information.
-
- If metadata-complete is set to "true", the deployment tool of the
- application server must ignore any annotations that specify deployment
- information, which might be present in the class files of the
- application.If metadata-complete is not specified or is set to "false",
- the deployment tool must examine the class files of the application for
- annotations, as specified by this specification. If the
- deployment descriptor is not included or is included but not marked
- metadata-complete, the deployment tool will process annotations.
-
- Application servers must assume that metadata-complete is true for
- resource adapter modules with deployment descriptor version
- lower than 1.6.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="credential-interfaceType">
- <xsd:annotation>
- <xsd:documentation>
-
- The credential-interfaceType specifies the
- interface that the resource adapter implementation
- supports for the representation of the
- credentials. This element(s) that use this type,
- i.e. credential-interface, should be used by
- application server to find out the Credential
- interface it should use as part of the security
- contract.
-
- The possible values are:
-
- javax.resource.spi.security.PasswordCredential
- org.ietf.jgss.GSSCredential
- javax.resource.spi.security.GenericCredential
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType">
- <xsd:enumeration value="javax.resource.spi.security.PasswordCredential"/>
- <xsd:enumeration value="org.ietf.jgss.GSSCredential"/>
- <xsd:enumeration value="javax.resource.spi.security.GenericCredential"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="inbound-resourceadapterType">
- <xsd:annotation>
- <xsd:documentation>
-
- The inbound-resourceadapterType specifies information
- about an inbound resource adapter. This contains information
- specific to the implementation of the resource adapter
- library as specified through the messageadapter element.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="messageadapter"
- type="javaee:messageadapterType"
- minOccurs="0">
- <xsd:unique name="messagelistener-type-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The messagelistener-type element content must be
- unique in the messageadapter. Several messagelisteners
- can not use the same messagelistener-type.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:messagelistener"/>
- <xsd:field xpath="javaee:messagelistener-type"/>
- </xsd:unique>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="licenseType">
- <xsd:annotation>
- <xsd:documentation>
-
- The licenseType specifies licensing requirements for the
- resource adapter module. This type specifies whether a
- license is required to deploy and use this resource adapter,
- and an optional description of the licensing terms
- (examples: duration of license, number of connection
- restrictions). It is used by the license element.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="license-required"
- type="javaee:true-falseType">
- <xsd:annotation>
- <xsd:documentation>
-
- The element license-required specifies whether a
- license is required to deploy and use the
- resource adapter. This element must be one of
- the following, "true" or "false".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="messageadapterType">
- <xsd:annotation>
- <xsd:documentation>
-
- The messageadapterType specifies information about the
- messaging capabilities of the resource adapter. This
- contains information specific to the implementation of the
- resource adapter library as specified through the
- messagelistener element.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="messagelistener"
- type="javaee:messagelistenerType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="messagelistenerType">
- <xsd:annotation>
- <xsd:documentation>
-
- The messagelistenerType specifies information about a
- specific message listener supported by the messaging
- resource adapter. It contains information on the Java type
- of the message listener interface and an activation
- specification.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="messagelistener-type"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The element messagelistener-type specifies the fully
- qualified name of the Java type of a message
- listener interface.
-
- Example:
-
- <messagelistener-type>javax.jms.MessageListener
- </messagelistener-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="activationspec"
- type="javaee:activationspecType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="outbound-resourceadapterType">
- <xsd:annotation>
- <xsd:documentation>
-
- The outbound-resourceadapterType specifies information about
- an outbound resource adapter. The information includes fully
- qualified names of classes/interfaces required as part of
- the connector architecture specified contracts for
- connection management, level of transaction support
- provided, one or more authentication mechanisms supported
- and additional required security permissions.
-
- If any of the outbound resource adapter elements (transaction-support,
- authentication-mechanism, reauthentication-support) is specified through
- this element or metadata annotations, and no connection-definition is
- specified as part of this element or through annotations, the
- application server must consider this an error and fail deployment.
-
- If there is no authentication-mechanism specified as part of
- this element or metadata annotations, then the resource adapter does
- not support any standard security authentication mechanisms as
- part of security contract. The application server ignores the security
- part of the system contracts in this case.
-
- If there is no transaction-support specified as part of this element
- or metadata annotation, then the application server must consider that
- the resource adapter does not support either the resource manager local
- or JTA transactions and must consider the transaction support as
- NoTransaction. Note that resource adapters may specify the level of
- transaction support to be used at runtime for a ManagedConnectionFactory
- through the TransactionSupport interface.
-
- If there is no reauthentication-support specified as part of
- this element or metadata annotation, then the application server must consider
- that the resource adapter does not support re-authentication of
- ManagedConnections.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="connection-definition"
- type="javaee:connection-definitionType"
- maxOccurs="unbounded"
- minOccurs="0"/>
- <xsd:element name="transaction-support"
- type="javaee:transaction-supportType"
- minOccurs="0"/>
- <xsd:element name="authentication-mechanism"
- type="javaee:authentication-mechanismType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="reauthentication-support"
- type="javaee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The element reauthentication-support specifies
- whether the resource adapter implementation supports
- re-authentication of existing Managed- Connection
- instance. Note that this information is for the
- resource adapter implementation and not for the
- underlying EIS instance. This element must have
- either a "true" or "false" value.
-
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="required-config-propertyType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The required-config-propertyType contains a declaration
- of a single configuration property used for specifying a
- required configuration property name. It is used
- by required-config-property elements.
-
- Usage of this type is deprecated from Connectors 1.6 specification.
- Refer to required-config-property element for more information.
-
- Example:
-
- <required-config-property>
- <config-property-name>Destination</config-property-name>
- </required-config-property>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="config-property-name"
- type="javaee:config-property-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="resourceadapterType">
- <xsd:annotation>
- <xsd:documentation>
-
- The resourceadapterType specifies information about the
- resource adapter. The information includes fully qualified
- resource adapter Java class name, configuration properties,
- information specific to the implementation of the resource
- adapter library as specified through the
- outbound-resourceadapter and inbound-resourceadapter
- elements, and an optional set of administered objects.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="resourceadapter-class"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The element resourceadapter-class specifies the
- fully qualified name of a Java class that implements
- the javax.resource.spi.ResourceAdapter
- interface. This Java class is provided as part of
- resource adapter's implementation of connector
- architecture specified contracts. The implementation
- of this class is required to be a JavaBean.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="config-property"
- type="javaee:config-propertyType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="outbound-resourceadapter"
- type="javaee:outbound-resourceadapterType"
- minOccurs="0">
- <xsd:unique name="connectionfactory-interface-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The connectionfactory-interface element content
- must be unique in the outbound-resourceadapter.
- Multiple connection-definitions can not use the
- same connectionfactory-type.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:connection-definition"/>
- <xsd:field xpath="javaee:connectionfactory-interface"/>
- </xsd:unique>
- </xsd:element>
- <xsd:element name="inbound-resourceadapter"
- type="javaee:inbound-resourceadapterType"
- minOccurs="0"/>
- <xsd:element name="adminobject"
- type="javaee:adminobjectType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:unique name="adminobject-type-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The adminobject-interface and adminobject-class element content must be
- unique in the resourceadapterType. Several admin objects
- can not use the same adminobject-interface and adminobject-class.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:adminobject"/>
- <xsd:field xpath="javaee:adminobject-interface"/>
- <xsd:field xpath="javaee:adminobject-class"/>
- </xsd:unique>
- </xsd:element>
- <xsd:element name="security-permission"
- type="javaee:security-permissionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-permissionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-permissionType specifies a security
- permission that is required by the resource adapter code.
-
- The security permission listed in the deployment descriptor
- are ones that are different from those required by the
- default permission set as specified in the connector
- specification. The optional description can mention specific
- reason that resource adapter requires a given security
- permission.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="security-permission-spec"
- type="javaee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The element security-permission-spec specifies a security
- permission based on the Security policy file
- syntax. Refer to the following URL for Sun's
- implementation of the security permission
- specification:
-
- http://java.sun.com/javase/6/docs/technotes/guides/security/PolicyFiles.html
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="transaction-supportType">
- <xsd:annotation>
- <xsd:documentation>
-
- The transaction-supportType specifies the level of
- transaction support provided by the resource adapter. It is
- used by transaction-support elements.
-
- The value must be one of the following:
-
- NoTransaction
- LocalTransaction
- XATransaction
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="NoTransaction"/>
- <xsd:enumeration value="LocalTransaction"/>
- <xsd:enumeration value="XATransaction"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_1_1.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_1_1.dtd
deleted file mode 100644
index efd838ee0b..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_1_1.dtd
+++ /dev/null
@@ -1,894 +0,0 @@
-<!--
-Copyright 1999 Sun Microsystems, Inc. 901 San Antonio Road,
-Palo Alto, CA 94303, U.S.A. All rights reserved.
-
-This product or document is protected by copyright and distributed
-under licenses restricting its use, copying, distribution, and
-decompilation. No part of this product or documentation may be
-reproduced in any form by any means without prior written authorization
-of Sun and its licensors, if any.
-
-Third party software, including font technology, is copyrighted and
-licensed from Sun suppliers.
-
-Sun, Sun Microsystems, the Sun Logo, Solaris, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail and Enterprise JavaBeans,
-are trademarks or registered trademarks of Sun Microsystems, Inc in the U.S.
-and other countries.
-
-All SPARC trademarks are used under license and are trademarks
-or registered trademarks of SPARC International, Inc.
-in the U.S. and other countries. Products bearing SPARC
-trademarks are based upon an architecture developed by Sun Microsystems, Inc.
-
-PostScript is a registered trademark of Adobe Systems, Inc.
-
-
-Federal Acquisitions: Commercial Software - Government Users Subject to
-Standard License Terms and Conditions.
-
-
-
-DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED
-CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
-IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT
-TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY
-INVALID.
-
-_________________________________________________________________________
-Copyright 1999 Sun Microsystems, Inc.,
-901 San Antonio Road, Palo Alto, CA 94303, Etats-Unis.
-Tous droits re'serve's.
-
-
-Ce produit ou document est prote'ge' par un copyright et distribue' avec
-des licences qui en restreignent l'utilisation, la copie, la distribution,
-et la de'compilation. Aucune partie de ce produit ou de sa documentation
-associe'e ne peut e^tre reproduite sous aucune forme, par quelque moyen
-que ce soit, sans l'autorisation pre'alable et e'crite de Sun et de ses
-bailleurs de licence, s'il y en a.
-
-Le logiciel de'tenu par des tiers, et qui comprend la technologie
-relative aux polices de caracte`res, est prote'ge' par un copyright
-et licencie' par des fournisseurs de Sun.
-
-Sun, Sun Microsystems, le logo Sun, Solaris, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail, et Enterprise JavaBeans,
-sont des marques de fabrique ou des marques de'pose'es de Sun
-Microsystems, Inc. aux Etats-Unis et dans d'autres pays.
-
-Toutes les marques SPARC sont utilise'es sous licence et sont
-des marques de fabrique ou des marques de'pose'es de SPARC
-International, Inc. aux Etats-Unis et dans
-d'autres pays. Les produits portant les marques SPARC sont
-base's sur une architecture de'veloppe'e par Sun Microsystems, Inc.
-
-Postcript est une marque enregistre'e d'Adobe Systems Inc.
-
-LA DOCUMENTATION EST FOURNIE "EN L'ETAT" ET TOUTES AUTRES CONDITIONS,
-DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES,
-DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT
-TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L'APTITUDE
-A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE CONTREFACON.
--->
-
-
-<!--
-This is the XML DTD for the EJB 1.1 deployment descriptor.
--->
-
-
-<!--
-The assembly-descriptor element contains application-assembly information.
-
-The application-assembly information consists of the following parts:
-the definition of security roles, the definition of method permissions,
-and the definition of transaction attributes for enterprise beans with
-container-managed transaction demarcation.
-
-All the parts are optional in the sense that they are omitted if the
-lists represented by them are empty.
-
-Providing an assembly-descriptor in the deployment descriptor is
-optional for the ejb-jar file producer.
-
-Used in: ejb-jar
--->
-<!ELEMENT assembly-descriptor (security-role*, method-permission*,
- container-transaction*)>
-
-<!--
-The cmp-field element describes a container-managed field. The field
-element includes an optional description of the field, and the name of
-the field.
-
-Used in: entity
--->
-<!ELEMENT cmp-field (description?, field-name)>
-
-<!--
-The container-transaction element specifies how the container must
-manage transaction scopes for the enterprise bean's method invocations.
-The element consists of an optional description, a list of method
-elements, and a transaction attribute.The transaction attribute is to
-be applied to all the specified methods.
-
-Used in: assembly-descriptor
--->
-<!ELEMENT container-transaction (description?, method+,
- trans-attribute)>
-
-<!--
-The description element is used by the ejb-jar file producer to provide
-text describing the parent element.
-
-The description element should include any information that the ejb-jar
-file producer wants to provide to the consumer of the ejb-jar file
-(i.e. to the Deployer). Typically, the tools used by the ejb-jar file
-consumer will display the description when processing the parent
-element.
-
-Used in: cmp-field, container-transaction, ejb-jar, entity, env-entry,
-ejb-ref, method, method-permission, resource-ref, security-role,
-security-role-ref, and session.
--->
-<!ELEMENT description (#PCDATA)>
-
-<!--
-The display-name element contains a short name that is intended to be
-display by tools.
-
-Used in: ejb-jar, session, and entity
-
-Example:
- <display-name>Employee Self Service</display-name>
--->
-<!ELEMENT display-name (#PCDATA)>
-
-<!--
-The ejb-class element contains the fully-qualified name of the
-enterprise bean's class.
-
-Used in: entity and session
-
-Example:
- <ejb-class>com.wombat.empl.EmployeeServiceBean</ejb-class>
--->
-<!ELEMENT ejb-class (#PCDATA)>
-
-<!--
-The optional ejb-client-jar element specifies a JAR file that contains
-the class files necessary for a client program to access the enterprise
-beans in the ejb-jar file. The Deployer should make the ejb-client JAR
-file accessible to the client's class-loader.
-
-Used in: ejb-jar
-
-Example:
- <ejb-client-jar>employee_service_client.jar</ejb-client-jar>
--->
-<!ELEMENT ejb-client-jar (#PCDATA)>
-
-<!--
-The ejb-jar element is the root element of the EJB deployment
-descriptor. It contains an optional description of the ejb-jar file,
-optional display name, optional small icon file name, optional large
-icon file name, mandatory structural information about all included
-enterprise beans, optional application-assembly descriptor, and an
-optional name of an ejb-client-jar file for the ejb-jar.
--->
-<!ELEMENT ejb-jar (description?, display-name?, small-icon?,
- large-icon?, enterprise-beans, assembly-descriptor?,
- ejb-client-jar?)>
-
-<!--
-The ejb-link element is used in the ejb-ref element to specify that an
-EJB reference is linked to another enterprise bean in the ejb-jar
-file.
-
-The value of the ejb-link element must be the ejb-name of an enterprise
-bean in the same ejb-jar file, or in another ejb-jar file in the same
-J2EE application unit.
-
-Used in: ejb-ref
-
-Example:
- <ejb-link>EmployeeRecord</ejb-link>
--->
-<!ELEMENT ejb-link (#PCDATA)>
-
-<!--
-The ejb-name element specifies an enterprise bean's name. This name is
-assigned by the ejb-jar file producer to name the enterprise bean in
-the ejb-jar file's deployment descriptor. The name must be unique among
-the names of the enterprise beans in the same ejb-jar file.
-
-The enterprise bean code does not depend on the name; therefore the
-name can be changed during the application-assembly process without
-breaking the enterprise bean's function.
-
-There is no architected relationship between the ejb-name in the
-deployment descriptor and the JNDI name that the Deployer will assign
-to the enterprise bean's home.
-
-The name must conform to the lexical rules for an NMTOKEN.
-
-Used in: entity, method, and session
-
-Example:
- <ejb-name>EmployeeService</ejb-name>
--->
-<!ELEMENT ejb-name (#PCDATA)>
-
-<!--
-The ejb-ref element is used for the declaration of a reference to
-another enterprise bean's home. The declaration consists of an optional
-description; the EJB reference name used in the code of the referencing
-enterprise bean; the expected type of the referenced enterprise bean;
-the expected home and remote interfaces of the referenced enterprise
-bean; and an optional ejb-link information.
-
-The optional ejb-link element is used to specify the referenced
-enterprise bean. It is used typically in ejb-jar files that contain an
-assembled application.
-
-Used in: entity and session
--->
-<!ELEMENT ejb-ref (description?, ejb-ref-name, ejb-ref-type, home,
- remote, ejb-link?)>
-
-<!--
-The ejb-ref-name element contains the name of an EJB reference. The EJB
-reference is an entry in the enterprise bean's environment.
-
-It is recommended that name is prefixed with "ejb/".
-
-Used in: ejb-ref
-
-Example:
- <ejb-ref-name>ejb/Payroll</ejb-ref-name>
--->
-<!ELEMENT ejb-ref-name (#PCDATA)>
-
-<!--
-The ejb-ref-type element contains the expected type of the referenced
-enterprise bean.
-
-The ejb-ref-type element must be one of the following:
- <ejb-ref-type>Entity</ejb-ref-type>
- <ejb-ref-type>Session</ejb-ref-type>
-
-Used in: ejb-ref
--->
-<!ELEMENT ejb-ref-type (#PCDATA)>
-
-<!--
-The enterprise-beans element contains the declarations of one or more
-enterprise beans.
--->
-<!ELEMENT enterprise-beans (session | entity)+>
-
-<!--
-The entity element declares an entity bean. The declaration consists
-of: an optional description; optional display name; optional small icon
-file name; optional large icon file name; a name assigned to the
-enterprise bean in the deployment descriptor; the names of the entity
-bean's home and remote interfaces; the entity bean's implementation
-class; the entity bean's persistence management type; the entity bean's
-primary key class name; an indication of the entity bean's reentrancy;
-an optional list of container-managed fields; an optional specification
-of the primary key field; an optional declaration of the bean's
-environment entries; an optional declaration of the bean's EJB
-references; an optional declaration of the security role references;
-and an optional declaration of the bean's resource manager connection
-factory references.
-
-The optional primkey-field may be present in the descriptor if the
-entity's persistency-type is Container.
-
-The other elements that are optional are "optional" in the sense that
-they are omitted if the lists represented by them are empty.
-
-At least one cmp-field element must be present in the descriptor if the
-entity's persistency-type is Container, and none must not be present if
-the entity's persistence-type is Bean.
-
-Used in: enterprise-beans
--->
-<!ELEMENT entity (description?, display-name?, small-icon?,
- large-icon?, ejb-name, home, remote, ejb-class,
- persistence-type, prim-key-class, reentrant,
- cmp-field*, primkey-field?, env-entry*,
- ejb-ref*, security-role-ref*, resource-ref*)>
-
-<!--
-The env-entry element contains the declaration of an enterprise bean's
-environment entries. The declaration consists of an optional
-description, the name of the environment entry, and an optional value.
-
-Used in: entity and session
--->
-<!ELEMENT env-entry (description?, env-entry-name, env-entry-type,
- env-entry-value?)>
-
-<!--
-The env-entry-name element contains the name of an enterprise bean's
-environment entry.
-
-Used in: env-entry
-
-Example:
- <env-entry-name>minAmount</env-entry-name>
--->
-<!ELEMENT env-entry-name (#PCDATA)>
-
-<!--
-The env-entry-type element contains the fully-qualified Java type of
-the environment entry value that is expected by the enterprise bean's
-code.
-
-The following are the legal values of env-entry-type:
-java.lang.Boolean, java.lang.String, java.lang.Integer,
-java.lang.Double, java.lang.Byte, java.lang.Short, java.lang.Long, and
-java.lang.Float.
-
-Used in: env-entry
-
-Example:
- <env-entry-type>java.lang.Boolean</env-entry-type>
--->
-<!ELEMENT env-entry-type (#PCDATA)>
-
-<!--
-The env-entry-value element contains the value of an enterprise bean's
-environment entry.
-
-Used in: env-entry
-
-Example:
- <env-entry-value>100.00</env-entry-value>
--->
-<!ELEMENT env-entry-value (#PCDATA)>
-
-<!--
-The field-name element specifies the name of a container managed field.
-The name must be a public field of the enterprise bean class or one of
-its superclasses.
-
-Used in: cmp-field
-
-Example:
- <field-name>firstName</field-Name>
--->
-<!ELEMENT field-name (#PCDATA)>
-
-<!--
-The home element contains the fully-qualified name of the enterprise
-bean's home interface.
-
-Used in: ejb-ref, entity, and session
-
-Example:
- <home>com.aardvark.payroll.PayrollHome</home>
--->
-<!ELEMENT home (#PCDATA)>
-
-<!--
-The large-icon element contains the name of a file containing a large
-(32 x 32) icon image. The file name is relative path within the ejb-jar
-file.
-
-The image must be either in the JPEG or GIF format, and the file name
-must end with the suffix ".jpg" or ".gif" respectively. The icon can
-be used by tools.
-
-Example:
- <large-icon>employee-service-icon32x32.jpg</large-icon>
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
-The method element is used to denote a method of an enterprise bean's
-home or remote interface, or a set of methods. The ejb-name element
-must be the name of one of the enterprise beans in declared in the
-deployment descriptor; the optional method-intf element allows to
-distinguish between a method with the same signature that is defined in
-both the home and remote interface; the method-name element specifies
-the method name; and the optional method-params elements identify a
-single method among multiple methods with an overloaded method name.
-
-There are three possible styles of the method element syntax:
-
-1. <method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>*</method-name>
- </method>
-
- This style is used to refer to all the methods of the specified
- enterprise bean's home and remote interfaces.
-
-2. <method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>METHOD</method-name>
- </method>>
-
- This style is used to refer to the specified method of the
- specified enterprise bean. If there are multiple methods with
- the same overloaded name, the element of this style refers to
- all the methods with the overloaded name.
-
-
-
-
-
-3. <method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>METHOD</method-name>
- <method-params>
- <method-param>PARAM-1</method-param>
- <method-param>PARAM-2</method-param>
- ...
- <method-param>PARAM-n</method-param>
- </method-params>
- <method>
-
- This style is used to refer to a single method within a set of
- methods with an overloaded name. PARAM-1 through PARAM-n are the
- fully-qualified Java types of the method's input parameters (if
- the method has no input arguments, the method-params element
- contains no method-param elements). Arrays are specified by the
- array element's type, followed by one or more pair of square
- brackets (e.g. int[][]).
-
-
-Used in: method-permission and container-transaction
-
-Examples:
-
- Style 1: The following method element refers to all the methods of
- the EmployeeService bean's home and remote interfaces:
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>*</method-name>
- </method>
-
- Style 2: The following method element refers to all the create
- methods of the EmployeeService bean's home interface:
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>create</method-name>
- </method>
-
- Style 3: The following method element refers to the
- create(String firstName, String LastName) method of the
- EmployeeService bean's home interface.
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
-
- The following example illustrates a Style 3 element with
- more complex parameter types. The method
- foobar(char s, int i, int[] iar, mypackage.MyClass mycl,
- mypackage.MyClass[][] myclaar)
- would be specified as:
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>foobar</method-name>
- <method-params>
- <method-param>char</method-param>
- <method-param>int</method-param>
- <method-param>int[]</method-param>
- <method-param>mypackage.MyClass</method-param>
- <method-param>mypackage.MyClass[][]</method-param>
- </method-params>
- </method>
-
- The optional method-intf element can be used when it becomes
- necessary to differentiate between a method defined in the home
- interface and a method with the same name and signature that is
- defined in the remote interface.
-
- For example, the method element
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Remote</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- can be used to differentiate the create(String, String) method
- defined in the remote interface from the create(String, String)
- method defined in the home interface, which would be defined as
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Home</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
--->
-<!ELEMENT method (description?, ejb-name, method-intf?, method-name,
- method-params?)>
-
-<!--
-The method-intf element allows a method element to differentiate
-between the methods with the same name and signature that are defined
-in both the remote and home interfaces.
-
-The method-intf element must be one of the following:
- <method-intf>Home</method-intf>
- <method-intf>Remote</method-intf>
-
-Used in: method
--->
-<!ELEMENT method-intf (#PCDATA)>
-
-<!--
-The method-name element contains a name of an enterprise bean method,
-or the asterisk (*) character. The asterisk is used when the element
-denotes all the methods of an enterprise bean's remote and home
-interfaces.
-
-Used in: method
--->
-<!ELEMENT method-name (#PCDATA)>
-
-<!--
-The method-param element contains the fully-qualified Java type name of
-a method parameter.
-
-Used in: method-params
--->
-<!ELEMENT method-param (#PCDATA)>
-
-<!--
-The method-params element contains a list of the fully-qualified Java
-type names of the method parameters.
-
-Used in: method
--->
-<!ELEMENT method-params (method-param*)>
-
-<!--
-The method-permission element specifies that one or more security roles
-are allowed to invoke one or more enterprise bean methods. The
-method-permission element consists of an optional description, a list
-of security role names, and a list of method elements.
-
-The security roles used in the method-permission element must be
-defined in the security-role element of the deployment descriptor, and
-the methods must be methods defined in the enterprise bean's remote
-and/or home interfaces.
-
-Used in: assembly-descriptor
--->
-<!ELEMENT method-permission (description?, role-name+, method+)>
-
-<!--
-The persistence-type element specifies an entity bean's persistence
-management type.
-
-The persistence-type element must be one of the two following:
- <persistence-type>Bean</persistence-type>
- <persistence-type>Container</persistence-type>
-
-Used in: entity
--->
-<!ELEMENT persistence-type (#PCDATA)>
-
-<!--
-The prim-key-class element contains the fully-qualified name of an
-entity bean's primary key class.
-
-If the definition of the primary key class is deferred to deployment
-time, the prim-key-class element should specify java.lang.Object.
-
-Used in: entity
-
-Examples:
- <prim-key-class>java.lang.String</prim-key-class>
- <prim-key-class>com.wombat.empl.EmployeeID</prim-key-class>
- <prim-key-class>java.lang.Object</prim-key-class>
-
--->
-<!ELEMENT prim-key-class (#PCDATA)>
-
-<!--
-The primkey-field element is used to specify the name of the primary
-key field for an entity with container-managed persistence.
-
-The primkey-field must be one of the fields declared in the cmp-field
-element, and the type of the field must be the same as the primary key
-type.
-
-The primkey-field element is not used if the primary key maps to
-multiple container-managed fields (i.e. the key is a compound key). In
-this case, the fields of the primary key class must be public, and
-their names must correspond to the field names of the entity bean class
-that comprise the key.
-
-Used in: entity
-
-Example:
- <primkey-field>EmployeeId</primkey-field>
--->
-<!ELEMENT primkey-field (#PCDATA)>
-
-<!--
-The reentrant element specifies whether an entity bean is reentrant or not.
-
-The reentrant element must be one of the two following:
- <reentrant>True</reentrant>
- <reentrant>False</reentrant>
-
-Used in: entity
--->
-<!ELEMENT reentrant (#PCDATA)>
-
-<!--
-The remote element contains the fully-qualified name of the enterprise
-bean's remote interface.
-
-Used in: ejb-ref, entity, and session
-
-Example:
- <remote>com.wombat.empl.EmployeeService</remote>
--->
-<!ELEMENT remote (#PCDATA)>
-
-<!--
-The res-auth element specifies whether the enterprise bean code signs
-on programmatically to the resource manager, or whether the Container
-will sign on to the resource manager on behalf of the bean. In the
-latter case, the Container uses information that is supplied by the
-Deployer.
-
-The value of this element must be one of the two following:
- <res-auth>Application</res-auth>
- <res-auth>Container</res-auth>
--->
-<!ELEMENT res-auth (#PCDATA)>
-
-<!--
-The res-ref-name element specifies the name of a resource manager
-connection factory reference.
-
-Used in: resource-ref
--->
-<!ELEMENT res-ref-name (#PCDATA)>
-
-<!--
-The res-type element specifies the type of the data source. The type is
-specified by the Java interface (or class) expected to be implemented
-by the data source.
-
-Used in: resource-ref
--->
-<!ELEMENT res-type (#PCDATA)>
-
-<!--
-The resource-ref element contains a declaration of enterprise bean's
-reference to an external resource. It consists of an optional
-description, the resource manager connection factory reference name,
-the indication of the resource manager connection factory type expected
-by the enterprise bean code, and the type of authentication (bean or
-container).
-
-Used in: entity and session
-
-Example:
- <resource-ref>
- <res-ref-name>EmployeeAppDB</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- </resource-ref>
--->
-<!ELEMENT resource-ref (description?, res-ref-name, res-type,
- res-auth)>
-
-<!--
-The role-link element is used to link a security role reference to a
-defined security role. The role-link element must contain the name of
-one of the security roles defined in the security-role elements.
-
-Used in: security-role-ref
--->
-<!ELEMENT role-link (#PCDATA)>
-
-<!--
-The role-name element contains the name of a security role.
-
-The name must conform to the lexical rules for an NMTOKEN.
-
-Used in: method-permission, security-role, and security-role-ref
--->
-<!ELEMENT role-name (#PCDATA)>
-
-<!--
-The security-role element contains the definition of a security role.
-The definition consists of an optional description of the security
-role, and the security role name.
-
-Used in: assembly-descriptor
-
-Example:
- <security-role>
- <description>
- This role includes all employees who
- are authorized to access the employee
- service application.
- </description>
- <role-name>employee</role-name>
- </security-role>
--->
-<!ELEMENT security-role (description?, role-name)>
-
-<!--
-The security-role-ref element contains the declaration of a security
-role reference in the enterprise bean's code. The declaration consists
-of an optional description, the security role name used in the code,
-and an optional link to a defined security role.
-
-The value of the role-name element must be the String used as the
-parameter to the EJBContext.isCallerInRole(String roleName) method.
-
-The value of the role-link element must be the name of one of the
-security roles defined in the security-role elements.
-
-Used in: entity and session
-
--->
-<!ELEMENT security-role-ref (description?, role-name, role-link?)>
-
-<!--
-The session-type element describes whether the session bean is a
-stateful session, or stateless session.
-
-The session-type element must be one of the two following:
- <session-type>Stateful</session-type>
- <session-type>Stateless</session-type>
--->
-<!ELEMENT session-type (#PCDATA)>
-
-<!--
-The session element declares an session bean. The declaration consists
-of: an optional description; optional display name; optional small icon
-file name; optional large icon file name; a name assigned to the
-enterprise bean in the deployment description; the names of the session
-bean's home and remote interfaces; the session bean's implementation
-class; the session bean's state management type; the session bean's
-transaction management type; an optional declaration of the bean's
-environment entries; an optional declaration of the bean's EJB
-references; an optional declaration of the security role references;
-and an optional declaration of the bean's resource manager connection
-factory references.
-
-The elements that are optional are "optional" in the sense that they
-are omitted when if lists represented by them are empty.
-
-Used in: enterprise-beans
--->
-<!ELEMENT session (description?, display-name?, small-icon?,
- large-icon?, ejb-name, home, remote, ejb-class,
- session-type, transaction-type, env-entry*,
- ejb-ref*, security-role-ref*, resource-ref*)>
-
-<!--
-The small-icon element contains the name of a file containing a small
-(16 x 16) icon image. The file name is relative path within the ejb-jar
-file.
-
-The image must be either in the JPEG or GIF format, and the file name
-must end with the suffix ".jpg" or ".gif" respectively.
-
-The icon can be used by tools.
-
-Example:
- <small-icon>employee-service-icon16x16.jpg</small-icon>
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
-The transaction-type element specifies an enterprise bean's transaction
-management type.
-
-The transaction-type element must be one of the two following:
- <transaction-type>Bean</transaction-type>
- <transaction-type>Container</transaction-type>
-
-Used in: session
--->
-<!ELEMENT transaction-type (#PCDATA)>
-
-<!--
-The trans-attribute element specifies how the container must manage the
-transaction boundaries when delegating a method invocation to an
-enterprise bean's business method.
-
-The value of trans-attribute must be one of the following:
- <trans-attribute>NotSupported</trans-attribute>
- <trans-attribute>Supports</trans-attribute>
- <trans-attribute>Required</trans-attribute>
- <trans-attribute>RequiresNew</trans-attribute>
- <trans-attribute>Mandatory</trans-attribute>
- <trans-attribute>Never</trans-attribute>
-
-Used in: container-transaction
--->
-<!ELEMENT trans-attribute (#PCDATA)>
-
-<!--
-The ID mechanism is to allow tools that produce additional deployment
-information (i.e information beyond the standard EJB deployment
-descriptor information) to store the non-standard information in a
-separate file, and easily refer from these tools-specific files to the
-information in the standard deployment descriptor.
-
-The EJB architecture does not allow the tools to add the non-standard
-information into the EJB deployment descriptor.
--->
-<!ATTLIST assembly-descriptor id ID #IMPLIED>
-<!ATTLIST cmp-field id ID #IMPLIED>
-<!ATTLIST container-transaction id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST ejb-class id ID #IMPLIED>
-<!ATTLIST ejb-client-jar id ID #IMPLIED>
-<!ATTLIST ejb-jar id ID #IMPLIED>
-<!ATTLIST ejb-link id ID #IMPLIED>
-<!ATTLIST ejb-name id ID #IMPLIED>
-<!ATTLIST ejb-ref id ID #IMPLIED>
-<!ATTLIST ejb-ref-name id ID #IMPLIED>
-<!ATTLIST ejb-ref-type id ID #IMPLIED>
-<!ATTLIST enterprise-beans id ID #IMPLIED>
-<!ATTLIST entity id ID #IMPLIED>
-<!ATTLIST env-entry id ID #IMPLIED>
-<!ATTLIST env-entry-name id ID #IMPLIED>
-<!ATTLIST env-entry-type id ID #IMPLIED>
-<!ATTLIST env-entry-value id ID #IMPLIED>
-<!ATTLIST field-name id ID #IMPLIED>
-<!ATTLIST home id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST method id ID #IMPLIED>
-<!ATTLIST method-intf id ID #IMPLIED>
-<!ATTLIST method-name id ID #IMPLIED>
-<!ATTLIST method-param id ID #IMPLIED>
-<!ATTLIST method-params id ID #IMPLIED>
-<!ATTLIST method-permission id ID #IMPLIED>
-<!ATTLIST persistence-type id ID #IMPLIED>
-<!ATTLIST prim-key-class id ID #IMPLIED>
-<!ATTLIST primkey-field id ID #IMPLIED>
-<!ATTLIST reentrant id ID #IMPLIED>
-<!ATTLIST remote id ID #IMPLIED>
-<!ATTLIST res-auth id ID #IMPLIED>
-<!ATTLIST res-ref-name id ID #IMPLIED>
-<!ATTLIST res-type id ID #IMPLIED>
-<!ATTLIST resource-ref id ID #IMPLIED>
-<!ATTLIST role-link id ID #IMPLIED>
-<!ATTLIST role-name id ID #IMPLIED>
-<!ATTLIST security-role id ID #IMPLIED>
-<!ATTLIST security-role-ref id ID #IMPLIED>
-<!ATTLIST session-type id ID #IMPLIED>
-<!ATTLIST session id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST transaction-type id ID #IMPLIED>
-<!ATTLIST trans-attribute id ID #IMPLIED>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_2_0.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_2_0.dtd
deleted file mode 100644
index 9a2cc7ce76..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_2_0.dtd
+++ /dev/null
@@ -1,1671 +0,0 @@
-<!--
-Copyright (c) 2000 Sun Microsystems, Inc.,
-901 San Antonio Road,
-Palo Alto, California 94303, U.S.A.
-All rights reserved.
-
-Sun Microsystems, Inc. has intellectual property rights relating to
-technology embodied in the product that is described in this document.
-In particular, and without limitation, these intellectual property
-rights may include one or more of the U.S. patents listed at
-http://www.sun.com/patents and one or more additional patents or
-pending patent applications in the U.S. and in other countries.
-
-This document and the product to which it pertains are distributed
-under licenses restricting their use, copying, distribution, and
-decompilation. This document may be reproduced and distributed but may
-not be changed without prior written authorization of Sun and its
-licensors, if any.
-
-Third-party software, including font technology, is copyrighted and
-licensed from Sun suppliers.
-
-Sun, Sun Microsystems, the Sun logo, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail and and
-Enterprise JavaBeans are trademarks or registered trademarks of Sun
-Microsystems, Inc. in the U.S. and other countries.
-
-Federal Acquisitions: Commercial Software - Government Users Subject to
-Standard License Terms and Conditions.
-
-DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED
-CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED
-WARRANTY OF MERCHANTABILITY, FITNESS FOR FOR A PARTICULAR PURPOSE OR
-NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH
-DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
-
-
-_________________________________________________________________________
-
-Copyright (c) 2000 Sun Microsystems, Inc.,
-901 San Antonio Road,
-Palo Alto, California 94303, E'tats-Unis.
-Tous droits re'serve's.
-
-Sun Microsystems, Inc. a les droits de proprie'te' intellectuels
-relatants a` la technologie incorpore'e dans le produit qui est de'crit
-dans ce document. En particulier, et sans la limitation, ces droits de
-proprie'te' intellectuels peuvent inclure un ou plus des brevets
-ame'ricains e'nume're's a` http://www.sun.com/patents et un ou les
-brevets plus supple'mentaires ou les applications de brevet en attente
-dans les E'tats-Unis et dans les autres pays.
-
-Ce produit ou document est prote'ge' par un copyright et distribue'
-avec des licences qui en restreignent l'utilisation, la copie, la
-distribution, et la de'compilation. Ce documention associe n peut
-e^tre reproduite et distribuer, par quelque moyen que ce soit, sans
-l'autorisation pre'alable et e'crite de Sun et de ses bailleurs de
-licence, le cas e'che'ant.
-
-Le logiciel de'tenu par des tiers, et qui comprend la technologie
-relative aux polices de caracte`res, est prote'ge' par un copyright et
-licencie' par des fournisseurs de Sun.
-
-Sun, Sun Microsystems, le logo Sun, Java, JavaServer Pages, Java
-Naming and Directory Interface, JDBC, JDK, JavaMail et and
-Enterprise JavaBeans sont des marques de fabrique ou des marques
-de'pose'es de Sun Microsystems, Inc. aux E'tats-Unis et dans d'autres
-pays.
-
-LA DOCUMENTATION EST FOURNIE "EN L'E'TAT" ET TOUTES AUTRES CONDITIONS,
-DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT
-EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS
-NOTAMMENT TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A
-L'APTITUDE A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE
-CONTREFAC,ON.
--->
-
-<!--
-This is the XML DTD for the EJB 2.0 deployment descriptor.
-All EJB 2.0 deployment descriptors must include a DOCTYPE
-of the following form:
-
- <!DOCTYPE ejb-jar PUBLIC
- "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
- "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
-
--->
-
-<!--
-The following conventions apply to all J2EE deployment descriptor
-elements unless indicated otherwise.
-
-- In elements that contain PCDATA, leading and trailing whitespace
- in the data may be ignored.
-
-- In elements whose value is an "enumerated type", the value is
- case sensitive.
-
-- In elements that specify a pathname to a file within the same
- JAR file, relative filenames (i.e., those not starting with "/")
- are considered relative to the root of the JAR file's namespace.
- Absolute filenames (i.e., those starting with "/") also specify
- names in the root of the JAR file's namespace. In general, relative
- names are preferred. The exception is .war files where absolute
- names are preferred for consistency with the servlet API.
--->
-
-
-<!--
-The ejb-jar element is the root element of the EJB deployment
-descriptor. It contains
-
- - an optional description of the ejb-jar file
- - an optional display name
- - an optional small icon file name
- - an optional large icon file name
- - mandatory structural information about all included
- enterprise beans
- - a descriptor for container managed relationships, if any
- - an optional application-assembly descriptor
- - an optional name of an ejb-client-jar file for the ejb-jar.
--->
-<!ELEMENT ejb-jar (description?, display-name?, small-icon?,
-large-icon?, enterprise-beans, relationships?, assembly-descriptor?,
-ejb-client-jar?)>
-
-<!--
-The abstract-schema-name element specifies the name of the abstract
-schema type of an entity bean with cmp-version 2.x. It is used in EJB
-QL queries.
-
-For example, the abstract-schema-name for an entity bean whose local
-interface is com.acme.commerce.Order might be Order.
-
-Used in: entity
--->
-<!ELEMENT abstract-schema-name (#PCDATA)>
-
-<!--
-
-The acknowledge-mode element specifies whether JMS AUTO_ACKNOWLEDGE or
-DUPS_OK_ACKNOWLEDGE message acknowledgment semantics should be used
-for the onMessage message of a message-driven bean that uses bean
-managed transaction demarcation.
-
-The acknowledge-mode element must be one of the two following:
-
- <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
- <acknowledge-mode>Dups-ok-acknowledge</acknowledgemode>
-
-Used in: message-driven
--->
-<!ELEMENT acknowledge-mode (#PCDATA)>
-
-<!--
-The assembly-descriptor element contains application-assembly information.
-
-The application-assembly information consists of the following parts:
-the definition of security roles, the definition of method
-permissions, the definition of transaction attributes for
-enterprise beans with container-managed transaction demarcation and
-a list of methods to be excluded from being invoked.
-
-All the parts are optional in the sense that they are omitted if the
-lists represented by them are empty.
-
-Providing an assembly-descriptor in the deployment descriptor is
-optional for the ejb-jar file producer.
-
-Used in: ejb-jar
--->
-<!ELEMENT assembly-descriptor (security-role*, method-permission*,
-container-transaction*, exclude-list?)>
-
-<!--
-The cascade-delete element specifies that, within a particular
-relationship, the lifetime of one or more entity beans is dependent
-upon the lifetime of another entity bean. The cascade-delete element
-can only be specified for an ejb-relationship-role element contained
-in an ejb-relation element in which the other ejb-relationship-role
-element specifies a multiplicity of One.
-
-Used in: ejb-relationship-role
--->
-<!ELEMENT cascade-delete EMPTY>
-
-<!--
-The cmp-field element describes a container-managed field. The
-field element includes an optional description of the field, and the
-name of the field.
-
-Used in: entity
--->
-<!ELEMENT cmp-field (description?, field-name)>
-
-<!--
-The cmp-version element specifies the version of an entity bean
-with container-managed persistence.
-
-The cmp-version element must be one of the two following:
-
- <cmp-version>1.x</cmp-version>
- <cmp-version>2.x</cmp-version>
-
-The default value of the cmp-version element is 2.x.
-
-Used in: entity
--->
-<!ELEMENT cmp-version (#PCDATA)>
-
-<!--
-
-The cmr-field element describes the bean provider's view of a
-relationship. It consists of an optional description, and the name and
-the class type of a field in the source of a role of a
-relationship. The cmr-field-name element corresponds to the name used
-for the get and set accessor methods for the relationship. The
-cmr-field-type element is used only for collection-valued
-cmr-fields. It specifies the type of the collection that is used.
-
-Used in: ejb-relationship-role
--->
-<!ELEMENT cmr-field (description?, cmr-field-name, cmr-field-type?)>
-
-<!--
-The cmr-field-name element specifies the name of a logical
-relationship field in the entity bean class. The name of the cmr-field
-must begin with a lowercase letter. This field is accessed by methods
-whose names consist of the name of the field specified by
-cmr-field-name in which the first letter is uppercased, prefixed by
-"get" or "set".
-
-Used in: cmr-field
--->
-<!ELEMENT cmr-field-name (#PCDATA)>
-
-<!--
-The cmr-field-type element specifies the class of a
-collection-valued logical relationship field in the entity bean
-class. The value of the cmr-field-type element must be either:
-java.util.Collection or java.util.Set.
-
-Used in: cmr-field
--->
-<!ELEMENT cmr-field-type (#PCDATA)>
-
-<!--
-The container-transaction element specifies how the container
-must manage transaction scopes for the enterprise bean's method
-invocations. The element consists of an optional description, a list
-of method elements, and a transaction attribute. The transaction
-attribute is to be applied to all the specified methods.
-
-Used in: assembly-descriptor
--->
-<!ELEMENT container-transaction (description?, method+, trans-attribute)>
-
-<!--
-The description element is used to provide text describing the parent
-element. The description element should include any information that
-the enterprise bean ejb-jar file producer wants to provide to the consumer of
-the enterprise bean ejb-jar file (i.e., to the Deployer). Typically, the tools
-used by the enterprise bean ejb-jar file consumer will display the description
-when processing the parent element that contains the description.
-
-Used in: cmp-field, cmr-field, container-transaction, ejb-jar,
-ejb-local-ref, ejb-ref, ejb-relation, ejb-relationship-role, entity,
-env-entry, exclude-list, message-driven, method, method-permission,
-query, relationship-role-source, relationships, resource-env-ref,
-resource-ref, run-as, security-identity, security-role,
-security-role-ref, session
--->
-<!ELEMENT description (#PCDATA)>
-
-<!--
-The destination-type element specifies the type of the JMS
-destination. The type is specified by the Java interface expected to
-be implemented by the destination.
-
-The destination-type element must be one of the two following:
-
-<destination-type>javax.jms.Queue</destination-type>
-<destination-type>javax.jms.Topic</destination-type>
-
-Used in: message-driven-destination
--->
-<!ELEMENT destination-type (#PCDATA)>
-
-<!--
-The display-name element contains a short name that is intended to be
-displayed by tools. The display name need not be unique.
-
-Used in: ejb-jar, entity, message-driven, session
-
-Example:
-
-<display-name>Employee Self Service</display-name>
--->
-<!ELEMENT display-name (#PCDATA)>
-
-<!--
-The ejb-class element contains the fully-qualified name of the
-enterprise bean's class.
-
-Used in: entity, message-driven, session
-
-Example:
-
-<ejb-class>com.wombat.empl.EmployeeServiceBean</ejb-class>
--->
-<!ELEMENT ejb-class (#PCDATA)>
-
-<!--
-The optional ejb-client-jar element specifies a JAR file that contains
-the class files necessary for a client program to access the
-enterprise beans in the ejb-jar file.
-
-Used in: ejb-jar
-
-Example:
-
-<ejb-client-jar>employee_service_client.jar</ejb-client-jar>
--->
-<!ELEMENT ejb-client-jar (#PCDATA)>
-
-<!--
-The ejb-link element is used in the ejb-ref or ejb-local-ref
-elements to specify that an EJB reference is linked to an
-enterprise bean.
-
-The value of the ejb-link element must be the ejb-name of an
-enterprise bean in the same ejb-jar file or in another ejb-jar
-file in the same J2EE application unit.
-
-Alternatively, the name in the ejb-link element may be composed of a
-path name specifying the ejb-jar containing the referenced enterprise
-bean with the ejb-name of the target bean appended and separated from
-the path name by "#". The path name is relative to the ejb-jar file
-containing the enterprise bean that is referencing the enterprise bean.
-This allows multiple enterprise beans with the same ejb-name to be
-uniquely identified.
-
-Used in: ejb-local-ref, ejb-ref
-
-Examples:
-
- <ejb-link>EmployeeRecord</ejb-link>
-
- <ejb-link>../products/product.jar#ProductEJB</ejb-link>
-
--->
-<!ELEMENT ejb-link (#PCDATA)>
-
-<!--
-The ejb-local-ref element is used for the declaration of a reference to
-an enterprise bean's local home. The declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of the enterprise bean
- that's referencing the enterprise bean
- - the expected type of the referenced enterprise bean
- - the expected local home and local interfaces of the referenced
- enterprise bean
- - optional ejb-link information, used to specify the referenced
- enterprise bean
-
-Used in: entity, message-driven, session
--->
-<!ELEMENT ejb-local-ref (description?, ejb-ref-name, ejb-ref-type,
- local-home, local, ejb-link?)>
-
-<!--
-The ejb-name element specifies an enterprise bean's name. This name is
-assigned by the ejb-jar file producer to name the enterprise bean in
-the ejb-jar file's deployment descriptor. The name must be unique
-among the names of the enterprise beans in the same ejb-jar file.
-
-There is no architected relationship between the ejb-name in the
-deployment descriptor and the JNDI name that the Deployer will assign
-to the enterprise bean's home.
-
-The name for an entity bean with cmp-version 2.x must conform to the
-lexical rules for an NMTOKEN. The name for an entity bean with
-cmp-version 2.x must not be a reserved literal in EJB QL.
-
-Used in: entity, message-driven, method, relationship-role-source,
-session
-
-Example:
-
-<ejb-name>EmployeeService</ejb-name>
--->
-<!ELEMENT ejb-name (#PCDATA)>
-
-<!--
-The ejb-ql element contains the EJB QL query string that defines
-a finder or select query. This element is defined within the scope of
-a query element whose contents specify the finder or the select method
-that uses the query. The content must be a valid EJB QL query string
-for the entity bean for which the query is specified.
-
-The ejb-ql element must be specified for all queries that are
-expressible in EJB QL.
-
-Used in: query
-
-Example:
-<query>
- <query-method>
- <method-name>ejbSelectPendingLineitems</method-name>
- <method-params/>
- </query-method>
- <ejb-ql>SELECT OBJECT(l) FROM LineItems l WHERE l.shipped <> TRUE
- </ejb-ql>
-</query>
-
--->
-<!ELEMENT ejb-ql (#PCDATA)>
-
-<!--
-The ejb-ref element is used for the declaration of a reference to
-an enterprise bean's home. The declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of
- the enterprise bean that's referencing the enterprise bean
- - the expected type of the referenced enterprise bean
- - the expected home and remote interfaces of the referenced
- enterprise bean
- - optional ejb-link information, used to specify the referenced
- enterprise bean
-
-Used in: entity, message-driven, session
--->
-<!ELEMENT ejb-ref (description?, ejb-ref-name, ejb-ref-type,
- home, remote, ejb-link?)>
-
-<!--
-The ejb-ref-name element contains the name of an EJB reference. The
-EJB reference is an entry in the enterprise bean's environment and is
-relative to the java:comp/env context. The name must be unique
-within the enterprise bean.
-
-It is recommended that name is prefixed with "ejb/".
-
-Used in: ejb-local-ref, ejb-ref
-
-Example:
-
-<ejb-ref-name>ejb/Payroll</ejb-ref-name>
--->
-<!ELEMENT ejb-ref-name (#PCDATA)>
-
-<!--
-The ejb-ref-type element contains the expected type of the
-referenced enterprise bean.
-
-The ejb-ref-type element must be one of the following:
-
- <ejb-ref-type>Entity</ejb-ref-type>
- <ejb-ref-type>Session</ejb-ref-type>
-
-Used in: ejb-local-ref, ejb-ref
--->
-<!ELEMENT ejb-ref-type (#PCDATA)>
-
-<!--
-
-The ejb-relation element describes a relationship between two
-entity beans with container-managed persistence. An ejb-relation
-element contains a description; an optional ejb-relation-name element;
-and exactly two relationship role declarations, defined by the
-ejb-relationship-role elements. The name of the relationship, if
-specified, is unique within the ejb-jar file.
-
-Used in: relationships
--->
-<!ELEMENT ejb-relation (description?, ejb-relation-name?, ejb-relationship-role,
-ejb-relationship-role)>
-
-<!--
-The ejb-relation-name element provides a unique name for a relationship.
-
-Used in: ejb-relation
--->
-<!ELEMENT ejb-relation-name (#PCDATA)>
-
-<!--
-The ejb-relationship-role element describes a role within a
-relationship. There are two roles in each relationship.
-
-The ejb-relationship-role element contains an optional description; an
-optional name for the relationship role; a specification of the
-multiplicity of the role; an optional specification of cascade-delete
-functionality for the role; the role source; and a declaration of the
-cmr-field, if any, by means of which the other side of the
-relationship is accessed from the perspective of the role source.
-
-The multiplicity and role-source element are mandatory.
-
-The relationship-role-source element designates an entity bean by
-means of an ejb-name element. For bidirectional relationships, both
-roles of a relationship must declare a relationship-role-source
-element that specifies a cmr-field in terms of which the relationship
-is accessed. The lack of a cmr-field element in an
-ejb-relationship-role specifies that the relationship is
-unidirectional in navigability and the entity bean that participates
-in the relationship is "not aware" of the relationship.
-
-Used in: ejb-relation
-
-Example:
-
-<ejb-relation>
- <ejb-relation-name>Product-LineItem</ejb-relation-name>
- <ejb-relationship-role>
- <ejb-relationship-role-name>product-has-lineitems
- </ejb-relationship-role-name>
- <multiplicity>One</multiplicity>
- <relationship-role-source>
- <ejb-name>ProductEJB</ejb-name>
- </relationship-role-source>
- </ejb-relationship-role>
-
--->
-<!ELEMENT ejb-relationship-role (description?, ejb-relationship-role-name?,
-multiplicity, cascade-delete?, relationship-role-source, cmr-field?)>
-
-<!--
-The ejb-relationship-role-name element defines a name for a role that
-is unique within an ejb-relation. Different relationships can use the
-same name for a role.
-
-Used in: ejb-relationship-role
--->
-<!ELEMENT ejb-relationship-role-name (#PCDATA)>
-
-<!--
-The enterprise-beans element contains the declarations of one or more
-enterprise beans.
--->
-<!ELEMENT enterprise-beans (session | entity | message-driven)+>
-
-<!--
-The entity element declares an entity bean. The declaration
-consists of:
-
- - an optional description
- - an optional display name
- - an optional small icon file name
- - an optional large icon file name
- - a unique name assigned to the enterprise bean
- in the deployment descriptor
- - the names of the entity bean's remote home and remote
- interfaces, if any
- - the names of the entity bean's local home and local
- interfaces, if any
- - the entity bean's implementation class
- - the entity bean's persistence management type
- - the entity bean's primary key class name
- - an indication of the entity bean's reentrancy
- - an optional specification of the entity bean's cmp-version
- - an optional specification of the entity bean's abstract
- schema name
- - an optional list of container-managed fields
- - an optional specification of the primary key field
- - an optional declaration of the bean's environment entries
- - an optional declaration of the bean's EJB references
- - an optional declaration of the bean's local EJB references
- - an optional declaration of the security role references
- - an optional declaration of the security identity
- to be used for the execution of the bean's methods
- - an optional declaration of the bean's resource manager
- connection factory references
- - an optional declaration of the bean's
- resource environment references
- - an optional set of query declarations
- for finder and select methods for an entity
- bean with cmp-version 2.x.
-
-The optional abstract-schema-name element must be specified for an
-entity bean with container-managed persistence and cmp-version 2.x.
-
-The optional primkey-field may be present in the descriptor if the
-entity's persistence-type is Container.
-
-The optional cmp-version element may be present in the descriptor if
-the entity's persistence-type is Container. If the persistence-type is
-Container and the cmp-version element is not specified, its value
-defaults to 2.x.
-
-The optional home and remote elements must be specified if the entity
-bean cmp-version is 1.x.
-
-The optional home and remote elements must be specified if the entity
-bean has a remote home and remote interface.
-
-The optional local-home and local elements must be specified if the
-entity bean has a local home and local interface.
-
-Either both the local-home and the local elements or both the
-home and the remote elements must be specified.
-
-The optional query elements must be present if the persistence-type is
-Container and the cmp-version is 2.x and query methods other than
-findByPrimaryKey have been defined for the entity bean.
-
-The other elements that are optional are "optional" in the sense that
-they are omitted if the lists represented by them are empty.
-
-At least one cmp-field element must be present in the descriptor if
-the entity's persistence-type is Container and the cmp-version is 1.x,
-and none must not be present if the entity's persistence-type is Bean.
-
-Used in: enterprise-beans
-
--->
-<!ELEMENT entity (description?, display-name?, small-icon?,
- large-icon?, ejb-name, home?, remote?, local-home?,
- local?, ejb-class, persistence-type, prim-key-class,
- reentrant, cmp-version?, abstract-schema-name?,
- cmp-field*, primkey-field?, env-entry*, ejb-ref*,
- ejb-local-ref*, security-role-ref*, security-identity?,
- resource-ref*, resource-env-ref*, query*)>
-
-<!--
-The env-entry element contains the declaration of an enterprise bean's
-environment entry. The declaration consists of an optional
-description, the name of the environment entry, and an optional
-value. If a value is not specified, one must be supplied
-during deployment.
-
-Used in: entity, message-driven, session
--->
-<!ELEMENT env-entry (description?, env-entry-name, env-entry-type,
- env-entry-value?)>
-
-<!--
-The env-entry-name element contains the name of an enterprise bean's
-environment entry. The name is a JNDI name relative to the
-java:comp/env context. The name must be unique within an enterprise bean.
-
-Used in: env-entry
-
-Example:
-
-<env-entry-name>minAmount</env-entry-name>
--->
-<!ELEMENT env-entry-name (#PCDATA)>
-
-<!--
-The env-entry-type element contains the fully-qualified Java type of
-the environment entry value that is expected by the enterprise bean's
-code.
-
-The following are the legal values of env-entry-type:
-
- java.lang.Boolean
- java.lang.Byte
- java.lang.Character
- java.lang.String
- java.lang.Short
- java.lang.Integer
- java.lang.Long
- java.lang.Float
- java.lang.Double
-
-
-Used in: env-entry
-
-Example:
-
-<env-entry-type>java.lang.Boolean</env-entry-type>
--->
-<!ELEMENT env-entry-type (#PCDATA)>
-
-<!--
-The env-entry-value element contains the value of an enterprise bean's
-environment entry. The value must be a String that is valid for the
-constructor of the specified type that takes a single String
-parameter, or for java.lang.Character, a single character.
-
-Used in: env-entry
-
-Example:
-
-<env-entry-value>100.00</env-entry-value>
--->
-<!ELEMENT env-entry-value (#PCDATA)>
-
-<!--
-The exclude list element specifies one or more methods which the
-Assembler marks to be uncallable.
-
-If the method permission relation contains methods that are in the
-exclude list, the Deployer should consider those methods to be
-uncallable.
-
-Used in: assembly-descriptor
--->
-<!ELEMENT exclude-list (description?, method+)>
-
-<!--
-The field-name element specifies the name of a container managed
-field.
-
-The name of the cmp-field of an entity bean with cmp-version 2.x must
-begin with a lowercase letter. This field is accessed by methods whose
-names consists of the name of the field specified by field-name in
-which the first letter is uppercased, prefixed by "get" or "set".
-
-The name of the cmp-field of an entity bean with cmp-version 1.x must
-denote a public field of the enterprise bean class or one of its
-superclasses.
-
-Used in: cmp-field
-
-Example:
-
-
- <field-name>firstName</field-Name>
-
--->
-<!ELEMENT field-name (#PCDATA)>
-
-<!--
-The home element contains the fully-qualified name of the enterprise
-bean's home interface.
-
-Used in: ejb-ref, entity, session
-
-Example:
-
-<home>com.aardvark.payroll.PayrollHome</home>
--->
-<!ELEMENT home (#PCDATA)>
-
-<!--
-The large-icon element contains the name of a file
-containing a large (32 x 32) icon image. The file
-name is a relative path within the enterprise bean's
-ejb-jar file.
-
-The image may be either in the JPEG or GIF format.
-The icon can be used by tools.
-
-Used in: ejb-jar, entity, message-driven, session
-
-Example:
-
-<large-icon>employee-service-icon32x32.jpg</large-icon>
--->
-<!ELEMENT large-icon (#PCDATA)>
-
-<!--
-
-The local element contains the fully-qualified name of the
-enterprise bean's local interface.
-
-Used in: ejb-local-ref, entity, session
-
--->
-<!ELEMENT local (#PCDATA)>
-
-<!--
-
-The local-home element contains the fully-qualified name of the
-enterprise bean's local home interface.
-
-Used in: ejb-local-ref, entity, session
--->
-<!ELEMENT local-home (#PCDATA)>
-
-<!--
-
-The message-driven element declares a message-driven bean. The
-declaration consists of:
-
- - an optional description
- - an optional display name
- - an optional small icon file name
- - an optional large icon file name
- - a name assigned to the enterprise bean in
- the deployment descriptor
- - the message-driven bean's implementation class
- - the message-driven bean's transaction management type
- - an optional declaration of the message-driven bean's
- message selector
- - an optional declaration of the
- acknowledgment mode for the message-driven bean
- if bean-managed transaction demarcation is used
- - an optional declaration of the
- intended destination type of the message-driven bean
- - an optional declaration of the bean's environment entries
- - an optional declaration of the bean's EJB references
- - an optional declaration of the bean's local EJB references
- - an optional declaration of the security
- identity to be used for the execution of the bean's methods
- - an optional declaration of the bean's resource manager
- connection factory references
- - an optional declaration of the bean's resource
- environment references.
-
-Used in: enterprise-beans
--->
-<!ELEMENT message-driven (description?, display-name?, small-icon?,
- large-icon?, ejb-name, ejb-class, transaction-type,
- message-selector?, acknowledge-mode?,
- message-driven-destination?, env-entry*, ejb-ref*,
- ejb-local-ref*, security-identity?, resource-ref*,
- resource-env-ref*)>
-
-<!--
-The message-driven-destination element provides advice to the Deployer
-as to whether a message-driven bean is intended for a Queue or a
-Topic. The declaration consists of: the type of the message-driven
-bean's intended destination and an optional declaration of whether a
-durable or non-durable subscription should be used if the
-destination-type is javax.jms.Topic.
-
-Used in: message-driven
--->
-<!ELEMENT message-driven-destination (destination-type,
-subscription-durability?)>
-
-<!--
-The message-selector element is used to specify the JMS message
-selector to be used in determining which messages a message-driven
-bean is to receive.
-
-Example:
-<message-selector>JMSType = `car' AND color = `blue' AND weight &gt; 2500
-</message-selector>
-
-Used in: message-driven
--->
-<!ELEMENT message-selector (#PCDATA)>
-
-<!--
-
-The method element is used to denote a method of an enterprise
-bean's home or component interface, or, in the case of a message-driven
-bean, the bean's onMessage method, or a set of methods. The ejb-name
-element must be the name of one of the enterprise beans declared in
-the deployment descriptor; the optional method-intf element allows to
-distinguish between a method with the same signature that is multiply
-defined across in both the home and component interfaces; the
-method-name element specifies the method name; and the optional
-method-params elements identify a single method among multiple methods
-with an overloaded method name.
-
-There are three possible styles of the method element syntax:
-
-1.
-<method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>*</method-name>
-</method>
-
- This style is used to refer to all the methods of the specified
- enterprise bean's home and component interfaces.
-
-2.
-<method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>METHOD</method-name>
-</method>>
-
- This style is used to refer to the specified method of the
- specified enterprise bean. If there are multiple methods with
- the same overloaded name, the element of this style refers to
- all the methods with the overloaded name.
-
-
-3.
-<method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>METHOD</method-name>
- <method-params>
- <method-param>PARAM-1</method-param>
- <method-param>PARAM-2</method-param>
- ...
- <method-param>PARAM-n</method-param>
- </method-params>
-<method>
-
-
- This style is used to refer to a single method within a set of
- methods with an overloaded name. PARAM-1 through PARAM-n are the
- fully-qualified Java types of the method's input parameters (if
- the method has no input arguments, the method-params element
- contains no method-param elements). Arrays are specified by the
- array element's type, followed by one or more pair of square
- brackets (e.g. int[][]). If there are multiple methods with the
- same overloaded name, this style refers to all of the overloaded
- methods.
-
-
-Used in: container-transaction, exclude-list, method-permission
-
-Examples:
-
-Style 1: The following method element refers to all the methods of
-the EmployeeService bean's home and component interfaces:
-
-<method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>*</method-name>
-</method>
-
-Style 2: The following method element refers to all the create
-methods of the EmployeeService bean's home interface(s).
-
-<method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>create</method-name>
-</method>
-
-
-Style 3: The following method element refers to the
-create(String firstName, String LastName) method of the
-EmployeeService bean's home interface(s).
-
-<method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
-</method>
-
-
-The following example illustrates a Style 3 element with
-more complex parameter types. The method
-foobar(char s, int i, int[] iar, mypackage.MyClass mycl,
-mypackage.MyClass[][] myclaar) would be specified as:
-
-<method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>foobar</method-name>
- <method-params>
- <method-param>char</method-param>
- <method-param>int</method-param>
- <method-param>int[]</method-param>
- <method-param>mypackage.MyClass</method-param>
- <method-param>mypackage.MyClass[][]</method-param>
- </method-params>
-</method>
-
-
-The optional method-intf element can be used when it becomes necessary
-to differentiate between a method that is multiply defined across the
-enterprise bean's home and component interfaces with the same name and
-signature.
-
-
-For example, the method element
-
-<method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Remote</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
-</method>
-
-
-can be used to differentiate the create(String, String) method defined
-in the remote interface from the create(String, String) method defined
-in the remote home interface, which would be defined as
-
-
-<method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Home</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
-</method>
-
-and the create method that is defined in the local home interface
-which would be defined as
-
-<method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>LocalHome</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
-</method>
-
-
-The method-intf element can be used with all three Styles of the
-method element usage. For example, the following method element
-example could be used to refer to all the methods of the
-EmployeeService bean's remote home interface.
-
-
-<method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Home</method-intf>
- <method-name>*</method-name>
-</method>
-
--->
-<!ELEMENT method (description?, ejb-name, method-intf?, method-name,
-method-params?)>
-
-<!--
-
-The method-intf element allows a method element to differentiate
-between the methods with the same name and signature that are multiply
-defined across the component and home interfaces (e.g, in both an
-enterprise bean's remote and local interfaces; in both an enterprise bean's
-home and remote interfaces, etc.)
-
-The method-intf element must be one of the following:
-
- <method-intf>Home</method-intf>
- <method-intf>Remote</method-intf>
- <method-intf>LocalHome</method-intf>
- <method-intf>Local</method-intf>
-
-Used in: method
--->
-<!ELEMENT method-intf (#PCDATA)>
-
-<!--
-The method-name element contains a name of an enterprise bean method
-or the asterisk (*) character. The asterisk is used when the element
-denotes all the methods of an enterprise bean's component and home
-interfaces.
-
-Used in: method, query-method
--->
-<!ELEMENT method-name (#PCDATA)>
-
-<!--
-The method-param element contains the fully-qualified Java type name
-of a method parameter.
-
-Used in: method-params
--->
-<!ELEMENT method-param (#PCDATA)>
-
-<!--
-The method-params element contains a list of the fully-qualified Java
-type names of the method parameters.
-
-Used in: method, query-method
--->
-<!ELEMENT method-params (method-param*)>
-
-<!--
-
-The method-permission element specifies that one or more security
-roles are allowed to invoke one or more enterprise bean methods. The
-method-permission element consists of an optional description, a list
-of security role names or an indicator to state that the method is
-unchecked for authorization, and a list of method elements.
-
-The security roles used in the method-permission element must be
-defined in the security-role elements of the deployment descriptor,
-and the methods must be methods defined in the enterprise bean's
-component and/or home interfaces.
-
-
-Used in: assembly-descriptor
--->
-<!ELEMENT method-permission (description?, (role-name+|unchecked), method+)>
-
-<!--
-The multiplicity element describes the multiplicity of the role that
-participates in a relation.
-
-The multiplicity element must be one of the two following:
-
- <multiplicity>One</multiplicity>
- <multiplicity>Many</multiplicity>
-
-Used in: ejb-relationship-role
--->
-<!ELEMENT multiplicity (#PCDATA)>
-
-<!--
-The persistence-type element specifies an entity bean's persistence
-management type.
-
-The persistence-type element must be one of the two following:
-
- <persistence-type>Bean</persistence-type>
- <persistence-type>Container</persistence-type>
-
-Used in: entity
--->
-<!ELEMENT persistence-type (#PCDATA)>
-
-<!--
-The prim-key-class element contains the fully-qualified name of an
-entity bean's primary key class.
-
-If the definition of the primary key class is deferred to deployment
-time, the prim-key-class element should specify java.lang.Object.
-
-Used in: entity
-
-Examples:
-
- <prim-key-class>java.lang.String</prim-key-class>
-
- <prim-key-class>com.wombat.empl.EmployeeID</prim-key-class>
-
- <prim-key-class>java.lang.Object</prim-key-class>
-
--->
-<!ELEMENT prim-key-class (#PCDATA)>
-
-<!--
-The primkey-field element is used to specify the name of the primary
-key field for an entity with container-managed persistence.
-
-The primkey-field must be one of the fields declared in the cmp-field
-element, and the type of the field must be the same as the primary key
-type.
-
-The primkey-field element is not used if the primary key maps to
-multiple container-managed fields (i.e. the key is a compound key). In
-this case, the fields of the primary key class must be public, and
-their names must correspond to the field names of the entity bean
-class that comprise the key.
-
-Used in: entity
-
-Example:
-
- <primkey-field>EmployeeId</primkey-field>
-
--->
-<!ELEMENT primkey-field (#PCDATA)>
-
-<!--
-The query element is used to specify a finder or select query. It
-contains
- - an optional description of the query
- - the specification of the finder or select
- method it is used by
- - an optional specification of the result type mapping, if
- the query is for a select method and entity objects are
- returned.
- - the EJB QL query string that defines the query.
-
-Queries that are expressible in EJB QL must use the ejb-ql element to
-specify the query. If a query is not expressible in EJB QL, the
-description element should be used to describe the semantics of the
-query and the ejb-ql element should be empty.
-
-The result-type-mapping is an optional element. It can only be present
-if the query-method specifies a select method that returns entity
-objects. The default value for the result-type-mapping element is
-"Local".
-
-
-Used in: entity
--->
-<!ELEMENT query (description?, query-method, result-type-mapping?, ejb-ql)>
-
-<!--
-The query-method element is used to specify the method for a finder or
-select query.
-
-The method-name element specifies the name of a finder or select
-method in the entity bean's implementation class.
-
-Each method-param must be defined for a query-method using the
-method-params element.
-
-Used in: query
-
-Example:
-
-<query>
- <description>Method finds large orders</description>
- <query-method>
- <method-name>findLargeOrders</method-name>
- <method-params></method-params>
- </query-method>
- <ejb-ql>SELECT OBJECT(o) FROM Order o WHERE o.amount &gt; 1000</ejb-ql>
-</query>
-
--->
-<!ELEMENT query-method (method-name, method-params)>
-
-<!--
-The reentrant element specifies whether an entity bean is reentrant or
-not.
-
-The reentrant element must be one of the two following:
-
- <reentrant>True</reentrant>
- <reentrant>False</reentrant>
-
-Used in: entity
--->
-<!ELEMENT reentrant (#PCDATA)>
-
-<!--
-
-The relationship-role-source element designates the source of a role
-that participates in a relationship. A relationship-role-source
-element uniquely identifies an entity bean.
-
-Used in: ejb-relationship-role
--->
-<!ELEMENT relationship-role-source (description?, ejb-name)>
-
-<!--
-The relationships element describes the relationships in which
-entity beans with container-managed persistence participate. The
-relationships element contains an optional description; and a list of
-ejb-relation elements, which specify the container managed
-relationships.
-
-
-Used in: ejb-jar
--->
-<!ELEMENT relationships (description?, ejb-relation+)>
-
-<!--
-The remote element contains the fully-qualified name of the enterprise
-bean's remote interface.
-
-Used in: ejb-ref, entity, session
-
-Example:
-
-<remote>com.wombat.empl.EmployeeService</remote>
--->
-<!ELEMENT remote (#PCDATA)>
-
-<!--
-The res-auth element specifies whether the enterprise bean code signs
-on programmatically to the resource manager, or whether the Container
-will sign on to the resource manager on behalf of the enterprise bean. In the
-latter case, the Container uses information that is supplied by the
-Deployer.
-
-The value of this element must be one of the two following:
-
- <res-auth>Application</res-auth>
- <res-auth>Container</res-auth>
-
-Used in: resource-ref
--->
-<!ELEMENT res-auth (#PCDATA)>
-
-<!--
-The res-ref-name element specifies the name of a resource manager
-connection factory reference. The name is a JNDI name relative to the
-java:comp/env context. The name must be unique within an enterprise bean.
-
-Used in: resource-ref
--->
-<!ELEMENT res-ref-name (#PCDATA)>
-
-<!--
-The res-sharing-scope element specifies whether connections obtained
-through the given resource manager connection factory reference can be
-shared. The value of this element, if specified, must be one of the
-two following:
-
- <res-sharing-scope>Shareable</res-sharing-scope>
- <res-sharing-scope>Unshareable</res-sharing-scope>
-
-The default value is Shareable.
-
-Used in: resource-ref
--->
-<!ELEMENT res-sharing-scope (#PCDATA)>
-
-<!--
-The res-type element specifies the type of the data source. The type
-is specified by the fully qualified Java language class or interface
-expected to be implemented by the data source.
-
-Used in: resource-ref
--->
-<!ELEMENT res-type (#PCDATA)>
-
-<!--
-The resource-env-ref element contains a declaration of an enterprise bean's
-reference to an administered object associated with a resource
-in the enterprise bean's environment. It consists of an optional
-description, the resource environment reference name, and an
-indication of the resource environment reference type expected by
-the enterprise bean code.
-
-Used in: entity, message-driven, session
-
-Example:
-
-<resource-env-ref>
- <resource-env-ref-name>jms/StockQueue</resource-env-ref-name>
- <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
-</resource-env-ref>
--->
-<!ELEMENT resource-env-ref (description?, resource-env-ref-name,
- resource-env-ref-type)>
-
-<!--
-The resource-env-ref-name element specifies the name of a resource
-environment reference; its value is the environment entry name used in
-the enterprise bean code. The name is a JNDI name relative to the
-java:comp/env context and must be unique within an enterprise bean.
-
-Used in: resource-env-ref
--->
-<!ELEMENT resource-env-ref-name (#PCDATA)>
-
-<!--
-The resource-env-ref-type element specifies the type of a resource
-environment reference. It is the fully qualified name of a Java
-language class or interface.
-
-Used in: resource-env-ref
--->
-<!ELEMENT resource-env-ref-type (#PCDATA)>
-
-<!--
-The resource-ref element contains a declaration of an enterprise bean's
-reference to an external resource. It consists of an optional
-description, the resource manager connection factory reference name,
-the indication of the resource manager connection factory type
-expected by the enterprise bean code, the type of authentication
-(Application or Container), and an optional specification of the
-shareability of connections obtained from the resource (Shareable or
-Unshareable).
-
-Used in: entity, message-driven, session
-
-Example:
-
- <resource-ref>
- <res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
--->
-<!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth,
- res-sharing-scope?)>
-
-<!--
-
-The result-type-mapping element is used in the query element to specify
-whether an abstract schema type returned by a query for a select method
-is to be mapped to an EJBLocalObject or EJBObject type.
-
-The result-type-mapping element must be one of the following:
-
- <result-type-mapping>Local</result-type-mapping>
- <result-type-mapping>Remote</result-type-mapping>
-
-Used in: query
--->
-<!ELEMENT result-type-mapping (#PCDATA)>
-
-<!--
-The role-link element is a reference to a defined security role. The
-role-link element must contain the name of one of the security roles
-defined in the security-role elements.
-
-Used in: security-role-ref
--->
-<!ELEMENT role-link (#PCDATA)>
-
-<!--
-The role-name element contains the name of a security role.
-
-The name must conform to the lexical rules for an NMTOKEN.
-
-Used in: method-permission, run-as, security-role, security-role-ref
--->
-<!ELEMENT role-name (#PCDATA)>
-
-<!--
-The run-as element specifies the run-as identity to be used for the
-execution of the enterprise bean. It contains an optional description, and
-the name of a security role.
-
-Used in: security-identity
--->
-<!ELEMENT run-as (description?, role-name)>
-
-<!--
-
-The security-identity element specifies whether the caller's
-security identity is to be used for the execution of the methods of
-the enterprise bean or whether a specific run-as identity is to be
-used. It contains an optional description and a specification of the
-security identity to be used.
-
-Used in: entity, message-driven, session
--->
-<!ELEMENT security-identity (description?, (use-caller-identity|run-as))>
-
-<!--
-The security-role element contains the definition of a security
-role. The definition consists of an optional description of the
-security role, and the security role name.
-
-Used in: assembly-descriptor
-
-Example:
-
- <security-role>
- <description>
- This role includes all employees who are authorized
- to access the employee service application.
- </description>
- <role-name>employee</role-name>
- </security-role>
--->
-<!ELEMENT security-role (description?, role-name)>
-
-<!--
-The security-role-ref element contains the declaration of a security
-role reference in the enterprise bean's code. The declaration consists
-of an optional description, the security role name used in the code,
-and an optional link to a security role. If the security role is not
-specified, the Deployer must choose an appropriate security role.
-
-The value of the role-name element must be the String used as the
-parameter to the EJBContext.isCallerInRole(String roleName) method
-or the HttpServletRequest.isUserInRole(String role) method.
-
-Used in: entity, session
-
--->
-<!ELEMENT security-role-ref (description?, role-name, role-link?)>
-
-<!--
-The session element declares an session bean. The declaration consists
-of:
- - an optional description
- - an optional display name
- - an optional small icon file name
- - an optional large icon file name
- - a name assigned to the enterprise bean
- in the deployment description
- - the names of the session bean's remote home and
- remote interfaces, if any
- - the names of the session bean's local home and
- local interfaces, if any
- - the session bean's implementation class
- - the session bean's state management type
- - the session bean's transaction management type
- - an optional declaration of the bean's environment entries
- - an optional declaration of the bean's EJB references
- - an optional declaration of the bean's local EJB references
- - an optional declaration of the security role references
- - an optional declaration of the security identity to be
- used for the execution of the bean's methods
- - an optional declaration of the bean's resource manager
- connection factory references
- - an optional declaration of the bean's resource environment
- references.
-
-The elements that are optional are "optional" in the sense that they
-are omitted when if lists represented by them are empty.
-
-Either both the local-home and the local elements or both the
-home and the remote elements must be specified for the session bean.
-
-Used in: enterprise-beans
--->
-<!ELEMENT session (description?, display-name?, small-icon?,
-large-icon?, ejb-name, home?, remote?, local-home?, local?,
-ejb-class, session-type, transaction-type, env-entry*, ejb-ref*,
-ejb-local-ref*, security-role-ref*, security-identity?, resource-ref*,
-resource-env-ref*)>
-
-<!--
-The session-type element describes whether the session bean is a
-stateful session or stateless session.
-
-The session-type element must be one of the two following:
-
- <session-type>Stateful</session-type>
- <session-type>Stateless</session-type>
--->
-<!ELEMENT session-type (#PCDATA)>
-
-<!--
-The small-icon element contains the name of a file
-containing a small (16 x 16) icon image. The file
-name is a relative path within the enterprise bean's
-ejb-jar file.
-
-The image may be either in the JPEG or GIF format.
-The icon can be used by tools.
-
-Used in: ejb-jar, entity, message-driven, session
-
-Example:
-
-<small-icon>employee-service-icon16x16.jpg</small-icon>
--->
-<!ELEMENT small-icon (#PCDATA)>
-
-<!--
-The subscription-durability element specifies whether a JMS topic
-subscription is intended to be durable or nondurable.
-
-The subscription-durability element must be one of the two following:
-
- <subscription-durability>Durable</subscription-durability>
- <subscription-durability>NonDurable</subscription-durability>
-
-Used in: message-driven-destination
--->
-<!ELEMENT subscription-durability (#PCDATA)>
-
-<!--
-The trans-attribute element specifies how the container must manage
-the transaction boundaries when delegating a method invocation to an
-enterprise bean's business method.
-
-The value of trans-attribute must be one of the following:
-
-
- <trans-attribute>NotSupported</trans-attribute>
- <trans-attribute>Supports</trans-attribute>
- <trans-attribute>Required</trans-attribute>
- <trans-attribute>RequiresNew</trans-attribute>
- <trans-attribute>Mandatory</trans-attribute>
- <trans-attribute>Never</trans-attribute>
-
-Used in: container-transaction
--->
-<!ELEMENT trans-attribute (#PCDATA)>
-
-<!--
-The transaction-type element specifies an enterprise bean's
-transaction management type.
-
-The transaction-type element must be one of the two following:
-
- <transaction-type>Bean</transaction-type>
- <transaction-type>Container</transaction-type>
-
-Used in: message-driven, session
--->
-<!ELEMENT transaction-type (#PCDATA)>
-
-<!--
-The unchecked element specifies that a method is not checked for authorization
-by the container prior to invocation of the method.
-
-Used in: method-permission
--->
-<!ELEMENT unchecked EMPTY>
-
-<!--
-
-The use-caller-identity element specifies that the caller's security
-identity be used as the security identity for the execution of the
-enterprise bean's methods.
-
-Used in: security-identity
--->
-<!ELEMENT use-caller-identity EMPTY>
-
-<!--
-The ID mechanism is to allow tools that produce additional deployment
-information (i.e., information beyond the standard deployment
-descriptor information) to store the non-standard information in a
-separate file, and easily refer from these tool-specific files to the
-information in the standard deployment descriptor.
-
-Tools are not allowed to add the non-standard information into the
-standard deployment descriptor.
--->
-
-<!ATTLIST abstract-schema-name id ID #IMPLIED>
-<!ATTLIST acknowledge-mode id ID #IMPLIED>
-<!ATTLIST assembly-descriptor id ID #IMPLIED>
-<!ATTLIST cascade-delete id ID #IMPLIED>
-<!ATTLIST cmp-field id ID #IMPLIED>
-<!ATTLIST cmp-version id ID #IMPLIED>
-<!ATTLIST cmr-field id ID #IMPLIED>
-<!ATTLIST cmr-field-name id ID #IMPLIED>
-<!ATTLIST cmr-field-type id ID #IMPLIED>
-<!ATTLIST container-transaction id ID #IMPLIED>
-<!ATTLIST description id ID #IMPLIED>
-<!ATTLIST destination-type id ID #IMPLIED>
-<!ATTLIST display-name id ID #IMPLIED>
-<!ATTLIST ejb-class id ID #IMPLIED>
-<!ATTLIST ejb-client-jar id ID #IMPLIED>
-<!ATTLIST ejb-jar id ID #IMPLIED>
-<!ATTLIST ejb-link id ID #IMPLIED>
-<!ATTLIST ejb-local-ref id ID #IMPLIED>
-<!ATTLIST ejb-name id ID #IMPLIED>
-<!ATTLIST ejb-ql id ID #IMPLIED>
-<!ATTLIST ejb-ref id ID #IMPLIED>
-<!ATTLIST ejb-ref-name id ID #IMPLIED>
-<!ATTLIST ejb-ref-type id ID #IMPLIED>
-<!ATTLIST ejb-relation id ID #IMPLIED>
-<!ATTLIST ejb-relation-name id ID #IMPLIED>
-<!ATTLIST ejb-relationship-role id ID #IMPLIED>
-<!ATTLIST ejb-relationship-role-name id ID #IMPLIED>
-<!ATTLIST enterprise-beans id ID #IMPLIED>
-<!ATTLIST entity id ID #IMPLIED>
-<!ATTLIST env-entry id ID #IMPLIED>
-<!ATTLIST env-entry-name id ID #IMPLIED>
-<!ATTLIST env-entry-type id ID #IMPLIED>
-<!ATTLIST env-entry-value id ID #IMPLIED>
-<!ATTLIST exclude-list id ID #IMPLIED>
-<!ATTLIST field-name id ID #IMPLIED>
-<!ATTLIST home id ID #IMPLIED>
-<!ATTLIST large-icon id ID #IMPLIED>
-<!ATTLIST local id ID #IMPLIED>
-<!ATTLIST local-home id ID #IMPLIED>
-<!ATTLIST message-driven id ID #IMPLIED>
-<!ATTLIST message-driven-destination id ID #IMPLIED>
-<!ATTLIST message-selector id ID #IMPLIED>
-<!ATTLIST method id ID #IMPLIED>
-<!ATTLIST method-intf id ID #IMPLIED>
-<!ATTLIST method-name id ID #IMPLIED>
-<!ATTLIST method-param id ID #IMPLIED>
-<!ATTLIST method-params id ID #IMPLIED>
-<!ATTLIST method-permission id ID #IMPLIED>
-<!ATTLIST multiplicity id ID #IMPLIED>
-<!ATTLIST persistence-type id ID #IMPLIED>
-<!ATTLIST prim-key-class id ID #IMPLIED>
-<!ATTLIST primkey-field id ID #IMPLIED>
-<!ATTLIST query id ID #IMPLIED>
-<!ATTLIST query-method id ID #IMPLIED>
-<!ATTLIST reentrant id ID #IMPLIED>
-<!ATTLIST relationship-role-source id ID #IMPLIED>
-<!ATTLIST relationships id ID #IMPLIED>
-<!ATTLIST remote id ID #IMPLIED>
-<!ATTLIST res-auth id ID #IMPLIED>
-<!ATTLIST res-ref-name id ID #IMPLIED>
-<!ATTLIST res-sharing-scope id ID #IMPLIED>
-<!ATTLIST res-type id ID #IMPLIED>
-<!ATTLIST resource-env-ref id ID #IMPLIED>
-<!ATTLIST resource-env-ref-name id ID #IMPLIED>
-<!ATTLIST resource-env-ref-type id ID #IMPLIED>
-<!ATTLIST resource-ref id ID #IMPLIED>
-<!ATTLIST result-type-mapping id ID #IMPLIED>
-<!ATTLIST role-link id ID #IMPLIED>
-<!ATTLIST role-name id ID #IMPLIED>
-<!ATTLIST run-as id ID #IMPLIED>
-<!ATTLIST security-identity id ID #IMPLIED>
-<!ATTLIST security-role id ID #IMPLIED>
-<!ATTLIST security-role-ref id ID #IMPLIED>
-<!ATTLIST session id ID #IMPLIED>
-<!ATTLIST session-type id ID #IMPLIED>
-<!ATTLIST small-icon id ID #IMPLIED>
-<!ATTLIST subscription-durability id ID #IMPLIED>
-<!ATTLIST trans-attribute id ID #IMPLIED>
-<!ATTLIST transaction-type id ID #IMPLIED>
-<!ATTLIST unchecked id ID #IMPLIED>
-<!ATTLIST use-caller-identity id ID #IMPLIED>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_2_1.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_2_1.xsd
deleted file mode 100644
index 419426b7ad..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_2_1.xsd
+++ /dev/null
@@ -1,2208 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/j2ee"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="2.1">
- <xsd:annotation>
- <xsd:documentation>
- @(#)ejb-jar_2_1.xsds 1.23 08/01/03
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
- Road, Palo Alto, California 94303, U.S.A. All rights
- reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- This is the XML Schema for the EJB 2.1 deployment descriptor.
- The deployment descriptor must be named "META-INF/ejb-jar.xml" in
- the EJB's jar file. All EJB deployment descriptors must indicate
- the ejb-jar schema by using the J2EE namespace:
-
- http://java.sun.com/xml/ns/j2ee
-
- and by indicating the version of the schema by
- using the version element as shown below:
-
- <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd"
- version="2.1">
- ...
- </ejb-jar>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for the
- J2EE namespace with the following location:
-
- http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all J2EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="j2ee_1_4.xsd"/>
-
-
-<!-- **************************************************** -->
-
-
- <xsd:element name="ejb-jar" type="j2ee:ejb-jarType">
- <xsd:annotation>
- <xsd:documentation>
-
- This is the root of the ejb-jar deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:key name="ejb-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-name element contains the name of an enterprise
- bean. The name must be unique within the ejb-jar file.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:enterprise-beans/*"/>
- <xsd:field xpath="j2ee:ejb-name"/>
- </xsd:key>
-
- <xsd:keyref name="ejb-name-references"
- refer="j2ee:ejb-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The keyref indicates the references from
- relationship-role-source must be to a specific ejb-name
- defined within the scope of enterprise-beans element.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector
- xpath=".//j2ee:ejb-relationship-role/j2ee:relationship-role-source"/>
- <xsd:field
- xpath="j2ee:ejb-name"/>
- </xsd:keyref>
-
- <xsd:key name="role-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- A role-name-key is specified to allow the references
- from the security-role-refs.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:assembly-descriptor/j2ee:security-role"/>
- <xsd:field xpath="j2ee:role-name"/>
- </xsd:key>
-
- <xsd:keyref name="role-name-references"
- refer="j2ee:role-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The keyref indicates the references from
- security-role-ref to a specified role-name.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:enterprise-beans/*/j2ee:security-role-ref"/>
- <xsd:field xpath="j2ee:role-link"/>
- </xsd:keyref>
- </xsd:element>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="activation-config-propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activation-config-propertyType contains a name/value
- configuration property pair for a message-driven bean.
-
- The properties that are recognized for a particular
- message-driven bean are determined by the messaging type.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="activation-config-property-name"
- type="j2ee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activation-config-property-name element contains
- the name for an activation configuration property of
- a message-driven bean.
-
- For JMS message-driven beans, the following property
- names are recognized: acknowledgeMode,
- messageSelector, destinationType, subscriptionDurability
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="activation-config-property-value"
- type="j2ee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activation-config-property-value element
- contains the value for an activation configuration
- property of a message-driven bean.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="activation-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activation-configType defines information about the
- expected configuration properties of the message-driven bean
- in its operational environment. This may include information
- about message acknowledgement, message selector, expected
- destination type, etc.
-
- The configuration information is expressed in terms of
- name/value configuration properties.
-
- The properties that are recognized for a particular
- message-driven bean are determined by the messaging type.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="activation-config-property"
- type="j2ee:activation-config-propertyType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="assembly-descriptorType">
- <xsd:annotation>
- <xsd:documentation>
-
- The assembly-descriptorType defines
- application-assembly information.
-
- The application-assembly information consists of the
- following parts: the definition of security roles, the
- definition of method permissions, the definition of
- transaction attributes for enterprise beans with
- container-managed transaction demarcation and a list of
- methods to be excluded from being invoked.
-
- All the parts are optional in the sense that they are
- omitted if the lists represented by them are empty.
-
- Providing an assembly-descriptor in the deployment
- descriptor is optional for the ejb-jar file producer.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="security-role"
- type="j2ee:security-roleType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="method-permission"
- type="j2ee:method-permissionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="container-transaction"
- type="j2ee:container-transactionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="message-destination"
- type="j2ee:message-destinationType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="exclude-list"
- type="j2ee:exclude-listType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="cmp-fieldType">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmp-fieldType describes a container-managed field. The
- cmp-fieldType contains an optional description of the field,
- and the name of the field.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="field-name"
- type="j2ee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The field-name element specifies the name of a
- container managed field.
-
- The name of the cmp-field of an entity bean with
- cmp-version 2.x must begin with a lowercase
- letter. This field is accessed by methods whose
- names consists of the name of the field specified by
- field-name in which the first letter is uppercased,
- prefixed by "get" or "set".
-
- The name of the cmp-field of an entity bean with
- cmp-version 1.x must denote a public field of the
- enterprise bean class or one of its superclasses.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="cmp-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmp-versionType specifies the version of an entity bean
- with container-managed persistence. It is used by
- cmp-version elements.
-
- The value must be one of the two following:
-
- 1.x
- 2.x
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="1.x"/>
- <xsd:enumeration value="2.x"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="cmr-field-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmr-field-type element specifies the class of a
- collection-valued logical relationship field in the entity
- bean class. The value of an element using cmr-field-typeType
- must be either: java.util.Collection or java.util.Set.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="java.util.Collection"/>
- <xsd:enumeration value="java.util.Set"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="cmr-fieldType">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmr-fieldType describes the bean provider's view of
- a relationship. It consists of an optional description, and
- the name and the class type of a field in the source of a
- role of a relationship. The cmr-field-name element
- corresponds to the name used for the get and set accessor
- methods for the relationship. The cmr-field-type element is
- used only for collection-valued cmr-fields. It specifies the
- type of the collection that is used.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="cmr-field-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmr-field-name element specifies the name of a
- logical relationship field in the entity bean
- class. The name of the cmr-field must begin with a
- lowercase letter. This field is accessed by methods
- whose names consist of the name of the field
- specified by cmr-field-name in which the first
- letter is uppercased, prefixed by "get" or "set".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="cmr-field-type"
- type="j2ee:cmr-field-typeType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="container-transactionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The container-transactionType specifies how the container
- must manage transaction scopes for the enterprise bean's
- method invocations. It defines an optional description, a
- list of method elements, and a transaction attribute. The
- transaction attribute is to be applied to all the specified
- methods.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="method"
- type="j2ee:methodType"
- maxOccurs="unbounded"/>
- <xsd:element name="trans-attribute"
- type="j2ee:trans-attributeType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-classType contains the fully-qualified name of the
- enterprise bean's class. It is used by ejb-class elements.
-
- Example:
-
- <ejb-class>com.wombat.empl.EmployeeServiceBean</ejb-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-jarType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-jarType defines the root element of the EJB
- deployment descriptor. It contains
-
- - an optional description of the ejb-jar file
- - an optional display name
- - an optional icon that contains a small and a large
- icon file name
- - mandatory structural information about all included
- enterprise beans
- - a descriptor for container managed relationships,
- if any
- - an optional application-assembly descriptor
- - an optional name of an ejb-client-jar file for the
- ejb-jar.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="enterprise-beans"
- type="j2ee:enterprise-beansType"/>
- <xsd:element name="relationships"
- type="j2ee:relationshipsType"
- minOccurs="0">
- <xsd:unique name="relationship-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relation-name contains the name of a
- relation. The name must be unique within
- relationships.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:ejb-relation"/>
- <xsd:field xpath="j2ee:ejb-relation-name"/>
- </xsd:unique>
- </xsd:element>
- <xsd:element name="assembly-descriptor"
- type="j2ee:assembly-descriptorType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Providing an assembly-descriptor in the deployment
- descriptor is optional for the ejb-jar file
- producer.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ejb-client-jar"
- type="j2ee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The optional ejb-client-jar element specifies a JAR
- file that contains the class files necessary for a
- client program to access the
- enterprise beans in the ejb-jar file.
-
- Example:
-
- <ejb-client-jar>employee_service_client.jar
- </ejb-client-jar>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="version"
- type="j2ee:dewey-versionType"
- fixed="2.1"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The version specifies the version of the
- EJB specification that the instance document must
- comply with. This information enables deployment tools
- to validate a particular EJB Deployment
- Descriptor with respect to a specific version of the EJB
- schema.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-nameType specifies an enterprise bean's name. It is
- used by ejb-name elements. This name is assigned by the
- ejb-jar file producer to name the enterprise bean in the
- ejb-jar file's deployment descriptor. The name must be
- unique among the names of the enterprise beans in the same
- ejb-jar file.
-
- There is no architected relationship between the used
- ejb-name in the deployment descriptor and the JNDI name that
- the Deployer will assign to the enterprise bean's home.
-
- The name for an entity bean must conform to the lexical
- rules for an NMTOKEN.
-
- Example:
-
- <ejb-name>EmployeeService</ejb-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:xsdNMTOKENType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-relationType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relationType describes a relationship between two
- entity beans with container-managed persistence. It is used
- by ejb-relation elements. It contains a description; an
- optional ejb-relation-name element; and exactly two
- relationship role declarations, defined by the
- ejb-relationship-role elements. The name of the
- relationship, if specified, is unique within the ejb-jar
- file.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-relation-name"
- type="j2ee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relation-name element provides a unique name
- within the ejb-jar file for a relationship.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ejb-relationship-role"
- type="j2ee:ejb-relationship-roleType"/>
- <xsd:element name="ejb-relationship-role"
- type="j2ee:ejb-relationship-roleType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-relationship-roleType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-relationship-roleType describes a role within a
- relationship. There are two roles in each relationship.
-
- The ejb-relationship-roleType contains an optional
- description; an optional name for the relationship role; a
- specification of the multiplicity of the role; an optional
- specification of cascade-delete functionality for the role;
- the role source; and a declaration of the cmr-field, if any,
- by means of which the other side of the relationship is
- accessed from the perspective of the role source.
-
- The multiplicity and role-source element are mandatory.
-
- The relationship-role-source element designates an entity
- bean by means of an ejb-name element. For bidirectional
- relationships, both roles of a relationship must declare a
- relationship-role-source element that specifies a cmr-field
- in terms of which the relationship is accessed. The lack of
- a cmr-field element in an ejb-relationship-role specifies
- that the relationship is unidirectional in navigability and
- the entity bean that participates in the relationship is
- "not aware" of the relationship.
-
- Example:
-
- <ejb-relation>
- <ejb-relation-name>Product-LineItem</ejb-relation-name>
- <ejb-relationship-role>
- <ejb-relationship-role-name>product-has-lineitems
- </ejb-relationship-role-name>
- <multiplicity>One</multiplicity>
- <relationship-role-source>
- <ejb-name>ProductEJB</ejb-name>
- </relationship-role-source>
- </ejb-relationship-role>
- </ejb-relation>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-relationship-role-name"
- type="j2ee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relationship-role-name element defines a
- name for a role that is unique within an
- ejb-relation. Different relationships can use the
- same name for a role.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="multiplicity"
- type="j2ee:multiplicityType"/>
- <xsd:element name="cascade-delete"
- type="j2ee:emptyType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The cascade-delete element specifies that, within a
- particular relationship, the lifetime of one or more
- entity beans is dependent upon the lifetime of
- another entity bean. The cascade-delete element can
- only be specified for an ejb-relationship-role
- element contained in an ejb-relation element in
- which the other ejb-relationship-role
- element specifies a multiplicity of One.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="relationship-role-source"
- type="j2ee:relationship-role-sourceType"/>
- <xsd:element name="cmr-field"
- type="j2ee:cmr-fieldType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="enterprise-beansType">
- <xsd:annotation>
- <xsd:documentation>
-
- The enterprise-beansType declares one or more enterprise
- beans. Each bean can be a session, entity or message-driven
- bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="session"
- type="j2ee:session-beanType">
- <xsd:unique name="session-ejb-local-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of
- an EJB reference. The EJB reference is an entry in
- the component's environment and is relative to the
- java:comp/env context. The name must be unique within
- the component.
-
- It is recommended that name be prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:ejb-local-ref"/>
- <xsd:field xpath="j2ee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="session-ejb-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- component's environment and is relative to the
- java:comp/env context. The name must be unique
- within the component.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:ejb-ref"/>
- <xsd:field xpath="j2ee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="session-resource-env-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:resource-env-ref"/>
- <xsd:field xpath="j2ee:resource-env-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="session-message-destination-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies the name
- of a message destination reference; its value is
- the message destination reference name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:message-destination-ref"/>
- <xsd:field xpath="j2ee:message-destination-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="session-res-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference. The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:resource-ref"/>
- <xsd:field xpath="j2ee:res-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="session-env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of a
- component's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The
- name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:env-entry"/>
- <xsd:field xpath="j2ee:env-entry-name"/>
- </xsd:unique>
- </xsd:element>
-
- <xsd:element name="entity"
- type="j2ee:entity-beanType">
- <xsd:unique name="entity-ejb-local-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of
- an EJB reference. The EJB reference is an entry in
- the component's environment and is relative to the
- java:comp/env context. The name must be unique within
- the component.
-
- It is recommended that name be prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:ejb-local-ref"/>
- <xsd:field xpath="j2ee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="entity-ejb-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- component's environment and is relative to the
- java:comp/env context. The name must be unique
- within the component.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:ejb-ref"/>
- <xsd:field xpath="j2ee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="entity-resource-env-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:resource-env-ref"/>
- <xsd:field xpath="j2ee:resource-env-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="entity-message-destination-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies the name
- of a message destination reference; its value is
- the message destination reference name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:message-destination-ref"/>
- <xsd:field xpath="j2ee:message-destination-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="entity-res-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference. The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:resource-ref"/>
- <xsd:field xpath="j2ee:res-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="entity-env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of a
- component's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The
- name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:env-entry"/>
- <xsd:field xpath="j2ee:env-entry-name"/>
- </xsd:unique>
- </xsd:element>
-
- <xsd:element name="message-driven"
- type="j2ee:message-driven-beanType">
- <xsd:unique name="messaged-ejb-local-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of
- an EJB reference. The EJB reference is an entry in
- the component's environment and is relative to the
- java:comp/env context. The name must be unique within
- the component.
-
- It is recommended that name be prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:ejb-local-ref"/>
- <xsd:field xpath="j2ee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="messaged-ejb-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- component's environment and is relative to the
- java:comp/env context. The name must be unique
- within the component.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:ejb-ref"/>
- <xsd:field xpath="j2ee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="messaged-resource-env-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:resource-env-ref"/>
- <xsd:field xpath="j2ee:resource-env-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="messaged-message-destination-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies the name
- of a message destination reference; its value is
- the message destination reference name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:message-destination-ref"/>
- <xsd:field xpath="j2ee:message-destination-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="messaged-res-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference. The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:resource-ref"/>
- <xsd:field xpath="j2ee:res-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="messaged-env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of a
- component's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The
- name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:env-entry"/>
- <xsd:field xpath="j2ee:env-entry-name"/>
- </xsd:unique>
- </xsd:element>
-
- </xsd:choice>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="entity-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The entity-beanType declares an entity bean. The declaration
- consists of:
-
- - an optional description
- - an optional display name
- - an optional icon element that contains a small and a large
- icon file name
- - a unique name assigned to the enterprise bean
- in the deployment descriptor
- - the names of the entity bean's remote home
- and remote interfaces, if any
- - the names of the entity bean's local home and local
- interfaces, if any
- - the entity bean's implementation class
- - the entity bean's persistence management type
- - the entity bean's primary key class name
- - an indication of the entity bean's reentrancy
- - an optional specification of the
- entity bean's cmp-version
- - an optional specification of the entity bean's
- abstract schema name
- - an optional list of container-managed fields
- - an optional specification of the primary key
- field
- - an optional declaration of the bean's environment
- entries
- - an optional declaration of the bean's EJB
- references
- - an optional declaration of the bean's local
- EJB references
- - an optional declaration of the bean's web
- service references
- - an optional declaration of the security role
- references
- - an optional declaration of the security identity
- to be used for the execution of the bean's methods
- - an optional declaration of the bean's
- resource manager connection factory references
- - an optional declaration of the bean's
- resource environment references
- - an optional declaration of the bean's message
- destination references
- - an optional set of query declarations
- for finder and select methods for an entity
- bean with cmp-version 2.x.
-
- The optional abstract-schema-name element must be specified
- for an entity bean with container-managed persistence and
- cmp-version 2.x.
-
- The optional primkey-field may be present in the descriptor
- if the entity's persistence-type is Container.
-
- The optional cmp-version element may be present in the
- descriptor if the entity's persistence-type is Container. If
- the persistence-type is Container and the cmp-version
- element is not specified, its value defaults to 2.x.
-
- The optional home and remote elements must be specified if
- the entity bean cmp-version is 1.x.
-
- The optional home and remote elements must be specified if
- the entity bean has a remote home and remote interface.
-
- The optional local-home and local elements must be specified
- if the entity bean has a local home and local interface.
-
- Either both the local-home and the local elements or both
- the home and the remote elements must be specified.
-
- The optional query elements must be present if the
- persistence-type is Container and the cmp-version is 2.x and
- query methods other than findByPrimaryKey have been defined
- for the entity bean.
-
- The other elements that are optional are "optional" in the
- sense that they are omitted if the lists represented by them
- are empty.
-
- At least one cmp-field element must be present in the
- descriptor if the entity's persistence-type is Container and
- the cmp-version is 1.x, and none must not be present if the
- entity's persistence-type is Bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="ejb-name"
- type="j2ee:ejb-nameType"/>
- <xsd:element name="home"
- type="j2ee:homeType"
- minOccurs="0"/>
- <xsd:element name="remote"
- type="j2ee:remoteType"
- minOccurs="0"/>
- <xsd:element name="local-home"
- type="j2ee:local-homeType"
- minOccurs="0"/>
- <xsd:element name="local"
- type="j2ee:localType"
- minOccurs="0"/>
- <xsd:element name="ejb-class"
- type="j2ee:ejb-classType"/>
- <xsd:element name="persistence-type"
- type="j2ee:persistence-typeType"/>
- <xsd:element name="prim-key-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The prim-key-class element contains the
- fully-qualified name of an
- entity bean's primary key class.
-
- If the definition of the primary key class is
- deferred to deployment time, the prim-key-class
- element should specify java.lang.Object.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="reentrant"
- type="j2ee:true-falseType">
- <xsd:annotation>
- <xsd:documentation>
-
- The reentrant element specifies whether an entity
- bean is reentrant or not.
-
- The reentrant element must be one of the two
- following: true or false
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="cmp-version"
- type="j2ee:cmp-versionType"
- minOccurs="0"/>
- <xsd:element name="abstract-schema-name"
- type="j2ee:java-identifierType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The abstract-schema-name element specifies the name
- of the abstract schema type of an entity bean with
- cmp-version 2.x. It is used in EJB QL queries.
-
- For example, the abstract-schema-name for an entity
- bean whose local interface is
- com.acme.commerce.Order might be Order.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="cmp-field"
- type="j2ee:cmp-fieldType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="primkey-field"
- type="j2ee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The primkey-field element is used to specify the
- name of the primary key field for an entity with
- container-managed persistence.
-
- The primkey-field must be one of the fields declared
- in the cmp-field element, and the type of the field
- must be the same as the primary key type.
-
- The primkey-field element is not used if the primary
- key maps to multiple container-managed fields
- (i.e. the key is a compound key). In this case, the
- fields of the primary key class must be public, and
- their names must correspond to the field names of
- the entity bean class that comprise the key.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:group ref="j2ee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="security-role-ref"
- type="j2ee:security-role-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="security-identity"
- type="j2ee:security-identityType"
- minOccurs="0"/>
- <xsd:element name="query"
- type="j2ee:queryType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="exclude-listType">
- <xsd:annotation>
- <xsd:documentation>
-
- The exclude-listType specifies one or more methods which
- the Assembler marks to be uncallable.
-
- If the method permission relation contains methods that are
- in the exclude list, the Deployer should consider those
- methods to be uncallable.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="method"
- type="j2ee:methodType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-driven-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-driven element declares a message-driven
- bean. The declaration consists of:
-
- - an optional description
- - an optional display name
- - an optional icon element that contains a small and a large
- icon file name.
- - a name assigned to the enterprise bean in
- the deployment descriptor
- - the message-driven bean's implementation class
- - an optional declaration of the bean's messaging
- type
- - the message-driven bean's transaction management type
- - an optional declaration of the bean's
- message-destination-type
- - an optional declaration of the bean's
- message-destination-link
- - an optional declaration of the message-driven bean's
- activation configuration properties
- - an optional declaration of the bean's environment
- entries
- - an optional declaration of the bean's EJB references
- - an optional declaration of the bean's local EJB
- references
- - an optional declaration of the bean's web service
- references
- - an optional declaration of the security
- identity to be used for the execution of the bean's
- methods
- - an optional declaration of the bean's
- resource manager connection factory
- references
- - an optional declaration of the bean's resource
- environment references.
- - an optional declaration of the bean's message
- destination references
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="ejb-name"
- type="j2ee:ejb-nameType"/>
- <xsd:element name="ejb-class"
- type="j2ee:ejb-classType"/>
- <xsd:element name="messaging-type"
- type="j2ee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The messaging-type element specifies the message
- listener interface of the message-driven bean. If
- the messaging-type element is not specified, it is
- assumed to be javax.jms.MessageListener.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="transaction-type"
- type="j2ee:transaction-typeType"/>
- <xsd:element name="message-destination-type"
- type="j2ee:message-destination-typeType"
- minOccurs="0"/>
- <xsd:element name="message-destination-link"
- type="j2ee:message-destination-linkType"
- minOccurs="0"/>
- <xsd:element name="activation-config"
- type="j2ee:activation-configType"
- minOccurs="0"/>
- <xsd:group ref="j2ee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="security-identity"
- type="j2ee:security-identityType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-intfType">
-
- <xsd:annotation>
- <xsd:documentation>
-
- The method-intf element allows a method element to
- differentiate between the methods with the same name and
- signature that are multiply defined across the home and
- component interfaces (e.g, in both an enterprise bean's
- remote and local interfaces or in both an enterprise bean's
- home and remote interfaces, etc.); the component and web
- service endpoint interfaces, and so on.
-
- The method-intf element must be one of the following:
-
- Home
- Remote
- LocalHome
- Local
- ServiceEndpoint
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Home"/>
- <xsd:enumeration value="Remote"/>
- <xsd:enumeration value="LocalHome"/>
- <xsd:enumeration value="Local"/>
- <xsd:enumeration value="ServiceEndpoint"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-nameType contains a name of an enterprise
- bean method or the asterisk (*) character. The asterisk is
- used when the element denotes all the methods of an
- enterprise bean's client view interfaces.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-paramsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-paramsType defines a list of the
- fully-qualified Java type names of the method parameters.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="method-param"
- type="j2ee:java-typeType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-param element contains a primitive
- or a fully-qualified Java type name of a method
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-permissionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-permissionType specifies that one or more
- security roles are allowed to invoke one or more enterprise
- bean methods. The method-permissionType consists of an
- optional description, a list of security role names or an
- indicator to state that the method is unchecked for
- authorization, and a list of method elements.
-
- The security roles used in the method-permissionType
- must be defined in the security-role elements of the
- deployment descriptor, and the methods must be methods
- defined in the enterprise bean's home, component and/or web
- service endpoint interfaces.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:choice>
- <xsd:element name="role-name"
- type="j2ee:role-nameType"
- maxOccurs="unbounded"/>
- <xsd:element name="unchecked"
- type="j2ee:emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The unchecked element specifies that a method is
- not checked for authorization by the container
- prior to invocation of the method.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- <xsd:element name="method"
- type="j2ee:methodType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="methodType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The methodType is used to denote a method of an enterprise
- bean's home, component, and/or web service endpoint
- interface, or, in the case of a message-driven bean, the
- bean's message listener method, or a set of such
- methods. The ejb-name element must be the name of one of the
- enterprise beans declared in the deployment descriptor; the
- optional method-intf element allows to distinguish between a
- method with the same signature that is multiply defined
- across the home, component, and/or web service endpoint
- interfaces; the method-name element specifies the method
- name; and the optional method-params elements identify a
- single method among multiple methods with an overloaded
- method name.
-
- There are three possible styles of using methodType element
- within a method element:
-
- 1.
- <method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>*</method-name>
- </method>
-
- This style is used to refer to all the methods of the
- specified enterprise bean's home, component, and/or web
- service endpoint interfaces.
-
- 2.
- <method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>METHOD</method-name>
- </method>
-
- This style is used to refer to the specified method of
- the specified enterprise bean. If there are multiple
- methods with the same overloaded name, the element of
- this style refers to all the methods with the overloaded
- name.
-
- 3.
- <method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>METHOD</method-name>
- <method-params>
- <method-param>PARAM-1</method-param>
- <method-param>PARAM-2</method-param>
- ...
- <method-param>PARAM-n</method-param>
- </method-params>
- </method>
-
- This style is used to refer to a single method within a
- set of methods with an overloaded name. PARAM-1 through
- PARAM-n are the fully-qualified Java types of the
- method's input parameters (if the method has no input
- arguments, the method-params element contains no
- method-param elements). Arrays are specified by the
- array element's type, followed by one or more pair of
- square brackets (e.g. int[][]). If there are multiple
- methods with the same overloaded name, this style refers
- to all of the overloaded methods.
-
- Examples:
-
- Style 1: The following method element refers to all the
- methods of the EmployeeService bean's home, component,
- and/or web service endpoint interfaces:
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>*</method-name>
- </method>
-
- Style 2: The following method element refers to all the
- create methods of the EmployeeService bean's home
- interface(s).
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>create</method-name>
- </method>
-
- Style 3: The following method element refers to the
- create(String firstName, String LastName) method of the
- EmployeeService bean's home interface(s).
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- The following example illustrates a Style 3 element with
- more complex parameter types. The method
- foobar(char s, int i, int[] iar, mypackage.MyClass mycl,
- mypackage.MyClass[][] myclaar) would be specified as:
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>foobar</method-name>
- <method-params>
- <method-param>char</method-param>
- <method-param>int</method-param>
- <method-param>int[]</method-param>
- <method-param>mypackage.MyClass</method-param>
- <method-param>mypackage.MyClass[][]</method-param>
- </method-params>
- </method>
-
- The optional method-intf element can be used when it becomes
- necessary to differentiate between a method that is multiply
- defined across the enterprise bean's home, component, and/or
- web service endpoint interfaces with the same name and
- signature.
-
- For example, the method element
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Remote</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- can be used to differentiate the create(String, String)
- method defined in the remote interface from the
- create(String, String) method defined in the remote home
- interface, which would be defined as
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Home</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- and the create method that is defined in the local home
- interface which would be defined as
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>LocalHome</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- The method-intf element can be used with all th ree Styles
- of the method element usage. For example, the following
- method element example could be used to refer to all the
- methods of the EmployeeService bean's remote home interface.
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Home</method-intf>
- <method-name>*</method-name>
- </method>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ejb-name"
- type="j2ee:ejb-nameType"/>
- <xsd:element name="method-intf"
- type="j2ee:method-intfType"
- minOccurs="0">
- </xsd:element>
- <xsd:element name="method-name"
- type="j2ee:method-nameType"/>
- <xsd:element name="method-params"
- type="j2ee:method-paramsType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="multiplicityType">
- <xsd:annotation>
- <xsd:documentation>
-
- The multiplicityType describes the multiplicity of the
- role that participates in a relation.
-
- The value must be one of the two following:
-
- One
- Many
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="One"/>
- <xsd:enumeration value="Many"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="persistence-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The persistence-typeType specifies an entity bean's persistence
- management type.
-
- The persistence-type element must be one of the two following:
-
- Bean
- Container
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Bean"/>
- <xsd:enumeration value="Container"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="query-methodType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The query-method specifies the method for a finder or select
- query.
-
- The method-name element specifies the name of a finder or select
- method in the entity bean's implementation class.
-
- Each method-param must be defined for a query-method using the
- method-params element.
-
- It is used by the query-method element.
-
- Example:
-
- <query>
- <description>Method finds large orders</description>
- <query-method>
- <method-name>findLargeOrders</method-name>
- <method-params></method-params>
- </query-method>
- <ejb-ql>
- SELECT OBJECT(o) FROM Order o
- WHERE o.amount &gt; 1000
- </ejb-ql>
- </query>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="method-name"
- type="j2ee:method-nameType"/>
- <xsd:element name="method-params"
- type="j2ee:method-paramsType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="queryType">
- <xsd:annotation>
- <xsd:documentation>
-
- The queryType defines a finder or select
- query. It contains
- - an optional description of the query
- - the specification of the finder or select
- method it is used by
- - an optional specification of the result type
- mapping, if the query is for a select method
- and entity objects are returned.
- - the EJB QL query string that defines the query.
-
- Queries that are expressible in EJB QL must use the ejb-ql
- element to specify the query. If a query is not expressible
- in EJB QL, the description element should be used to
- describe the semantics of the query and the ejb-ql element
- should be empty.
-
- The result-type-mapping is an optional element. It can only
- be present if the query-method specifies a select method
- that returns entity objects. The default value for the
- result-type-mapping element is "Local".
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType" minOccurs="0"/>
- <xsd:element name="query-method"
- type="j2ee:query-methodType"/>
- <xsd:element name="result-type-mapping"
- type="j2ee:result-type-mappingType"
- minOccurs="0"/>
- <xsd:element name="ejb-ql"
- type="j2ee:xsdStringType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="relationship-role-sourceType">
- <xsd:annotation>
- <xsd:documentation>
-
- The relationship-role-sourceType designates the source of a
- role that participates in a relationship. A
- relationship-role-sourceType is used by
- relationship-role-source elements to uniquely identify an
- entity bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-name"
- type="j2ee:ejb-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="relationshipsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The relationshipsType describes the relationships in
- which entity beans with container-managed persistence
- participate. The relationshipsType contains an optional
- description; and a list of ejb-relation elements, which
- specify the container managed relationships.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-relation"
- type="j2ee:ejb-relationType"
- maxOccurs="unbounded">
-
- <xsd:unique name="role-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relationship-role-name contains the name of a
- relationship role. The name must be unique within
- a relationship, but can be reused in different
- relationships.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector
- xpath=".//j2ee:ejb-relationship-role-name"/>
- <xsd:field
- xpath="."/>
- </xsd:unique>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="result-type-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The result-type-mappingType is used in the query element to
- specify whether an abstract schema type returned by a query
- for a select method is to be mapped to an EJBLocalObject or
- EJBObject type.
-
- The value must be one of the following:
-
- Local
- Remote
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Local"/>
- <xsd:enumeration value="Remote"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-identityType">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-identityType specifies whether the caller's
- security identity is to be used for the execution of the
- methods of the enterprise bean or whether a specific run-as
- identity is to be used. It contains an optional description
- and a specification of the security identity to be used.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:choice>
- <xsd:element name="use-caller-identity"
- type="j2ee:emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The use-caller-identity element specifies that
- the caller's security identity be used as the
- security identity for the execution of the
- enterprise bean's methods.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="run-as"
- type="j2ee:run-asType"/>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="session-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The session-beanType declares an session bean. The
- declaration consists of:
-
- - an optional description
- - an optional display name
- - an optional icon element that contains a small and a large
- icon file name
- - a name assigned to the enterprise bean
- in the deployment description
- - the names of the session bean's remote home and
- remote interfaces, if any
- - the names of the session bean's local home and
- local interfaces, if any
- - the name of the session bean's web service endpoint
- interface, if any
- - the session bean's implementation class
- - the session bean's state management type
- - the session bean's transaction management type
- - an optional declaration of the bean's
- environment entries
- - an optional declaration of the bean's EJB references
- - an optional declaration of the bean's local
- EJB references
- - an optional declaration of the bean's web
- service references
- - an optional declaration of the security role
- references
- - an optional declaration of the security identity
- to be used for the execution of the bean's methods
- - an optional declaration of the bean's resource
- manager connection factory references
- - an optional declaration of the bean's resource
- environment references.
- - an optional declaration of the bean's message
- destination references
-
- The elements that are optional are "optional" in the sense
- that they are omitted when if lists represented by them are
- empty.
-
- Either both the local-home and the local elements or both
- the home and the remote elements must be specified for the
- session bean.
-
- The service-endpoint element may only be specified if the
- bean is a stateless session bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="ejb-name"
- type="j2ee:ejb-nameType"/>
- <xsd:element name="home"
- type="j2ee:homeType"
- minOccurs="0"/>
- <xsd:element name="remote"
- type="j2ee:remoteType"
- minOccurs="0"/>
- <xsd:element name="local-home"
- type="j2ee:local-homeType"
- minOccurs="0"/>
- <xsd:element name="local"
- type="j2ee:localType"
- minOccurs="0"/>
- <xsd:element name="service-endpoint"
- type="j2ee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint element contains the
- fully-qualified name of the enterprise bean's web
- service endpoint interface. The service-endpoint
- element may only be specified for a stateless
- session bean. The specified interface must be a
- valid JAX-RPC service endpoint interface.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ejb-class"
- type="j2ee:ejb-classType"/>
- <xsd:element name="session-type"
- type="j2ee:session-typeType"/>
- <xsd:element name="transaction-type"
- type="j2ee:transaction-typeType"/>
- <xsd:group ref="j2ee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="security-role-ref"
- type="j2ee:security-role-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="security-identity"
- type="j2ee:security-identityType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="session-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The session-typeType describes whether the session bean is a
- stateful session or stateless session. It is used by
- session-type elements.
-
- The value must be one of the two following:
-
- Stateful
- Stateless
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Stateful"/>
- <xsd:enumeration value="Stateless"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="trans-attributeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The trans-attributeType specifies how the container must
- manage the transaction boundaries when delegating a method
- invocation to an enterprise bean's business method.
-
- The value must be one of the following:
-
- NotSupported
- Supports
- Required
- RequiresNew
- Mandatory
- Never
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="NotSupported"/>
- <xsd:enumeration value="Supports"/>
- <xsd:enumeration value="Required"/>
- <xsd:enumeration value="RequiresNew"/>
- <xsd:enumeration value="Mandatory"/>
- <xsd:enumeration value="Never"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="transaction-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The transaction-typeType specifies an enterprise bean's
- transaction management type.
-
- The transaction-type must be one of the two following:
-
- Bean
- Container
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Bean"/>
- <xsd:enumeration value="Container"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_3_0.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_3_0.xsd
deleted file mode 100644
index 48282913a4..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_3_0.xsd
+++ /dev/null
@@ -1,2706 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="3.0">
- <xsd:annotation>
- <xsd:documentation>
- @(#)ejb-jar_3_0.xsds 1.51 02/23/06
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003-2006 Sun Microsystems, Inc.
- 4150 Network Circle
- Santa Clara, California 95054
- U.S.A
- All rights reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- This is the XML Schema for the EJB 3.0 deployment descriptor.
- The deployment descriptor must be named "META-INF/ejb-jar.xml" in
- the EJB's jar file. All EJB deployment descriptors must indicate
- the ejb-jar schema by using the Java EE namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and by indicating the version of the schema by
- using the version element as shown below:
-
- <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
- version="3.0">
- ...
- </ejb-jar>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for the
- Java EE namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all Java EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_5.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:element name="ejb-jar" type="javaee:ejb-jarType">
- <xsd:annotation>
- <xsd:documentation>
-
- This is the root of the ejb-jar deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:key name="ejb-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-name element contains the name of an enterprise
- bean. The name must be unique within the ejb-jar file.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:enterprise-beans/*"/>
- <xsd:field xpath="javaee:ejb-name"/>
- </xsd:key>
-
- <xsd:keyref name="ejb-name-references"
- refer="javaee:ejb-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The keyref indicates the references from
- relationship-role-source must be to a specific ejb-name
- defined within the scope of enterprise-beans element.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector
-xpath=".//javaee:ejb-relationship-role/javaee:relationship-role-source"/>
- <xsd:field
- xpath="javaee:ejb-name"/>
- </xsd:keyref>
-
- <xsd:key name="role-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- A role-name-key is specified to allow the references
- from the security-role-refs.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:assembly-descriptor/javaee:security-role"/>
- <xsd:field xpath="javaee:role-name"/>
- </xsd:key>
-
- <xsd:keyref name="role-name-references"
- refer="javaee:role-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The keyref indicates the references from
- security-role-ref to a specified role-name.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:enterprise-beans/*/javaee:security-role-ref"/>
- <xsd:field xpath="javaee:role-link"/>
- </xsd:keyref>
- </xsd:element>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="activation-config-propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activation-config-propertyType contains a name/value
- configuration property pair for a message-driven bean.
-
- The properties that are recognized for a particular
- message-driven bean are determined by the messaging type.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="activation-config-property-name"
- type="javaee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activation-config-property-name element contains
- the name for an activation configuration property of
- a message-driven bean.
-
- For JMS message-driven beans, the following property
- names are recognized: acknowledgeMode,
- messageSelector, destinationType, subscriptionDurability
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="activation-config-property-value"
- type="javaee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activation-config-property-value element
- contains the value for an activation configuration
- property of a message-driven bean.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="activation-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activation-configType defines information about the
- expected configuration properties of the message-driven bean
- in its operational environment. This may include information
- about message acknowledgement, message selector, expected
- destination type, etc.
-
- The configuration information is expressed in terms of
- name/value configuration properties.
-
- The properties that are recognized for a particular
- message-driven bean are determined by the messaging type.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="activation-config-property"
- type="javaee:activation-config-propertyType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="application-exceptionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The application-exceptionType declares an application
- exception. The declaration consists of:
-
- - the exception class. When the container receives
- an exception of this type, it is required to
- forward this exception as an applcation exception
- to the client regardless of whether it is a checked
- or unchecked exception.
- - an optional rollback element. If this element is
- set to true, the container must rollback the current
- transaction before forwarding the exception to the
- client. If not specified, it defaults to false.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="exception-class"
- type="javaee:fully-qualified-classType"/>
- <xsd:element name="rollback"
- type="javaee:true-falseType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="around-invokeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The around-invoke type specifies a method on a
- class to be called during the around invoke portion of an
- ejb invocation. Note that each class may have only one
- around invoke method and that the method may not be
- overloaded.
-
- If the class element is missing then
- the class defining the callback is assumed to be the
- interceptor class or component class in scope at the
- location in the descriptor in which the around invoke
- definition appears.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="class"
- type="javaee:fully-qualified-classType"
- minOccurs="0"/>
- <xsd:element name="method-name"
- type="javaee:java-identifierType"/>
- </xsd:sequence>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="assembly-descriptorType">
- <xsd:annotation>
- <xsd:documentation>
-
- The assembly-descriptorType defines
- application-assembly information.
-
- The application-assembly information consists of the
- following parts: the definition of security roles, the
- definition of method permissions, the definition of
- transaction attributes for enterprise beans with
- container-managed transaction demarcation, the definition
- of interceptor bindings, a list of
- methods to be excluded from being invoked, and a list of
- exception types that should be treated as application exceptions.
-
- All the parts are optional in the sense that they are
- omitted if the lists represented by them are empty.
-
- Providing an assembly-descriptor in the deployment
- descriptor is optional for the ejb-jar file producer.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="security-role"
- type="javaee:security-roleType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="method-permission"
- type="javaee:method-permissionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="container-transaction"
- type="javaee:container-transactionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="interceptor-binding"
- type="javaee:interceptor-bindingType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="message-destination"
- type="javaee:message-destinationType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="exclude-list"
- type="javaee:exclude-listType"
- minOccurs="0"/>
- <xsd:element name="application-exception"
- type="javaee:application-exceptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="cmp-fieldType">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmp-fieldType describes a container-managed field. The
- cmp-fieldType contains an optional description of the field,
- and the name of the field.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="field-name"
- type="javaee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The field-name element specifies the name of a
- container managed field.
-
- The name of the cmp-field of an entity bean with
- cmp-version 2.x must begin with a lowercase
- letter. This field is accessed by methods whose
- names consists of the name of the field specified by
- field-name in which the first letter is uppercased,
- prefixed by "get" or "set".
-
- The name of the cmp-field of an entity bean with
- cmp-version 1.x must denote a public field of the
- enterprise bean class or one of its superclasses.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="cmp-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmp-versionType specifies the version of an entity bean
- with container-managed persistence. It is used by
- cmp-version elements.
-
- The value must be one of the two following:
-
- 1.x
- 2.x
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="1.x"/>
- <xsd:enumeration value="2.x"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="cmr-field-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmr-field-type element specifies the class of a
- collection-valued logical relationship field in the entity
- bean class. The value of an element using cmr-field-typeType
- must be either: java.util.Collection or java.util.Set.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="java.util.Collection"/>
- <xsd:enumeration value="java.util.Set"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="cmr-fieldType">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmr-fieldType describes the bean provider's view of
- a relationship. It consists of an optional description, and
- the name and the class type of a field in the source of a
- role of a relationship. The cmr-field-name element
- corresponds to the name used for the get and set accessor
- methods for the relationship. The cmr-field-type element is
- used only for collection-valued cmr-fields. It specifies the
- type of the collection that is used.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="cmr-field-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmr-field-name element specifies the name of a
- logical relationship field in the entity bean
- class. The name of the cmr-field must begin with a
- lowercase letter. This field is accessed by methods
- whose names consist of the name of the field
- specified by cmr-field-name in which the first
- letter is uppercased, prefixed by "get" or "set".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="cmr-field-type"
- type="javaee:cmr-field-typeType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="container-transactionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The container-transactionType specifies how the container
- must manage transaction scopes for the enterprise bean's
- method invocations. It defines an optional description, a
- list of method elements, and a transaction attribute. The
- transaction attribute is to be applied to all the specified
- methods.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="method"
- type="javaee:methodType"
- maxOccurs="unbounded"/>
- <xsd:element name="trans-attribute"
- type="javaee:trans-attributeType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-classType contains the fully-qualified name of the
- enterprise bean's class. It is used by ejb-class elements.
-
- Example:
-
- <ejb-class>com.wombat.empl.EmployeeServiceBean</ejb-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-jarType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-jarType defines the root element of the EJB
- deployment descriptor. It contains
-
- - an optional description of the ejb-jar file
- - an optional display name
- - an optional icon that contains a small and a large
- icon file name
- - structural information about all included
- enterprise beans that is not specified through
- annotations
- - structural information about interceptor classes
- - a descriptor for container managed relationships,
- if any.
- - an optional application-assembly descriptor
- - an optional name of an ejb-client-jar file for the
- ejb-jar.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="enterprise-beans"
- type="javaee:enterprise-beansType"
- minOccurs="0"/>
- <xsd:element name="interceptors"
- type="javaee:interceptorsType"
- minOccurs="0"/>
- <xsd:element name="relationships"
- type="javaee:relationshipsType"
- minOccurs="0">
- <xsd:unique name="relationship-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relation-name contains the name of a
- relation. The name must be unique within
- relationships.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-relation"/>
- <xsd:field xpath="javaee:ejb-relation-name"/>
- </xsd:unique>
- </xsd:element>
- <xsd:element name="assembly-descriptor"
- type="javaee:assembly-descriptorType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Providing an assembly-descriptor in the deployment
- descriptor is optional for the ejb-jar file
- producer.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ejb-client-jar"
- type="javaee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The optional ejb-client-jar element specifies a JAR
- file that contains the class files necessary for a
- client program to access the
- enterprise beans in the ejb-jar file.
-
- Example:
-
- <ejb-client-jar>employee_service_client.jar
- </ejb-client-jar>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="version"
- type="javaee:dewey-versionType"
- fixed="3.0"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The version specifies the version of the
- EJB specification that the instance document must
- comply with. This information enables deployment tools
- to validate a particular EJB Deployment
- Descriptor with respect to a specific version of the EJB
- schema.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="metadata-complete" type="xsd:boolean">
- <xsd:annotation>
- <xsd:documentation>
-
- The metadata-complete attribute defines whether this
- deployment descriptor and other related deployment
- descriptors for this module (e.g., web service
- descriptors) are complete, or whether the class
- files available to this module and packaged with
- this application should be examined for annotations
- that specify deployment information.
-
- If metadata-complete is set to "true", the deployment
- tool must ignore any annotations that specify deployment
- information, which might be present in the class files
- of the application.
-
- If metadata-complete is not specified or is set to
- "false", the deployment tool must examine the class
- files of the application for annotations, as
- specified by the specifications.
-
- </xsd:documentation>
- </xsd:annotation>
-
- </xsd:attribute>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-nameType specifies an enterprise bean's name. It is
- used by ejb-name elements. This name is assigned by the
- ejb-jar file producer to name the enterprise bean in the
- ejb-jar file's deployment descriptor. The name must be
- unique among the names of the enterprise beans in the same
- ejb-jar file.
-
- There is no architected relationship between the used
- ejb-name in the deployment descriptor and the JNDI name that
- the Deployer will assign to the enterprise bean's home.
-
- The name for an entity bean must conform to the lexical
- rules for an NMTOKEN.
-
- Example:
-
- <ejb-name>EmployeeService</ejb-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:xsdNMTOKENType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-relationType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relationType describes a relationship between two
- entity beans with container-managed persistence. It is used
- by ejb-relation elements. It contains a description; an
- optional ejb-relation-name element; and exactly two
- relationship role declarations, defined by the
- ejb-relationship-role elements. The name of the
- relationship, if specified, is unique within the ejb-jar
- file.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-relation-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relation-name element provides a unique name
- within the ejb-jar file for a relationship.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ejb-relationship-role"
- type="javaee:ejb-relationship-roleType"/>
- <xsd:element name="ejb-relationship-role"
- type="javaee:ejb-relationship-roleType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-relationship-roleType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-relationship-roleType describes a role within a
- relationship. There are two roles in each relationship.
-
- The ejb-relationship-roleType contains an optional
- description; an optional name for the relationship role; a
- specification of the multiplicity of the role; an optional
- specification of cascade-delete functionality for the role;
- the role source; and a declaration of the cmr-field, if any,
- by means of which the other side of the relationship is
- accessed from the perspective of the role source.
-
- The multiplicity and role-source element are mandatory.
-
- The relationship-role-source element designates an entity
- bean by means of an ejb-name element. For bidirectional
- relationships, both roles of a relationship must declare a
- relationship-role-source element that specifies a cmr-field
- in terms of which the relationship is accessed. The lack of
- a cmr-field element in an ejb-relationship-role specifies
- that the relationship is unidirectional in navigability and
- the entity bean that participates in the relationship is
- "not aware" of the relationship.
-
- Example:
-
- <ejb-relation>
- <ejb-relation-name>Product-LineItem</ejb-relation-name>
- <ejb-relationship-role>
- <ejb-relationship-role-name>product-has-lineitems
- </ejb-relationship-role-name>
- <multiplicity>One</multiplicity>
- <relationship-role-source>
- <ejb-name>ProductEJB</ejb-name>
- </relationship-role-source>
- </ejb-relationship-role>
- </ejb-relation>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-relationship-role-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relationship-role-name element defines a
- name for a role that is unique within an
- ejb-relation. Different relationships can use the
- same name for a role.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="multiplicity"
- type="javaee:multiplicityType"/>
- <xsd:element name="cascade-delete"
- type="javaee:emptyType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The cascade-delete element specifies that, within a
- particular relationship, the lifetime of one or more
- entity beans is dependent upon the lifetime of
- another entity bean. The cascade-delete element can
- only be specified for an ejb-relationship-role
- element contained in an ejb-relation element in
- which the other ejb-relationship-role
- element specifies a multiplicity of One.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="relationship-role-source"
- type="javaee:relationship-role-sourceType"/>
- <xsd:element name="cmr-field"
- type="javaee:cmr-fieldType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="enterprise-beansType">
- <xsd:annotation>
- <xsd:documentation>
-
- The enterprise-beansType declares one or more enterprise
- beans. Each bean can be a session, entity or message-driven
- bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="session"
- type="javaee:session-beanType">
- <xsd:unique name="session-ejb-local-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of
- an EJB reference. The EJB reference is an entry in
- the component's environment and is relative to the
- java:comp/env context. The name must be unique within
- the component.
-
- It is recommended that name be prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-local-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="session-ejb-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- component's environment and is relative to the
- java:comp/env context. The name must be unique
- within the component.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="session-resource-env-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-env-ref"/>
- <xsd:field xpath="javaee:resource-env-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="session-message-destination-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies the name
- of a message destination reference; its value is
- the message destination reference name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:message-destination-ref"/>
- <xsd:field xpath="javaee:message-destination-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="session-res-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference. The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-ref"/>
- <xsd:field xpath="javaee:res-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="session-env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of a
- component's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The
- name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:env-entry"/>
- <xsd:field xpath="javaee:env-entry-name"/>
- </xsd:unique>
- </xsd:element>
-
- <xsd:element name="entity"
- type="javaee:entity-beanType">
- <xsd:unique name="entity-ejb-local-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of
- an EJB reference. The EJB reference is an entry in
- the component's environment and is relative to the
- java:comp/env context. The name must be unique within
- the component.
-
- It is recommended that name be prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-local-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="entity-ejb-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- component's environment and is relative to the
- java:comp/env context. The name must be unique
- within the component.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="entity-resource-env-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-env-ref"/>
- <xsd:field xpath="javaee:resource-env-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="entity-message-destination-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies the name
- of a message destination reference; its value is
- the message destination reference name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:message-destination-ref"/>
- <xsd:field xpath="javaee:message-destination-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="entity-res-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference. The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-ref"/>
- <xsd:field xpath="javaee:res-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="entity-env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of a
- component's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The
- name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:env-entry"/>
- <xsd:field xpath="javaee:env-entry-name"/>
- </xsd:unique>
- </xsd:element>
-
- <xsd:element name="message-driven"
- type="javaee:message-driven-beanType">
- <xsd:unique name="messaged-ejb-local-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of
- an EJB reference. The EJB reference is an entry in
- the component's environment and is relative to the
- java:comp/env context. The name must be unique within
- the component.
-
- It is recommended that name be prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-local-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="messaged-ejb-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- component's environment and is relative to the
- java:comp/env context. The name must be unique
- within the component.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="messaged-resource-env-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-env-ref"/>
- <xsd:field xpath="javaee:resource-env-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="messaged-message-destination-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies the name
- of a message destination reference; its value is
- the message destination reference name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:message-destination-ref"/>
- <xsd:field xpath="javaee:message-destination-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="messaged-res-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference. The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-ref"/>
- <xsd:field xpath="javaee:res-ref-name"/>
- </xsd:unique>
-
- <xsd:unique name="messaged-env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of a
- component's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The
- name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:env-entry"/>
- <xsd:field xpath="javaee:env-entry-name"/>
- </xsd:unique>
- </xsd:element>
-
- </xsd:choice>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="entity-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The entity-beanType declares an entity bean. The declaration
- consists of:
-
- - an optional description
- - an optional display name
- - an optional icon element that contains a small and a large
- icon file name
- - a unique name assigned to the enterprise bean
- in the deployment descriptor
- - an optional mapped-name element that can be used to provide
- vendor-specific deployment information such as the physical
- jndi-name of the entity bean's remote home interface. This
- element is not required to be supported by all implementations.
- Any use of this element is non-portable.
- - the names of the entity bean's remote home
- and remote interfaces, if any
- - the names of the entity bean's local home and local
- interfaces, if any
- - the entity bean's implementation class
- - the optional entity bean's persistence management type. If
- this element is not specified it is defaulted to Container.
- - the entity bean's primary key class name
- - an indication of the entity bean's reentrancy
- - an optional specification of the
- entity bean's cmp-version
- - an optional specification of the entity bean's
- abstract schema name
- - an optional list of container-managed fields
- - an optional specification of the primary key
- field
- - an optional declaration of the bean's environment
- entries
- - an optional declaration of the bean's EJB
- references
- - an optional declaration of the bean's local
- EJB references
- - an optional declaration of the bean's web
- service references
- - an optional declaration of the security role
- references
- - an optional declaration of the security identity
- to be used for the execution of the bean's methods
- - an optional declaration of the bean's
- resource manager connection factory references
- - an optional declaration of the bean's
- resource environment references
- - an optional declaration of the bean's message
- destination references
- - an optional set of query declarations
- for finder and select methods for an entity
- bean with cmp-version 2.x.
-
- The optional abstract-schema-name element must be specified
- for an entity bean with container-managed persistence and
- cmp-version 2.x.
-
- The optional primkey-field may be present in the descriptor
- if the entity's persistence-type is Container.
-
- The optional cmp-version element may be present in the
- descriptor if the entity's persistence-type is Container. If
- the persistence-type is Container and the cmp-version
- element is not specified, its value defaults to 2.x.
-
- The optional home and remote elements must be specified if
- the entity bean cmp-version is 1.x.
-
- The optional home and remote elements must be specified if
- the entity bean has a remote home and remote interface.
-
- The optional local-home and local elements must be specified
- if the entity bean has a local home and local interface.
-
- Either both the local-home and the local elements or both
- the home and the remote elements must be specified.
-
- The optional query elements must be present if the
- persistence-type is Container and the cmp-version is 2.x and
- query methods other than findByPrimaryKey have been defined
- for the entity bean.
-
- The other elements that are optional are "optional" in the
- sense that they are omitted if the lists represented by them
- are empty.
-
- At least one cmp-field element must be present in the
- descriptor if the entity's persistence-type is Container and
- the cmp-version is 1.x, and none must not be present if the
- entity's persistence-type is Bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="ejb-name"
- type="javaee:ejb-nameType"/>
- <xsd:element name="mapped-name"
- type="javaee:xsdStringType"
- minOccurs="0"/>
- <xsd:element name="home"
- type="javaee:homeType"
- minOccurs="0"/>
- <xsd:element name="remote"
- type="javaee:remoteType"
- minOccurs="0"/>
- <xsd:element name="local-home"
- type="javaee:local-homeType"
- minOccurs="0"/>
- <xsd:element name="local"
- type="javaee:localType"
- minOccurs="0"/>
- <xsd:element name="ejb-class"
- type="javaee:ejb-classType"/>
- <xsd:element name="persistence-type"
- type="javaee:persistence-typeType"/>
- <xsd:element name="prim-key-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The prim-key-class element contains the
- fully-qualified name of an
- entity bean's primary key class.
-
- If the definition of the primary key class is
- deferred to deployment time, the prim-key-class
- element should specify java.lang.Object.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="reentrant"
- type="javaee:true-falseType">
- <xsd:annotation>
- <xsd:documentation>
-
- The reentrant element specifies whether an entity
- bean is reentrant or not.
-
- The reentrant element must be one of the two
- following: true or false
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="cmp-version"
- type="javaee:cmp-versionType"
- minOccurs="0"/>
- <xsd:element name="abstract-schema-name"
- type="javaee:java-identifierType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The abstract-schema-name element specifies the name
- of the abstract schema type of an entity bean with
- cmp-version 2.x. It is used in EJB QL queries.
-
- For example, the abstract-schema-name for an entity
- bean whose local interface is
- com.acme.commerce.Order might be Order.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="cmp-field"
- type="javaee:cmp-fieldType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="primkey-field"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The primkey-field element is used to specify the
- name of the primary key field for an entity with
- container-managed persistence.
-
- The primkey-field must be one of the fields declared
- in the cmp-field element, and the type of the field
- must be the same as the primary key type.
-
- The primkey-field element is not used if the primary
- key maps to multiple container-managed fields
- (i.e. the key is a compound key). In this case, the
- fields of the primary key class must be public, and
- their names must correspond to the field names of
- the entity bean class that comprise the key.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:group ref="javaee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="security-role-ref"
- type="javaee:security-role-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="security-identity"
- type="javaee:security-identityType"
- minOccurs="0"/>
- <xsd:element name="query"
- type="javaee:queryType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="exclude-listType">
- <xsd:annotation>
- <xsd:documentation>
-
- The exclude-listType specifies one or more methods which
- the Assembler marks to be uncallable.
-
- If the method permission relation contains methods that are
- in the exclude list, the Deployer should consider those
- methods to be uncallable.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="method"
- type="javaee:methodType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="init-methodType">
- <xsd:sequence>
- <xsd:element name="create-method"
- type="javaee:named-methodType"/>
- <xsd:element name="bean-method"
- type="javaee:named-methodType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="interceptor-bindingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The interceptor-bindingType element describes the binding of
- interceptor classes to beans within the ejb-jar.
- It consists of :
-
- - An optional description.
- - The name of an ejb within the ejb-jar or the wildcard value "*",
- which is used to define interceptors that are bound to all
- beans in the ejb-jar.
- - A list of interceptor classes that are bound to the contents of
- the ejb-name element or a specification of the total ordering
- over the interceptors defined for the given level and above.
- - An optional exclude-default-interceptors element. If set to true,
- specifies that default interceptors are not to be applied to
- a bean-class and/or business method.
- - An optional exclude-class-interceptors element. If set to true,
- specifies that class interceptors are not to be applied to
- a business method.
- - An optional set of method elements for describing the name/params
- of a method-level interceptor.
-
- Interceptors bound to all classes using the wildcard syntax
- "*" are default interceptors for the components in the ejb-jar.
- In addition, interceptors may be bound at the level of the bean
- class (class-level interceptors) or business methods (method-level
- interceptors ).
-
- The binding of interceptors to classes is additive. If interceptors
- are bound at the class-level and/or default-level as well as the
- method-level, both class-level and/or default-level as well as
- method-level will apply.
-
- There are four possible styles of the interceptor element syntax :
-
- 1.
- <interceptor-binding>
- <ejb-name>*</ejb-name>
- <interceptor-class>INTERCEPTOR</interceptor-class>
- </interceptor-binding>
-
- Specifying the ejb-name as the wildcard value "*" designates
- default interceptors (interceptors that apply to all session and
- message-driven beans contained in the ejb-jar).
-
- 2.
- <interceptor-binding>
- <ejb-name>EJBNAME</ejb-name>
- <interceptor-class>INTERCEPTOR</interceptor-class>
- </interceptor-binding>
-
- This style is used to refer to interceptors associated with the
- specified enterprise bean(class-level interceptors).
-
- 3.
- <interceptor-binding>
- <ejb-name>EJBNAME</ejb-name>
- <interceptor-class>INTERCEPTOR</interceptor-class>
- <method>
- <method-name>METHOD</method-name>
- </method>
- </interceptor-binding>
-
- This style is used to associate a method-level interceptor with
- the specified enterprise bean. If there are multiple methods
- with the same overloaded name, the element of this style refers
- to all the methods with the overloaded name. Method-level
- interceptors can only be associated with business methods of the
- bean class. Note that the wildcard value "*" cannot be used
- to specify method-level interceptors.
-
- 4.
- <interceptor-binding>
- <ejb-name>EJBNAME</ejb-name>
- <interceptor-class>INTERCEPTOR</interceptor-class>
- <method>
- <method-name>METHOD</method-name>
- <method-params>
- <method-param>PARAM-1</method-param>
- <method-param>PARAM-2</method-param>
- ...
- <method-param>PARAM-N</method-param>
- </method-params>
- </method>
- </interceptor-binding>
-
- This style is used to associate a method-level interceptor with
- the specified method of the specified enterprise bean. This
- style is used to refer to a single method within a set of methods
- with an overloaded name. The values PARAM-1 through PARAM-N
- are the fully-qualified Java types of the method's input parameters
- (if the method has no input arguments, the method-params element
- contains no method-param elements). Arrays are specified by the
- array element's type, followed by one or more pair of square
- brackets (e.g. int[][]).
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-name"
- type="javaee:string"/>
- <xsd:choice>
- <xsd:element name="interceptor-class"
- type="javaee:fully-qualified-classType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="interceptor-order"
- type="javaee:interceptor-orderType"
- minOccurs="1"/>
- </xsd:choice>
- <xsd:element name="exclude-default-interceptors"
- type="javaee:true-falseType"
- minOccurs="0"/>
- <xsd:element name="exclude-class-interceptors"
- type="javaee:true-falseType"
- minOccurs="0"/>
- <xsd:element name="method"
- type="javaee:named-methodType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="interceptor-orderType">
- <xsd:annotation>
- <xsd:documentation>
- The interceptor-orderType element describes a total ordering
- of interceptor classes.
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
-
- <xsd:element name="interceptor-class"
- type="javaee:fully-qualified-classType"
- minOccurs="1"
- maxOccurs="unbounded"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="interceptorType">
- <xsd:annotation>
- <xsd:documentation>
-
- The interceptorType element declares information about a single
- interceptor class. It consists of :
-
- - An optional description.
- - The fully-qualified name of the interceptor class.
- - An optional list of around invoke methods declared on the
- interceptor class and/or its super-classes.
- - An optional list environment dependencies for the interceptor
- class and/or its super-classes.
- - An optional list of post-activate methods declared on the
- interceptor class and/or its super-classes.
- - An optional list of pre-passivate methods declared on the
- interceptor class and/or its super-classes.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="interceptor-class"
- type="javaee:fully-qualified-classType"/>
- <xsd:element name="around-invoke"
- type="javaee:around-invokeType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:group ref="javaee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="post-activate"
- type="javaee:lifecycle-callbackType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="pre-passivate"
- type="javaee:lifecycle-callbackType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="interceptorsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The interceptorsType element declares one or more interceptor
- classes used by components within this ejb-jar. The declaration
- consists of :
-
- - An optional description.
- - One or more interceptor elements.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="interceptor"
- type="javaee:interceptorType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-driven-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-driven element declares a message-driven
- bean. The declaration consists of:
-
- - an optional description
- - an optional display name
- - an optional icon element that contains a small and a large
- icon file name.
- - a name assigned to the enterprise bean in
- the deployment descriptor
- - an optional mapped-name element that can be used to provide
- vendor-specific deployment information such as the physical
- jndi-name of destination from which this message-driven bean
- should consume. This element is not required to be supported
- by all implementations. Any use of this element is non-portable.
- - the message-driven bean's implementation class
- - an optional declaration of the bean's messaging
- type
- - an optional declaration of the bean's timeout method.
- - the optional message-driven bean's transaction management
- type. If it is not defined, it is defaulted to Container.
- - an optional declaration of the bean's
- message-destination-type
- - an optional declaration of the bean's
- message-destination-link
- - an optional declaration of the message-driven bean's
- activation configuration properties
- - an optional list of the message-driven bean class and/or
- superclass around-invoke methods.
- - an optional declaration of the bean's environment
- entries
- - an optional declaration of the bean's EJB references
- - an optional declaration of the bean's local EJB
- references
- - an optional declaration of the bean's web service
- references
- - an optional declaration of the security
- identity to be used for the execution of the bean's
- methods
- - an optional declaration of the bean's
- resource manager connection factory
- references
- - an optional declaration of the bean's resource
- environment references.
- - an optional declaration of the bean's message
- destination references
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="ejb-name"
- type="javaee:ejb-nameType"/>
- <xsd:element name="mapped-name"
- type="javaee:xsdStringType"
- minOccurs="0"/>
- <xsd:element name="ejb-class"
- type="javaee:ejb-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-class element specifies the fully qualified name
- of the bean class for this ejb. It is required unless
- there is a component-defining annotation for the same
- ejb-name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="messaging-type"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The messaging-type element specifies the message
- listener interface of the message-driven bean.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="timeout-method"
- type="javaee:named-methodType"
- minOccurs="0"/>
- <xsd:element name="transaction-type"
- type="javaee:transaction-typeType"
- minOccurs="0"/>
- <xsd:element name="message-destination-type"
- type="javaee:message-destination-typeType"
- minOccurs="0"/>
- <xsd:element name="message-destination-link"
- type="javaee:message-destination-linkType"
- minOccurs="0"/>
- <xsd:element name="activation-config"
- type="javaee:activation-configType"
- minOccurs="0"/>
- <xsd:element name="around-invoke"
- type="javaee:around-invokeType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:group ref="javaee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="security-identity"
- type="javaee:security-identityType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-intfType">
-
- <xsd:annotation>
- <xsd:documentation>
-
- The method-intf element allows a method element to
- differentiate between the methods with the same name and
- signature that are multiply defined across the home and
- component interfaces (e.g, in both an enterprise bean's
- remote and local interfaces or in both an enterprise bean's
- home and remote interfaces, etc.); the component and web
- service endpoint interfaces, and so on. The Local applies to
- both local component interface and local business interface.
- Similarly, Remote applies to both remote component interface
- and the remote business interface.
-
- The method-intf element must be one of the following:
-
- Home
- Remote
- LocalHome
- Local
- ServiceEndpoint
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Home"/>
- <xsd:enumeration value="Remote"/>
- <xsd:enumeration value="LocalHome"/>
- <xsd:enumeration value="Local"/>
- <xsd:enumeration value="ServiceEndpoint"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-nameType contains a name of an enterprise
- bean method or the asterisk (*) character. The asterisk is
- used when the element denotes all the methods of an
- enterprise bean's client view interfaces.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-paramsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-paramsType defines a list of the
- fully-qualified Java type names of the method parameters.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="method-param"
- type="javaee:java-typeType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-param element contains a primitive
- or a fully-qualified Java type name of a method
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-permissionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-permissionType specifies that one or more
- security roles are allowed to invoke one or more enterprise
- bean methods. The method-permissionType consists of an
- optional description, a list of security role names or an
- indicator to state that the method is unchecked for
- authorization, and a list of method elements.
-
- The security roles used in the method-permissionType
- must be defined in the security-role elements of the
- deployment descriptor, and the methods must be methods
- defined in the enterprise bean's business, home, component
- and/or web service endpoint interfaces.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:choice>
- <xsd:element name="role-name"
- type="javaee:role-nameType"
- maxOccurs="unbounded"/>
- <xsd:element name="unchecked"
- type="javaee:emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The unchecked element specifies that a method is
- not checked for authorization by the container
- prior to invocation of the method.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- <xsd:element name="method"
- type="javaee:methodType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="methodType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The methodType is used to denote a method of an enterprise
- bean's business, home, component, and/or web service endpoint
- interface, or, in the case of a message-driven bean, the
- bean's message listener method, or a set of such
- methods. The ejb-name element must be the name of one of the
- enterprise beans declared in the deployment descriptor; the
- optional method-intf element allows to distinguish between a
- method with the same signature that is multiply defined
- across the business, home, component, and/or web service
- endpoint nterfaces; the method-name element specifies the
- method name; and the optional method-params elements identify
- a single method among multiple methods with an overloaded
- method name.
-
- There are three possible styles of using methodType element
- within a method element:
-
- 1.
- <method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>*</method-name>
- </method>
-
- This style is used to refer to all the methods of the
- specified enterprise bean's business, home, component,
- and/or web service endpoint interfaces.
-
- 2.
- <method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>METHOD</method-name>
- </method>
-
- This style is used to refer to the specified method of
- the specified enterprise bean. If there are multiple
- methods with the same overloaded name, the element of
- this style refers to all the methods with the overloaded
- name.
-
- 3.
- <method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>METHOD</method-name>
- <method-params>
- <method-param>PARAM-1</method-param>
- <method-param>PARAM-2</method-param>
- ...
- <method-param>PARAM-n</method-param>
- </method-params>
- </method>
-
- This style is used to refer to a single method within a
- set of methods with an overloaded name. PARAM-1 through
- PARAM-n are the fully-qualified Java types of the
- method's input parameters (if the method has no input
- arguments, the method-params element contains no
- method-param elements). Arrays are specified by the
- array element's type, followed by one or more pair of
- square brackets (e.g. int[][]). If there are multiple
- methods with the same overloaded name, this style refers
- to all of the overloaded methods.
-
- Examples:
-
- Style 1: The following method element refers to all the
- methods of the EmployeeService bean's business, home,
- component, and/or web service endpoint interfaces:
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>*</method-name>
- </method>
-
- Style 2: The following method element refers to all the
- create methods of the EmployeeService bean's home
- interface(s).
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>create</method-name>
- </method>
-
- Style 3: The following method element refers to the
- create(String firstName, String LastName) method of the
- EmployeeService bean's home interface(s).
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- The following example illustrates a Style 3 element with
- more complex parameter types. The method
- foobar(char s, int i, int[] iar, mypackage.MyClass mycl,
- mypackage.MyClass[][] myclaar) would be specified as:
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>foobar</method-name>
- <method-params>
- <method-param>char</method-param>
- <method-param>int</method-param>
- <method-param>int[]</method-param>
- <method-param>mypackage.MyClass</method-param>
- <method-param>mypackage.MyClass[][]</method-param>
- </method-params>
- </method>
-
- The optional method-intf element can be used when it becomes
- necessary to differentiate between a method that is multiply
- defined across the enterprise bean's business, home, component,
- and/or web service endpoint interfaces with the same name and
- signature. However, if the same method is a method of both the
- local business interface, and the local component interface,
- the same attribute applies to the method for both interfaces.
- Likewise, if the same method is a method of both the remote
- business interface and the remote component interface, the same
- attribute applies to the method for both interfaces.
-
- For example, the method element
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Remote</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- can be used to differentiate the create(String, String)
- method defined in the remote interface from the
- create(String, String) method defined in the remote home
- interface, which would be defined as
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Home</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- and the create method that is defined in the local home
- interface which would be defined as
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>LocalHome</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- The method-intf element can be used with all three Styles
- of the method element usage. For example, the following
- method element example could be used to refer to all the
- methods of the EmployeeService bean's remote home interface
- and the remote business interface.
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Home</method-intf>
- <method-name>*</method-name>
- </method>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ejb-name"
- type="javaee:ejb-nameType"/>
- <xsd:element name="method-intf"
- type="javaee:method-intfType"
- minOccurs="0">
- </xsd:element>
- <xsd:element name="method-name"
- type="javaee:method-nameType"/>
- <xsd:element name="method-params"
- type="javaee:method-paramsType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="multiplicityType">
- <xsd:annotation>
- <xsd:documentation>
-
- The multiplicityType describes the multiplicity of the
- role that participates in a relation.
-
- The value must be one of the two following:
-
- One
- Many
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="One"/>
- <xsd:enumeration value="Many"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="named-methodType">
- <xsd:sequence>
- <xsd:element name="method-name"
- type="javaee:string"/>
- <xsd:element name="method-params"
- type="javaee:method-paramsType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="persistence-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The persistence-typeType specifies an entity bean's persistence
- management type.
-
- The persistence-type element must be one of the two following:
-
- Bean
- Container
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Bean"/>
- <xsd:enumeration value="Container"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="query-methodType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The query-method specifies the method for a finder or select
- query.
-
- The method-name element specifies the name of a finder or select
- method in the entity bean's implementation class.
-
- Each method-param must be defined for a query-method using the
- method-params element.
-
- It is used by the query-method element.
-
- Example:
-
- <query>
- <description>Method finds large orders</description>
- <query-method>
- <method-name>findLargeOrders</method-name>
- <method-params></method-params>
- </query-method>
- <ejb-ql>
- SELECT OBJECT(o) FROM Order o
- WHERE o.amount &gt; 1000
- </ejb-ql>
- </query>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="method-name"
- type="javaee:method-nameType"/>
- <xsd:element name="method-params"
- type="javaee:method-paramsType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="queryType">
- <xsd:annotation>
- <xsd:documentation>
-
- The queryType defines a finder or select
- query. It contains
- - an optional description of the query
- - the specification of the finder or select
- method it is used by
- - an optional specification of the result type
- mapping, if the query is for a select method
- and entity objects are returned.
- - the EJB QL query string that defines the query.
-
- Queries that are expressible in EJB QL must use the ejb-ql
- element to specify the query. If a query is not expressible
- in EJB QL, the description element should be used to
- describe the semantics of the query and the ejb-ql element
- should be empty.
-
- The result-type-mapping is an optional element. It can only
- be present if the query-method specifies a select method
- that returns entity objects. The default value for the
- result-type-mapping element is "Local".
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType" minOccurs="0"/>
- <xsd:element name="query-method"
- type="javaee:query-methodType"/>
- <xsd:element name="result-type-mapping"
- type="javaee:result-type-mappingType"
- minOccurs="0"/>
- <xsd:element name="ejb-ql"
- type="javaee:xsdStringType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="relationship-role-sourceType">
- <xsd:annotation>
- <xsd:documentation>
-
- The relationship-role-sourceType designates the source of a
- role that participates in a relationship. A
- relationship-role-sourceType is used by
- relationship-role-source elements to uniquely identify an
- entity bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-name"
- type="javaee:ejb-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="relationshipsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The relationshipsType describes the relationships in
- which entity beans with container-managed persistence
- participate. The relationshipsType contains an optional
- description; and a list of ejb-relation elements, which
- specify the container managed relationships.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-relation"
- type="javaee:ejb-relationType"
- maxOccurs="unbounded">
-
- <xsd:unique name="role-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relationship-role-name contains the name of a
- relationship role. The name must be unique within
- a relationship, but can be reused in different
- relationships.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector
- xpath=".//javaee:ejb-relationship-role-name"/>
- <xsd:field
- xpath="."/>
- </xsd:unique>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="remove-methodType">
- <xsd:sequence>
- <xsd:element name="bean-method"
- type="javaee:named-methodType"/>
- <xsd:element name="retain-if-exception"
- type="javaee:true-falseType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="result-type-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The result-type-mappingType is used in the query element to
- specify whether an abstract schema type returned by a query
- for a select method is to be mapped to an EJBLocalObject or
- EJBObject type.
-
- The value must be one of the following:
-
- Local
- Remote
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Local"/>
- <xsd:enumeration value="Remote"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-identityType">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-identityType specifies whether the caller's
- security identity is to be used for the execution of the
- methods of the enterprise bean or whether a specific run-as
- identity is to be used. It contains an optional description
- and a specification of the security identity to be used.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:choice>
- <xsd:element name="use-caller-identity"
- type="javaee:emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The use-caller-identity element specifies that
- the caller's security identity be used as the
- security identity for the execution of the
- enterprise bean's methods.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="run-as"
- type="javaee:run-asType"/>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="session-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The session-beanType declares an session bean. The
- declaration consists of:
-
- - an optional description
- - an optional display name
- - an optional icon element that contains a small and a large
- icon file name
- - a name assigned to the enterprise bean
- in the deployment description
- - an optional mapped-name element that can be used to provide
- vendor-specific deployment information such as the physical
- jndi-name of the session bean's remote home/business interface.
- This element is not required to be supported by all
- implementations. Any use of this element is non-portable.
- - the names of all the remote or local business interfaces,
- if any
- - the names of the session bean's remote home and
- remote interfaces, if any
- - the names of the session bean's local home and
- local interfaces, if any
- - the name of the session bean's web service endpoint
- interface, if any
- - the session bean's implementation class
- - the session bean's state management type
- - an optional declaration of the session bean's timeout method.
- - the optional session bean's transaction management type.
- If it is not present, it is defaulted to Container.
- - an optional list of the session bean class and/or
- superclass around-invoke methods.
- - an optional declaration of the bean's
- environment entries
- - an optional declaration of the bean's EJB references
- - an optional declaration of the bean's local
- EJB references
- - an optional declaration of the bean's web
- service references
- - an optional declaration of the security role
- references
- - an optional declaration of the security identity
- to be used for the execution of the bean's methods
- - an optional declaration of the bean's resource
- manager connection factory references
- - an optional declaration of the bean's resource
- environment references.
- - an optional declaration of the bean's message
- destination references
-
- The elements that are optional are "optional" in the sense
- that they are omitted when if lists represented by them are
- empty.
-
- Either both the local-home and the local elements or both
- the home and the remote elements must be specified for the
- session bean.
-
- The service-endpoint element may only be specified if the
- bean is a stateless session bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="ejb-name"
- type="javaee:ejb-nameType"/>
- <xsd:element name="mapped-name"
- type="javaee:xsdStringType"
- minOccurs="0"/>
- <xsd:element name="home"
- type="javaee:homeType"
- minOccurs="0"/>
- <xsd:element name="remote"
- type="javaee:remoteType"
- minOccurs="0"/>
- <xsd:element name="local-home"
- type="javaee:local-homeType"
- minOccurs="0"/>
- <xsd:element name="local"
- type="javaee:localType"
- minOccurs="0"/>
- <xsd:element name="business-local"
- type="javaee:fully-qualified-classType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="business-remote"
- type="javaee:fully-qualified-classType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="service-endpoint"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint element contains the
- fully-qualified name of the enterprise bean's web
- service endpoint interface. The service-endpoint
- element may only be specified for a stateless
- session bean. The specified interface must be a
- valid JAX-RPC service endpoint interface.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ejb-class"
- type="javaee:ejb-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-class element specifies the fully qualified name
- of the bean class for this ejb. It is required unless
- there is a component-defining annotation for the same
- ejb-name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="session-type"
- type="javaee:session-typeType"
- minOccurs="0"/>
- <xsd:element name="timeout-method"
- type="javaee:named-methodType"
- minOccurs="0"/>
- <xsd:element name="init-method"
- type="javaee:init-methodType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The init-method element specifies the mappings for
- EJB 2.x style create methods for an EJB 3.0 bean.
- This element can only be specified for stateful
- session beans.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="remove-method"
- type="javaee:remove-methodType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The remove-method element specifies the mappings for
- EJB 2.x style remove methods for an EJB 3.0 bean.
- This element can only be specified for stateful
- session beans.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="transaction-type"
- type="javaee:transaction-typeType"
- minOccurs="0"/>
- <xsd:element name="around-invoke"
- type="javaee:around-invokeType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:group ref="javaee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="post-activate"
- type="javaee:lifecycle-callbackType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="pre-passivate"
- type="javaee:lifecycle-callbackType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="security-role-ref"
- type="javaee:security-role-refType"
- minOccurs="0"
- maxOccurs="unbounded">
- </xsd:element>
- <xsd:element name="security-identity"
- type="javaee:security-identityType"
- minOccurs="0">
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="session-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The session-typeType describes whether the session bean is a
- stateful session or stateless session. It is used by
- session-type elements.
-
- The value must be one of the two following:
-
- Stateful
- Stateless
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Stateful"/>
- <xsd:enumeration value="Stateless"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="trans-attributeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The trans-attributeType specifies how the container must
- manage the transaction boundaries when delegating a method
- invocation to an enterprise bean's business method.
-
- The value must be one of the following:
-
- NotSupported
- Supports
- Required
- RequiresNew
- Mandatory
- Never
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="NotSupported"/>
- <xsd:enumeration value="Supports"/>
- <xsd:enumeration value="Required"/>
- <xsd:enumeration value="RequiresNew"/>
- <xsd:enumeration value="Mandatory"/>
- <xsd:enumeration value="Never"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="transaction-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The transaction-typeType specifies an enterprise bean's
- transaction management type.
-
- The transaction-type must be one of the two following:
-
- Bean
- Container
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Bean"/>
- <xsd:enumeration value="Container"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_3_1.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_3_1.xsd
deleted file mode 100644
index 8c097627a9..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/ejb-jar_3_1.xsd
+++ /dev/null
@@ -1,3247 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="3.1">
- <xsd:annotation>
- <xsd:documentation>
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
-
- The contents of this file are subject to the terms of either the
- GNU General Public License Version 2 only ("GPL") or the Common
- Development and Distribution License("CDDL") (collectively, the
- "License"). You may not use this file except in compliance with
- the License. You can obtain a copy of the License at
- https://glassfish.dev.java.net/public/CDDL+GPL.html or
- glassfish/bootstrap/legal/LICENSE.txt. See the License for the
- specific language governing permissions and limitations under the
- License.
-
- When distributing the software, include this License Header
- Notice in each file and include the License file at
- glassfish/bootstrap/legal/LICENSE.txt. Sun designates this
- particular file as subject to the "Classpath" exception as
- provided by Sun in the GPL Version 2 section of the License file
- that accompanied this code. If applicable, add the following
- below the License Header, with the fields enclosed by brackets []
- replaced by your own identifying information:
- "Portions Copyrighted [year] [name of copyright owner]"
-
- Contributor(s):
-
- If you wish your version of this file to be governed by only the
- CDDL or only the GPL Version 2, indicate your decision by adding
- "[Contributor] elects to include this software in this
- distribution under the [CDDL or GPL Version 2] license." If you
- don't indicate a single choice of license, a recipient has the
- option to distribute your version of this file under either the
- CDDL, the GPL Version 2 or to extend the choice of license to its
- licensees as provided above. However, if you add GPL Version 2
- code and therefore, elected the GPL Version 2 license, then the
- option applies only if the new code is made subject to such
- option by the copyright holder.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- This is the XML Schema for the EJB 3.1 deployment descriptor.
-
- All EJB deployment descriptors must indicate
- the schema by using the Java EE namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and by indicating the version of the schema by
- using the version element as shown below:
-
- <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd"
- version="3.1">
- ...
- </ejb-jar>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for the
- Java EE namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all Java EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_6.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:element name="ejb-jar"
- type="javaee:ejb-jarType">
- <xsd:annotation>
- <xsd:documentation>
-
- This is the root of the ejb-jar deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:key name="ejb-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-name element contains the name of an enterprise
- bean. The name must be unique within the ejb-jar or
- .war file.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:enterprise-beans/*"/>
- <xsd:field xpath="javaee:ejb-name"/>
- </xsd:key>
- <xsd:keyref name="ejb-name-references"
- refer="javaee:ejb-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The keyref indicates the references from
- relationship-role-source must be to a specific ejb-name
- defined within the scope of enterprise-beans element.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath=".//javaee:ejb-relationship-role/javaee:relationship-role-source"/>
- <xsd:field xpath="javaee:ejb-name"/>
- </xsd:keyref>
- <xsd:key name="role-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- A role-name-key is specified to allow the references
- from the security-role-refs.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:assembly-descriptor/javaee:security-role"/>
- <xsd:field xpath="javaee:role-name"/>
- </xsd:key>
- <xsd:keyref name="role-name-references"
- refer="javaee:role-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The keyref indicates the references from
- security-role-ref to a specified role-name.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:enterprise-beans/*/javaee:security-role-ref"/>
- <xsd:field xpath="javaee:role-link"/>
- </xsd:keyref>
- </xsd:element>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="access-timeoutType">
- <xsd:annotation>
- <xsd:documentation>
-
- The access-timeoutType represents the maximum amount of
- time (in a given time unit) that the container should wait for
- a concurrency lock before throwing a timeout exception to the
- client.
-
- A timeout value of 0 means concurrent access is not permitted.
-
- A timeout value of -1 means wait indefinitely to acquire a lock.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="timeout"
- type="javaee:xsdIntegerType"/>
- <xsd:element name="unit"
- type="javaee:time-unit-typeType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="async-methodType">
- <xsd:annotation>
- <xsd:documentation>
-
- The async-methodType element specifies that a session
- bean method has asynchronous invocation semantics.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="method-name"
- type="javaee:string"/>
- <xsd:element name="method-params"
- type="javaee:method-paramsType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="activation-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activation-configType defines information about the
- expected configuration properties of the message-driven bean
- in its operational environment. This may include information
- about message acknowledgement, message selector, expected
- destination type, etc.
-
- The configuration information is expressed in terms of
- name/value configuration properties.
-
- The properties that are recognized for a particular
- message-driven bean are determined by the messaging type.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="activation-config-property"
- type="javaee:activation-config-propertyType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="activation-config-propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activation-config-propertyType contains a name/value
- configuration property pair for a message-driven bean.
-
- The properties that are recognized for a particular
- message-driven bean are determined by the messaging type.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="activation-config-property-name"
- type="javaee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activation-config-property-name element contains
- the name for an activation configuration property of
- a message-driven bean.
-
- For JMS message-driven beans, the following property
- names are recognized: acknowledgeMode,
- messageSelector, destinationType, subscriptionDurability
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="activation-config-property-value"
- type="javaee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The activation-config-property-value element
- contains the value for an activation configuration
- property of a message-driven bean.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="around-invokeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The around-invoke type specifies a method on a
- class to be called during the around invoke portion of an
- ejb invocation. Note that each class may have only one
- around invoke method and that the method may not be
- overloaded.
-
- If the class element is missing then
- the class defining the callback is assumed to be the
- interceptor class or component class in scope at the
- location in the descriptor in which the around invoke
- definition appears.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="class"
- type="javaee:fully-qualified-classType"
- minOccurs="0"/>
- <xsd:element name="method-name"
- type="javaee:java-identifierType"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="around-timeoutType">
- <xsd:annotation>
- <xsd:documentation>
-
- The around-timeout type specifies a method on a
- class to be called during the around-timeout portion of
- a timer timeout callback. Note that each class may have
- only one around-timeout method and that the method may not
- be overloaded.
-
- If the class element is missing then
- the class defining the callback is assumed to be the
- interceptor class or component class in scope at the
- location in the descriptor in which the around-timeout
- definition appears.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="class"
- type="javaee:fully-qualified-classType"
- minOccurs="0"/>
- <xsd:element name="method-name"
- type="javaee:java-identifierType"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="assembly-descriptorType">
- <xsd:annotation>
- <xsd:documentation>
-
- The assembly-descriptorType defines
- application-assembly information.
-
- The application-assembly information consists of the
- following parts: the definition of security roles, the
- definition of method permissions, the definition of
- transaction attributes for enterprise beans with
- container-managed transaction demarcation, the definition
- of interceptor bindings, a list of
- methods to be excluded from being invoked, and a list of
- exception types that should be treated as application exceptions.
-
- All the parts are optional in the sense that they are
- omitted if the lists represented by them are empty.
-
- Providing an assembly-descriptor in the deployment
- descriptor is optional for the ejb-jar or .war file producer.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="security-role"
- type="javaee:security-roleType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="method-permission"
- type="javaee:method-permissionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="container-transaction"
- type="javaee:container-transactionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="interceptor-binding"
- type="javaee:interceptor-bindingType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="message-destination"
- type="javaee:message-destinationType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="exclude-list"
- type="javaee:exclude-listType"
- minOccurs="0"/>
- <xsd:element name="application-exception"
- type="javaee:application-exceptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="cmp-fieldType">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmp-fieldType describes a container-managed field. The
- cmp-fieldType contains an optional description of the field,
- and the name of the field.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="field-name"
- type="javaee:java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The field-name element specifies the name of a
- container managed field.
-
- The name of the cmp-field of an entity bean with
- cmp-version 2.x must begin with a lowercase
- letter. This field is accessed by methods whose
- names consists of the name of the field specified by
- field-name in which the first letter is uppercased,
- prefixed by "get" or "set".
-
- The name of the cmp-field of an entity bean with
- cmp-version 1.x must denote a public field of the
- enterprise bean class or one of its superclasses.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="cmp-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmp-versionType specifies the version of an entity bean
- with container-managed persistence. It is used by
- cmp-version elements.
-
- The value must be one of the two following:
-
- 1.x
- 2.x
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="1.x"/>
- <xsd:enumeration value="2.x"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="cmr-fieldType">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmr-fieldType describes the bean provider's view of
- a relationship. It consists of an optional description, and
- the name and the class type of a field in the source of a
- role of a relationship. The cmr-field-name element
- corresponds to the name used for the get and set accessor
- methods for the relationship. The cmr-field-type element is
- used only for collection-valued cmr-fields. It specifies the
- type of the collection that is used.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="cmr-field-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmr-field-name element specifies the name of a
- logical relationship field in the entity bean
- class. The name of the cmr-field must begin with a
- lowercase letter. This field is accessed by methods
- whose names consist of the name of the field
- specified by cmr-field-name in which the first
- letter is uppercased, prefixed by "get" or "set".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="cmr-field-type"
- type="javaee:cmr-field-typeType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="cmr-field-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The cmr-field-type element specifies the class of a
- collection-valued logical relationship field in the entity
- bean class. The value of an element using cmr-field-typeType
- must be either: java.util.Collection or java.util.Set.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="java.util.Collection"/>
- <xsd:enumeration value="java.util.Set"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="concurrency-management-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The concurrency-management-typeType specifies the way concurrency
- is managed for a singleton or stateful session bean.
-
- The concurrency management type must be one of the following:
-
- Bean
- Container
-
- Bean managed concurrency can only be specified for a singleton bean.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Bean"/>
- <xsd:enumeration value="Container"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="concurrent-lock-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The concurrent-lock-typeType specifies how the container must
- manage concurrent access to a method of a Singleton bean
- with container-managed concurrency.
-
- The container managed concurrency lock type must be one
- of the following :
-
- Read
- Write
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Read"/>
- <xsd:enumeration value="Write"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="concurrent-methodType">
- <xsd:annotation>
- <xsd:documentation>
-
- The concurrent-methodType specifies information about a method
- of a bean with container managed concurrency.
-
- The optional lock element specifies the kind of concurrency
- lock asssociated with the method.
-
- The optional access-timeout element specifies the amount of
- time (in a given time unit) the container should wait for a
- concurrency lock before throwing an exception to the client.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="method"
- type="javaee:named-methodType"/>
- <xsd:element name="lock"
- type="javaee:concurrent-lock-typeType"
- minOccurs="0"/>
- <xsd:element name="access-timeout"
- type="javaee:access-timeoutType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="container-transactionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The container-transactionType specifies how the container
- must manage transaction scopes for the enterprise bean's
- method invocations. It defines an optional description, a
- list of method elements, and a transaction attribute. The
- transaction attribute is to be applied to all the specified
- methods.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="method"
- type="javaee:methodType"
- maxOccurs="unbounded"/>
- <xsd:element name="trans-attribute"
- type="javaee:trans-attributeType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="depends-onType">
- <xsd:annotation>
- <xsd:documentation>
-
- The depends-onType is used to express initialization
- ordering dependencies between Singleton components.
- The depends-onType specifies the names of one or more
- Singleton beans in the same application as the referring
- Singleton, each of which must be initialized before
- the referring bean.
-
- Each dependent bean is expressed using ejb-link syntax.
- The order in which dependent beans are initialized at
- runtime is not guaranteed to match the order in which
- they are listed.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="ejb-name"
- type="javaee:ejb-linkType"
- minOccurs="1"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The ejb-classType contains the fully-qualified name of the
- enterprise bean's class. It is used by ejb-class elements.
-
- Example:
-
- <ejb-class>com.wombat.empl.EmployeeServiceBean</ejb-class>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-jarType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-jarType defines the root element of the EJB
- deployment descriptor. It contains
-
- - an optional description of the ejb-jar file
- - an optional display name
- - an optional icon that contains a small and a large
- icon file name
- - an optional module name. Only applicable to
- stand-alone ejb-jars or ejb-jars packaged in an ear.
- Ignored if specified for an ejb-jar.xml within a .war.
- In that case, standard .war module-name rules apply.
- - structural information about all included
- enterprise beans that is not specified through
- annotations
- - structural information about interceptor classes
- - a descriptor for container managed relationships,
- if any.
- - an optional application-assembly descriptor
- - an optional name of an ejb-client-jar file for the
- ejb-jar.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="module-name"
- type="javaee:string"
- minOccurs="0"/>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="enterprise-beans"
- type="javaee:enterprise-beansType"
- minOccurs="0"/>
- <xsd:element name="interceptors"
- type="javaee:interceptorsType"
- minOccurs="0"/>
- <xsd:element name="relationships"
- type="javaee:relationshipsType"
- minOccurs="0">
- <xsd:unique name="relationship-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relation-name contains the name of a
- relation. The name must be unique within
- relationships.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-relation"/>
- <xsd:field xpath="javaee:ejb-relation-name"/>
- </xsd:unique>
- </xsd:element>
- <xsd:element name="assembly-descriptor"
- type="javaee:assembly-descriptorType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Providing an assembly-descriptor in the deployment
- descriptor is optional for the ejb-jar or .war file
- producer.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ejb-client-jar"
- type="javaee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The optional ejb-client-jar element specifies a JAR
- file that contains the class files necessary for a
- client program to access the
- enterprise beans in the ejb-jar file.
-
- Example:
-
- <ejb-client-jar>employee_service_client.jar
- </ejb-client-jar>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="version"
- type="javaee:dewey-versionType"
- fixed="3.1"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The version specifies the version of the
- EJB specification that the instance document must
- comply with. This information enables deployment tools
- to validate a particular EJB Deployment
- Descriptor with respect to a specific version of the EJB
- schema.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="metadata-complete"
- type="xsd:boolean">
- <xsd:annotation>
- <xsd:documentation>
-
- The metadata-complete attribute defines whether this
- deployment descriptor and other related deployment
- descriptors for this module (e.g., web service
- descriptors) are complete, or whether the class
- files available to this module and packaged with
- this application should be examined for annotations
- that specify deployment information.
-
- If metadata-complete is set to "true", the deployment
- tool must ignore any annotations that specify deployment
- information, which might be present in the class files
- of the application.
-
- If metadata-complete is not specified or is set to
- "false", the deployment tool must examine the class
- files of the application for annotations, as
- specified by the specifications.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The ejb-nameType specifies an enterprise bean's name. It is
- used by ejb-name elements. This name is assigned by the
- file producer to name the enterprise bean in the
- ejb-jar or .war file's deployment descriptor. The name must be
- unique among the names of the enterprise beans in the same
- ejb-jar or .war file.
-
- There is no architected relationship between the used
- ejb-name in the deployment descriptor and the JNDI name that
- the Deployer will assign to the enterprise bean's home.
-
- The name for an entity bean must conform to the lexical
- rules for an NMTOKEN.
-
- Example:
-
- <ejb-name>EmployeeService</ejb-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:xsdNMTOKENType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-relationType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relationType describes a relationship between two
- entity beans with container-managed persistence. It is used
- by ejb-relation elements. It contains a description; an
- optional ejb-relation-name element; and exactly two
- relationship role declarations, defined by the
- ejb-relationship-role elements. The name of the
- relationship, if specified, is unique within the ejb-jar
- file.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-relation-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relation-name element provides a unique name
- within the ejb-jar file for a relationship.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ejb-relationship-role"
- type="javaee:ejb-relationship-roleType"/>
- <xsd:element name="ejb-relationship-role"
- type="javaee:ejb-relationship-roleType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-relationship-roleType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The ejb-relationship-roleType describes a role within a
- relationship. There are two roles in each relationship.
-
- The ejb-relationship-roleType contains an optional
- description; an optional name for the relationship role; a
- specification of the multiplicity of the role; an optional
- specification of cascade-delete functionality for the role;
- the role source; and a declaration of the cmr-field, if any,
- by means of which the other side of the relationship is
- accessed from the perspective of the role source.
-
- The multiplicity and role-source element are mandatory.
-
- The relationship-role-source element designates an entity
- bean by means of an ejb-name element. For bidirectional
- relationships, both roles of a relationship must declare a
- relationship-role-source element that specifies a cmr-field
- in terms of which the relationship is accessed. The lack of
- a cmr-field element in an ejb-relationship-role specifies
- that the relationship is unidirectional in navigability and
- the entity bean that participates in the relationship is
- "not aware" of the relationship.
-
- Example:
-
- <ejb-relation>
- <ejb-relation-name>Product-LineItem</ejb-relation-name>
- <ejb-relationship-role>
- <ejb-relationship-role-name>product-has-lineitems
- </ejb-relationship-role-name>
- <multiplicity>One</multiplicity>
- <relationship-role-source>
- <ejb-name>ProductEJB</ejb-name>
- </relationship-role-source>
- </ejb-relationship-role>
- </ejb-relation>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-relationship-role-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relationship-role-name element defines a
- name for a role that is unique within an
- ejb-relation. Different relationships can use the
- same name for a role.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="multiplicity"
- type="javaee:multiplicityType"/>
- <xsd:element name="cascade-delete"
- type="javaee:emptyType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The cascade-delete element specifies that, within a
- particular relationship, the lifetime of one or more
- entity beans is dependent upon the lifetime of
- another entity bean. The cascade-delete element can
- only be specified for an ejb-relationship-role
- element contained in an ejb-relation element in
- which the other ejb-relationship-role
- element specifies a multiplicity of One.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="relationship-role-source"
- type="javaee:relationship-role-sourceType"/>
- <xsd:element name="cmr-field"
- type="javaee:cmr-fieldType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="enterprise-beansType">
- <xsd:annotation>
- <xsd:documentation>
-
- The enterprise-beansType declares one or more enterprise
- beans. Each bean can be a session, entity or message-driven
- bean.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="session"
- type="javaee:session-beanType">
- <xsd:unique name="session-ejb-local-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of
- an EJB reference. The EJB reference is an entry in
- the component's environment and is relative to the
- java:comp/env context. The name must be unique within
- the component.
-
- It is recommended that name be prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-local-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
- <xsd:unique name="session-ejb-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- component's environment and is relative to the
- java:comp/env context. The name must be unique
- within the component.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
- <xsd:unique name="session-resource-env-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-env-ref"/>
- <xsd:field xpath="javaee:resource-env-ref-name"/>
- </xsd:unique>
- <xsd:unique name="session-message-destination-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies the name
- of a message destination reference; its value is
- the message destination reference name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:message-destination-ref"/>
- <xsd:field xpath="javaee:message-destination-ref-name"/>
- </xsd:unique>
- <xsd:unique name="session-res-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference. The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-ref"/>
- <xsd:field xpath="javaee:res-ref-name"/>
- </xsd:unique>
- <xsd:unique name="session-env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of a
- component's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The
- name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:env-entry"/>
- <xsd:field xpath="javaee:env-entry-name"/>
- </xsd:unique>
- </xsd:element>
- <xsd:element name="entity"
- type="javaee:entity-beanType">
- <xsd:unique name="entity-ejb-local-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of
- an EJB reference. The EJB reference is an entry in
- the component's environment and is relative to the
- java:comp/env context. The name must be unique within
- the component.
-
- It is recommended that name be prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-local-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
- <xsd:unique name="entity-ejb-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- component's environment and is relative to the
- java:comp/env context. The name must be unique
- within the component.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
- <xsd:unique name="entity-resource-env-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-env-ref"/>
- <xsd:field xpath="javaee:resource-env-ref-name"/>
- </xsd:unique>
- <xsd:unique name="entity-message-destination-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies the name
- of a message destination reference; its value is
- the message destination reference name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:message-destination-ref"/>
- <xsd:field xpath="javaee:message-destination-ref-name"/>
- </xsd:unique>
- <xsd:unique name="entity-res-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference. The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-ref"/>
- <xsd:field xpath="javaee:res-ref-name"/>
- </xsd:unique>
- <xsd:unique name="entity-env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of a
- component's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The
- name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:env-entry"/>
- <xsd:field xpath="javaee:env-entry-name"/>
- </xsd:unique>
- </xsd:element>
- <xsd:element name="message-driven"
- type="javaee:message-driven-beanType">
- <xsd:unique name="messaged-ejb-local-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of
- an EJB reference. The EJB reference is an entry in
- the component's environment and is relative to the
- java:comp/env context. The name must be unique within
- the component.
-
- It is recommended that name be prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-local-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
- <xsd:unique name="messaged-ejb-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- component's environment and is relative to the
- java:comp/env context. The name must be unique
- within the component.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:ejb-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
- </xsd:unique>
- <xsd:unique name="messaged-resource-env-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-env-ref"/>
- <xsd:field xpath="javaee:resource-env-ref-name"/>
- </xsd:unique>
- <xsd:unique name="messaged-message-destination-ref-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies the name
- of a message destination reference; its value is
- the message destination reference name used in the component
- code. The name is a JNDI name relative to the
- java:comp/env context and must be unique within an
- component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:message-destination-ref"/>
- <xsd:field xpath="javaee:message-destination-ref-name"/>
- </xsd:unique>
- <xsd:unique name="messaged-res-ref-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference. The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:resource-ref"/>
- <xsd:field xpath="javaee:res-ref-name"/>
- </xsd:unique>
- <xsd:unique name="messaged-env-entry-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entry-name element contains the name of a
- component's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The
- name must be unique within an component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:env-entry"/>
- <xsd:field xpath="javaee:env-entry-name"/>
- </xsd:unique>
- </xsd:element>
- </xsd:choice>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="entity-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The entity-beanType declares an entity bean. The declaration
- consists of:
-
- - an optional description
- - an optional display name
- - an optional icon element that contains a small and a large
- icon file name
- - a unique name assigned to the enterprise bean
- in the deployment descriptor
- - an optional mapped-name element that can be used to provide
- vendor-specific deployment information such as the physical
- jndi-name of the entity bean's remote home interface. This
- element is not required to be supported by all implementations.
- Any use of this element is non-portable.
- - the names of the entity bean's remote home
- and remote interfaces, if any
- - the names of the entity bean's local home and local
- interfaces, if any
- - the entity bean's implementation class
- - the optional entity bean's persistence management type. If
- this element is not specified it is defaulted to Container.
- - the entity bean's primary key class name
- - an indication of the entity bean's reentrancy
- - an optional specification of the
- entity bean's cmp-version
- - an optional specification of the entity bean's
- abstract schema name
- - an optional list of container-managed fields
- - an optional specification of the primary key
- field
- - an optional declaration of the bean's environment
- entries
- - an optional declaration of the bean's EJB
- references
- - an optional declaration of the bean's local
- EJB references
- - an optional declaration of the bean's web
- service references
- - an optional declaration of the security role
- references
- - an optional declaration of the security identity
- to be used for the execution of the bean's methods
- - an optional declaration of the bean's
- resource manager connection factory references
- - an optional declaration of the bean's
- resource environment references
- - an optional declaration of the bean's message
- destination references
- - an optional set of query declarations
- for finder and select methods for an entity
- bean with cmp-version 2.x.
-
- The optional abstract-schema-name element must be specified
- for an entity bean with container-managed persistence and
- cmp-version 2.x.
-
- The optional primkey-field may be present in the descriptor
- if the entity's persistence-type is Container.
-
- The optional cmp-version element may be present in the
- descriptor if the entity's persistence-type is Container. If
- the persistence-type is Container and the cmp-version
- element is not specified, its value defaults to 2.x.
-
- The optional home and remote elements must be specified if
- the entity bean cmp-version is 1.x.
-
- The optional home and remote elements must be specified if
- the entity bean has a remote home and remote interface.
-
- The optional local-home and local elements must be specified
- if the entity bean has a local home and local interface.
-
- Either both the local-home and the local elements or both
- the home and the remote elements must be specified.
-
- The optional query elements must be present if the
- persistence-type is Container and the cmp-version is 2.x and
- query methods other than findByPrimaryKey have been defined
- for the entity bean.
-
- The other elements that are optional are "optional" in the
- sense that they are omitted if the lists represented by them
- are empty.
-
- At least one cmp-field element must be present in the
- descriptor if the entity's persistence-type is Container and
- the cmp-version is 1.x, and none must not be present if the
- entity's persistence-type is Bean.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="ejb-name"
- type="javaee:ejb-nameType"/>
- <xsd:element name="mapped-name"
- type="javaee:xsdStringType"
- minOccurs="0"/>
- <xsd:element name="home"
- type="javaee:homeType"
- minOccurs="0"/>
- <xsd:element name="remote"
- type="javaee:remoteType"
- minOccurs="0"/>
- <xsd:element name="local-home"
- type="javaee:local-homeType"
- minOccurs="0"/>
- <xsd:element name="local"
- type="javaee:localType"
- minOccurs="0"/>
- <xsd:element name="ejb-class"
- type="javaee:ejb-classType"/>
- <xsd:element name="persistence-type"
- type="javaee:persistence-typeType"/>
- <xsd:element name="prim-key-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The prim-key-class element contains the
- fully-qualified name of an
- entity bean's primary key class.
-
- If the definition of the primary key class is
- deferred to deployment time, the prim-key-class
- element should specify java.lang.Object.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="reentrant"
- type="javaee:true-falseType">
- <xsd:annotation>
- <xsd:documentation>
-
- The reentrant element specifies whether an entity
- bean is reentrant or not.
-
- The reentrant element must be one of the two
- following: true or false
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="cmp-version"
- type="javaee:cmp-versionType"
- minOccurs="0"/>
- <xsd:element name="abstract-schema-name"
- type="javaee:java-identifierType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The abstract-schema-name element specifies the name
- of the abstract schema type of an entity bean with
- cmp-version 2.x. It is used in EJB QL queries.
-
- For example, the abstract-schema-name for an entity
- bean whose local interface is
- com.acme.commerce.Order might be Order.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="cmp-field"
- type="javaee:cmp-fieldType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="primkey-field"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The primkey-field element is used to specify the
- name of the primary key field for an entity with
- container-managed persistence.
-
- The primkey-field must be one of the fields declared
- in the cmp-field element, and the type of the field
- must be the same as the primary key type.
-
- The primkey-field element is not used if the primary
- key maps to multiple container-managed fields
- (i.e. the key is a compound key). In this case, the
- fields of the primary key class must be public, and
- their names must correspond to the field names of
- the entity bean class that comprise the key.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:group ref="javaee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="security-role-ref"
- type="javaee:security-role-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="security-identity"
- type="javaee:security-identityType"
- minOccurs="0"/>
- <xsd:element name="query"
- type="javaee:queryType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="exclude-listType">
- <xsd:annotation>
- <xsd:documentation>
-
- The exclude-listType specifies one or more methods which
- the Assembler marks to be uncallable.
-
- If the method permission relation contains methods that are
- in the exclude list, the Deployer should consider those
- methods to be uncallable.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="method"
- type="javaee:methodType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="application-exceptionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The application-exceptionType declares an application
- exception. The declaration consists of:
-
- - the exception class. When the container receives
- an exception of this type, it is required to
- forward this exception as an applcation exception
- to the client regardless of whether it is a checked
- or unchecked exception.
- - an optional rollback element. If this element is
- set to true, the container must rollback the current
- transaction before forwarding the exception to the
- client. If not specified, it defaults to false.
- - an optional inherited element. If this element is
- set to true, subclasses of the exception class type
- are also automatically considered application
- exceptions (unless overriden at a lower level).
- If set to false, only the exception class type is
- considered an application-exception, not its
- exception subclasses. If not specified, this
- value defaults to true.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="exception-class"
- type="javaee:fully-qualified-classType"/>
- <xsd:element name="rollback"
- type="javaee:true-falseType"
- minOccurs="0"/>
- <xsd:element name="inherited"
- type="javaee:true-falseType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="interceptorsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The interceptorsType element declares one or more interceptor
- classes used by components within this ejb-jar or .war. The declaration
- consists of :
-
- - An optional description.
- - One or more interceptor elements.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="interceptor"
- type="javaee:interceptorType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="interceptorType">
- <xsd:annotation>
- <xsd:documentation>
-
- The interceptorType element declares information about a single
- interceptor class. It consists of :
-
- - An optional description.
- - The fully-qualified name of the interceptor class.
- - An optional list of around invoke methods declared on the
- interceptor class and/or its super-classes.
- - An optional list of around timeout methods declared on the
- interceptor class and/or its super-classes.
- - An optional list environment dependencies for the interceptor
- class and/or its super-classes.
- - An optional list of post-activate methods declared on the
- interceptor class and/or its super-classes.
- - An optional list of pre-passivate methods declared on the
- interceptor class and/or its super-classes.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="interceptor-class"
- type="javaee:fully-qualified-classType"/>
- <xsd:element name="around-invoke"
- type="javaee:around-invokeType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="around-timeout"
- type="javaee:around-timeoutType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:group ref="javaee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="post-activate"
- type="javaee:lifecycle-callbackType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="pre-passivate"
- type="javaee:lifecycle-callbackType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="interceptor-bindingType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The interceptor-bindingType element describes the binding of
- interceptor classes to beans within the ejb-jar or .war.
- It consists of :
-
- - An optional description.
- - The name of an ejb within the module or the wildcard value "*",
- which is used to define interceptors that are bound to all
- beans in the ejb-jar or .war.
- - A list of interceptor classes that are bound to the contents of
- the ejb-name element or a specification of the total ordering
- over the interceptors defined for the given level and above.
- - An optional exclude-default-interceptors element. If set to true,
- specifies that default interceptors are not to be applied to
- a bean-class and/or business method.
- - An optional exclude-class-interceptors element. If set to true,
- specifies that class interceptors are not to be applied to
- a business method.
- - An optional set of method elements for describing the name/params
- of a method-level interceptor.
-
- Interceptors bound to all classes using the wildcard syntax
- "*" are default interceptors for the components in the ejb-jar or .war.
- In addition, interceptors may be bound at the level of the bean
- class (class-level interceptors) or business methods (method-level
- interceptors ).
-
- The binding of interceptors to classes is additive. If interceptors
- are bound at the class-level and/or default-level as well as the
- method-level, both class-level and/or default-level as well as
- method-level will apply.
-
- There are four possible styles of the interceptor element syntax :
-
- 1.
- <interceptor-binding>
- <ejb-name>*</ejb-name>
- <interceptor-class>INTERCEPTOR</interceptor-class>
- </interceptor-binding>
-
- Specifying the ejb-name as the wildcard value "*" designates
- default interceptors (interceptors that apply to all session and
- message-driven beans contained in the ejb-jar or .war).
-
- 2.
- <interceptor-binding>
- <ejb-name>EJBNAME</ejb-name>
- <interceptor-class>INTERCEPTOR</interceptor-class>
- </interceptor-binding>
-
- This style is used to refer to interceptors associated with the
- specified enterprise bean(class-level interceptors).
-
- 3.
- <interceptor-binding>
- <ejb-name>EJBNAME</ejb-name>
- <interceptor-class>INTERCEPTOR</interceptor-class>
- <method>
- <method-name>METHOD</method-name>
- </method>
- </interceptor-binding>
-
- This style is used to associate a method-level interceptor with
- the specified enterprise bean. If there are multiple methods
- with the same overloaded name, the element of this style refers
- to all the methods with the overloaded name. Method-level
- interceptors can only be associated with business methods of the
- bean class. Note that the wildcard value "*" cannot be used
- to specify method-level interceptors.
-
- 4.
- <interceptor-binding>
- <ejb-name>EJBNAME</ejb-name>
- <interceptor-class>INTERCEPTOR</interceptor-class>
- <method>
- <method-name>METHOD</method-name>
- <method-params>
- <method-param>PARAM-1</method-param>
- <method-param>PARAM-2</method-param>
- ...
- <method-param>PARAM-N</method-param>
- </method-params>
- </method>
- </interceptor-binding>
-
- This style is used to associate a method-level interceptor with
- the specified method of the specified enterprise bean. This
- style is used to refer to a single method within a set of methods
- with an overloaded name. The values PARAM-1 through PARAM-N
- are the fully-qualified Java types of the method's input parameters
- (if the method has no input arguments, the method-params element
- contains no method-param elements). Arrays are specified by the
- array element's type, followed by one or more pair of square
- brackets (e.g. int[][]).
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-name"
- type="javaee:string"/>
- <xsd:choice>
- <xsd:element name="interceptor-class"
- type="javaee:fully-qualified-classType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="interceptor-order"
- type="javaee:interceptor-orderType"
- minOccurs="1"/>
- </xsd:choice>
- <xsd:element name="exclude-default-interceptors"
- type="javaee:true-falseType"
- minOccurs="0"/>
- <xsd:element name="exclude-class-interceptors"
- type="javaee:true-falseType"
- minOccurs="0"/>
- <xsd:element name="method"
- type="javaee:named-methodType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="interceptor-orderType">
- <xsd:annotation>
- <xsd:documentation>
-
- The interceptor-orderType element describes a total ordering
- of interceptor classes.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="interceptor-class"
- type="javaee:fully-qualified-classType"
- minOccurs="1"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="named-methodType">
- <xsd:sequence>
- <xsd:element name="method-name"
- type="javaee:string"/>
- <xsd:element name="method-params"
- type="javaee:method-paramsType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="init-methodType">
- <xsd:sequence>
- <xsd:element name="create-method"
- type="javaee:named-methodType"/>
- <xsd:element name="bean-method"
- type="javaee:named-methodType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="remove-methodType">
- <xsd:sequence>
- <xsd:element name="bean-method"
- type="javaee:named-methodType"/>
- <xsd:element name="retain-if-exception"
- type="javaee:true-falseType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-driven-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-driven element declares a message-driven
- bean. The declaration consists of:
-
- - an optional description
- - an optional display name
- - an optional icon element that contains a small and a large
- icon file name.
- - a name assigned to the enterprise bean in
- the deployment descriptor
- - an optional mapped-name element that can be used to provide
- vendor-specific deployment information such as the physical
- jndi-name of destination from which this message-driven bean
- should consume. This element is not required to be supported
- by all implementations. Any use of this element is non-portable.
- - the message-driven bean's implementation class
- - an optional declaration of the bean's messaging
- type
- - an optional declaration of the bean's timeout method for
- handling programmatically created timers
- - an optional declaration of timers to be automatically created at
- deployment time
- - the optional message-driven bean's transaction management
- type. If it is not defined, it is defaulted to Container.
- - an optional declaration of the bean's
- message-destination-type
- - an optional declaration of the bean's
- message-destination-link
- - an optional declaration of the message-driven bean's
- activation configuration properties
- - an optional list of the message-driven bean class and/or
- superclass around-invoke methods.
- - an optional list of the message-driven bean class and/or
- superclass around-timeout methods.
- - an optional declaration of the bean's environment
- entries
- - an optional declaration of the bean's EJB references
- - an optional declaration of the bean's local EJB
- references
- - an optional declaration of the bean's web service
- references
- - an optional declaration of the security role
- references
- - an optional declaration of the security
- identity to be used for the execution of the bean's
- methods
- - an optional declaration of the bean's
- resource manager connection factory
- references
- - an optional declaration of the bean's resource
- environment references.
- - an optional declaration of the bean's message
- destination references
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="ejb-name"
- type="javaee:ejb-nameType"/>
- <xsd:element name="mapped-name"
- type="javaee:xsdStringType"
- minOccurs="0"/>
- <xsd:element name="ejb-class"
- type="javaee:ejb-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-class element specifies the fully qualified name
- of the bean class for this ejb. It is required unless
- there is a component-defining annotation for the same
- ejb-name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="messaging-type"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The messaging-type element specifies the message
- listener interface of the message-driven bean.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="timeout-method"
- type="javaee:named-methodType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The timeout-method element specifies the method that
- will receive callbacks for programmatically
- created timers.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="timer"
- type="javaee:timerType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="transaction-type"
- type="javaee:transaction-typeType"
- minOccurs="0"/>
- <xsd:element name="message-destination-type"
- type="javaee:message-destination-typeType"
- minOccurs="0"/>
- <xsd:element name="message-destination-link"
- type="javaee:message-destination-linkType"
- minOccurs="0"/>
- <xsd:element name="activation-config"
- type="javaee:activation-configType"
- minOccurs="0"/>
- <xsd:element name="around-invoke"
- type="javaee:around-invokeType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="around-timeout"
- type="javaee:around-timeoutType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:group ref="javaee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="security-role-ref"
- type="javaee:security-role-refType"
- minOccurs="0"
- maxOccurs="unbounded">
- </xsd:element>
- <xsd:element name="security-identity"
- type="javaee:security-identityType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="methodType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The methodType is used to denote a method of an enterprise
- bean's business, home, component, and/or web service endpoint
- interface, or, in the case of a message-driven bean, the
- bean's message listener method, or a set of such
- methods. The ejb-name element must be the name of one of the
- enterprise beans declared in the deployment descriptor; the
- optional method-intf element allows to distinguish between a
- method with the same signature that is multiply defined
- across the business, home, component, and/or web service
- endpoint nterfaces; the method-name element specifies the
- method name; and the optional method-params elements identify
- a single method among multiple methods with an overloaded
- method name.
-
- There are three possible styles of using methodType element
- within a method element:
-
- 1.
- <method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>*</method-name>
- </method>
-
- This style is used to refer to all the methods of the
- specified enterprise bean's business, home, component,
- and/or web service endpoint interfaces.
-
- 2.
- <method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>METHOD</method-name>
- </method>
-
- This style is used to refer to the specified method of
- the specified enterprise bean. If there are multiple
- methods with the same overloaded name, the element of
- this style refers to all the methods with the overloaded
- name.
-
- 3.
- <method>
- <ejb-name>EJBNAME</ejb-name>
- <method-name>METHOD</method-name>
- <method-params>
- <method-param>PARAM-1</method-param>
- <method-param>PARAM-2</method-param>
- ...
- <method-param>PARAM-n</method-param>
- </method-params>
- </method>
-
- This style is used to refer to a single method within a
- set of methods with an overloaded name. PARAM-1 through
- PARAM-n are the fully-qualified Java types of the
- method's input parameters (if the method has no input
- arguments, the method-params element contains no
- method-param elements). Arrays are specified by the
- array element's type, followed by one or more pair of
- square brackets (e.g. int[][]). If there are multiple
- methods with the same overloaded name, this style refers
- to all of the overloaded methods.
-
- Examples:
-
- Style 1: The following method element refers to all the
- methods of the EmployeeService bean's business, home,
- component, and/or web service endpoint interfaces:
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>*</method-name>
- </method>
-
- Style 2: The following method element refers to all the
- create methods of the EmployeeService bean's home
- interface(s).
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>create</method-name>
- </method>
-
- Style 3: The following method element refers to the
- create(String firstName, String LastName) method of the
- EmployeeService bean's home interface(s).
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- The following example illustrates a Style 3 element with
- more complex parameter types. The method
- foobar(char s, int i, int[] iar, mypackage.MyClass mycl,
- mypackage.MyClass[][] myclaar) would be specified as:
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-name>foobar</method-name>
- <method-params>
- <method-param>char</method-param>
- <method-param>int</method-param>
- <method-param>int[]</method-param>
- <method-param>mypackage.MyClass</method-param>
- <method-param>mypackage.MyClass[][]</method-param>
- </method-params>
- </method>
-
- The optional method-intf element can be used when it becomes
- necessary to differentiate between a method that is multiply
- defined across the enterprise bean's business, home, component,
- and/or web service endpoint interfaces with the same name and
- signature. However, if the same method is a method of both the
- local business interface, and the local component interface,
- the same attribute applies to the method for both interfaces.
- Likewise, if the same method is a method of both the remote
- business interface and the remote component interface, the same
- attribute applies to the method for both interfaces.
-
- For example, the method element
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Remote</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- can be used to differentiate the create(String, String)
- method defined in the remote interface from the
- create(String, String) method defined in the remote home
- interface, which would be defined as
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Home</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- and the create method that is defined in the local home
- interface which would be defined as
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>LocalHome</method-intf>
- <method-name>create</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- <method-param>java.lang.String</method-param>
- </method-params>
- </method>
-
- The method-intf element can be used with all three Styles
- of the method element usage. For example, the following
- method element example could be used to refer to all the
- methods of the EmployeeService bean's remote home interface
- and the remote business interface.
-
- <method>
- <ejb-name>EmployeeService</ejb-name>
- <method-intf>Home</method-intf>
- <method-name>*</method-name>
- </method>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-name"
- type="javaee:ejb-nameType"/>
- <xsd:element name="method-intf"
- type="javaee:method-intfType"
- minOccurs="0">
- </xsd:element>
- <xsd:element name="method-name"
- type="javaee:method-nameType"/>
- <xsd:element name="method-params"
- type="javaee:method-paramsType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-intfType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-intf element allows a method element to
- differentiate between the methods with the same name and
- signature that are multiply defined across the home and
- component interfaces (e.g, in both an enterprise bean's
- remote and local interfaces or in both an enterprise bean's
- home and remote interfaces, etc.); the component and web
- service endpoint interfaces, and so on.
-
- Local applies to the local component interface, local business
- interfaces, and the no-interface view.
-
- Remote applies to both remote component interface and the remote
- business interfaces.
-
- ServiceEndpoint refers to methods exposed through a web service
- endpoint.
-
- Timer refers to the bean's timeout callback methods.
-
- MessageEndpoint refers to the methods of a message-driven bean's
- message-listener interface.
-
- The method-intf element must be one of the following:
-
- Home
- Remote
- LocalHome
- Local
- ServiceEndpoint
- Timer
- MessageEndpoint
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Home"/>
- <xsd:enumeration value="Remote"/>
- <xsd:enumeration value="LocalHome"/>
- <xsd:enumeration value="Local"/>
- <xsd:enumeration value="ServiceEndpoint"/>
- <xsd:enumeration value="Timer"/>
- <xsd:enumeration value="MessageEndpoint"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-nameType contains a name of an enterprise
- bean method or the asterisk (*) character. The asterisk is
- used when the element denotes all the methods of an
- enterprise bean's client view interfaces.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-paramsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-paramsType defines a list of the
- fully-qualified Java type names of the method parameters.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="method-param"
- type="javaee:java-typeType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-param element contains a primitive
- or a fully-qualified Java type name of a method
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-permissionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-permissionType specifies that one or more
- security roles are allowed to invoke one or more enterprise
- bean methods. The method-permissionType consists of an
- optional description, a list of security role names or an
- indicator to state that the method is unchecked for
- authorization, and a list of method elements.
-
- The security roles used in the method-permissionType
- must be defined in the security-role elements of the
- deployment descriptor, and the methods must be methods
- defined in the enterprise bean's business, home, component
- and/or web service endpoint interfaces.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:choice>
- <xsd:element name="role-name"
- type="javaee:role-nameType"
- maxOccurs="unbounded"/>
- <xsd:element name="unchecked"
- type="javaee:emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The unchecked element specifies that a method is
- not checked for authorization by the container
- prior to invocation of the method.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- <xsd:element name="method"
- type="javaee:methodType"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="multiplicityType">
- <xsd:annotation>
- <xsd:documentation>
-
- The multiplicityType describes the multiplicity of the
- role that participates in a relation.
-
- The value must be one of the two following:
-
- One
- Many
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="One"/>
- <xsd:enumeration value="Many"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="persistence-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The persistence-typeType specifies an entity bean's persistence
- management type.
-
- The persistence-type element must be one of the two following:
-
- Bean
- Container
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Bean"/>
- <xsd:enumeration value="Container"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="queryType">
- <xsd:annotation>
- <xsd:documentation>
-
- The queryType defines a finder or select
- query. It contains
- - an optional description of the query
- - the specification of the finder or select
- method it is used by
- - an optional specification of the result type
- mapping, if the query is for a select method
- and entity objects are returned.
- - the EJB QL query string that defines the query.
-
- Queries that are expressible in EJB QL must use the ejb-ql
- element to specify the query. If a query is not expressible
- in EJB QL, the description element should be used to
- describe the semantics of the query and the ejb-ql element
- should be empty.
-
- The result-type-mapping is an optional element. It can only
- be present if the query-method specifies a select method
- that returns entity objects. The default value for the
- result-type-mapping element is "Local".
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"/>
- <xsd:element name="query-method"
- type="javaee:query-methodType"/>
- <xsd:element name="result-type-mapping"
- type="javaee:result-type-mappingType"
- minOccurs="0"/>
- <xsd:element name="ejb-ql"
- type="javaee:xsdStringType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="query-methodType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The query-method specifies the method for a finder or select
- query.
-
- The method-name element specifies the name of a finder or select
- method in the entity bean's implementation class.
-
- Each method-param must be defined for a query-method using the
- method-params element.
-
- It is used by the query-method element.
-
- Example:
-
- <query>
- <description>Method finds large orders</description>
- <query-method>
- <method-name>findLargeOrders</method-name>
- <method-params></method-params>
- </query-method>
- <ejb-ql>
- SELECT OBJECT(o) FROM Order o
- WHERE o.amount &gt; 1000
- </ejb-ql>
- </query>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="method-name"
- type="javaee:method-nameType"/>
- <xsd:element name="method-params"
- type="javaee:method-paramsType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="relationship-role-sourceType">
- <xsd:annotation>
- <xsd:documentation>
-
- The relationship-role-sourceType designates the source of a
- role that participates in a relationship. A
- relationship-role-sourceType is used by
- relationship-role-source elements to uniquely identify an
- entity bean.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-name"
- type="javaee:ejb-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="relationshipsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The relationshipsType describes the relationships in
- which entity beans with container-managed persistence
- participate. The relationshipsType contains an optional
- description; and a list of ejb-relation elements, which
- specify the container managed relationships.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-relation"
- type="javaee:ejb-relationType"
- maxOccurs="unbounded">
- <xsd:unique name="role-name-uniqueness">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-relationship-role-name contains the name of a
- relationship role. The name must be unique within
- a relationship, but can be reused in different
- relationships.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath=".//javaee:ejb-relationship-role-name"/>
- <xsd:field xpath="."/>
- </xsd:unique>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="result-type-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The result-type-mappingType is used in the query element to
- specify whether an abstract schema type returned by a query
- for a select method is to be mapped to an EJBLocalObject or
- EJBObject type.
-
- The value must be one of the following:
-
- Local
- Remote
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Local"/>
- <xsd:enumeration value="Remote"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-identityType">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-identityType specifies whether the caller's
- security identity is to be used for the execution of the
- methods of the enterprise bean or whether a specific run-as
- identity is to be used. It contains an optional description
- and a specification of the security identity to be used.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:choice>
- <xsd:element name="use-caller-identity"
- type="javaee:emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The use-caller-identity element specifies that
- the caller's security identity be used as the
- security identity for the execution of the
- enterprise bean's methods.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="run-as"
- type="javaee:run-asType"/>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="session-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The session-beanType declares an session bean. The
- declaration consists of:
-
- - an optional description
- - an optional display name
- - an optional icon element that contains a small and a large
- icon file name
- - a name assigned to the enterprise bean
- in the deployment description
- - an optional mapped-name element that can be used to provide
- vendor-specific deployment information such as the physical
- jndi-name of the session bean's remote home/business interface.
- This element is not required to be supported by all
- implementations. Any use of this element is non-portable.
- - the names of all the remote or local business interfaces,
- if any
- - the names of the session bean's remote home and
- remote interfaces, if any
- - the names of the session bean's local home and
- local interfaces, if any
- - an optional declaration that this bean exposes a
- no-interface view
- - the name of the session bean's web service endpoint
- interface, if any
- - the session bean's implementation class
- - the session bean's state management type
- - an optional declaration of a stateful session bean's timeout value
- - an optional declaration of the session bean's timeout method for
- handling programmatically created timers
- - an optional declaration of timers to be automatically created at
- deployment time
- - an optional declaration that a Singleton bean has eager
- initialization
- - an optional declaration of a Singleton/Stateful bean's concurrency
- management type
- - an optional declaration of the method locking metadata
- for a Singleton with container managed concurrency
- - an optional declaration of the other Singleton beans in the
- application that must be initialized before this bean
- - an optional declaration of the session bean's asynchronous
- methods
- - the optional session bean's transaction management type.
- If it is not present, it is defaulted to Container.
- - an optional declaration of a stateful session bean's
- afterBegin, beforeCompletion, and/or afterCompletion methods
- - an optional list of the session bean class and/or
- superclass around-invoke methods.
- - an optional list of the session bean class and/or
- superclass around-timeout methods.
- - an optional declaration of the bean's
- environment entries
- - an optional declaration of the bean's EJB references
- - an optional declaration of the bean's local
- EJB references
- - an optional declaration of the bean's web
- service references
- - an optional declaration of the security role
- references
- - an optional declaration of the security identity
- to be used for the execution of the bean's methods
- - an optional declaration of the bean's resource
- manager connection factory references
- - an optional declaration of the bean's resource
- environment references.
- - an optional declaration of the bean's message
- destination references
-
- The elements that are optional are "optional" in the sense
- that they are omitted when if lists represented by them are
- empty.
-
- The service-endpoint element may only be specified if the
- bean is a stateless session bean.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="ejb-name"
- type="javaee:ejb-nameType"/>
- <xsd:element name="mapped-name"
- type="javaee:xsdStringType"
- minOccurs="0"/>
- <xsd:element name="home"
- type="javaee:homeType"
- minOccurs="0"/>
- <xsd:element name="remote"
- type="javaee:remoteType"
- minOccurs="0"/>
- <xsd:element name="local-home"
- type="javaee:local-homeType"
- minOccurs="0"/>
- <xsd:element name="local"
- type="javaee:localType"
- minOccurs="0"/>
- <xsd:element name="business-local"
- type="javaee:fully-qualified-classType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="business-remote"
- type="javaee:fully-qualified-classType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="local-bean"
- type="javaee:emptyType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The local-bean element declares that this
- session bean exposes a no-interface Local client view.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-endpoint"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint element contains the
- fully-qualified name of the enterprise bean's web
- service endpoint interface. The service-endpoint
- element may only be specified for a stateless
- session bean. The specified interface must be a
- valid JAX-RPC service endpoint interface.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="ejb-class"
- type="javaee:ejb-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-class element specifies the fully qualified name
- of the bean class for this ejb. It is required unless
- there is a component-defining annotation for the same
- ejb-name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="session-type"
- type="javaee:session-typeType"
- minOccurs="0"/>
- <xsd:element name="stateful-timeout"
- type="javaee:stateful-timeoutType"
- minOccurs="0"/>
- <xsd:element name="timeout-method"
- type="javaee:named-methodType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The timeout-method element specifies the method that
- will receive callbacks for programmatically
- created timers.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="timer"
- type="javaee:timerType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="init-on-startup"
- type="javaee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The init-on-startup element specifies that a Singleton
- bean has eager initialization.
- This element can only be specified for singleton session
- beans.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="concurrency-management-type"
- type="javaee:concurrency-management-typeType"
- minOccurs="0"/>
- <xsd:element name="concurrent-method"
- type="javaee:concurrent-methodType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="depends-on"
- type="javaee:depends-onType"
- minOccurs="0"/>
- <xsd:element name="init-method"
- type="javaee:init-methodType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The init-method element specifies the mappings for
- EJB 2.x style create methods for an EJB 3.x bean.
- This element can only be specified for stateful
- session beans.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="remove-method"
- type="javaee:remove-methodType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The remove-method element specifies the mappings for
- EJB 2.x style remove methods for an EJB 3.x bean.
- This element can only be specified for stateful
- session beans.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="async-method"
- type="javaee:async-methodType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="transaction-type"
- type="javaee:transaction-typeType"
- minOccurs="0"/>
- <xsd:element name="after-begin-method"
- type="javaee:named-methodType"
- minOccurs="0"/>
- <xsd:element name="before-completion-method"
- type="javaee:named-methodType"
- minOccurs="0"/>
- <xsd:element name="after-completion-method"
- type="javaee:named-methodType"
- minOccurs="0"/>
- <xsd:element name="around-invoke"
- type="javaee:around-invokeType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="around-timeout"
- type="javaee:around-timeoutType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:group ref="javaee:jndiEnvironmentRefsGroup"/>
- <xsd:element name="post-activate"
- type="javaee:lifecycle-callbackType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="pre-passivate"
- type="javaee:lifecycle-callbackType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="security-role-ref"
- type="javaee:security-role-refType"
- minOccurs="0"
- maxOccurs="unbounded">
- </xsd:element>
- <xsd:element name="security-identity"
- type="javaee:security-identityType"
- minOccurs="0">
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="session-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The session-typeType describes whether the session bean is a
- singleton, stateful or stateless session. It is used by
- session-type elements.
-
- The value must be one of the three following:
-
- Singleton
- Stateful
- Stateless
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Singleton"/>
- <xsd:enumeration value="Stateful"/>
- <xsd:enumeration value="Stateless"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="stateful-timeoutType">
- <xsd:annotation>
- <xsd:documentation>
-
- The stateful-timeoutType represents the amount of time
- a stateful session bean can be idle(not receive any client
- invocations) before it is eligible for removal by the container.
-
- A timeout value of 0 means the bean is immediately eligible for removal.
-
- A timeout value of -1 means the bean will never be removed due to timeout.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="timeout"
- type="javaee:xsdIntegerType"/>
- <xsd:element name="unit"
- type="javaee:time-unit-typeType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="time-unit-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The time-unit-typeType represents a time duration at a given
- unit of granularity.
-
- The time unit type must be one of the following :
-
- Days
- Hours
- Minutes
- Seconds
- Milliseconds
- Microseconds
- Nanoseconds
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Days"/>
- <xsd:enumeration value="Hours"/>
- <xsd:enumeration value="Minutes"/>
- <xsd:enumeration value="Seconds"/>
- <xsd:enumeration value="Milliseconds"/>
- <xsd:enumeration value="Microseconds"/>
- <xsd:enumeration value="Nanoseconds"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="timer-scheduleType">
- <xsd:sequence>
- <xsd:element name="second"
- type="javaee:string"
- minOccurs="0"/>
- <xsd:element name="minute"
- type="javaee:string"
- minOccurs="0"/>
- <xsd:element name="hour"
- type="javaee:string"
- minOccurs="0"/>
- <xsd:element name="day-of-month"
- type="javaee:string"
- minOccurs="0"/>
- <xsd:element name="month"
- type="javaee:string"
- minOccurs="0"/>
- <xsd:element name="day-of-week"
- type="javaee:string"
- minOccurs="0"/>
- <xsd:element name="year"
- type="javaee:string"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="timerType">
- <xsd:annotation>
- <xsd:documentation>
-
- The timerType specifies an enterprise bean timer. Each
- timer is automatically created by the container upon
- deployment. Timer callbacks occur based on the
- schedule attributes. All callbacks are made to the
- timeout-method associated with the timer.
-
- A timer can have an optional start and/or end date. If
- a start date is specified, it takes precedence over the
- associated timer schedule such that any matching
- expirations prior to the start time will not occur.
- Likewise, no matching expirations will occur after any
- end date. Start/End dates are specified using the
- XML Schema dateTime type, which follows the ISO-8601
- standard for date(and optional time-within-the-day)
- representation.
-
- An optional flag can be used to control whether
- this timer has persistent(true) delivery semantics or
- non-persistent(false) delivery semantics. If not specified,
- the value defaults to persistent(true).
-
- A time zone can optionally be associated with a timer.
- If specified, the timer's schedule is evaluated in the context
- of that time zone, regardless of the default time zone in which
- the container is executing. Time zones are specified as an
- ID string. The set of required time zone IDs is defined by
- the Zone Name(TZ) column of the public domain zoneinfo database.
-
- An optional info string can be assigned to the timer and
- retrieved at runtime through the Timer.getInfo() method.
-
- The timerType can only be specified on stateless session
- beans, singleton session beans, and message-driven beans.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="schedule"
- type="javaee:timer-scheduleType"/>
- <xsd:element name="start"
- type="xsd:dateTime"
- minOccurs="0"/>
- <xsd:element name="end"
- type="xsd:dateTime"
- minOccurs="0"/>
- <xsd:element name="timeout-method"
- type="javaee:named-methodType"/>
- <xsd:element name="persistent"
- type="javaee:true-falseType"
- minOccurs="0"/>
- <xsd:element name="timezone"
- type="javaee:string"
- minOccurs="0"/>
- <xsd:element name="info"
- type="javaee:string"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="trans-attributeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The trans-attributeType specifies how the container must
- manage the transaction boundaries when delegating a method
- invocation to an enterprise bean's business method.
-
- The value must be one of the following:
-
- NotSupported
- Supports
- Required
- RequiresNew
- Mandatory
- Never
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="NotSupported"/>
- <xsd:enumeration value="Supports"/>
- <xsd:enumeration value="Required"/>
- <xsd:enumeration value="RequiresNew"/>
- <xsd:enumeration value="Mandatory"/>
- <xsd:enumeration value="Never"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="transaction-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The transaction-typeType specifies an enterprise bean's
- transaction management type.
-
- The transaction-type must be one of the two following:
-
- Bean
- Container
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Bean"/>
- <xsd:enumeration value="Container"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/facelet-taglib_1_0.dtd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/facelet-taglib_1_0.dtd
deleted file mode 100644
index e036d0ee70..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/facelet-taglib_1_0.dtd
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
- Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- Licensed under the Common Development and Distribution License,
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.sun.com/cddl/
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied. See the License for the specific language governing
- permissions and limitations under the License.
-
- $Id: facelet-taglib_1_0.dtd,v 1.1 2010/02/10 02:14:51 david_williams Exp $
--->
-
-<!ELEMENT facelet-taglib (library-class|(namespace,(tag|function)+))>
-<!ATTLIST facelet-taglib xmlns CDATA #FIXED "http://java.sun.com/JSF/Facelet">
-<!ELEMENT namespace (#PCDATA)>
-<!ELEMENT library-class (#PCDATA)>
-<!ELEMENT tag (tag-name,(handler-class|component|converter|validator|source))>
-<!ELEMENT tag-name (#PCDATA)>
-<!ELEMENT handler-class (#PCDATA)>
-<!ELEMENT component (component-type,renderer-type?,handler-class?)>
-<!ELEMENT component-type (#PCDATA)>
-<!ELEMENT renderer-type (#PCDATA)>
-<!ELEMENT converter (converter-id, handler-class?)>
-<!ELEMENT converter-id (#PCDATA)>
-<!ELEMENT validator (validator-id, handler-class?)>
-<!ELEMENT validator-id (#PCDATA)>
-<!ELEMENT source (#PCDATA)>
-<!ELEMENT function (function-name,function-class,function-signature)>
-<!ELEMENT function-name (#PCDATA)>
-<!ELEMENT function-class (#PCDATA)>
-<!ELEMENT function-signature (#PCDATA)>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_1_4.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_1_4.xsd
deleted file mode 100644
index 9b2334c2e3..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_1_4.xsd
+++ /dev/null
@@ -1,1608 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema
- targetNamespace="http://java.sun.com/xml/ns/j2ee"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.4">
- <xsd:annotation>
- <xsd:documentation>
- @(#)j2ee_1_4.xsds 1.43 03/09/16
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
- Road, Palo Alto, California 94303, U.S.A. All rights
- reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
-<xsd:annotation>
-<xsd:documentation>
-
-The following definitions that appear in the common
-shareable schema(s) of J2EE deployment descriptors should be
-interpreted with respect to the context they are included:
-
-Deployment Component may indicate one of the following:
- j2ee application;
- application client;
- web application;
- enterprise bean;
- resource adapter;
-
-Deployment File may indicate one of the following:
- ear file;
- war file;
- jar file;
- rar file;
-
-</xsd:documentation>
-</xsd:annotation>
-
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
- schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-
- <xsd:include schemaLocation=
- "http://www.ibm.com/webservices/xsd/j2ee_web_services_client_1_1.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:group name="descriptionGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group keeps the usage of the contained description related
- elements consistent across J2EE deployment descriptors.
-
- All elements may occur multiple times with different languages,
- to support localization of the content.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="display-name"
- type="j2ee:display-nameType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="icon"
- type="j2ee:iconType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="descriptionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The description type is used by a description element to
- provide text describing the parent element. The elements
- that use this type should include any information that the
- Deployment Component's Deployment File file producer wants
- to provide to the consumer of the Deployment Component's
- Deployment File (i.e., to the Deployer). Typically, the
- tools used by such a Deployment File consumer will display
- the description when processing the parent element that
- contains the description.
-
- The lang attribute defines the language that the
- description is provided in. The default value is "en" (English).
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="j2ee:xsdStringType">
- <xsd:attribute ref="xml:lang"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="dewey-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type defines a dewey decimal which is used
- to describe versions of documents.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:decimal">
- <xsd:whiteSpace value="collapse"/>
- </xsd:restriction>
-
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="display-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The display-name type contains a short name that is intended
- to be displayed by tools. It is used by display-name
- elements. The display name need not be unique.
-
- Example:
-
- ...
- <display-name xml:lang="en">Employee Self Service</display-name>
-
- The value of the xml:lang attribute is "en" (English) by default.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="j2ee:string">
- <xsd:attribute ref="xml:lang"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-linkType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-linkType is used by ejb-link
- elements in the ejb-ref or ejb-local-ref elements to specify
- that an EJB reference is linked to enterprise bean.
-
- The value of the ejb-link element must be the ejb-name of an
- enterprise bean in the same ejb-jar file or in another ejb-jar
- file in the same J2EE application unit.
-
- Alternatively, the name in the ejb-link element may be
- composed of a path name specifying the ejb-jar containing the
- referenced enterprise bean with the ejb-name of the target
- bean appended and separated from the path name by "#". The
- path name is relative to the Deployment File containing
- Deployment Component that is referencing the enterprise
- bean. This allows multiple enterprise beans with the same
- ejb-name to be uniquely identified.
-
- Examples:
-
- <ejb-link>EmployeeRecord</ejb-link>
-
- <ejb-link>../products/product.jar#ProductEJB</ejb-link>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-local-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-local-refType is used by ejb-local-ref elements for
- the declaration of a reference to an enterprise bean's local
- home. The declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of the Deployment
- Component that's referencing the enterprise bean
- - the expected type of the referenced enterprise bean
- - the expected local home and local interfaces of the
- referenced enterprise bean
- - optional ejb-link information, used to specify the
- referenced enterprise bean
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref-name"
- type="j2ee:ejb-ref-nameType"/>
- <xsd:element name="ejb-ref-type"
- type="j2ee:ejb-ref-typeType"/>
- <xsd:element name="local-home"
- type="j2ee:local-homeType"/>
- <xsd:element name="local"
- type="j2ee:localType"/>
- <xsd:element name="ejb-link"
- type="j2ee:ejb-linkType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-ref-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- Deployment Component's environment and is relative to the
- java:comp/env context. The name must be unique within the
- Deployment Component.
-
- It is recommended that name is prefixed with "ejb/".
-
- Example:
-
- <ejb-ref-name>ejb/Payroll</ejb-ref-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:jndi-nameType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-ref-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-typeType contains the expected type of the
- referenced enterprise bean.
-
- The ejb-ref-type designates a value
- that must be one of the following:
-
- Entity
- Session
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Entity"/>
- <xsd:enumeration value="Session"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-refType is used by ejb-ref elements for the
- declaration of a reference to an enterprise bean's home. The
- declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of
- the Deployment Component that's referencing the enterprise
- bean
- - the expected type of the referenced enterprise bean
- - the expected home and remote interfaces of the referenced
- enterprise bean
- - optional ejb-link information, used to specify the
- referenced enterprise bean
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref-name"
- type="j2ee:ejb-ref-nameType"/>
- <xsd:element name="ejb-ref-type"
- type="j2ee:ejb-ref-typeType"/>
-
- <xsd:element name="home"
- type="j2ee:homeType"/>
- <xsd:element name="remote"
- type="j2ee:remoteType"/>
- <xsd:element name="ejb-link"
- type="j2ee:ejb-linkType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type is used to designate an empty
- element when used.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="env-entry-type-valuesType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- This type contains the fully-qualified Java type of the
- environment entry value that is expected by the
- application's code.
-
- The following are the legal values of env-entry-type-valuesType:
-
- java.lang.Boolean
- java.lang.Byte
- java.lang.Character
- java.lang.String
- java.lang.Short
- java.lang.Integer
- java.lang.Long
- java.lang.Float
- java.lang.Double
-
- Example:
-
- <env-entry-type>java.lang.Boolean</env-entry-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="java.lang.Boolean"/>
- <xsd:enumeration value="java.lang.Byte"/>
- <xsd:enumeration value="java.lang.Character"/>
- <xsd:enumeration value="java.lang.String"/>
- <xsd:enumeration value="java.lang.Short"/>
- <xsd:enumeration value="java.lang.Integer"/>
- <xsd:enumeration value="java.lang.Long"/>
- <xsd:enumeration value="java.lang.Float"/>
- <xsd:enumeration value="java.lang.Double"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="env-entryType">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entryType is used to declare an application's
- environment entry. The declaration consists of an optional
- description, the name of the environment entry, and an
- optional value. If a value is not specified, one must be
- supplied during deployment.
-
- It is used by env-entry elements.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="env-entry-name"
- type="j2ee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The env-entry-name element contains the name of a
- Deployment Component's environment entry. The name
- is a JNDI name relative to the java:comp/env
- context. The name must be unique within a
- Deployment Component. The uniqueness
- constraints must be defined within the declared
- context.
-
- Example:
-
- <env-entry-name>minAmount</env-entry-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="env-entry-type"
- type="j2ee:env-entry-type-valuesType"/>
-
- <xsd:element name="env-entry-value"
- type="j2ee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The env-entry-value designates the value of a
- Deployment Component's environment entry. The value
- must be a String that is valid for the
- constructor of the specified type that takes a
- single String parameter, or for java.lang.Character,
- a single character.
-
- Example:
-
- <env-entry-value>100.00</env-entry-value>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The elements that use this type designate the name of a
- Java class or interface. The name is in the form of a
- "binary name", as defined in the JLS. This is the form
- of name used in Class.forName(). Tools that need the
- canonical name (the name used in source code) will need
- to convert this binary name to the canonical name.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="generic-booleanType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type defines four different values which can designate
- boolean values. This includes values yes and no which are
- not designated by xsd:boolean
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="true"/>
- <xsd:enumeration value="false"/>
- <xsd:enumeration value="yes"/>
- <xsd:enumeration value="no"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="homeType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The homeType defines the fully-qualified name of
- an enterprise bean's home interface.
-
- Example:
-
- <home>com.aardvark.payroll.PayrollHome</home>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="iconType">
- <xsd:annotation>
- <xsd:documentation>
-
- The icon type contains small-icon and large-icon elements
- that specify the file names for small and large GIF or
- JPEG icon images used to represent the parent element in a
- GUI tool.
-
- The xml:lang attribute defines the language that the
- icon file names are provided in. Its value is "en" (English)
- by default.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="small-icon" type="j2ee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The small-icon element contains the name of a file
- containing a small (16 x 16) icon image. The file
- name is a relative path within the Deployment
- Component's Deployment File.
-
- The image may be either in the JPEG or GIF format.
- The icon can be used by tools.
-
- Example:
-
- <small-icon>employee-service-icon16x16.jpg</small-icon>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="large-icon" type="j2ee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The large-icon element contains the name of a file
- containing a large
- (32 x 32) icon image. The file name is a relative
- path within the Deployment Component's Deployment
- File.
-
- The image may be either in the JPEG or GIF format.
- The icon can be used by tools.
-
- Example:
-
- <large-icon>employee-service-icon32x32.jpg</large-icon>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:sequence>
-
- <xsd:attribute ref="xml:lang"/>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-identifierType defines a Java identifier.
- The users of this type should further verify that
- the content does not contain Java reserved keywords.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:pattern value="($|_|\p{L})(\p{L}|\p{Nd}|_|$)*"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="java-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- This is a generic type that designates a Java primitive
- type or a fully qualified name of a Java interface/type,
- or an array of such types.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:pattern value="[^\p{Z}]*"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jndi-nameType type designates a JNDI name in the
- Deployment Component's environment and is relative to the
- java:comp/env context. A JNDI name must be unique within the
- Deployment Component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:group name="jndiEnvironmentRefsGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group keeps the usage of the contained JNDI environment
- reference elements consistent across J2EE deployment descriptors.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="env-entry"
- type="j2ee:env-entryType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref"
- type="j2ee:ejb-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ejb-local-ref"
- type="j2ee:ejb-local-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:group ref="j2ee:service-refGroup"/>
- <xsd:element name="resource-ref"
- type="j2ee:resource-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref"
- type="j2ee:resource-env-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref"
- type="j2ee:message-destination-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="listenerType">
- <xsd:annotation>
- <xsd:documentation>
-
- The listenerType indicates the deployment properties for a web
- application listener bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="listener-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The listener-class element declares a class in the
- application must be registered as a web
- application listener bean. The value is the fully
- qualified classname of the listener class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="local-homeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The local-homeType defines the fully-qualified
- name of an enterprise bean's local home interface.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="localType">
- <xsd:annotation>
- <xsd:documentation>
-
- The localType defines the fully-qualified name of an
- enterprise bean's local interface.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-linkType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-linkType is used to link a message
- destination reference or message-driven bean to a message
- destination.
-
- The Assembler sets the value to reflect the flow of messages
- between producers and consumers in the application.
-
- The value must be the message-destination-name of a message
- destination in the same Deployment File or in another
- Deployment File in the same J2EE application unit.
-
- Alternatively, the value may be composed of a path name
- specifying a Deployment File containing the referenced
- message destination with the message-destination-name of the
- destination appended and separated from the path name by
- "#". The path name is relative to the Deployment File
- containing Deployment Component that is referencing the
- message destination. This allows multiple message
- destinations with the same name to be uniquely identified.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The message-destination-ref element contains a declaration
- of Deployment Component's reference to a message destination
- associated with a resource in Deployment Component's
- environment. It consists of:
-
- - an optional description
- - the message destination reference name
- - the message destination type
- - a specification as to whether the
- destination is used for
- consuming or producing messages, or both
- - a link to the message destination
-
- Examples:
-
- <message-destination-ref>
- <message-destination-ref-name>jms/StockQueue
- </message-destination-ref-name>
- <message-destination-type>javax.jms.Queue
- </message-destination-type>
- <message-destination-usage>Consumes
- </message-destination-usage>
- <message-destination-link>CorporateStocks
- </message-destination-link>
- </message-destination-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref-name"
- type="j2ee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies
- the name of a message destination reference; its
- value is the environment entry name used in
- Deployment Component code. The name is a JNDI name
- relative to the java:comp/env context and must be
- unique within an ejb-jar (for enterprise beans) or a
- Deployment File (for others).
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="message-destination-type"
- type="j2ee:message-destination-typeType"/>
- <xsd:element name="message-destination-usage"
- type="j2ee:message-destination-usageType"/>
- <xsd:element name="message-destination-link"
- type="j2ee:message-destination-linkType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-typeType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The message-destination-typeType specifies the type of
- the destination. The type is specified by the Java interface
- expected to be implemented by the destination.
-
- Example:
-
- <message-destination-type>javax.jms.Queue
- </message-destination-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-usageType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-usageType specifies the use of the
- message destination indicated by the reference. The value
- indicates whether messages are consumed from the message
- destination, produced for the destination, or both. The
- Assembler makes use of this information in linking producers
- of a destination with its consumers.
-
- The value of the message-destination-usage element must be
- one of the following:
- Consumes
- Produces
- ConsumesProduces
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Consumes"/>
- <xsd:enumeration value="Produces"/>
- <xsd:enumeration value="ConsumesProduces"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destinationType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The message-destinationType specifies a message
- destination. The logical destination described by this
- element is mapped to a physical destination by the Deployer.
-
- The message destination element contains:
-
- - an optional description
- - an optional display-name
- - an optional icon
- - a message destination name which must be unique
- among message destination names within the same
- Deployment File.
-
- Example:
-
- <message-destination>
- <message-destination-name>CorporateStocks
- </message-destination-name>
- </message-destination>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="message-destination-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-name element specifies a
- name for a message destination. This name must be
- unique among the names of message destinations
- within the Deployment File.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="param-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type is a general type that can be used to declare
- parameter/value lists.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="param-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-name element contains the name of a
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="param-value"
- type="j2ee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-value element contains the value of a
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The elements that use this type designate either a relative
- path or an absolute path starting with a "/".
-
- In elements that specify a pathname to a file within the
- same Deployment File, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the Deployment File's namespace. Absolute filenames (i.e.,
- those starting with "/") also specify names in the root of
- the Deployment File's namespace. In general, relative names
- are preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="remoteType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The remote element contains the fully-qualified name
- of the enterprise bean's remote interface.
-
- Example:
-
- <remote>com.wombat.empl.EmployeeService</remote>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="res-authType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-authType specifies whether the Deployment Component
- code signs on programmatically to the resource manager, or
- whether the Container will sign on to the resource manager
- on behalf of the Deployment Component. In the latter case,
- the Container uses information that is supplied by the
- Deployer.
-
- The value must be one of the two following:
-
- Application
- Container
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Application"/>
- <xsd:enumeration value="Container"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="res-sharing-scopeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-sharing-scope type specifies whether connections
- obtained through the given resource manager connection
- factory reference can be shared. The value, if specified,
- must be one of the two following:
-
- Shareable
- Unshareable
-
- The default value is Shareable.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="Shareable"/>
- <xsd:enumeration value="Unshareable"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="resource-env-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The resource-env-refType is used to define
- resource-env-type elements. It contains a declaration of a
- Deployment Component's reference to an administered object
- associated with a resource in the Deployment Component's
- environment. It consists of an optional description, the
- resource environment reference name, and an indication of
- the resource environment reference type expected by the
- Deployment Component code.
-
- Example:
-
- <resource-env-ref>
- <resource-env-ref-name>jms/StockQueue
- </resource-env-ref-name>
- <resource-env-ref-type>javax.jms.Queue
- </resource-env-ref-type>
- </resource-env-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref-name"
- type="j2ee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in
- the Deployment Component code. The name is a JNDI
- name relative to the java:comp/env context and must
- be unique within a Deployment Component.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="resource-env-ref-type"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-type element specifies the type
- of a resource environment reference. It is the
- fully qualified name of a Java language class or
- interface.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="resource-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The resource-refType contains a declaration of a
- Deployment Component's reference to an external resource. It
- consists of an optional description, the resource manager
- connection factory reference name, the indication of the
- resource manager connection factory type expected by the
- Deployment Component code, the type of authentication
- (Application or Container), and an optional specification of
- the shareability of connections obtained from the resource
- (Shareable or Unshareable).
-
- Example:
-
- <resource-ref>
- <res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="res-ref-name"
- type="j2ee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference.
- The name is a JNDI name relative to the
- java:comp/env context.
- The name must be unique within a Deployment File.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="res-type"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-type element specifies the type of the data
- source. The type is specified by the fully qualified
- Java language class or interface
- expected to be implemented by the data source.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="res-auth"
- type="j2ee:res-authType"/>
-
- <xsd:element name="res-sharing-scope"
- type="j2ee:res-sharing-scopeType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="role-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The role-nameType designates the name of a security role.
-
- The name must conform to the lexical rules for a token.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="run-asType">
- <xsd:annotation>
- <xsd:documentation>
-
- The run-asType specifies the run-as identity to be
- used for the execution of a component. It contains an
- optional description, and the name of a security role.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="j2ee:role-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-role-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-role-refType contains the declaration of a
- security role reference in a component's or a
- Deployment Component's code. The declaration consists of an
- optional description, the security role name used in the
- code, and an optional link to a security role. If the
- security role is not specified, the Deployer must choose an
- appropriate security role.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="j2ee:role-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The value of the role-name element must be the String used
- as the parameter to the
- EJBContext.isCallerInRole(String roleName) method or the
- HttpServletRequest.isUserInRole(String role) method.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="role-link"
- type="j2ee:role-nameType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The role-link element is a reference to a defined
- security role. The role-link element must contain
- the name of one of the security roles defined in the
- security-role elements.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-roleType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The security-roleType contains the definition of a security
- role. The definition consists of an optional description of the
- security role, and the security role name.
-
- Example:
-
- <security-role>
- <description>
- This role includes all employees who are authorized
- to access the employee service application.
- </description>
- <role-name>employee</role-name>
- </security-role>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="j2ee:role-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="string">
- <xsd:annotation>
- <xsd:documentation>
-
- This is a special string datatype that is defined by J2EE as
- a base type for defining collapsed strings. When schemas
- require trailing/leading space elimination as well as
- collapsing the existing whitespace, this base type may be
- used.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:token">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="true-falseType">
- <xsd:annotation>
- <xsd:documentation>
-
- This simple type designates a boolean with only two
- permissible values
-
- - true
- - false
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:xsdBooleanType">
- <xsd:pattern value="(true|false)"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="url-patternType">
- <xsd:annotation>
- <xsd:documentation>
-
- The url-patternType contains the url pattern of the mapping.
- It must follow the rules specified in Section 11.2 of the
- Servlet API Specification. This pattern is assumed to be in
- URL-decoded form and must not contain CR(#xD) or LF(#xA).
- If it contains those characters, the container must inform
- the developer with a descriptive error message.
- The container must preserve all characters including whitespaces.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdAnyURIType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:anyURI.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:anyURI">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdBooleanType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:boolean.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:boolean">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:integer.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:integer">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdNMTOKENType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:NMTOKEN.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:NMTOKEN">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdNonNegativeIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:nonNegativeInteger.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:nonNegativeInteger">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdPositiveIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:positiveInteger.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:positiveInteger">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:QName.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:QName">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:string.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_jaxrpc_mapping_1_1.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_jaxrpc_mapping_1_1.xsd
deleted file mode 100644
index 852191c298..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_jaxrpc_mapping_1_1.xsd
+++ /dev/null
@@ -1,886 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/j2ee"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.1">
- <xsd:annotation>
- <xsd:documentation>
- @(#)j2ee_jaxrpc_mapping_1_1.xsds 1.11 09/03/03
-
- Based on j2ee_jaxrpc_mapping_1_0.dtd, Last updated: 09/19/2002 10:26
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
- Road, Palo Alto, California 94303, U.S.A. All rights
- reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- (C) Copyright International Business Machines Corporation 2002
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The element describes the Java mapping to a known WSDL document.
-
- It contains the mapping between package names and XML namespaces,
- WSDL root types and Java artifacts, and the set of mappings for
- services.
-
- All java-wsdl-mapping deployment descriptors must indicate the
- schema by using the J2EE namespace:
-
- http://java.sun.com/xml/ns/j2ee
-
- and by indicating the version of the schema by using the
- version element as shown below:
-
- <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
- version="1.1">
- ...
- </java-wsdl-mapping>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for J2EE
- namespace with the following location:
-
- http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all J2EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="j2ee_1_4.xsd"/>
-
-
-<!-- **************************************************** -->
-
-
- <xsd:element name="java-wsdl-mapping" type="j2ee:java-wsdl-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- This is the root of the java-wsdl-mapping deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="constructor-parameter-orderType">
- <xsd:annotation>
- <xsd:documentation>
-
- The constructor-parameter-order element defines the order
- that complexType element values are applied to a Java
- exception constructor. Element names are specified for each
- parameter of the constructor, including element names of
- inherited types if necessary.
-
- Used in: exception-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="element-name"
- type="j2ee:string"
- minOccurs="1" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The element-name element defines the name of a complexType
- element name attribute value.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="exception-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The exception-mapping element defines the mapping between the
- service specific exception types and wsdl faults and
- SOAP headerfaults.
-
- This element should be interpreted with respect to the
- mapping between a method and an operation which provides the
- mapping context.
-
- Used in: service-endpoint-method-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="exception-type"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The exception-type element defines Java type of the exception.
- It may be a service specific exception.
-
- It must be a fully qualified class name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-message"
- type="j2ee:wsdl-messageType"/>
- <xsd:element name="wsdl-message-part-name"
- type="j2ee:wsdl-message-part-nameType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-message-part-name element is required only
- when the message referenced by the wsdl-message element
- has more than one part.
-
- This only occurs when multiple headerfaults use the
- same message.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="constructor-parameter-order"
- type="j2ee:constructor-parameter-orderType"
- minOccurs="0" maxOccurs="1"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="java-wsdl-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The element describes the Java mapping to a known WSDL document.
-
- It contains the mapping between package names and XML namespaces,
- WSDL root types and Java artifacts, and the set of mappings for
- services.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="package-mapping"
- type="j2ee:package-mappingType"
- minOccurs="1" maxOccurs="unbounded"/>
- <xsd:element name="java-xml-type-mapping"
- type="j2ee:java-xml-type-mappingType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="exception-mapping"
- type="j2ee:exception-mappingType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:sequence minOccurs="0" maxOccurs="unbounded">
- <xsd:element name="service-interface-mapping"
- type="j2ee:service-interface-mappingType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="service-endpoint-interface-mapping"
- type="j2ee:service-endpoint-interface-mappingType"
- minOccurs="1" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:sequence>
-
- <xsd:attribute name="version"
- type="j2ee:dewey-versionType"
- fixed="1.1"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 1.1.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="java-xml-type-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-xml-type-mapping element contains a java-type that is the
- fully qualified name of the Java class, primitive type, or array
- type, QName of the XML root type or anonymous type, the WSDL type
- scope the QName applies to and the set of variable mappings for
- each public variable within the Java class.
-
- Used in: java-wsdl-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="java-type"
- type="j2ee:java-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-type element is the fully qualified class name of
- a Java class, primitive, or array type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <choice>
- <xsd:element name="root-type-qname"
- type="j2ee:xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The root-type-qname identifies the WSDL QName of an XML type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="anonymous-type-qname"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The anonymous-type-qname identifies the WSDL QName of an
- anonymous XML type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </choice>
- <xsd:element name="qname-scope"
- type="j2ee:qname-scopeType"/>
- <xsd:element name="variable-mapping"
- type="j2ee:variable-mappingType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="method-param-parts-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-param-parts-mapping element defines the mapping between a
- Java method parameters and a wsdl-message.
-
- Used in: service-endpoint-method-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="param-position"
- type="j2ee:xsdNonNegativeIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-position element defines the position of a
- parameter within a Java method. It must be an integer
- starting from 0.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="param-type"
- type="j2ee:java-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-type element defines the fully qualified
- class name of a Java class, primitive, or array type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-message-mapping"
- type="j2ee:wsdl-message-mappingType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="package-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The package-mapping indicates the mapping between java-package-name
- and XML namespace in the WSDL document.
-
- Used in: java-wsdl-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="package-type"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The package-type indicates the Java package name. It must be a fully
- qualified package name, even though the XML schema type is
- fully-qualified-classType.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="namespaceURI"
- type="j2ee:xsdAnyURIType">
- <xsd:annotation>
- <xsd:documentation>
-
- The namespaceURI element indicates a URI.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="parameter-modeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The parameter-mode element defines the mode of the parameter.
- It can have only three values, IN, OUT, INOUT.
-
- Used in: java-xml-type-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="IN"/>
- <xsd:enumeration value="OUT"/>
- <xsd:enumeration value="INOUT"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="port-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-mapping defines the mapping of the WSDL port name attribute
- to the Java name used to generate the Generated Service Interface
- method get{java-name}.
-
- Used in: service-interface-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="port-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-mapping defines the mapping of the WSDL port name
- attribute to the Java name used to generate the Generated
- Service Interface method get{java-name}.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="java-port-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-port-name element is the string to use as the port
- name in Java. It is used in generating the Generated
- Service Interface method get{java-port-name}.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="qname-scopeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The qname-scope elements scopes the reference of a QName to the WSDL
- element type it applies to. The value of qname-scope may be
- simpleType, complexType, or element.
-
- Used in: java-xml-type-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string">
- <xsd:enumeration value="simpleType"/>
- <xsd:enumeration value="complexType"/>
- <xsd:enumeration value="element"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-endpoint-interface-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint-interface-mapping defines a tuple
- to specify Service Endpoint Interfaces to
- WSDL port types and WSDL bindings.
-
- An interface may be mapped to a port-type and binding multiple
- times. This happens rarely.
-
- Used in: java-wsdl-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="service-endpoint-interface"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint-interface element defines the Java
- type for the endpoint interface. The name must be a fully
- qualified class name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-port-type"
- type="j2ee:xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-port-type element defines the wsdl port type
- by a QNAME which uniquely identifies the port type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-binding"
- type="j2ee:xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-binding element defines the wsdl binding
- by a QNAME which uniquely identifies the binding.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-endpoint-method-mapping"
- type="j2ee:service-endpoint-method-mappingType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-endpoint-method-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint-method-mapping element defines the mapping of
- Java methods to operations (which are not uniquely qualified by
- qnames).
-
- The wsdl-operation should be interpreted with respect to the
- portType and binding in which this definition is embedded within.
- See the definitions for service-endpoint-interface-mapping and
- service-interface-mapping to acquire the proper context. The
- wrapped-element indicator should only be specified when a WSDL
- message wraps an element type. The wsdl-return-value-mapping is
- not specified for one-way operations.
-
- Used in: service-endpoint-interface-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="java-method-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-method-name element defines the name of a Java method
- within an interface.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-operation"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-operation element defines an operation within a WSDL
- document. It must be interpreted with respect to a port type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wrapped-element"
- type="j2ee:emptyType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The wrapped-element element is defined when a WSDL message
- with a single part is used to wrap an element type and the
- element's name matches the operation name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="method-param-parts-mapping"
- type="j2ee:method-param-parts-mappingType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="wsdl-return-value-mapping"
- type="j2ee:wsdl-return-value-mappingType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-interface-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-interface-mapping element defines how a Java type for
- the service interface maps to a WSDL service.
-
- Used in: java-wsdl-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="service-interface"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-interface element defines the Java type for the service.
- For static services, it is javax.xml.rpc.Service interface. For
- generated service, it would be the generated interface name.
-
- The name must be a fully qualified class name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-service-name"
- type="j2ee:xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-service-name element defines the wsdl service name
- by a QNAME which uniquely identifies the service.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="port-mapping"
- type="j2ee:port-mappingType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="variable-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The variable-mapping element defines the correlation between a
- Java class data member or JavaBeans property to an XML element
- or attribute name of an XML root type. If the data-member
- element is present, the Java variable name is a public data
- member. If data-member is not present, the Java variable name
- is a JavaBeans property.
-
- Used in: java-xml-type-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="java-variable-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-variable-name defines the name of a public data member or
- JavaBeans property within a Java class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="data-member"
- type="j2ee:emptyType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The data-member element is a boolean indicator that a Java
- variable is a public data member and not a JavaBeans property.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:choice>
- <xsd:element name="xml-attribute-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The xml-attribute-name element defines name attribute value
- of a WSDL attribute element within a root type. The value
- of an xml-attribute-name element must match the value of
- the ref attribute if mapping an attribute reference.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="xml-element-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The xml-element-name element defines name attribute value of
- a WSDL element within a root type. The value of an
- xml-element-name element must match the value of the ref
- attribute if mapping an element reference.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="xml-wildcard"
- type="j2ee:emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- The xml-wildcard element associates the variable-mapping with
- an xsd:any element within a root type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="wsdl-message-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-message-mapping element defines the mapping to a
- specific message and its part. Together they define uniquely
- the mapping for a specific parameter. Parts within a message
- context are uniquely identified with their names.
-
- The parameter-mode is defined by the mapping to indicate
- whether the mapping will be IN, OUT, or INOUT.. The presence
- of the soap-header element indicates that the parameter is
- mapped to a soap header only. When absent, it means that the
- wsdl-message is mapped to a Java parameter. The soap headers
- are interpreted in the order they are provided in the mapping.
-
- Used in: method-param-parts-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="wsdl-message"
- type="j2ee:wsdl-messageType"/>
- <xsd:element name="wsdl-message-part-name"
- type="j2ee:wsdl-message-part-nameType"/>
- <xsd:element name="parameter-mode"
- type="j2ee:parameter-modeType"/>
- <xsd:element name="soap-header"
- type="j2ee:emptyType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The soap-header element is a boolean element indicating that
- a parameter is mapped to a SOAP header.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="wsdl-message-part-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- Interpretation of the wsdl-message-part-name element depends on
- whether or not wrapped-element has been defined in the
- service-endpoint-method-mapping. If wrapped-element is not
- specified, wsdl-message-part-name defines a WSDL message part. It
- should always be interpreted with respect to a wsdl-message
- element. If wrapped-element is specified, wsdl-message-part-name
- refers to an element name of the element type.
-
- Used in: wsdl-message-mapping, wsdl-return-value-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="wsdl-messageType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-message element defines a WSDL message by a QNAME.
-
- Used in: wsdl-message-mapping, wsdl-return-value-mapping,
- exception-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:xsdQNameType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="wsdl-return-value-mappingType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-return-value-mapping element defines the mapping for the
- method's return value. It defines the mapping to a specific message
- and its part. Together they define uniquely the mapping for a
- specific parameter. Parts within a message context are uniquely
- identified with their names. The wsdl-message-part-name is not
- specified if there is no return value or OUT parameters.
-
- Used in: service-endpoint-method-mapping
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="method-return-value"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The method-return-value element defines a fully qualified
- class name or void type for the method's return value
- type.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-message"
- type="j2ee:wsdl-messageType"/>
- <xsd:element name="wsdl-message-part-name"
- type="j2ee:wsdl-message-part-nameType"
- minOccurs="0"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_web_services_1_1.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_web_services_1_1.xsd
deleted file mode 100644
index 7e2a7980a2..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_web_services_1_1.xsd
+++ /dev/null
@@ -1,491 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/j2ee"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.1">
- <xsd:annotation>
- <xsd:documentation>
- @(#)j2ee_web_services_1_1.xsds 1.11 02/11/03
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
- Road, Palo Alto, California 94303, U.S.A. All rights
- reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- (C) Copyright International Business Machines Corporation 2002
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The webservices element is the root element for the web services
- deployment descriptor. It specifies the set of web service
- descriptions that are to be deployed into the J2EE Application
- Server and the dependencies they have on container resources and
- services. The deployment descriptor must be named
- "META-INF/webservices.xml" in the web services' jar file.
-
- Used in: webservices.xml
-
- All webservices deployment descriptors must indicate the
- webservices schema by using the J2EE namespace:
-
- http://java.sun.com/xml/ns/j2ee
-
- and by indicating the version of the schema by using the version
- element as shown below:
-
- <webservices xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
- http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
- version="1.1">
- ...
- </webservices>
-
- The instance documents may indicate the published version of the
- schema using the xsi:schemaLocation attribute for the J2EE
- namespace with the following location:
-
- http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all J2EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="j2ee_1_4.xsd"/>
-
-
-<!-- **************************************************** -->
-
-
- <xsd:element name="webservices" type="j2ee:webservicesType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservices element is the root element for the web services
- deployment descriptor. It specifies the set of web service
- descriptions that are to be deployed into the J2EE Application Server
- and the dependencies they have on container resources and services.
-
- Used in: webservices.xml
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:key name="webservice-description-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description-name identifies the collection of
- port-components associated with a WSDL file and JAX-RPC mapping. The
- name must be unique within the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:webservice-description"/>
- <xsd:field xpath="j2ee:webservice-description-name"/>
- </xsd:key>
- </xsd:element>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="port-componentType">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component element associates a WSDL port with a web service
- interface and implementation. It defines the name of the port as a
- component, optional description, optional display name, optional iconic
- representations, WSDL port QName, Service Endpoint Interface, Service
- Implementation Bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="display-name"
- type="j2ee:display-nameType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="icon"
- type="j2ee:iconType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="port-component-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The port-component-name element specifies a port component's
- name. This name is assigned by the module producer to name
- the service implementation bean in the module's deployment
- descriptor. The name must be unique among the port component
- names defined in the same module.
-
- Used in: port-component
-
- Example:
- <port-component-name>EmployeeService
- </port-component-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-port"
- type="j2ee:xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name space and local name part of the WSDL port QName.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-endpoint-interface"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The service-endpoint-interface element contains the
- fully-qualified name of the port component's Service Endpoint
- Interface.
-
- Used in: port-component
-
- Example:
- <remote>com.wombat.empl.EmployeeService</remote>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-impl-bean"
- type="j2ee:service-impl-beanType"/>
-
- <xsd:element name="handler"
- type="j2ee:port-component_handlerType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="port-component_handlerType">
- <xsd:annotation>
- <xsd:documentation>
-
- Declares the handler for a port-component. Handlers can access the
- init-param name/value pairs using the HandlerInfo interface.
-
- Used in: port-component
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="handler-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique within the
- module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines a fully qualified class name for the handler implementation.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="init-param"
- type="j2ee:param-valueType"
- minOccurs="0" maxOccurs="unbounded"/>
-
- <xsd:element name="soap-header"
- type="j2ee:xsdQNameType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the QName of a SOAP header that will be processed by the
- handler.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="soap-role"
- type="j2ee:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The soap-role element contains a SOAP actor definition that the
- Handler will play as a role.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-impl-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-impl-bean element defines the web service implementation.
- A service implementation can be an EJB bean class or JAX-RPC web
- component. Existing EJB implementations are exposed as a web service
- using an ejb-link.
-
- Used in: port-component
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice>
- <xsd:element name="ejb-link"
- type="j2ee:ejb-linkType"/>
- <xsd:element name="servlet-link"
- type="j2ee:servlet-linkType"/>
- </xsd:choice>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="servlet-linkType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The servlet-link element is used in the service-impl-bean element
- to specify that a Service Implementation Bean is defined as a
- JAX-RPC Service Endpoint.
-
- The value of the servlet-link element must be the servlet-name of
- a JAX-RPC Service Endpoint in the same WAR file.
-
- Used in: service-impl-bean
-
- Example:
- <servlet-link>StockQuoteService</servlet-link>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="webservice-descriptionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description element defines a WSDL document file
- and the set of Port components associated with the WSDL ports
- defined in the WSDL document. There may be multiple
- webservice-descriptions defined within a module.
-
- All WSDL file ports must have a corresponding port-component element
- defined.
-
- Used in: webservices
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="j2ee:descriptionType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="display-name"
- type="j2ee:display-nameType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="icon"
- type="j2ee:iconType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="webservice-description-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description-name identifies the collection of
- port-components associated with a WSDL file and JAX-RPC
- mapping. The name must be unique within the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-file"
- type="j2ee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-file element contains the name of a WSDL file in the
- module. The file name is a relative path within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="jaxrpc-mapping-file"
- type="j2ee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jaxrpc-mapping-file element contains the name of a file that
- describes the JAX-RPC mapping between the Java interaces used by
- the application and the WSDL description in the wsdl-file. The
- file name is a relative path within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="port-component"
- type="j2ee:port-componentType"
- minOccurs="1" maxOccurs="unbounded">
- <xsd:key name="port-component_handler-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique
- within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:handler"/>
- <xsd:field xpath="j2ee:handler-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="webservicesType">
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="webservice-description"
- type="j2ee:webservice-descriptionType"
- minOccurs="1" maxOccurs="unbounded">
- <xsd:key name="port-component-name-key">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The port-component-name element specifies a port
- component's name. This name is assigned by the module
- producer to name the service implementation bean in the
- module's deployment descriptor. The name must be unique
- among the port component names defined in the same module.
-
- Used in: port-component
-
- Example:
- <port-component-name>EmployeeService
- </port-component-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:port-component"/>
- <xsd:field xpath="j2ee:port-component-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
-
- <xsd:attribute name="version"
- type="j2ee:dewey-versionType"
- fixed="1.1"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 1.1.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_web_services_client_1_1.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_web_services_client_1_1.xsd
deleted file mode 100644
index 454a554528..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/j2ee_web_services_client_1_1.xsd
+++ /dev/null
@@ -1,345 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/j2ee"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.1">
- <xsd:annotation>
- <xsd:documentation>
- @(#)j2ee_web_services_client_1_1.xsds 1.10 02/11/03
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
- Road, Palo Alto, California 94303, U.S.A. All rights
- reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- (C) Copyright International Business Machines Corporation 2002
-
- </xsd:documentation>
- </xsd:annotation>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="port-component-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component-ref element declares a client dependency
- on the container for resolving a Service Endpoint Interface
- to a WSDL port. It optionally associates the Service Endpoint
- Interface with a particular port-component. This is only used
- by the container for a Service.getPort(Class) method call.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="service-endpoint-interface"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint-interface element defines a fully qualified
- Java class that represents the Service Endpoint Interface of a
- WSDL port.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="port-component-link"
- type="j2ee:string"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component-link element links a port-component-ref
- to a specific port-component required to be made available
- by a service reference.
-
- The value of a port-component-link must be the
- port-component-name of a port-component in the same module
- or another module in the same application unit. The syntax
- for specification follows the syntax defined for ejb-link
- in the EJB 2.0 specification.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:group name="service-refGroup">
- <xsd:sequence>
- <xsd:element name="service-ref"
- type="j2ee:service-refType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:key name="service-ref_handler-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique
- within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="j2ee:handler"/>
- <xsd:field xpath="j2ee:handler-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-ref element declares a reference to a Web
- service. It contains optional description, display name and
- icons, a declaration of the required Service interface,
- an optional WSDL document location, an optional set
- of JAX-RPC mappings, an optional QName for the service element,
- an optional set of Service Endpoint Interfaces to be resolved
- by the container to a WSDL port, and an optional set of handlers.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="service-ref-name"
- type="j2ee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-ref-name element declares logical name that the
- components in the module use to look up the Web service. It
- is recommended that all service reference names start with
- "service/".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-interface"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-interface element declares the fully qualified class
- name of the JAX-RPC Service interface the client depends on.
- In most cases the value will be javax.xml.rpc.Service. A JAX-RPC
- generated Service Interface class may also be specified.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="wsdl-file"
- type="j2ee:xsdAnyURIType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-file element contains the URI location of a WSDL
- file. The location is relative to the root of the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="jaxrpc-mapping-file"
- type="j2ee:pathType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The jaxrpc-mapping-file element contains the name of a file that
- describes the JAX-RPC mapping between the Java interaces used by
- the application and the WSDL description in the wsdl-file. The
- file name is a relative path within the module file.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-qname"
- type="j2ee:xsdQNameType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-qname element declares the specific WSDL service
- element that is being refered to. It is not specified if no
- wsdl-file is declared.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="port-component-ref"
- type="j2ee:port-component-refType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component-ref element declares a client dependency
- on the container for resolving a Service Endpoint Interface
- to a WSDL port. It optionally associates the Service Endpoint
- Interface with a particular port-component. This is only used
- by the container for a Service.getPort(Class) method call.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="handler"
- type="j2ee:service-ref_handlerType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Declares the handler for a port-component. Handlers can
- access the init-param name/value pairs using the
- HandlerInfo interface. If port-name is not specified, the
- handler is assumed to be associated with all ports of the
- service.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-ref_handlerType">
- <xsd:annotation>
- <xsd:documentation>
-
- Declares the handler for a port-component. Handlers can access the
- init-param name/value pairs using the HandlerInfo interface. If
- port-name is not specified, the handler is assumed to be associated
- with all ports of the service.
-
- Used in: service-ref
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="handler-name"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique
- within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-class"
- type="j2ee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines a fully qualified class name for the handler
- implementation.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="init-param"
- type="j2ee:param-valueType"
- minOccurs="0" maxOccurs="unbounded"/>
-
- <xsd:element name="soap-header"
- type="j2ee:xsdQNameType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the QName of a SOAP header that will be processed
- by the handler.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="soap-role"
- type="j2ee:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The soap-role element contains a SOAP actor definition that
- the Handler will play as a role.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="port-name"
- type="j2ee:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-name element defines the WSDL port-name that a
- handler should be associated with.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_5.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_5.xsd
deleted file mode 100644
index db1018188e..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_5.xsd
+++ /dev/null
@@ -1,2096 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="5">
- <xsd:annotation>
- <xsd:documentation>
- @(#)javaee_5.xsds 1.65 06/02/17
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003-2005 Sun Microsystems, Inc.
- 4150 Network Circle
- Santa Clara, California 95054
- U.S.A
- All rights reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
-<xsd:annotation>
-<xsd:documentation>
-
-The following definitions that appear in the common
-shareable schema(s) of J2EE deployment descriptors should be
-interpreted with respect to the context they are included:
-
-Deployment Component may indicate one of the following:
- j2ee application;
- application client;
- web application;
- enterprise bean;
- resource adapter;
-
-Deployment File may indicate one of the following:
- ear file;
- war file;
- jar file;
- rar file;
-
-</xsd:documentation>
-</xsd:annotation>
-
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
- schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-
- <xsd:include schemaLocation="javaee_web_services_client_1_2.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:group name="descriptionGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group keeps the usage of the contained description related
- elements consistent across Java EE deployment descriptors.
-
- All elements may occur multiple times with different languages,
- to support localization of the content.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="display-name"
- type="javaee:display-nameType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="icon"
- type="javaee:iconType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="descriptionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The description type is used by a description element to
- provide text describing the parent element. The elements
- that use this type should include any information that the
- Deployment Component's Deployment File file producer wants
- to provide to the consumer of the Deployment Component's
- Deployment File (i.e., to the Deployer). Typically, the
- tools used by such a Deployment File consumer will display
- the description when processing the parent element that
- contains the description.
-
- The lang attribute defines the language that the
- description is provided in. The default value is "en" (English).
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="javaee:xsdStringType">
- <xsd:attribute ref="xml:lang"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="dewey-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type defines a dewey decimal that is used
- to describe versions of documents.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="\.?[0-9]+(\.[0-9]+)*"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="display-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The display-name type contains a short name that is intended
- to be displayed by tools. It is used by display-name
- elements. The display name need not be unique.
-
- Example:
-
- ...
- <display-name xml:lang="en">
- Employee Self Service
- </display-name>
-
- The value of the xml:lang attribute is "en" (English) by default.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="javaee:string">
- <xsd:attribute ref="xml:lang"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-linkType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-linkType is used by ejb-link
- elements in the ejb-ref or ejb-local-ref elements to specify
- that an EJB reference is linked to enterprise bean.
-
- The value of the ejb-link element must be the ejb-name of an
- enterprise bean in the same ejb-jar file or in another ejb-jar
- file in the same Java EE application unit.
-
- Alternatively, the name in the ejb-link element may be
- composed of a path name specifying the ejb-jar containing the
- referenced enterprise bean with the ejb-name of the target
- bean appended and separated from the path name by "#". The
- path name is relative to the Deployment File containing
- Deployment Component that is referencing the enterprise
- bean. This allows multiple enterprise beans with the same
- ejb-name to be uniquely identified.
-
- Examples:
-
- <ejb-link>EmployeeRecord</ejb-link>
-
- <ejb-link>../products/product.jar#ProductEJB</ejb-link>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-local-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-local-refType is used by ejb-local-ref elements for
- the declaration of a reference to an enterprise bean's local
- home or to the local business interface of a 3.0 bean.
- The declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of the Deployment
- Component that's referencing the enterprise bean.
- - the optional expected type of the referenced enterprise bean
- - the optional expected local interface of the referenced
- enterprise bean or the local business interface of the
- referenced enterprise bean.
- - the optional expected local home interface of the referenced
- enterprise bean. Not applicable if this ejb-local-ref refers
- to the local business interface of a 3.0 bean.
- - optional ejb-link information, used to specify the
- referenced enterprise bean
- - optional elements to define injection of the named enterprise
- bean into a component field or property.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref-name"
- type="javaee:ejb-ref-nameType"/>
- <xsd:element name="ejb-ref-type"
- type="javaee:ejb-ref-typeType"
- minOccurs="0"/>
- <xsd:element name="local-home"
- type="javaee:local-homeType"
- minOccurs="0"/>
- <xsd:element name="local"
- type="javaee:localType"
- minOccurs="0"/>
- <xsd:element name="ejb-link"
- type="javaee:ejb-linkType"
- minOccurs="0"/>
- <xsd:group ref="javaee:resourceGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-ref-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- Deployment Component's environment and is relative to the
- java:comp/env context. The name must be unique within the
- Deployment Component.
-
- It is recommended that name is prefixed with "ejb/".
-
- Example:
-
- <ejb-ref-name>ejb/Payroll</ejb-ref-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:jndi-nameType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-ref-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-typeType contains the expected type of the
- referenced enterprise bean.
-
- The ejb-ref-type designates a value
- that must be one of the following:
-
- Entity
- Session
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Entity"/>
- <xsd:enumeration value="Session"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-refType is used by ejb-ref elements for the
- declaration of a reference to an enterprise bean's home or
- to the remote business interface of a 3.0 bean.
- The declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of
- the Deployment Component that's referencing the enterprise
- bean.
- - the optional expected type of the referenced enterprise bean
- - the optional remote interface of the referenced enterprise bean
- or the remote business interface of the referenced enterprise
- bean
- - the optional expected home interface of the referenced
- enterprise bean. Not applicable if this ejb-ref
- refers to the remote business interface of a 3.0 bean.
- - optional ejb-link information, used to specify the
- referenced enterprise bean
- - optional elements to define injection of the named enterprise
- bean into a component field or property
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref-name"
- type="javaee:ejb-ref-nameType"/>
- <xsd:element name="ejb-ref-type"
- type="javaee:ejb-ref-typeType"
- minOccurs="0"/>
- <xsd:element name="home"
- type="javaee:homeType"
- minOccurs="0"/>
- <xsd:element name="remote"
- type="javaee:remoteType"
- minOccurs="0"/>
- <xsd:element name="ejb-link"
- type="javaee:ejb-linkType"
- minOccurs="0"/>
- <xsd:group ref="javaee:resourceGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type is used to designate an empty
- element when used.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="env-entry-type-valuesType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- This type contains the fully-qualified Java type of the
- environment entry value that is expected by the
- application's code.
-
- The following are the legal values of env-entry-type-valuesType:
-
- java.lang.Boolean
- java.lang.Byte
- java.lang.Character
- java.lang.String
- java.lang.Short
- java.lang.Integer
- java.lang.Long
- java.lang.Float
- java.lang.Double
-
- Example:
-
- <env-entry-type>java.lang.Boolean</env-entry-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="java.lang.Boolean"/>
- <xsd:enumeration value="java.lang.Byte"/>
- <xsd:enumeration value="java.lang.Character"/>
- <xsd:enumeration value="java.lang.String"/>
- <xsd:enumeration value="java.lang.Short"/>
- <xsd:enumeration value="java.lang.Integer"/>
- <xsd:enumeration value="java.lang.Long"/>
- <xsd:enumeration value="java.lang.Float"/>
- <xsd:enumeration value="java.lang.Double"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="env-entryType">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entryType is used to declare an application's
- environment entry. The declaration consists of an optional
- description, the name of the environment entry, a type
- (optional if the value is injected, otherwise required), and
- an optional value.
-
- It also includes optional elements to define injection of
- the named resource into fields or JavaBeans properties.
-
- If a value is not specified and injection is requested,
- no injection will occur and no entry of the specified name
- will be created. This allows an initial value to be
- specified in the source code without being incorrectly
- changed when no override has been specified.
-
- If a value is not specified and no injection is requested,
- a value must be supplied during deployment.
-
- This type is used by env-entry elements.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="env-entry-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The env-entry-name element contains the name of a
- Deployment Component's environment entry. The name
- is a JNDI name relative to the java:comp/env
- context. The name must be unique within a
- Deployment Component. The uniqueness
- constraints must be defined within the declared
- context.
-
- Example:
-
- <env-entry-name>minAmount</env-entry-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="env-entry-type"
- type="javaee:env-entry-type-valuesType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The env-entry-type element contains the Java language
- type of the environment entry. If an injection target
- is specified for the environment entry, the type may
- be omitted, or must match the type of the injection
- target. If no injection target is specified, the type
- is required.
-
- Example:
-
- <env-entry-type>java.lang.Integer</env-entry-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="env-entry-value"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The env-entry-value designates the value of a
- Deployment Component's environment entry. The value
- must be a String that is valid for the
- constructor of the specified type that takes a
- single String parameter, or for java.lang.Character,
- a single character.
-
- Example:
-
- <env-entry-value>100.00</env-entry-value>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The elements that use this type designate the name of a
- Java class or interface. The name is in the form of a
- "binary name", as defined in the JLS. This is the form
- of name used in Class.forName(). Tools that need the
- canonical name (the name used in source code) will need
- to convert this binary name to the canonical name.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="generic-booleanType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type defines four different values which can designate
- boolean values. This includes values yes and no which are
- not designated by xsd:boolean
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="true"/>
- <xsd:enumeration value="false"/>
- <xsd:enumeration value="yes"/>
- <xsd:enumeration value="no"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="homeType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The homeType defines the fully-qualified name of
- an enterprise bean's home interface.
-
- Example:
-
- <home>com.aardvark.payroll.PayrollHome</home>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="iconType">
- <xsd:annotation>
- <xsd:documentation>
-
- The icon type contains small-icon and large-icon elements
- that specify the file names for small and large GIF, JPEG,
- or PNG icon images used to represent the parent element in a
- GUI tool.
-
- The xml:lang attribute defines the language that the
- icon file names are provided in. Its value is "en" (English)
- by default.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="small-icon" type="javaee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The small-icon element contains the name of a file
- containing a small (16 x 16) icon image. The file
- name is a relative path within the Deployment
- Component's Deployment File.
-
- The image may be in the GIF, JPEG, or PNG format.
- The icon can be used by tools.
-
- Example:
-
- <small-icon>employee-service-icon16x16.jpg</small-icon>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="large-icon" type="javaee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The large-icon element contains the name of a file
- containing a large
- (32 x 32) icon image. The file name is a relative
- path within the Deployment Component's Deployment
- File.
-
- The image may be in the GIF, JPEG, or PNG format.
- The icon can be used by tools.
-
- Example:
-
- <large-icon>employee-service-icon32x32.jpg</large-icon>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:sequence>
-
- <xsd:attribute ref="xml:lang"/>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="injection-targetType">
- <xsd:annotation>
- <xsd:documentation>
-
- An injection target specifies a class and a name within
- that class into which a resource should be injected.
-
- The injection target class specifies the fully qualified
- class name that is the target of the injection. The
- Java EE specifications describe which classes can be an
- injection target.
-
- The injection target name specifies the target within
- the specified class. The target is first looked for as a
- JavaBeans property name. If not found, the target is
- looked for as a field name.
-
- The specified resource will be injected into the target
- during initialization of the class by either calling the
- set method for the target property or by setting a value
- into the named field.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="injection-target-class"
- type="javaee:fully-qualified-classType"/>
- <xsd:element name="injection-target-name"
- type="javaee:java-identifierType"/>
- </xsd:sequence>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-identifierType defines a Java identifier.
- The users of this type should further verify that
- the content does not contain Java reserved keywords.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:pattern value="($|_|\p{L})(\p{L}|\p{Nd}|_|$)*"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="java-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- This is a generic type that designates a Java primitive
- type or a fully qualified name of a Java interface/type,
- or an array of such types.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:pattern value="[^\p{Z}]*"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jndi-nameType type designates a JNDI name in the
- Deployment Component's environment and is relative to the
- java:comp/env context. A JNDI name must be unique within the
- Deployment Component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:group name="jndiEnvironmentRefsGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group keeps the usage of the contained JNDI environment
- reference elements consistent across Java EE deployment descriptors.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="env-entry"
- type="javaee:env-entryType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref"
- type="javaee:ejb-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="ejb-local-ref"
- type="javaee:ejb-local-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:group ref="javaee:service-refGroup"/>
- <xsd:element name="resource-ref"
- type="javaee:resource-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref"
- type="javaee:resource-env-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref"
- type="javaee:message-destination-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="persistence-context-ref"
- type="javaee:persistence-context-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="persistence-unit-ref"
- type="javaee:persistence-unit-refType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="post-construct"
- type="javaee:lifecycle-callbackType"
- minOccurs="0" maxOccurs="unbounded"/>
- <xsd:element name="pre-destroy"
- type="javaee:lifecycle-callbackType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="lifecycle-callbackType">
- <xsd:annotation>
- <xsd:documentation>
-
- The lifecycle-callback type specifies a method on a
- class to be called when a lifecycle event occurs.
- Note that each class may have only one lifecycle callback
- method for any given event and that the method may not
- be overloaded.
-
- If the lifefycle-callback-class element is missing then
- the class defining the callback is assumed to be the
- component class in scope at the place in the descriptor
- in which the callback definition appears.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="lifecycle-callback-class"
- type="javaee:fully-qualified-classType"
- minOccurs="0"/>
- <xsd:element name="lifecycle-callback-method"
- type="javaee:java-identifierType"/>
- </xsd:sequence>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="listenerType">
- <xsd:annotation>
- <xsd:documentation>
-
- The listenerType indicates the deployment properties for a web
- application listener bean.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="listener-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The listener-class element declares a class in the
- application must be registered as a web
- application listener bean. The value is the fully
- qualified classname of the listener class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="local-homeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The local-homeType defines the fully-qualified
- name of an enterprise bean's local home interface.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="localType">
- <xsd:annotation>
- <xsd:documentation>
-
- The localType defines the fully-qualified name of an
- enterprise bean's local interface.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-linkType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-linkType is used to link a message
- destination reference or message-driven bean to a message
- destination.
-
- The Assembler sets the value to reflect the flow of messages
- between producers and consumers in the application.
-
- The value must be the message-destination-name of a message
- destination in the same Deployment File or in another
- Deployment File in the same Java EE application unit.
-
- Alternatively, the value may be composed of a path name
- specifying a Deployment File containing the referenced
- message destination with the message-destination-name of the
- destination appended and separated from the path name by
- "#". The path name is relative to the Deployment File
- containing Deployment Component that is referencing the
- message destination. This allows multiple message
- destinations with the same name to be uniquely identified.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The message-destination-ref element contains a declaration
- of Deployment Component's reference to a message destination
- associated with a resource in Deployment Component's
- environment. It consists of:
-
- - an optional description
- - the message destination reference name
- - an optional message destination type
- - an optional specification as to whether
- the destination is used for
- consuming or producing messages, or both.
- if not specified, "both" is assumed.
- - an optional link to the message destination
- - optional injection targets
-
- The message destination type must be supplied unless an
- injection target is specified, in which case the type
- of the target is used. If both are specified, the type
- must be assignment compatible with the type of the injection
- target.
-
- Examples:
-
- <message-destination-ref>
- <message-destination-ref-name>jms/StockQueue
- </message-destination-ref-name>
- <message-destination-type>javax.jms.Queue
- </message-destination-type>
- <message-destination-usage>Consumes
- </message-destination-usage>
- <message-destination-link>CorporateStocks
- </message-destination-link>
- </message-destination-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies
- the name of a message destination reference; its
- value is the environment entry name used in
- Deployment Component code. The name is a JNDI name
- relative to the java:comp/env context and must be
- unique within an ejb-jar (for enterprise beans) or a
- Deployment File (for others).
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="message-destination-type"
- type="javaee:message-destination-typeType"
- minOccurs="0"/>
- <xsd:element name="message-destination-usage"
- type="javaee:message-destination-usageType"
- minOccurs="0"/>
- <xsd:element name="message-destination-link"
- type="javaee:message-destination-linkType"
- minOccurs="0"/>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-typeType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The message-destination-typeType specifies the type of
- the destination. The type is specified by the Java interface
- expected to be implemented by the destination.
-
- Example:
-
- <message-destination-type>javax.jms.Queue
- </message-destination-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-usageType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-usageType specifies the use of the
- message destination indicated by the reference. The value
- indicates whether messages are consumed from the message
- destination, produced for the destination, or both. The
- Assembler makes use of this information in linking producers
- of a destination with its consumers.
-
- The value of the message-destination-usage element must be
- one of the following:
- Consumes
- Produces
- ConsumesProduces
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Consumes"/>
- <xsd:enumeration value="Produces"/>
- <xsd:enumeration value="ConsumesProduces"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destinationType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The message-destinationType specifies a message
- destination. The logical destination described by this
- element is mapped to a physical destination by the Deployer.
-
- The message destination element contains:
-
- - an optional description
- - an optional display-name
- - an optional icon
- - a message destination name which must be unique
- among message destination names within the same
- Deployment File.
- - an optional mapped name
-
- Example:
-
- <message-destination>
- <message-destination-name>CorporateStocks
- </message-destination-name>
- </message-destination>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="message-destination-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-name element specifies a
- name for a message destination. This name must be
- unique among the names of message destinations
- within the Deployment File.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="mapped-name"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- A product specific name that this message destination
- should be mapped to. Each message-destination-ref
- element that references this message destination will
- define a name in the namespace of the referencing
- component. (It's a name in the JNDI java:comp/env
- namespace.) Many application servers provide a way to
- map these local names to names of resources known to the
- application server. This mapped name is often a global
- JNDI name, but may be a name of any form. Each of the
- local names should be mapped to this same global name.
-
- Application servers are not required to support any
- particular form or type of mapped name, nor the ability
- to use mapped names. The mapped name is
- product-dependent and often installation-dependent. No
- use of a mapped name is portable.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="param-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type is a general type that can be used to declare
- parameter/value lists.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="param-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-name element contains the name of a
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="param-value"
- type="javaee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-value element contains the value of a
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The elements that use this type designate either a relative
- path or an absolute path starting with a "/".
-
- In elements that specify a pathname to a file within the
- same Deployment File, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the Deployment File's namespace. Absolute filenames (i.e.,
- those starting with "/") also specify names in the root of
- the Deployment File's namespace. In general, relative names
- are preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="persistence-context-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The persistence-context-ref element contains a declaration
- of Deployment Component's reference to a persistence context
- associated within a Deployment Component's
- environment. It consists of:
-
- - an optional description
- - the persistence context reference name
- - an optional persistence unit name. If not specified,
- the default persistence unit is assumed.
- - an optional specification as to whether
- the persistence context type is Transaction or
- Extended. If not specified, Transaction is assumed.
- - an optional list of persistence properties
- - optional injection targets
-
- Examples:
-
- <persistence-context-ref>
- <persistence-context-ref-name>myPersistenceContext
- </persistence-context-ref-name>
- </persistence-context-ref>
-
- <persistence-context-ref>
- <persistence-context-ref-name>myPersistenceContext
- </persistence-context-ref-name>
- <persistence-unit-name>PersistenceUnit1
- </persistence-unit-name>
- <persistence-context-type>Extended</persistence-context-type>
- </persistence-context-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="persistence-context-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The persistence-context-ref-name element specifies
- the name of a persistence context reference; its
- value is the environment entry name used in
- Deployment Component code. The name is a JNDI name
- relative to the java:comp/env context.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="persistence-unit-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The Application Assembler(or BeanProvider) may use the
- following syntax to avoid the need to rename persistence
- units to have unique names within a Java EE application.
-
- The Application Assembler specifies the pathname of the
- root of the persistence.xml file for the referenced
- persistence unit and appends the name of the persistence
- unit separated from the pathname by #. The pathname is
- relative to the referencing application component jar file.
- In this manner, multiple persistence units with the same
- persistence unit name may be uniquely identified when the
- Application Assembler cannot change persistence unit names.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="persistence-context-type"
- type="javaee:persistence-context-typeType"
- minOccurs="0"/>
-
- <xsd:element name="persistence-property"
- type="javaee:propertyType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Used to specify properties for the container or persistence
- provider. Vendor-specific properties may be included in
- the set of properties. Properties that are not recognized
- by a vendor must be ignored. Entries that make use of the
- namespace javax.persistence and its subnamespaces must not
- be used for vendor-specific properties. The namespace
- javax.persistence is reserved for use by the specification.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="persistence-context-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The persistence-context-typeType specifies the transactional
- nature of a persistence context reference.
-
- The value of the persistence-context-type element must be
- one of the following:
- Transaction
- Extended
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Transaction"/>
- <xsd:enumeration value="Extended"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="persistence-unit-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The persistence-unit-ref element contains a declaration
- of Deployment Component's reference to a persistence unit
- associated within a Deployment Component's
- environment. It consists of:
-
- - an optional description
- - the persistence unit reference name
- - an optional persistence unit name. If not specified,
- the default persistence unit is assumed.
- - optional injection targets
-
- Examples:
-
- <persistence-unit-ref>
- <persistence-unit-ref-name>myPersistenceUnit
- </persistence-unit-ref-name>
- </persistence-unit-ref>
-
- <persistence-unit-ref>
- <persistence-unit-ref-name>myPersistenceUnit
- </persistence-unit-ref-name>
- <persistence-unit-name>PersistenceUnit1
- </persistence-unit-name>
- </persistence-unit-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="persistence-unit-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The persistence-unit-ref-name element specifies
- the name of a persistence unit reference; its
- value is the environment entry name used in
- Deployment Component code. The name is a JNDI name
- relative to the java:comp/env context.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="persistence-unit-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The Application Assembler(or BeanProvider) may use the
- following syntax to avoid the need to rename persistence
- units to have unique names within a Java EE application.
-
- The Application Assembler specifies the pathname of the
- root of the persistence.xml file for the referenced
- persistence unit and appends the name of the persistence
- unit separated from the pathname by #. The pathname is
- relative to the referencing application component jar file.
- In this manner, multiple persistence units with the same
- persistence unit name may be uniquely identified when the
- Application Assembler cannot change persistence unit names.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
-
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- Specifies a name/value pair.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="name"
- type="javaee:xsdStringType">
- </xsd:element>
- <xsd:element name="value"
- type="javaee:xsdStringType">
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="remoteType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The remote element contains the fully-qualified name
- of the enterprise bean's remote interface.
-
- Example:
-
- <remote>com.wombat.empl.EmployeeService</remote>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="res-authType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-authType specifies whether the Deployment Component
- code signs on programmatically to the resource manager, or
- whether the Container will sign on to the resource manager
- on behalf of the Deployment Component. In the latter case,
- the Container uses information that is supplied by the
- Deployer.
-
- The value must be one of the two following:
-
- Application
- Container
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Application"/>
- <xsd:enumeration value="Container"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="res-sharing-scopeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-sharing-scope type specifies whether connections
- obtained through the given resource manager connection
- factory reference can be shared. The value, if specified,
- must be one of the two following:
-
- Shareable
- Unshareable
-
- The default value is Shareable.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Shareable"/>
- <xsd:enumeration value="Unshareable"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="resource-env-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The resource-env-refType is used to define
- resource-env-type elements. It contains a declaration of a
- Deployment Component's reference to an administered object
- associated with a resource in the Deployment Component's
- environment. It consists of an optional description, the
- resource environment reference name, and an optional
- indication of the resource environment reference type
- expected by the Deployment Component code.
-
- It also includes optional elements to define injection of
- the named resource into fields or JavaBeans properties.
-
- The resource environment type must be supplied unless an
- injection target is specified, in which case the type
- of the target is used. If both are specified, the type
- must be assignment compatible with the type of the injection
- target.
-
- Example:
-
- <resource-env-ref>
- <resource-env-ref-name>jms/StockQueue
- </resource-env-ref-name>
- <resource-env-ref-type>javax.jms.Queue
- </resource-env-ref-type>
- </resource-env-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in
- the Deployment Component code. The name is a JNDI
- name relative to the java:comp/env context and must
- be unique within a Deployment Component.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="resource-env-ref-type"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-type element specifies the type
- of a resource environment reference. It is the
- fully qualified name of a Java language class or
- interface.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="resource-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The resource-refType contains a declaration of a
- Deployment Component's reference to an external resource. It
- consists of an optional description, the resource manager
- connection factory reference name, an optional indication of
- the resource manager connection factory type expected by the
- Deployment Component code, an optional type of authentication
- (Application or Container), and an optional specification of
- the shareability of connections obtained from the resource
- (Shareable or Unshareable).
-
- It also includes optional elements to define injection of
- the named resource into fields or JavaBeans properties.
-
- The connection factory type must be supplied unless an
- injection target is specified, in which case the type
- of the target is used. If both are specified, the type
- must be assignment compatible with the type of the injection
- target.
-
- Example:
-
- <resource-ref>
- <res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="res-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference.
- The name is a JNDI name relative to the
- java:comp/env context.
- The name must be unique within a Deployment File.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="res-type"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-type element specifies the type of the data
- source. The type is specified by the fully qualified
- Java language class or interface
- expected to be implemented by the data source.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="res-auth"
- type="javaee:res-authType"
- minOccurs="0"/>
-
- <xsd:element name="res-sharing-scope"
- type="javaee:res-sharing-scopeType"
- minOccurs="0"/>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:group name="resourceGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group collects elements that are common to all the
- JNDI resource elements.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="mapped-name"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- A product specific name that this resource should be
- mapped to. The name of this resource, as defined by the
- resource's name element or defaulted, is a name that is
- local to the application component using the resource.
- (It's a name in the JNDI java:comp/env namespace.) Many
- application servers provide a way to map these local
- names to names of resources known to the application
- server. This mapped name is often a global JNDI name,
- but may be a name of any form.
-
- Application servers are not required to support any
- particular form or type of mapped name, nor the ability
- to use mapped names. The mapped name is
- product-dependent and often installation-dependent. No
- use of a mapped name is portable.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="injection-target"
- type="javaee:injection-targetType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="role-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The role-nameType designates the name of a security role.
-
- The name must conform to the lexical rules for a token.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="run-asType">
- <xsd:annotation>
- <xsd:documentation>
-
- The run-asType specifies the run-as identity to be
- used for the execution of a component. It contains an
- optional description, and the name of a security role.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="javaee:role-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-role-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-role-refType contains the declaration of a
- security role reference in a component's or a
- Deployment Component's code. The declaration consists of an
- optional description, the security role name used in the
- code, and an optional link to a security role. If the
- security role is not specified, the Deployer must choose an
- appropriate security role.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="javaee:role-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The value of the role-name element must be the String used
- as the parameter to the
- EJBContext.isCallerInRole(String roleName) method or the
- HttpServletRequest.isUserInRole(String role) method.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="role-link"
- type="javaee:role-nameType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The role-link element is a reference to a defined
- security role. The role-link element must contain
- the name of one of the security roles defined in the
- security-role elements.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-roleType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The security-roleType contains the definition of a security
- role. The definition consists of an optional description of
- the security role, and the security role name.
-
- Example:
-
- <security-role>
- <description>
- This role includes all employees who are authorized
- to access the employee service application.
- </description>
- <role-name>employee</role-name>
- </security-role>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="javaee:role-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="string">
- <xsd:annotation>
- <xsd:documentation>
-
- This is a special string datatype that is defined by Java EE as
- a base type for defining collapsed strings. When schemas
- require trailing/leading space elimination as well as
- collapsing the existing whitespace, this base type may be
- used.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:token">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="true-falseType">
- <xsd:annotation>
- <xsd:documentation>
-
- This simple type designates a boolean with only two
- permissible values
-
- - true
- - false
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:xsdBooleanType">
- <xsd:pattern value="(true|false)"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="url-patternType">
- <xsd:annotation>
- <xsd:documentation>
-
- The url-patternType contains the url pattern of the mapping.
- It must follow the rules specified in Section 11.2 of the
- Servlet API Specification. This pattern is assumed to be in
- URL-decoded form and must not contain CR(#xD) or LF(#xA).
- If it contains those characters, the container must inform
- the developer with a descriptive error message.
- The container must preserve all characters including whitespaces.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdAnyURIType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:anyURI.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:anyURI">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdBooleanType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:boolean.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:boolean">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:integer.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:integer">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdNMTOKENType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:NMTOKEN.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:NMTOKEN">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdNonNegativeIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:nonNegativeInteger.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:nonNegativeInteger">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdPositiveIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:positiveInteger.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:positiveInteger">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:QName.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:QName">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:string.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_6.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_6.xsd
deleted file mode 100644
index f165d1822d..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_6.xsd
+++ /dev/null
@@ -1,2422 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="6">
- <xsd:annotation>
- <xsd:documentation>
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
-
- The contents of this file are subject to the terms of either the
- GNU General Public License Version 2 only ("GPL") or the Common
- Development and Distribution License("CDDL") (collectively, the
- "License"). You may not use this file except in compliance with
- the License. You can obtain a copy of the License at
- https://glassfish.dev.java.net/public/CDDL+GPL.html or
- glassfish/bootstrap/legal/LICENSE.txt. See the License for the
- specific language governing permissions and limitations under the
- License.
-
- When distributing the software, include this License Header
- Notice in each file and include the License file at
- glassfish/bootstrap/legal/LICENSE.txt. Sun designates this
- particular file as subject to the "Classpath" exception as
- provided by Sun in the GPL Version 2 section of the License file
- that accompanied this code. If applicable, add the following
- below the License Header, with the fields enclosed by brackets []
- replaced by your own identifying information:
- "Portions Copyrighted [year] [name of copyright owner]"
-
- Contributor(s):
-
- If you wish your version of this file to be governed by only the
- CDDL or only the GPL Version 2, indicate your decision by adding
- "[Contributor] elects to include this software in this
- distribution under the [CDDL or GPL Version 2] license." If you
- don't indicate a single choice of license, a recipient has the
- option to distribute your version of this file under either the
- CDDL, the GPL Version 2 or to extend the choice of license to its
- licensees as provided above. However, if you add GPL Version 2
- code and therefore, elected the GPL Version 2 license, then the
- option applies only if the new code is made subject to such
- option by the copyright holder.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following definitions that appear in the common
- shareable schema(s) of Java EE deployment descriptors should be
- interpreted with respect to the context they are included:
-
- Deployment Component may indicate one of the following:
- java ee application;
- application client;
- web application;
- enterprise bean;
- resource adapter;
-
- Deployment File may indicate one of the following:
- ear file;
- war file;
- jar file;
- rar file;
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace"
- schemaLocation="http://www.w3.org/2001/xml.xsd"/>
-
- <xsd:include schemaLocation="javaee_web_services_client_1_3.xsd"/>
-
- <xsd:group name="descriptionGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group keeps the usage of the contained description related
- elements consistent across Java EE deployment descriptors.
-
- All elements may occur multiple times with different languages,
- to support localization of the content.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="display-name"
- type="javaee:display-nameType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="icon"
- type="javaee:iconType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
- <xsd:group name="jndiEnvironmentRefsGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group keeps the usage of the contained JNDI environment
- reference elements consistent across Java EE deployment descriptors.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="env-entry"
- type="javaee:env-entryType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref"
- type="javaee:ejb-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-local-ref"
- type="javaee:ejb-local-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:group ref="javaee:service-refGroup"/>
- <xsd:element name="resource-ref"
- type="javaee:resource-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref"
- type="javaee:resource-env-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref"
- type="javaee:message-destination-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="persistence-context-ref"
- type="javaee:persistence-context-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="persistence-unit-ref"
- type="javaee:persistence-unit-refType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="post-construct"
- type="javaee:lifecycle-callbackType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="pre-destroy"
- type="javaee:lifecycle-callbackType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="data-source"
- type="javaee:data-sourceType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
- <xsd:group name="resourceGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group collects elements that are common to most
- JNDI resource elements.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:resourceBaseGroup"/>
- <xsd:element name="lookup-name"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The JNDI name to be looked up to resolve a resource reference.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- </xsd:group>
-
- <xsd:group name="resourceBaseGroup">
- <xsd:annotation>
- <xsd:documentation>
-
- This group collects elements that are common to all the
- JNDI resource elements. It does not include the lookup-name
- element, that is only applicable to some resource elements.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="mapped-name"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- A product specific name that this resource should be
- mapped to. The name of this resource, as defined by the
- resource's name element or defaulted, is a name that is
- local to the application component using the resource.
- (It's a name in the JNDI java:comp/env namespace.) Many
- application servers provide a way to map these local
- names to names of resources known to the application
- server. This mapped name is often a global JNDI name,
- but may be a name of any form.
-
- Application servers are not required to support any
- particular form or type of mapped name, nor the ability
- to use mapped names. The mapped name is
- product-dependent and often installation-dependent. No
- use of a mapped name is portable.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="injection-target"
- type="javaee:injection-targetType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- </xsd:group>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="data-sourceType">
- <xsd:annotation>
- <xsd:documentation>
-
- Configuration of a DataSource.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Description of this DataSource.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The name element specifies the JNDI name of the
- data source being defined.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="class-name"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- DataSource, XADataSource or ConnectionPoolDataSource
- implementation class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="server-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Database server name.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="port-number"
- type="javaee:xsdIntegerType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Port number where a server is listening for requests.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="database-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Name of a database on a server.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="url"
- type="javaee:jdbc-urlType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- A JDBC URL. If the <code>url</code> property is specified
- along with other standard <code>DataSource</code> properties
- such as <code>serverName</code>, <code>databaseName</code>
- and <code>portNumber</code>, the more specific properties will
- take precedence and <code>url</code> will be ignored.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="user"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- User name to use for connection authentication.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="password"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Password to use for connection authentication.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="property"
- type="javaee:propertyType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- JDBC DataSource property. This may be a vendor-specific
- property or a less commonly used DataSource property.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="login-timeout"
- type="javaee:xsdIntegerType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Sets the maximum time in seconds that this data source
- will wait while attempting to connect to a database.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="transactional"
- type="javaee:xsdBooleanType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Set to false if connections should not participate in
- transactions.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="isolation-level"
- type="javaee:isolation-levelType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Isolation level for connections.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="initial-pool-size"
- type="javaee:xsdIntegerType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Number of connections that should be created when a
- connection pool is initialized.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="max-pool-size"
- type="javaee:xsdIntegerType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Maximum number of connections that should be concurrently
- allocated for a connection pool.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="min-pool-size"
- type="javaee:xsdIntegerType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Minimum number of connections that should be concurrently
- allocated for a connection pool.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="max-idle-time"
- type="javaee:xsdIntegerType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The number of seconds that a physical connection should
- remain unused in the pool before the connection is
- closed for a connection pool.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="max-statements"
- type="javaee:xsdIntegerType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The total number of statements that a connection pool
- should keep open.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="descriptionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The description type is used by a description element to
- provide text describing the parent element. The elements
- that use this type should include any information that the
- Deployment Component's Deployment File file producer wants
- to provide to the consumer of the Deployment Component's
- Deployment File (i.e., to the Deployer). Typically, the
- tools used by such a Deployment File consumer will display
- the description when processing the parent element that
- contains the description.
-
- The lang attribute defines the language that the
- description is provided in. The default value is "en" (English).
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="javaee:xsdStringType">
- <xsd:attribute ref="xml:lang"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
- <xsd:simpleType name="dewey-versionType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type defines a dewey decimal that is used
- to describe versions of documents.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="\.?[0-9]+(\.[0-9]+)*"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="display-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The display-name type contains a short name that is intended
- to be displayed by tools. It is used by display-name
- elements. The display name need not be unique.
-
- Example:
-
- ...
- <display-name xml:lang="en">
- Employee Self Service
- </display-name>
-
- The value of the xml:lang attribute is "en" (English) by default.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="javaee:string">
- <xsd:attribute ref="xml:lang"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-linkType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The ejb-linkType is used by ejb-link
- elements in the ejb-ref or ejb-local-ref elements to specify
- that an EJB reference is linked to enterprise bean.
-
- The value of the ejb-link element must be the ejb-name of an
- enterprise bean in the same ejb-jar file or in another ejb-jar
- file in the same Java EE application unit.
-
- Alternatively, the name in the ejb-link element may be
- composed of a path name specifying the ejb-jar containing the
- referenced enterprise bean with the ejb-name of the target
- bean appended and separated from the path name by "#". The
- path name is relative to the Deployment File containing
- Deployment Component that is referencing the enterprise
- bean. This allows multiple enterprise beans with the same
- ejb-name to be uniquely identified.
-
- Examples:
-
- <ejb-link>EmployeeRecord</ejb-link>
-
- <ejb-link>../products/product.jar#ProductEJB</ejb-link>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-local-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-local-refType is used by ejb-local-ref elements for
- the declaration of a reference to an enterprise bean's local
- home or to the local business interface of a 3.0 bean.
- The declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of the Deployment
- Component that's referencing the enterprise bean.
- - the optional expected type of the referenced enterprise bean
- - the optional expected local interface of the referenced
- enterprise bean or the local business interface of the
- referenced enterprise bean.
- - the optional expected local home interface of the referenced
- enterprise bean. Not applicable if this ejb-local-ref refers
- to the local business interface of a 3.0 bean.
- - optional ejb-link information, used to specify the
- referenced enterprise bean
- - optional elements to define injection of the named enterprise
- bean into a component field or property.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref-name"
- type="javaee:ejb-ref-nameType"/>
- <xsd:element name="ejb-ref-type"
- type="javaee:ejb-ref-typeType"
- minOccurs="0"/>
- <xsd:element name="local-home"
- type="javaee:local-homeType"
- minOccurs="0"/>
- <xsd:element name="local"
- type="javaee:localType"
- minOccurs="0"/>
- <xsd:element name="ejb-link"
- type="javaee:ejb-linkType"
- minOccurs="0"/>
- <xsd:group ref="javaee:resourceGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-ref-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the
- Deployment Component's environment and is relative to the
- java:comp/env context. The name must be unique within the
- Deployment Component.
-
- It is recommended that name is prefixed with "ejb/".
-
- Example:
-
- <ejb-ref-name>ejb/Payroll</ejb-ref-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:jndi-nameType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-refType is used by ejb-ref elements for the
- declaration of a reference to an enterprise bean's home or
- to the remote business interface of a 3.0 bean.
- The declaration consists of:
-
- - an optional description
- - the EJB reference name used in the code of
- the Deployment Component that's referencing the enterprise
- bean.
- - the optional expected type of the referenced enterprise bean
- - the optional remote interface of the referenced enterprise bean
- or the remote business interface of the referenced enterprise
- bean
- - the optional expected home interface of the referenced
- enterprise bean. Not applicable if this ejb-ref
- refers to the remote business interface of a 3.0 bean.
- - optional ejb-link information, used to specify the
- referenced enterprise bean
- - optional elements to define injection of the named enterprise
- bean into a component field or property
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="ejb-ref-name"
- type="javaee:ejb-ref-nameType"/>
- <xsd:element name="ejb-ref-type"
- type="javaee:ejb-ref-typeType"
- minOccurs="0"/>
- <xsd:element name="home"
- type="javaee:homeType"
- minOccurs="0"/>
- <xsd:element name="remote"
- type="javaee:remoteType"
- minOccurs="0"/>
- <xsd:element name="ejb-link"
- type="javaee:ejb-linkType"
- minOccurs="0"/>
- <xsd:group ref="javaee:resourceGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="ejb-ref-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The ejb-ref-typeType contains the expected type of the
- referenced enterprise bean.
-
- The ejb-ref-type designates a value
- that must be one of the following:
-
- Entity
- Session
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Entity"/>
- <xsd:enumeration value="Session"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="emptyType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type is used to designate an empty
- element when used.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="env-entryType">
- <xsd:annotation>
- <xsd:documentation>
-
- The env-entryType is used to declare an application's
- environment entry. The declaration consists of an optional
- description, the name of the environment entry, a type
- (optional if the value is injected, otherwise required), and
- an optional value.
-
- It also includes optional elements to define injection of
- the named resource into fields or JavaBeans properties.
-
- If a value is not specified and injection is requested,
- no injection will occur and no entry of the specified name
- will be created. This allows an initial value to be
- specified in the source code without being incorrectly
- changed when no override has been specified.
-
- If a value is not specified and no injection is requested,
- a value must be supplied during deployment.
-
- This type is used by env-entry elements.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="env-entry-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The env-entry-name element contains the name of a
- Deployment Component's environment entry. The name
- is a JNDI name relative to the java:comp/env
- context. The name must be unique within a
- Deployment Component. The uniqueness
- constraints must be defined within the declared
- context.
-
- Example:
-
- <env-entry-name>minAmount</env-entry-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="env-entry-type"
- type="javaee:env-entry-type-valuesType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The env-entry-type element contains the Java language
- type of the environment entry. If an injection target
- is specified for the environment entry, the type may
- be omitted, or must match the type of the injection
- target. If no injection target is specified, the type
- is required.
-
- Example:
-
- <env-entry-type>java.lang.Integer</env-entry-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="env-entry-value"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The env-entry-value designates the value of a
- Deployment Component's environment entry. The value
- must be a String that is valid for the
- constructor of the specified type that takes a
- single String parameter, or for java.lang.Character,
- a single character.
-
- Example:
-
- <env-entry-value>100.00</env-entry-value>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:group ref="javaee:resourceGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="env-entry-type-valuesType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- This type contains the fully-qualified Java type of the
- environment entry value that is expected by the
- application's code.
-
- The following are the legal values of env-entry-type-valuesType:
-
- java.lang.Boolean
- java.lang.Byte
- java.lang.Character
- java.lang.String
- java.lang.Short
- java.lang.Integer
- java.lang.Long
- java.lang.Float
- java.lang.Double
- java.lang.Class
- any enumeration type (i.e. a subclass of java.lang.Enum)
-
- Examples:
-
- <env-entry-type>java.lang.Boolean</env-entry-type>
- <env-entry-type>java.lang.Class</env-entry-type>
- <env-entry-type>com.example.Color</env-entry-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The elements that use this type designate the name of a
- Java class or interface. The name is in the form of a
- "binary name", as defined in the JLS. This is the form
- of name used in Class.forName(). Tools that need the
- canonical name (the name used in source code) will need
- to convert this binary name to the canonical name.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="generic-booleanType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type defines four different values which can designate
- boolean values. This includes values yes and no which are
- not designated by xsd:boolean
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="true"/>
- <xsd:enumeration value="false"/>
- <xsd:enumeration value="yes"/>
- <xsd:enumeration value="no"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="iconType">
- <xsd:annotation>
- <xsd:documentation>
-
- The icon type contains small-icon and large-icon elements
- that specify the file names for small and large GIF, JPEG,
- or PNG icon images used to represent the parent element in a
- GUI tool.
-
- The xml:lang attribute defines the language that the
- icon file names are provided in. Its value is "en" (English)
- by default.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="small-icon"
- type="javaee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The small-icon element contains the name of a file
- containing a small (16 x 16) icon image. The file
- name is a relative path within the Deployment
- Component's Deployment File.
-
- The image may be in the GIF, JPEG, or PNG format.
- The icon can be used by tools.
-
- Example:
-
- <small-icon>employee-service-icon16x16.jpg</small-icon>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="large-icon"
- type="javaee:pathType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The large-icon element contains the name of a file
- containing a large
- (32 x 32) icon image. The file name is a relative
- path within the Deployment Component's Deployment
- File.
-
- The image may be in the GIF, JPEG, or PNG format.
- The icon can be used by tools.
-
- Example:
-
- <large-icon>employee-service-icon32x32.jpg</large-icon>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute ref="xml:lang"/>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="injection-targetType">
- <xsd:annotation>
- <xsd:documentation>
-
- An injection target specifies a class and a name within
- that class into which a resource should be injected.
-
- The injection target class specifies the fully qualified
- class name that is the target of the injection. The
- Java EE specifications describe which classes can be an
- injection target.
-
- The injection target name specifies the target within
- the specified class. The target is first looked for as a
- JavaBeans property name. If not found, the target is
- looked for as a field name.
-
- The specified resource will be injected into the target
- during initialization of the class by either calling the
- set method for the target property or by setting a value
- into the named field.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="injection-target-class"
- type="javaee:fully-qualified-classType"/>
- <xsd:element name="injection-target-name"
- type="javaee:java-identifierType"/>
- </xsd:sequence>
- </xsd:complexType>
-
- <xsd:simpleType name="isolation-levelType">
- <xsd:annotation>
- <xsd:documentation>
-
- The following transaction isolation levels are allowed
- (see documentation for the java.sql.Connection interface):
- TRANSACTION_READ_UNCOMMITTED
- TRANSACTION_READ_COMMITTED
- TRANSACTION_REPEATABLE_READ
- TRANSACTION_SERIALIZABLE
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:string">
- <xsd:enumeration value="TRANSACTION_READ_UNCOMMITTED"/>
- <xsd:enumeration value="TRANSACTION_READ_COMMITTED"/>
- <xsd:enumeration value="TRANSACTION_REPEATABLE_READ"/>
- <xsd:enumeration value="TRANSACTION_SERIALIZABLE"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="java-identifierType">
- <xsd:annotation>
- <xsd:documentation>
-
- The java-identifierType defines a Java identifier.
- The users of this type should further verify that
- the content does not contain Java reserved keywords.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:pattern value="($|_|\p{L})(\p{L}|\p{Nd}|_|$)*"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="java-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- This is a generic type that designates a Java primitive
- type or a fully qualified name of a Java interface/type,
- or an array of such types.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:pattern value="[^\p{Z}]*"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="jdbc-urlType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The jdbc-urlType contains the url pattern of the mapping.
- It must follow the rules specified in Section 9.3 of the
- JDBC Specification where the format is:
-
- jdbc:<subprotocol>:<subname>
-
- Example:
-
- <url>jdbc:mysql://localhost:3307/testdb</url>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:pattern value="jdbc:(.*):(.*)"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jndi-nameType type designates a JNDI name in the
- Deployment Component's environment and is relative to the
- java:comp/env context. A JNDI name must be unique within the
- Deployment Component.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="homeType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The homeType defines the fully-qualified name of
- an enterprise bean's home interface.
-
- Example:
-
- <home>com.aardvark.payroll.PayrollHome</home>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="lifecycle-callbackType">
- <xsd:annotation>
- <xsd:documentation>
-
- The lifecycle-callback type specifies a method on a
- class to be called when a lifecycle event occurs.
- Note that each class may have only one lifecycle callback
- method for any given event and that the method may not
- be overloaded.
-
- If the lifefycle-callback-class element is missing then
- the class defining the callback is assumed to be the
- component class in scope at the place in the descriptor
- in which the callback definition appears.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="lifecycle-callback-class"
- type="javaee:fully-qualified-classType"
- minOccurs="0"/>
- <xsd:element name="lifecycle-callback-method"
- type="javaee:java-identifierType"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="listenerType">
- <xsd:annotation>
- <xsd:documentation>
-
- The listenerType indicates the deployment properties for a web
- application listener bean.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="listener-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The listener-class element declares a class in the
- application must be registered as a web
- application listener bean. The value is the fully
- qualified classname of the listener class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="localType">
- <xsd:annotation>
- <xsd:documentation>
-
- The localType defines the fully-qualified name of an
- enterprise bean's local interface.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="local-homeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The local-homeType defines the fully-qualified
- name of an enterprise bean's local home interface.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="param-valueType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type is a general type that can be used to declare
- parameter/value lists.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="param-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-name element contains the name of a
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="param-value"
- type="javaee:xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- The param-value element contains the value of a
- parameter.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- The elements that use this type designate either a relative
- path or an absolute path starting with a "/".
-
- In elements that specify a pathname to a file within the
- same Deployment File, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the Deployment File's namespace. Absolute filenames (i.e.,
- those starting with "/") also specify names in the root of
- the Deployment File's namespace. In general, relative names
- are preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="persistence-context-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The persistence-context-ref element contains a declaration
- of Deployment Component's reference to a persistence context
- associated within a Deployment Component's
- environment. It consists of:
-
- - an optional description
- - the persistence context reference name
- - an optional persistence unit name. If not specified,
- the default persistence unit is assumed.
- - an optional specification as to whether
- the persistence context type is Transaction or
- Extended. If not specified, Transaction is assumed.
- - an optional list of persistence properties
- - optional injection targets
-
- Examples:
-
- <persistence-context-ref>
- <persistence-context-ref-name>myPersistenceContext
- </persistence-context-ref-name>
- </persistence-context-ref>
-
- <persistence-context-ref>
- <persistence-context-ref-name>myPersistenceContext
- </persistence-context-ref-name>
- <persistence-unit-name>PersistenceUnit1
- </persistence-unit-name>
- <persistence-context-type>Extended</persistence-context-type>
- </persistence-context-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="persistence-context-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The persistence-context-ref-name element specifies
- the name of a persistence context reference; its
- value is the environment entry name used in
- Deployment Component code. The name is a JNDI name
- relative to the java:comp/env context.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="persistence-unit-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The Application Assembler(or BeanProvider) may use the
- following syntax to avoid the need to rename persistence
- units to have unique names within a Java EE application.
-
- The Application Assembler specifies the pathname of the
- root of the persistence.xml file for the referenced
- persistence unit and appends the name of the persistence
- unit separated from the pathname by #. The pathname is
- relative to the referencing application component jar file.
- In this manner, multiple persistence units with the same
- persistence unit name may be uniquely identified when the
- Application Assembler cannot change persistence unit names.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="persistence-context-type"
- type="javaee:persistence-context-typeType"
- minOccurs="0"/>
- <xsd:element name="persistence-property"
- type="javaee:propertyType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Used to specify properties for the container or persistence
- provider. Vendor-specific properties may be included in
- the set of properties. Properties that are not recognized
- by a vendor must be ignored. Entries that make use of the
- namespace javax.persistence and its subnamespaces must not
- be used for vendor-specific properties. The namespace
- javax.persistence is reserved for use by the specification.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:group ref="javaee:resourceBaseGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="persistence-context-typeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The persistence-context-typeType specifies the transactional
- nature of a persistence context reference.
-
- The value of the persistence-context-type element must be
- one of the following:
- Transaction
- Extended
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Transaction"/>
- <xsd:enumeration value="Extended"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="propertyType">
- <xsd:annotation>
- <xsd:documentation>
-
- Specifies a name/value pair.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="name"
- type="javaee:xsdStringType">
- </xsd:element>
- <xsd:element name="value"
- type="javaee:xsdStringType">
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="persistence-unit-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The persistence-unit-ref element contains a declaration
- of Deployment Component's reference to a persistence unit
- associated within a Deployment Component's
- environment. It consists of:
-
- - an optional description
- - the persistence unit reference name
- - an optional persistence unit name. If not specified,
- the default persistence unit is assumed.
- - optional injection targets
-
- Examples:
-
- <persistence-unit-ref>
- <persistence-unit-ref-name>myPersistenceUnit
- </persistence-unit-ref-name>
- </persistence-unit-ref>
-
- <persistence-unit-ref>
- <persistence-unit-ref-name>myPersistenceUnit
- </persistence-unit-ref-name>
- <persistence-unit-name>PersistenceUnit1
- </persistence-unit-name>
- </persistence-unit-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="persistence-unit-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The persistence-unit-ref-name element specifies
- the name of a persistence unit reference; its
- value is the environment entry name used in
- Deployment Component code. The name is a JNDI name
- relative to the java:comp/env context.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="persistence-unit-name"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The Application Assembler(or BeanProvider) may use the
- following syntax to avoid the need to rename persistence
- units to have unique names within a Java EE application.
-
- The Application Assembler specifies the pathname of the
- root of the persistence.xml file for the referenced
- persistence unit and appends the name of the persistence
- unit separated from the pathname by #. The pathname is
- relative to the referencing application component jar file.
- In this manner, multiple persistence units with the same
- persistence unit name may be uniquely identified when the
- Application Assembler cannot change persistence unit names.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:group ref="javaee:resourceBaseGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="remoteType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The remote element contains the fully-qualified name
- of the enterprise bean's remote interface.
-
- Example:
-
- <remote>com.wombat.empl.EmployeeService</remote>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="resource-env-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The resource-env-refType is used to define
- resource-env-ref elements. It contains a declaration of a
- Deployment Component's reference to an administered object
- associated with a resource in the Deployment Component's
- environment. It consists of an optional description, the
- resource environment reference name, and an optional
- indication of the resource environment reference type
- expected by the Deployment Component code.
-
- It also includes optional elements to define injection of
- the named resource into fields or JavaBeans properties.
-
- The resource environment type must be supplied unless an
- injection target is specified, in which case the type
- of the target is used. If both are specified, the type
- must be assignment compatible with the type of the injection
- target.
-
- Example:
-
- <resource-env-ref>
- <resource-env-ref-name>jms/StockQueue
- </resource-env-ref-name>
- <resource-env-ref-type>javax.jms.Queue
- </resource-env-ref-type>
- </resource-env-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="resource-env-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-name element specifies the name
- of a resource environment reference; its value is
- the environment entry name used in
- the Deployment Component code. The name is a JNDI
- name relative to the java:comp/env context and must
- be unique within a Deployment Component.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="resource-env-ref-type"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The resource-env-ref-type element specifies the type
- of a resource environment reference. It is the
- fully qualified name of a Java language class or
- interface.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:group ref="javaee:resourceGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="resource-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The resource-refType contains a declaration of a
- Deployment Component's reference to an external resource. It
- consists of an optional description, the resource manager
- connection factory reference name, an optional indication of
- the resource manager connection factory type expected by the
- Deployment Component code, an optional type of authentication
- (Application or Container), and an optional specification of
- the shareability of connections obtained from the resource
- (Shareable or Unshareable).
-
- It also includes optional elements to define injection of
- the named resource into fields or JavaBeans properties.
-
- The connection factory type must be supplied unless an
- injection target is specified, in which case the type
- of the target is used. If both are specified, the type
- must be assignment compatible with the type of the injection
- target.
-
- Example:
-
- <resource-ref>
- <res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="res-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-ref-name element specifies the name of a
- resource manager connection factory reference.
- The name is a JNDI name relative to the
- java:comp/env context.
- The name must be unique within a Deployment File.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="res-type"
- type="javaee:fully-qualified-classType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-type element specifies the type of the data
- source. The type is specified by the fully qualified
- Java language class or interface
- expected to be implemented by the data source.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="res-auth"
- type="javaee:res-authType"
- minOccurs="0"/>
- <xsd:element name="res-sharing-scope"
- type="javaee:res-sharing-scopeType"
- minOccurs="0"/>
- <xsd:group ref="javaee:resourceGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="res-authType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-authType specifies whether the Deployment Component
- code signs on programmatically to the resource manager, or
- whether the Container will sign on to the resource manager
- on behalf of the Deployment Component. In the latter case,
- the Container uses information that is supplied by the
- Deployer.
-
- The value must be one of the two following:
-
- Application
- Container
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Application"/>
- <xsd:enumeration value="Container"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="res-sharing-scopeType">
- <xsd:annotation>
- <xsd:documentation>
-
- The res-sharing-scope type specifies whether connections
- obtained through the given resource manager connection
- factory reference can be shared. The value, if specified,
- must be one of the two following:
-
- Shareable
- Unshareable
-
- The default value is Shareable.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Shareable"/>
- <xsd:enumeration value="Unshareable"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="run-asType">
- <xsd:annotation>
- <xsd:documentation>
-
- The run-asType specifies the run-as identity to be
- used for the execution of a component. It contains an
- optional description, and the name of a security role.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="javaee:role-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="role-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The role-nameType designates the name of a security role.
-
- The name must conform to the lexical rules for a token.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-roleType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The security-roleType contains the definition of a security
- role. The definition consists of an optional description of
- the security role, and the security role name.
-
- Example:
-
- <security-role>
- <description>
- This role includes all employees who are authorized
- to access the employee service application.
- </description>
- <role-name>employee</role-name>
- </security-role>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="javaee:role-nameType"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="security-role-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The security-role-refType contains the declaration of a
- security role reference in a component's or a
- Deployment Component's code. The declaration consists of an
- optional description, the security role name used in the
- code, and an optional link to a security role. If the
- security role is not specified, the Deployer must choose an
- appropriate security role.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="role-name"
- type="javaee:role-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The value of the role-name element must be the String used
- as the parameter to the
- EJBContext.isCallerInRole(String roleName) method or the
- HttpServletRequest.isUserInRole(String role) method.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="role-link"
- type="javaee:role-nameType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The role-link element is a reference to a defined
- security role. The role-link element must contain
- the name of one of the security roles defined in the
- security-role elements.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdQNameType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:QName.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:QName">
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdBooleanType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:boolean.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:boolean">
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdNMTOKENType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:NMTOKEN.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:NMTOKEN">
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdAnyURIType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:anyURI.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:anyURI">
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:integer.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:integer">
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdPositiveIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:positiveInteger.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:positiveInteger">
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdNonNegativeIntegerType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:nonNegativeInteger.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:nonNegativeInteger">
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="xsdStringType">
- <xsd:annotation>
- <xsd:documentation>
-
- This type adds an "id" attribute to xsd:string.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string">
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="string">
- <xsd:annotation>
- <xsd:documentation>
-
- This is a special string datatype that is defined by Java EE as
- a base type for defining collapsed strings. When schemas
- require trailing/leading space elimination as well as
- collapsing the existing whitespace, this base type may be
- used.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:token">
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:extension>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="true-falseType">
- <xsd:annotation>
- <xsd:documentation>
-
- This simple type designates a boolean with only two
- permissible values
-
- - true
- - false
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:xsdBooleanType">
- <xsd:pattern value="(true|false)"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="url-patternType">
- <xsd:annotation>
- <xsd:documentation>
-
- The url-patternType contains the url pattern of the mapping.
- It must follow the rules specified in Section 11.2 of the
- Servlet API Specification. This pattern is assumed to be in
- URL-decoded form and must not contain CR(#xD) or LF(#xA).
- If it contains those characters, the container must inform
- the developer with a descriptive error message.
- The container must preserve all characters including whitespaces.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:extension base="xsd:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destinationType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The message-destinationType specifies a message
- destination. The logical destination described by this
- element is mapped to a physical destination by the Deployer.
-
- The message destination element contains:
-
- - an optional description
- - an optional display-name
- - an optional icon
- - a message destination name which must be unique
- among message destination names within the same
- Deployment File.
- - an optional mapped name
- - an optional lookup name
-
- Example:
-
- <message-destination>
- <message-destination-name>CorporateStocks
- </message-destination-name>
- </message-destination>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="message-destination-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-name element specifies a
- name for a message destination. This name must be
- unique among the names of message destinations
- within the Deployment File.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="mapped-name"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- A product specific name that this message destination
- should be mapped to. Each message-destination-ref
- element that references this message destination will
- define a name in the namespace of the referencing
- component or in one of the other predefined namespaces.
- Many application servers provide a way to map these
- local names to names of resources known to the
- application server. This mapped name is often a global
- JNDI name, but may be a name of any form. Each of the
- local names should be mapped to this same global name.
-
- Application servers are not required to support any
- particular form or type of mapped name, nor the ability
- to use mapped names. The mapped name is
- product-dependent and often installation-dependent. No
- use of a mapped name is portable.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="lookup-name"
- type="javaee:xsdStringType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The JNDI name to be looked up to resolve the message destination.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-refType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The message-destination-ref element contains a declaration
- of Deployment Component's reference to a message destination
- associated with a resource in Deployment Component's
- environment. It consists of:
-
- - an optional description
- - the message destination reference name
- - an optional message destination type
- - an optional specification as to whether
- the destination is used for
- consuming or producing messages, or both.
- if not specified, "both" is assumed.
- - an optional link to the message destination
- - optional injection targets
-
- The message destination type must be supplied unless an
- injection target is specified, in which case the type
- of the target is used. If both are specified, the type
- must be assignment compatible with the type of the injection
- target.
-
- Examples:
-
- <message-destination-ref>
- <message-destination-ref-name>jms/StockQueue
- </message-destination-ref-name>
- <message-destination-type>javax.jms.Queue
- </message-destination-type>
- <message-destination-usage>Consumes
- </message-destination-usage>
- <message-destination-link>CorporateStocks
- </message-destination-link>
- </message-destination-ref>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="message-destination-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-ref-name element specifies
- the name of a message destination reference; its
- value is the environment entry name used in
- Deployment Component code.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="message-destination-type"
- type="javaee:message-destination-typeType"
- minOccurs="0"/>
- <xsd:element name="message-destination-usage"
- type="javaee:message-destination-usageType"
- minOccurs="0"/>
- <xsd:element name="message-destination-link"
- type="javaee:message-destination-linkType"
- minOccurs="0"/>
- <xsd:group ref="javaee:resourceGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-usageType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-usageType specifies the use of the
- message destination indicated by the reference. The value
- indicates whether messages are consumed from the message
- destination, produced for the destination, or both. The
- Assembler makes use of this information in linking producers
- of a destination with its consumers.
-
- The value of the message-destination-usage element must be
- one of the following:
- Consumes
- Produces
- ConsumesProduces
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="Consumes"/>
- <xsd:enumeration value="Produces"/>
- <xsd:enumeration value="ConsumesProduces"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-typeType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The message-destination-typeType specifies the type of
- the destination. The type is specified by the Java interface
- expected to be implemented by the destination.
-
- Example:
-
- <message-destination-type>javax.jms.Queue
- </message-destination-type>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:fully-qualified-classType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="message-destination-linkType">
- <xsd:annotation>
- <xsd:documentation>
-
- The message-destination-linkType is used to link a message
- destination reference or message-driven bean to a message
- destination.
-
- The Assembler sets the value to reflect the flow of messages
- between producers and consumers in the application.
-
- The value must be the message-destination-name of a message
- destination in the same Deployment File or in another
- Deployment File in the same Java EE application unit.
-
- Alternatively, the value may be composed of a path name
- specifying a Deployment File containing the referenced
- message destination with the message-destination-name of the
- destination appended and separated from the path name by
- "#". The path name is relative to the Deployment File
- containing Deployment Component that is referencing the
- message destination. This allows multiple message
- destinations with the same name to be uniquely identified.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_1_2.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_1_2.xsd
deleted file mode 100644
index e28cb1cefb..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_1_2.xsd
+++ /dev/null
@@ -1,747 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.2">
- <xsd:annotation>
- <xsd:documentation>
- @(#)javaee_web_services_1_2.xsds 1.18 02/13/06
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003-2005 Sun Microsystems, Inc.
- 4150 Network Circle
- Santa Clara, California 95054
- U.S.A
- All rights reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- (C) Copyright International Business Machines Corporation 2002
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The webservices element is the root element for the web services
- deployment descriptor. It specifies the set of web service
- descriptions that are to be deployed into the Java EE Application
- Server and the dependencies they have on container resources and
- services. The deployment descriptor must be named
- "META-INF/webservices.xml" in the web services' jar file.
-
- Used in: webservices.xml
-
- All webservices deployment descriptors must indicate the
- webservices schema by using the Java EE namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and by indicating the version of the schema by using the version
- element as shown below:
-
- <webservices xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/javaee_web_services_1_2.xsd"
- version="1.2">
- ...
- </webservices>
-
- The instance documents may indicate the published version of the
- schema using the xsi:schemaLocation attribute for the Java EE
- namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/javaee_web_services_1_2.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all Java EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_5.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:element name="webservices" type="javaee:webservicesType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservices element is the root element for the web services
- deployment descriptor. It specifies the set of web service
- descriptions that are to be deployed into the Java EE Application Server
- and the dependencies they have on container resources and services.
-
- Used in: webservices.xml
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:key name="webservice-description-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description-name identifies the collection of
- port-components associated with a WSDL file and JAX-RPC mapping. The
- name must be unique within the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:webservice-description"/>
- <xsd:field xpath="javaee:webservice-description-name"/>
- </xsd:key>
- </xsd:element>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="handler-chainType">
- <xsd:annotation>
- <xsd:documentation>
-
- The handler-chain element defines the handlerchain.
- Handlerchain can be defined such that the handlers in the
- handlerchain operate,all ports of a service, on a specific
- port or on a list of protocol-bindings. The choice of elements
- service-name-pattern, port-name-pattern and protocol-bindings
- are used to specify whether the handlers in handler-chain are
- for a service, port or protocol binding. If none of these
- choices are specified with the handler-chain element then the
- handlers specified in the handler-chain will be applied on
- everything.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
-
- <xsd:choice minOccurs="0" maxOccurs="1">
- <xsd:element name="service-name-pattern"
- type="javaee:qname-pattern" />
- <xsd:element name="port-name-pattern"
- type="javaee:qname-pattern" />
- <xsd:element name="protocol-bindings"
- type="javaee:protocol-bindingListType"/>
- </xsd:choice>
-
- <xsd:element name="handler"
- type="javaee:port-component_handlerType"
- minOccurs="1" maxOccurs="unbounded"/>
- </xsd:sequence>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="handler-chainsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The handler-chains element defines the handlerchains associated
- with this service or service endpoint.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="handler-chain"
- type="javaee:handler-chainType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="port-componentType">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component element associates a WSDL port with a web service
- interface and implementation. It defines the name of the port as a
- component, optional description, optional display name, optional iconic
- representations, WSDL port QName, Service Endpoint Interface, Service
- Implementation Bean.
-
- This element also associates a WSDL service with a JAX-WS Provider
- implementation.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="display-name"
- type="javaee:display-nameType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="icon"
- type="javaee:iconType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="port-component-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The port-component-name element specifies a port component's
- name. This name is assigned by the module producer to name
- the service implementation bean in the module's deployment
- descriptor. The name must be unique among the port component
- names defined in the same module.
-
- Used in: port-component
-
- Example:
- <port-component-name>EmployeeService
- </port-component-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-service"
- type="javaee:xsdQNameType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name space and local name part of the WSDL
- service QName. This is required to be specified for
- port components that are JAX-WS Provider implementations.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-port"
- type="javaee:xsdQNameType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name space and local name part of the WSDL
- port QName. This is not required to be specified for port
- components that are JAX-WS Provider implementations
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="enable-mtom"
- type="javaee:true-falseType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Used to enable or disable SOAP MTOM/XOP mechanism for an
- endpoint implementation.
-
- Not to be specified for JAX-RPC runtime
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="protocol-binding"
- type="javaee:protocol-bindingType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Used to specify the protocol binding used by the port-component.
- If this element is not specified, then the default binding is
- used (SOAP 1.1 over HTTP)
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-endpoint-interface"
- type="javaee:fully-qualified-classType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The service-endpoint-interface element contains the
- fully-qualified name of the port component's Service Endpoint
- Interface.
-
- Used in: port-component
-
- Example:
- <remote>com.wombat.empl.EmployeeService</remote>
-
- This may not be specified in case there is no Service
- Enpoint Interface as is the case with directly using an
- implementation class with the @WebService annotation.
-
- When the port component is a Provider implementation
- this is not specified.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-impl-bean"
- type="javaee:service-impl-beanType"/>
-
- <xsd:choice>
- <xsd:element name="handler"
- type="javaee:port-component_handlerType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
- To be used with JAX-RPC based runtime only.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-chains"
- type="javaee:handler-chainsType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- To be used with JAX-WS based runtime only.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="port-component_handlerType">
- <xsd:annotation>
- <xsd:documentation>
-
- Declares the handler for a port-component. Handlers can access the
- init-param name/value pairs using the HandlerInfo interface.
-
- Used in: port-component
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="handler-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique within the
- module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines a fully qualified class name for the handler implementation.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="init-param"
- type="javaee:param-valueType"
- minOccurs="0" maxOccurs="unbounded"/>
-
- <xsd:element name="soap-header"
- type="javaee:xsdQNameType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the QName of a SOAP header that will be processed by the
- handler.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="soap-role"
- type="javaee:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The soap-role element contains a SOAP actor definition that the
- Handler will play as a role.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="protocol-URIAliasType">
- <xsd:annotation>
- <xsd:documentation>
- Defines the type that is used for specifying tokens that
- start with ## which are used to alias existing standard
- protocol bindings and support aliases for new standard
- binding URIs that are introduced in future specifications.
-
- The following tokens alias the standard protocol binding
- URIs:
-
- ##SOAP11_HTTP = "http://schemas.xmlsoap.org/wsdl/soap/http"
- ##SOAP11_HTTP_MTOM =
- "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true"
- ##SOAP12_HTTP = "http://www.w3.org/2003/05/soap/bindings/HTTP/"
- ##SOAP12_HTTP_MTOM =
- "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true"
- ##XML_HTTP = "http://www.w3.org/2004/08/wsdl/http"
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="##.+"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="protocol-bindingListType">
- <xsd:annotation>
- <xsd:documentation>
- Defines the type used for specifying a list of
- protocol-bindingType(s). For e.g.
-
- ##SOAP11_HTTP ##SOAP12_HTTP ##XML_HTTP
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:list itemType="javaee:protocol-bindingType"/>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="protocol-bindingType">
- <xsd:annotation>
- <xsd:documentation>
- Defines the type used for specifying the URI for the
- protocol binding used by the port-component. For
- portability one could use one of the following tokens that
- alias the standard binding types:
-
- ##SOAP11_HTTP
- ##SOAP11_HTTP_MTOM
- ##SOAP12_HTTP
- ##SOAP12_HTTP_MTOM
- ##XML_HTTP
-
- Other specifications could define tokens that start with ##
- to alias new standard binding URIs that are introduced.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:union memberTypes="xsd:anyURI javaee:protocol-URIAliasType"/>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="qname-pattern">
- <xsd:annotation>
- <xsd:documentation>
- This is used to specify the QName pattern in the
- attribute service-name-pattern and port-name-pattern in
- the handler-chain element
-
- For example, the various forms acceptable here for
- service-name-pattern attribute in handler-chain element
- are :
-
- Exact Name: service-name-pattern="ns1:EchoService"
-
- In this case, handlers specified in this
- handler-chain element will apply to all ports with
- this exact service name. The namespace prefix must
- have been declared in a namespace declaration
- attribute in either the start-tag of the element
- where the prefix is used or in an an ancestor
- element (i.e. an element in whose content the
- prefixed markup occurs)
-
- Pattern : service-name-pattern="ns1:EchoService*"
-
- In this case, handlers specified in this
- handler-chain element will apply to all ports whose
- Service names are like EchoService1, EchoServiceFoo
- etc. The namespace prefix must have been declared in
- a namespace declaration attribute in either the
- start-tag of the element where the prefix is used or
- in an an ancestor element (i.e. an element in whose
- content the prefixed markup occurs)
-
- Wild Card : service-name-pattern="*"
-
- In this case, handlers specified in this handler-chain
- element will apply to ports of all service names.
-
- The same can be applied to port-name attribute in
- handler-chain element.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="\*|([\i-[:]][\c-[:]]*:)?[\i-[:]][\c-[:]]*\*?"/>
- </xsd:restriction>
-
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-impl-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-impl-bean element defines the web service implementation.
- A service implementation can be an EJB bean class or JAX-RPC web
- component. Existing EJB implementations are exposed as a web service
- using an ejb-link.
-
- Used in: port-component
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice>
- <xsd:element name="ejb-link"
- type="javaee:ejb-linkType"/>
- <xsd:element name="servlet-link"
- type="javaee:servlet-linkType"/>
- </xsd:choice>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="servlet-linkType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The servlet-link element is used in the service-impl-bean element
- to specify that a Service Implementation Bean is defined as a
- JAX-RPC Service Endpoint.
-
- The value of the servlet-link element must be the servlet-name of
- a JAX-RPC Service Endpoint in the same WAR file.
-
- Used in: service-impl-bean
-
- Example:
- <servlet-link>StockQuoteService</servlet-link>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="webservice-descriptionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description element defines a WSDL document file
- and the set of Port components associated with the WSDL ports
- defined in the WSDL document. There may be multiple
- webservice-descriptions defined within a module.
-
- All WSDL file ports must have a corresponding port-component element
- defined.
-
- Used in: webservices
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="display-name"
- type="javaee:display-nameType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="icon"
- type="javaee:iconType"
- minOccurs="0" maxOccurs="1"/>
- <xsd:element name="webservice-description-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description-name identifies the collection of
- port-components associated with a WSDL file and JAX-RPC
- mapping. The name must be unique within the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-file"
- type="javaee:pathType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-file element contains the name of a WSDL file in the
- module. The file name is a relative path within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="jaxrpc-mapping-file"
- type="javaee:pathType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The jaxrpc-mapping-file element contains the name of a file that
- describes the JAX-RPC mapping between the Java interaces used by
- the application and the WSDL description in the wsdl-file. The
- file name is a relative path within the module.
-
- This is not required when JAX-WS based runtime is used.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="port-component"
- type="javaee:port-componentType"
- minOccurs="1" maxOccurs="unbounded">
- <xsd:key name="port-component_handler-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique
- within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:handler"/>
- <xsd:field xpath="javaee:handler-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="webservicesType">
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="webservice-description"
- type="javaee:webservice-descriptionType"
- minOccurs="1" maxOccurs="unbounded">
- <xsd:key name="port-component-name-key">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[
-
- The port-component-name element specifies a port
- component's name. This name is assigned by the module
- producer to name the service implementation bean in the
- module's deployment descriptor. The name must be unique
- among the port component names defined in the same module.
-
- Used in: port-component
-
- Example:
- <port-component-name>EmployeeService
- </port-component-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:port-component"/>
- <xsd:field xpath="javaee:port-component-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
-
- <xsd:attribute name="version"
- type="javaee:dewey-versionType"
- fixed="1.2"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 1.2.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_1_3.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_1_3.xsd
deleted file mode 100644
index 7daf23e34a..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_1_3.xsd
+++ /dev/null
@@ -1,572 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.3">
- <xsd:annotation>
- <xsd:documentation>
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
-
- The contents of this file are subject to the terms of either the
- GNU General Public License Version 2 only ("GPL") or the Common
- Development and Distribution License("CDDL") (collectively, the
- "License"). You may not use this file except in compliance with
- the License. You can obtain a copy of the License at
- https://glassfish.dev.java.net/public/CDDL+GPL.html or
- glassfish/bootstrap/legal/LICENSE.txt. See the License for the
- specific language governing permissions and limitations under the
- License.
-
- When distributing the software, include this License Header
- Notice in each file and include the License file at
- glassfish/bootstrap/legal/LICENSE.txt. Sun designates this
- particular file as subject to the "Classpath" exception as
- provided by Sun in the GPL Version 2 section of the License file
- that accompanied this code. If applicable, add the following
- below the License Header, with the fields enclosed by brackets []
- replaced by your own identifying information:
- "Portions Copyrighted [year] [name of copyright owner]"
-
- Contributor(s):
-
- If you wish your version of this file to be governed by only the
- CDDL or only the GPL Version 2, indicate your decision by adding
- "[Contributor] elects to include this software in this
- distribution under the [CDDL or GPL Version 2] license." If you
- don't indicate a single choice of license, a recipient has the
- option to distribute your version of this file under either the
- CDDL, the GPL Version 2 or to extend the choice of license to its
- licensees as provided above. However, if you add GPL Version 2
- code and therefore, elected the GPL Version 2 license, then the
- option applies only if the new code is made subject to such
- option by the copyright holder.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- (C) Copyright International Business Machines Corporation 2002
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The webservices element is the root element for the web services
- deployment descriptor. It specifies the set of web service
- descriptions that are to be deployed into the Java EE Application
- Server and the dependencies they have on container resources and
- services. The deployment descriptor must be named
- "META-INF/webservices.xml" in the web services' jar file.
-
- Used in: webservices.xml
-
- All webservices deployment descriptors must indicate the
- webservices schema by using the Java EE namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and by indicating the version of the schema by using the version
- element as shown below:
-
- <webservices xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
- http://java.sun.com/xml/ns/javaee/javaee_web_services_1_3.xsd"
- version="1.3">
- ...
- </webservices>
-
- The instance documents may indicate the published version of the
- schema using the xsi:schemaLocation attribute for the Java EE
- namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/javaee_web_services_1_3.xsd
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all Java EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_6.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:element name="webservices"
- type="javaee:webservicesType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservices element is the root element for the web services
- deployment descriptor. It specifies the set of web service
- descriptions that are to be deployed into the Java EE Application Server
- and the dependencies they have on container resources and services.
-
- Used in: webservices.xml
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:key name="webservice-description-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description-name identifies the collection of
- port-components associated with a WSDL file and JAX-RPC mapping. The
- name must be unique within the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:webservice-description"/>
- <xsd:field xpath="javaee:webservice-description-name"/>
- </xsd:key>
- </xsd:element>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="port-componentType">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component element associates a WSDL port with a web service
- interface and implementation. It defines the name of the port as a
- component, optional description, optional display name, optional iconic
- representations, WSDL port QName, Service Endpoint Interface, Service
- Implementation Bean.
-
- This element also associates a WSDL service with a JAX-WS Provider
- implementation.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="1"/>
- <xsd:element name="display-name"
- type="javaee:display-nameType"
- minOccurs="0"
- maxOccurs="1"/>
- <xsd:element name="icon"
- type="javaee:iconType"
- minOccurs="0"
- maxOccurs="1"/>
- <xsd:element name="port-component-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The port-component-name element specifies a port component's
- name. This name is assigned by the module producer to name
- the service implementation bean in the module's deployment
- descriptor. The name must be unique among the port component
- names defined in the same module.
-
- Used in: port-component
-
- Example:
- <port-component-name>EmployeeService
- </port-component-name>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-service"
- type="javaee:xsdQNameType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name space and local name part of the WSDL
- service QName. This is required to be specified for
- port components that are JAX-WS Provider implementations.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-port"
- type="javaee:xsdQNameType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name space and local name part of the WSDL
- port QName. This is not required to be specified for port
- components that are JAX-WS Provider implementations
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="enable-mtom"
- type="javaee:true-falseType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Used to enable or disable SOAP MTOM/XOP mechanism for an
- endpoint implementation.
-
- Not to be specified for JAX-RPC runtime
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="mtom-threshold"
- type="javaee:xsdNonNegativeIntegerType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- When MTOM is enabled, binary data above this size in bytes
- will be XOP encoded or sent as attachment. Default value is 0.
-
- Not to be specified for JAX-RPC runtime
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="addressing"
- type="javaee:addressingType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- This specifies the WS-Addressing requirements for a JAX-WS
- web service. It corresponds to javax.xml.ws.soap.Addressing
- annotation or its feature javax.xml.ws.soap.AddressingFeature.
-
- See the addressingType for more information.
-
- Not to be specified for JAX-RPC runtime
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="respect-binding"
- type="javaee:respect-bindingType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Corresponds to the javax.xml.ws.RespectBinding annotation
- or its corresponding javax.xml.ws.RespectBindingFeature web
- service feature. This is used to control whether a JAX-WS
- implementation must respect/honor the contents of the
- wsdl:binding in the WSDL that is associated with the service.
-
- Not to be specified for JAX-RPC runtime
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="protocol-binding"
- type="javaee:protocol-bindingType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Used to specify the protocol binding used by the port-component.
- If this element is not specified, then the default binding is
- used (SOAP 1.1 over HTTP)
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-endpoint-interface"
- type="javaee:fully-qualified-classType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The service-endpoint-interface element contains the
- fully-qualified name of the port component's Service Endpoint
- Interface.
-
- Used in: port-component
-
- Example:
- <remote>com.wombat.empl.EmployeeService</remote>
-
- This may not be specified in case there is no Service
- Enpoint Interface as is the case with directly using an
- implementation class with the @WebService annotation.
-
- When the port component is a Provider implementation
- this is not specified.
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-impl-bean"
- type="javaee:service-impl-beanType"/>
- <xsd:choice>
- <xsd:element name="handler"
- type="javaee:handlerType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- To be used with JAX-RPC based runtime only.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-chains"
- type="javaee:handler-chainsType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- To be used with JAX-WS based runtime only.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-impl-beanType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-impl-bean element defines the web service implementation.
- A service implementation can be an EJB bean class or JAX-RPC web
- component. Existing EJB implementations are exposed as a web service
- using an ejb-link.
-
- Used in: port-component
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:choice>
- <xsd:element name="ejb-link"
- type="javaee:ejb-linkType"/>
- <xsd:element name="servlet-link"
- type="javaee:servlet-linkType"/>
- </xsd:choice>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="servlet-linkType">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The servlet-link element is used in the service-impl-bean element
- to specify that a Service Implementation Bean is defined as a
- JAX-RPC Service Endpoint.
-
- The value of the servlet-link element must be the servlet-name of
- a JAX-RPC Service Endpoint in the same WAR file.
-
- Used in: service-impl-bean
-
- Example:
- <servlet-link>StockQuoteService</servlet-link>
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="webservice-descriptionType">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description element defines a WSDL document file
- and the set of Port components associated with the WSDL ports
- defined in the WSDL document. There may be multiple
- webservice-descriptions defined within a module.
-
- All WSDL file ports must have a corresponding port-component element
- defined.
-
- Used in: webservices
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="description"
- type="javaee:descriptionType"
- minOccurs="0"
- maxOccurs="1"/>
- <xsd:element name="display-name"
- type="javaee:display-nameType"
- minOccurs="0"
- maxOccurs="1"/>
- <xsd:element name="icon"
- type="javaee:iconType"
- minOccurs="0"
- maxOccurs="1"/>
- <xsd:element name="webservice-description-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- The webservice-description-name identifies the collection of
- port-components associated with a WSDL file and JAX-RPC
- mapping. The name must be unique within the deployment descriptor.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-file"
- type="javaee:pathType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-file element contains the name of a WSDL file in the
- module. The file name is a relative path within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="jaxrpc-mapping-file"
- type="javaee:pathType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The jaxrpc-mapping-file element contains the name of a file that
- describes the JAX-RPC mapping between the Java interaces used by
- the application and the WSDL description in the wsdl-file. The
- file name is a relative path within the module.
-
- This is not required when JAX-WS based runtime is used.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="port-component"
- type="javaee:port-componentType"
- minOccurs="1"
- maxOccurs="unbounded">
- <xsd:key name="port-component_handler-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique
- within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:handler"/>
- <xsd:field xpath="javaee:handler-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="webservicesType">
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="webservice-description"
- type="javaee:webservice-descriptionType"
- minOccurs="1"
- maxOccurs="unbounded">
- <xsd:key name="port-component-name-key">
- <xsd:annotation>
- <xsd:documentation>
- <![CDATA[[
- The port-component-name element specifies a port
- component's name. This name is assigned by the module
- producer to name the service implementation bean in the
- module's deployment descriptor. The name must be unique
- among the port component names defined in the same module.
-
- Used in: port-component
-
- Example:
- <port-component-name>EmployeeService
- </port-component-name>
-
-
-
- ]]>
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:port-component"/>
- <xsd:field xpath="javaee:port-component-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="version"
- type="javaee:dewey-versionType"
- fixed="1.3"
- use="required">
- <xsd:annotation>
- <xsd:documentation>
-
- The required value for the version is 1.3.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:attribute>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_client_1_2.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_client_1_2.xsd
deleted file mode 100644
index 3df0dd6279..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_client_1_2.xsd
+++ /dev/null
@@ -1,578 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.2">
- <xsd:annotation>
- <xsd:documentation>
- @(#)javaee_web_services_client_1_2.xsds 1.19 02/13/06
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003-2005 Sun Microsystems, Inc.
- 4150 Network Circle
- Santa Clara, California 95054
- U.S.A
- All rights reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- (C) Copyright International Business Machines Corporation 2002
-
- </xsd:documentation>
- </xsd:annotation>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="port-component-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component-ref element declares a client dependency
- on the container for resolving a Service Endpoint Interface
- to a WSDL port. It optionally associates the Service Endpoint
- Interface with a particular port-component. This is only used
- by the container for a Service.getPort(Class) method call.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="service-endpoint-interface"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint-interface element defines a fully qualified
- Java class that represents the Service Endpoint Interface of a
- WSDL port.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="enable-mtom"
- type="javaee:true-falseType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Used to enable or disable SOAP MTOM/XOP mechanism on the client
- side for a port-component.
-
- Not to be specified for JAX-RPC runtime
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="port-component-link"
- type="javaee:string"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component-link element links a port-component-ref
- to a specific port-component required to be made available
- by a service reference.
-
- The value of a port-component-link must be the
- port-component-name of a port-component in the same module
- or another module in the same application unit. The syntax
- for specification follows the syntax defined for ejb-link
- in the EJB 2.0 specification.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:group name="service-refGroup">
- <xsd:sequence>
- <xsd:element name="service-ref"
- type="javaee:service-refType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:key name="service-ref_handler-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique
- within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:handler"/>
- <xsd:field xpath="javaee:handler-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
- </xsd:group>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-ref element declares a reference to a Web
- service. It contains optional description, display name and
- icons, a declaration of the required Service interface,
- an optional WSDL document location, an optional set
- of JAX-RPC mappings, an optional QName for the service element,
- an optional set of Service Endpoint Interfaces to be resolved
- by the container to a WSDL port, and an optional set of handlers.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="service-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-ref-name element declares logical name that the
- components in the module use to look up the Web service. It
- is recommended that all service reference names start with
- "service/".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-interface"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-interface element declares the fully qualified class
- name of the JAX-RPC Service interface the client depends on.
- In most cases the value will be javax.xml.rpc.Service. A JAX-RPC
- generated Service Interface class may also be specified.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-ref-type"
- type="javaee:fully-qualified-classType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-ref-type element declares the type of the service-ref
- element that is injected or returned when a JNDI lookup is done.
- This must be either a fully qualified name of Service class or
- the fully qualified name of service endpoint interface class.
- This is only used with JAX-WS runtime where the corresponding
- @WebServiceRef annotation can be used to denote both a Service
- or a Port.
-
- If this is not specified, then the type of service-ref element
- that is injected or returned when a JNDI lookup is done is
- always a Service interface/class.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="wsdl-file"
- type="javaee:xsdAnyURIType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-file element contains the URI location of a WSDL
- file. The location is relative to the root of the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="jaxrpc-mapping-file"
- type="javaee:pathType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The jaxrpc-mapping-file element contains the name of a file that
- describes the JAX-RPC mapping between the Java interaces used by
- the application and the WSDL description in the wsdl-file. The
- file name is a relative path within the module file.
-
- This is not required when JAX-WS based runtime is used.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="service-qname"
- type="javaee:xsdQNameType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-qname element declares the specific WSDL service
- element that is being refered to. It is not specified if no
- wsdl-file is declared.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="port-component-ref"
- type="javaee:port-component-refType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component-ref element declares a client dependency
- on the container for resolving a Service Endpoint Interface
- to a WSDL port. It optionally associates the Service Endpoint
- Interface with a particular port-component. This is only used
- by the container for a Service.getPort(Class) method call.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:choice>
- <xsd:element name="handler"
- type="javaee:service-ref_handlerType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Declares the handler for a port-component. Handlers can
- access the init-param name/value pairs using the
- HandlerInfo interface. If port-name is not specified, the
- handler is assumed to be associated with all ports of the
- service.
-
- To be used with JAX-RPC based runtime only.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-chains"
- type="javaee:service-ref_handler-chainsType"
- minOccurs="0" maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
- To be used with JAX-WS based runtime only.
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
-
- <xsd:group ref="javaee:resourceGroup"/>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-ref_handler-chainType">
- <xsd:annotation>
- <xsd:documentation>
-
- The handler-chain element defines the handlerchain.
- Handlerchain can be defined such that the handlers in the
- handlerchain operate,all ports of a service, on a specific
- port or on a list of protocol-bindings. The choice of elements
- service-name-pattern, port-name-pattern and protocol-bindings
- are used to specify whether the handlers in handler-chain are
- for a service, port or protocol binding. If none of these
- choices are specified with the handler-chain element then the
- handlers specified in the handler-chain will be applied on
- everything.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
-
- <xsd:choice minOccurs="0" maxOccurs="1">
- <xsd:element name="service-name-pattern"
- type="javaee:service-ref_qname-pattern" />
- <xsd:element name="port-name-pattern"
- type="javaee:service-ref_qname-pattern" />
- <xsd:element name="protocol-bindings"
- type="javaee:service-ref_protocol-bindingListType"/>
- </xsd:choice>
-
- <xsd:element name="handler"
- type="javaee:service-ref_handlerType"
- minOccurs="1" maxOccurs="unbounded"/>
- </xsd:sequence>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-ref_handler-chainsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The handler-chains element defines the handlerchains associated with this
- service or service endpoint.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="handler-chain"
- type="javaee:service-ref_handler-chainType"
- minOccurs="0" maxOccurs="unbounded"/>
- </xsd:sequence>
-
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-ref_handlerType">
- <xsd:annotation>
- <xsd:documentation>
-
- Declares the handler for a port-component. Handlers can access the
- init-param name/value pairs using the HandlerInfo interface. If
- port-name is not specified, the handler is assumed to be associated
- with all ports of the service.
-
- Used in: service-ref
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="handler-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique
- within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines a fully qualified class name for the handler
- implementation.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="init-param"
- type="javaee:param-valueType"
- minOccurs="0" maxOccurs="unbounded"/>
-
- <xsd:element name="soap-header"
- type="javaee:xsdQNameType"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the QName of a SOAP header that will be processed
- by the handler.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="soap-role"
- type="javaee:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The soap-role element contains a SOAP actor definition that
- the Handler will play as a role.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="port-name"
- type="javaee:string"
- minOccurs="0" maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-name element defines the WSDL port-name that a
- handler should be associated with.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="service-ref_protocol-URIAliasType">
- <xsd:annotation>
- <xsd:documentation>
- Defines the type that is used for specifying tokens that
- start with ## which are used to alias existing standard
- protocol bindings and support aliases for new standard
- binding URIs that are introduced in future specifications.
-
- The following tokens alias the standard protocol binding
- URIs:
-
- ##SOAP11_HTTP = "http://schemas.xmlsoap.org/wsdl/soap/http"
- ##SOAP11_HTTP_MTOM =
- "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true"
- ##SOAP12_HTTP = "http://www.w3.org/2003/05/soap/bindings/HTTP/"
- ##SOAP12_HTTP_MTOM =
- "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true"
- ##XML_HTTP = "http://www.w3.org/2004/08/wsdl/http"
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="##.+"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="service-ref_protocol-bindingListType">
- <xsd:annotation>
- <xsd:documentation>
- Defines the type used for specifying a list of
- protocol-bindingType(s). For e.g.
-
- ##SOAP11_HTTP ##SOAP12_HTTP ##XML_HTTP
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:list itemType="javaee:service-ref_protocol-bindingType"/>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="service-ref_protocol-bindingType">
- <xsd:annotation>
- <xsd:documentation>
- Defines the type used for specifying the URI for the
- protocol binding used by the port-component. For
- portability one could use one of the following tokens that
- alias the standard binding types:
-
- ##SOAP11_HTTP
- ##SOAP11_HTTP_MTOM
- ##SOAP12_HTTP
- ##SOAP12_HTTP_MTOM
- ##XML_HTTP
-
- Other specifications could define tokens that start with ##
- to alias new standard binding URIs that are introduced.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:union memberTypes="xsd:anyURI javaee:service-ref_protocol-URIAliasType"/>
- </xsd:simpleType>
-
-<!-- **************************************************** -->
-
- <xsd:simpleType name="service-ref_qname-pattern">
- <xsd:annotation>
- <xsd:documentation>
- This is used to specify the QName pattern in the
- attribute service-name-pattern and port-name-pattern in
- the handler-chain element
-
- For example, the various forms acceptable here for
- service-name-pattern attribute in handler-chain element
- are :
-
- Exact Name: service-name-pattern="ns1:EchoService"
-
- In this case, handlers specified in this
- handler-chain element will apply to all ports with
- this exact service name. The namespace prefix must
- have been declared in a namespace declaration
- attribute in either the start-tag of the element
- where the prefix is used or in an an ancestor
- element (i.e. an element in whose content the
- prefixed markup occurs)
-
- Pattern : service-name-pattern="ns1:EchoService*"
-
- In this case, handlers specified in this
- handler-chain element will apply to all ports whose
- Service names are like EchoService1, EchoServiceFoo
- etc. The namespace prefix must have been declared in
- a namespace declaration attribute in either the
- start-tag of the element where the prefix is used or
- in an an ancestor element (i.e. an element in whose
- content the prefixed markup occurs)
-
- Wild Card : service-name-pattern="*"
-
- In this case, handlers specified in this handler-chain
- element will apply to ports of all service names.
-
- The same can be applied to port-name attribute in
- handler-chain element.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="\*|([\i-[:]][\c-[:]]*:)?[\i-[:]][\c-[:]]*\*?"/>
- </xsd:restriction>
-
- </xsd:simpleType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_client_1_3.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_client_1_3.xsd
deleted file mode 100644
index 5c673ae915..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/javaee_web_services_client_1_3.xsd
+++ /dev/null
@@ -1,737 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.3">
- <xsd:annotation>
- <xsd:documentation>
-
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
-
- The contents of this file are subject to the terms of either the
- GNU General Public License Version 2 only ("GPL") or the Common
- Development and Distribution License("CDDL") (collectively, the
- "License"). You may not use this file except in compliance with
- the License. You can obtain a copy of the License at
- https://glassfish.dev.java.net/public/CDDL+GPL.html or
- glassfish/bootstrap/legal/LICENSE.txt. See the License for the
- specific language governing permissions and limitations under the
- License.
-
- When distributing the software, include this License Header
- Notice in each file and include the License file at
- glassfish/bootstrap/legal/LICENSE.txt. Sun designates this
- particular file as subject to the "Classpath" exception as
- provided by Sun in the GPL Version 2 section of the License file
- that accompanied this code. If applicable, add the following
- below the License Header, with the fields enclosed by brackets []
- replaced by your own identifying information:
- "Portions Copyrighted [year] [name of copyright owner]"
-
- Contributor(s):
-
- If you wish your version of this file to be governed by only the
- CDDL or only the GPL Version 2, indicate your decision by adding
- "[Contributor] elects to include this software in this
- distribution under the [CDDL or GPL Version 2] license." If you
- don't indicate a single choice of license, a recipient has the
- option to distribute your version of this file under either the
- CDDL, the GPL Version 2 or to extend the choice of license to its
- licensees as provided above. However, if you add GPL Version 2
- code and therefore, elected the GPL Version 2 license, then the
- option applies only if the new code is made subject to such
- option by the copyright holder.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- (C) Copyright International Business Machines Corporation 2002
-
- </xsd:documentation>
- </xsd:annotation>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="service-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-ref element declares a reference to a Web
- service. It contains optional description, display name and
- icons, a declaration of the required Service interface,
- an optional WSDL document location, an optional set
- of JAX-RPC mappings, an optional QName for the service element,
- an optional set of Service Endpoint Interfaces to be resolved
- by the container to a WSDL port, and an optional set of handlers.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="service-ref-name"
- type="javaee:jndi-nameType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-ref-name element declares logical name that the
- components in the module use to look up the Web service. It
- is recommended that all service reference names start with
- "service/".
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-interface"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-interface element declares the fully qualified class
- name of the JAX-RPC Service interface the client depends on.
- In most cases the value will be javax.xml.rpc.Service. A JAX-RPC
- generated Service Interface class may also be specified.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-ref-type"
- type="javaee:fully-qualified-classType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-ref-type element declares the type of the service-ref
- element that is injected or returned when a JNDI lookup is done.
- This must be either a fully qualified name of Service class or
- the fully qualified name of service endpoint interface class.
- This is only used with JAX-WS runtime where the corresponding
- @WebServiceRef annotation can be used to denote both a Service
- or a Port.
-
- If this is not specified, then the type of service-ref element
- that is injected or returned when a JNDI lookup is done is
- always a Service interface/class.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="wsdl-file"
- type="javaee:xsdAnyURIType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The wsdl-file element contains the URI location of a WSDL
- file. The location is relative to the root of the module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="jaxrpc-mapping-file"
- type="javaee:pathType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The jaxrpc-mapping-file element contains the name of a file that
- describes the JAX-RPC mapping between the Java interaces used by
- the application and the WSDL description in the wsdl-file. The
- file name is a relative path within the module file.
-
- This is not required when JAX-WS based runtime is used.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="service-qname"
- type="javaee:xsdQNameType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-qname element declares the specific WSDL service
- element that is being refered to. It is not specified if no
- wsdl-file is declared.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="port-component-ref"
- type="javaee:port-component-refType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component-ref element declares a client dependency
- on the container for resolving a Service Endpoint Interface
- to a WSDL port. It optionally associates the Service Endpoint
- Interface with a particular port-component. This is only used
- by the container for a Service.getPort(Class) method call.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:choice>
- <xsd:element name="handler"
- type="javaee:handlerType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Declares the handler for a port-component. Handlers can
- access the init-param name/value pairs using the
- HandlerInfo interface. If port-name is not specified, the
- handler is assumed to be associated with all ports of the
- service.
-
- To be used with JAX-RPC based runtime only.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-chains"
- type="javaee:handler-chainsType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- To be used with JAX-WS based runtime only.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:choice>
- <xsd:group ref="javaee:resourceGroup"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="port-component-refType">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component-ref element declares a client dependency
- on the container for resolving a Service Endpoint Interface
- to a WSDL port. It optionally associates the Service Endpoint
- Interface with a particular port-component. This is only used
- by the container for a Service.getPort(Class) method call.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="service-endpoint-interface"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- The service-endpoint-interface element defines a fully qualified
- Java class that represents the Service Endpoint Interface of a
- WSDL port.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="enable-mtom"
- type="javaee:true-falseType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Used to enable or disable SOAP MTOM/XOP mechanism on the client
- side for a port-component.
-
- Not to be specified for JAX-RPC runtime
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="mtom-threshold"
- type="javaee:xsdNonNegativeIntegerType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- When MTOM is enabled, binary data above this size in bytes
- should be XOP encoded or sent as attachment. Default value is 0.
-
- Not to be specified for JAX-RPC runtime
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="addressing"
- type="javaee:addressingType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- This specifies the WS-Addressing requirements for a JAX-WS
- web service. It corresponds to javax.xml.ws.soap.Addressing
- annotation or its feature javax.xml.ws.soap.AddressingFeature.
-
- See the addressingType for more information.
-
- Not to be specified for JAX-RPC runtime
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="respect-binding"
- type="javaee:respect-bindingType"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- Corresponds to the javax.xml.ws.RespectBinding annotation
- or its corresponding javax.xml.ws.RespectBindingFeature web
- service feature. This is used to control whether a JAX-WS
- implementation must respect/honor the contents of the
- wsdl:binding in the WSDL that is associated with the service.
-
- Not to be specified for JAX-RPC runtime
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="port-component-link"
- type="javaee:string"
- minOccurs="0"
- maxOccurs="1">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-component-link element links a port-component-ref
- to a specific port-component required to be made available
- by a service reference.
-
- The value of a port-component-link must be the
- port-component-name of a port-component in the same module
- or another module in the same application unit. The syntax
- for specification follows the syntax defined for ejb-link
- in the EJB 2.0 specification.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="handler-chainsType">
- <xsd:annotation>
- <xsd:documentation>
-
- The handler-chains element defines the handlerchains associated with this
- service or service endpoint.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="handler-chain"
- type="javaee:handler-chainType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="handler-chainType">
- <xsd:annotation>
- <xsd:documentation>
-
- The handler-chain element defines the handlerchain.
- Handlerchain can be defined such that the handlers in the
- handlerchain operate,all ports of a service, on a specific
- port or on a list of protocol-bindings. The choice of elements
- service-name-pattern, port-name-pattern and protocol-bindings
- are used to specify whether the handlers in handler-chain are
- for a service, port or protocol binding. If none of these
- choices are specified with the handler-chain element then the
- handlers specified in the handler-chain will be applied on
- everything.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:choice minOccurs="0"
- maxOccurs="1">
- <xsd:element name="service-name-pattern"
- type="javaee:qname-pattern"/>
- <xsd:element name="port-name-pattern"
- type="javaee:qname-pattern"/>
- <xsd:element name="protocol-bindings"
- type="javaee:protocol-bindingListType"/>
- </xsd:choice>
- <xsd:element name="handler"
- type="javaee:handlerType"
- minOccurs="1"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
- <xsd:simpleType name="protocol-bindingListType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the type used for specifying a list of
- protocol-bindingType(s). For e.g.
-
- ##SOAP11_HTTP ##SOAP12_HTTP ##XML_HTTP
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:list itemType="javaee:protocol-bindingType"/>
- </xsd:simpleType>
-
- <xsd:simpleType name="protocol-bindingType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the type used for specifying the URI for the
- protocol binding used by the port-component. For
- portability one could use one of the following tokens that
- alias the standard binding types:
-
- ##SOAP11_HTTP
- ##SOAP11_HTTP_MTOM
- ##SOAP12_HTTP
- ##SOAP12_HTTP_MTOM
- ##XML_HTTP
-
- Other specifications could define tokens that start with ##
- to alias new standard binding URIs that are introduced.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:union memberTypes="xsd:anyURI javaee:protocol-URIAliasType"/>
- </xsd:simpleType>
-
- <xsd:simpleType name="protocol-URIAliasType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the type that is used for specifying tokens that
- start with ## which are used to alias existing standard
- protocol bindings and support aliases for new standard
- binding URIs that are introduced in future specifications.
-
- The following tokens alias the standard protocol binding
- URIs:
-
- ##SOAP11_HTTP = "http://schemas.xmlsoap.org/wsdl/soap/http"
- ##SOAP11_HTTP_MTOM =
- "http://schemas.xmlsoap.org/wsdl/soap/http?mtom=true"
- ##SOAP12_HTTP = "http://www.w3.org/2003/05/soap/bindings/HTTP/"
- ##SOAP12_HTTP_MTOM =
- "http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true"
- ##XML_HTTP = "http://www.w3.org/2004/08/wsdl/http"
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="##.+"/>
- </xsd:restriction>
- </xsd:simpleType>
-
- <xsd:simpleType name="qname-pattern">
- <xsd:annotation>
- <xsd:documentation>
-
- This is used to specify the QName pattern in the
- attribute service-name-pattern and port-name-pattern in
- the handler-chain element
-
- For example, the various forms acceptable here for
- service-name-pattern attribute in handler-chain element
- are :
-
- Exact Name: service-name-pattern="ns1:EchoService"
-
- In this case, handlers specified in this
- handler-chain element will apply to all ports with
- this exact service name. The namespace prefix must
- have been declared in a namespace declaration
- attribute in either the start-tag of the element
- where the prefix is used or in an an ancestor
- element (i.e. an element in whose content the
- prefixed markup occurs)
-
-
- Pattern : service-name-pattern="ns1:EchoService*"
-
- In this case, handlers specified in this
- handler-chain element will apply to all ports whose
- Service names are like EchoService1, EchoServiceFoo
- etc. The namespace prefix must have been declared in
- a namespace declaration attribute in either the
- start-tag of the element where the prefix is used or
- in an an ancestor element (i.e. an element in whose
- content the prefixed markup occurs)
-
- Wild Card : service-name-pattern="*"
-
- In this case, handlers specified in this handler-chain
- element will apply to ports of all service names.
-
- The same can be applied to port-name attribute in
- handler-chain element.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:restriction base="xsd:token">
- <xsd:pattern value="\*|([\i-[:]][\c-[:]]*:)?[\i-[:]][\c-[:]]*\*?"/>
- </xsd:restriction>
- </xsd:simpleType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="addressingType">
- <xsd:annotation>
- <xsd:documentation>
-
- This specifies the WS-Addressing requirements for a JAX-WS web service.
- It corresponds to javax.xml.ws.soap.Addressing annotation or its
- feature javax.xml.ws.soap.AddressingFeature.
-
- If the "enabled" element is "true", WS-Addressing is enabled.
- It means that the endpoint supports WS-Addressing but does not require
- its use. The default value for "enabled" is "true".
-
- If the WS-Addressing is enabled and the "required" element is "true",
- it means that the endpoint requires WS-Addressing. The default value
- for "required" is "false".
-
- If WS-Addressing is enabled, the "responses" element determines
- if an endpoint requires the use of only anonymous responses,
- or only non-anonymous responses, or all. The value of the "responses"
- element must be one of the following:
-
- ANONYMOUS
- NON_ANONYMOUS
- ALL
-
- The default value for the "responses" is ALL.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="enabled"
- type="javaee:true-falseType"
- minOccurs="0"
- maxOccurs="1"/>
- <xsd:element name="required"
- type="javaee:true-falseType"
- minOccurs="0"
- maxOccurs="1"/>
- <xsd:element name="responses"
- type="javaee:addressing-responsesType"
- minOccurs="0"
- maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="addressing-responsesType">
- <xsd:annotation>
- <xsd:documentation>
-
- If WS-Addressing is enabled, this type determines if an endpoint
- requires the use of only anonymous responses, or only non-anonymous
- responses, or all.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:simpleContent>
- <xsd:restriction base="javaee:string">
- <xsd:enumeration value="ANONYMOUS"/>
- <xsd:enumeration value="NON_ANONYMOUS"/>
- <xsd:enumeration value="ALL"/>
- </xsd:restriction>
- </xsd:simpleContent>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="respect-bindingType">
- <xsd:annotation>
- <xsd:documentation>
-
- Corresponds to the javax.xml.ws.RespectBinding annotation
- or its corresponding javax.xml.ws.RespectBindingFeature web
- service feature. This is used to control whether a JAX-WS
- implementation must respect/honor the contents of the
- wsdl:binding in the WSDL that is associated with the service.
-
- If the "enabled" element is "true", wsdl:binding in the
- associated WSDL, if any, must be respected/honored.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:element name="enabled"
- type="javaee:true-falseType"
- minOccurs="0"
- maxOccurs="1"/>
- </xsd:sequence>
- </xsd:complexType>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="handlerType">
- <xsd:annotation>
- <xsd:documentation>
-
- Declares the handler for a port-component, service-ref. Handlers can
- access the init-param name/value pairs using the HandlerInfo interface.
-
- Used in: port-component, service-ref
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="handler-name"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique within the
- module.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="handler-class"
- type="javaee:fully-qualified-classType">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines a fully qualified class name for the handler implementation.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="init-param"
- type="javaee:param-valueType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Not to be specified for JAX-WS runtime
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="soap-header"
- type="javaee:xsdQNameType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the QName of a SOAP header that will be processed by the
- handler.
-
- Not to be specified for JAX-WS runtime
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="soap-role"
- type="javaee:string"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The soap-role element contains a SOAP actor definition that the
- Handler will play as a role.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="port-name"
- type="javaee:string"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The port-name element defines the WSDL port-name that a
- handler should be associated with. If port-name is not
- specified, the handler is assumed to be associated with
- all ports of the service.
-
- Not to be specified for JAX-WS runtime
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id"
- type="xsd:ID"/>
- </xsd:complexType>
-
- <xsd:group name="service-refGroup">
- <xsd:sequence>
- <xsd:element name="service-ref"
- type="javaee:service-refType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:key name="service-ref_handler-name-key">
- <xsd:annotation>
- <xsd:documentation>
-
- Defines the name of the handler. The name must be unique
- within the module.
-
- </xsd:documentation>
- </xsd:annotation>
- <xsd:selector xpath="javaee:handler"/>
- <xsd:field xpath="javaee:handler-name"/>
- </xsd:key>
- </xsd:element>
- </xsd:sequence>
- </xsd:group>
-
-</xsd:schema>
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/jsp_2_0.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/jsp_2_0.xsd
deleted file mode 100644
index 970a76d7df..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/jsp_2_0.xsd
+++ /dev/null
@@ -1,308 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/j2ee"
- xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="2.0">
- <xsd:annotation>
- <xsd:documentation>
- @(#)jsp_2_0.xsds 1.17 03/18/03
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003 Sun Microsystems, Inc., 901 San Antonio
- Road, Palo Alto, California 94303, U.S.A. All rights
- reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- This is the XML Schema for the JSP 2.0 deployment descriptor
- types. The JSP 2.0 schema contains all the special
- structures and datatypes that are necessary to use JSP files
- from a web application.
-
- The contents of this schema is used by the web-app_2_4.xsd
- file to define JSP specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all J2EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="j2ee_1_4.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="jsp-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jsp-configType is used to provide global configuration
- information for the JSP files in a web application. It has
- two subelements, taglib and jsp-property-group.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="taglib"
- type="j2ee:taglibType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="jsp-property-group"
- type="j2ee:jsp-property-groupType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="jsp-fileType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jsp-file element contains the full path to a JSP file
- within the web application beginning with a `/'.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="j2ee:pathType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="jsp-property-groupType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jsp-property-groupType is used to group a number of
- files so they can be given global property information.
- All files so described are deemed to be JSP files. The
- following additional properties can be described:
-
- - Control whether EL is ignored
- - Control whether scripting elements are invalid
- - Indicate pageEncoding information.
- - Indicate that a resource is a JSP document (XML)
- - Prelude and Coda automatic includes.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="j2ee:descriptionGroup"/>
- <xsd:element name="url-pattern"
- type="j2ee:url-patternType"
- maxOccurs="unbounded"/>
- <xsd:element name="el-ignored"
- type="j2ee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Can be used to easily set the isELIgnored
- property of a group of JSP pages. By default, the
- EL evaluation is enabled for Web Applications using
- a Servlet 2.4 or greater web.xml, and disabled
- otherwise.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="page-encoding"
- type="j2ee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The valid values of page-encoding are those of the
- pageEncoding page directive. It is a
- translation-time error to name different encodings
- in the pageEncoding attribute of the page directive
- of a JSP page and in a JSP configuration element
- matching the page. It is also a translation-time
- error to name different encodings in the prolog
- or text declaration of a document in XML syntax and
- in a JSP configuration element matching the document.
- It is legal to name the same encoding through
- mulitple mechanisms.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="scripting-invalid"
- type="j2ee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Can be used to easily disable scripting in a
- group of JSP pages. By default, scripting is
- enabled.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="is-xml"
- type="j2ee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- If true, denotes that the group of resources
- that match the URL pattern are JSP documents,
- and thus must be interpreted as XML documents.
- If false, the resources are assumed to not
- be JSP documents, unless there is another
- property group that indicates otherwise.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="include-prelude"
- type="j2ee:pathType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The include-prelude element is a context-relative
- path that must correspond to an element in the
- Web Application. When the element is present,
- the given path will be automatically included (as
- in an include directive) at the beginning of each
- JSP page in this jsp-property-group.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="include-coda"
- type="j2ee:pathType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The include-coda element is a context-relative
- path that must correspond to an element in the
- Web Application. When the element is present,
- the given path will be automatically included (as
- in an include directive) at the end of each
- JSP page in this jsp-property-group.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="taglibType">
- <xsd:annotation>
- <xsd:documentation>
-
- The taglibType defines the syntax for declaring in
- the deployment descriptor that a tag library is
- available to the application. This can be done
- to override implicit map entries from TLD files and
- from the container.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="taglib-uri"
- type="j2ee:string">
- <xsd:annotation>
- <xsd:documentation>
-
- A taglib-uri element describes a URI identifying a
- tag library used in the web application. The body
- of the taglib-uri element may be either an
- absolute URI specification, or a relative URI.
- There should be no entries in web.xml with the
- same taglib-uri value.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- <xsd:element name="taglib-location"
- type="j2ee:pathType">
- <xsd:annotation>
- <xsd:documentation>
-
- the taglib-location element contains the location
- (as a resource relative to the root of the web
- application) where to find the Tag Library
- Description file for the tag library.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
-
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-</xsd:schema>
-
diff --git a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/jsp_2_1.xsd b/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/jsp_2_1.xsd
deleted file mode 100644
index ab633886d9..0000000000
--- a/bundles/org.eclipse.jst.standard.schemas/dtdsAndSchemas/jsp_2_1.xsd
+++ /dev/null
@@ -1,343 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="2.1">
- <xsd:annotation>
- <xsd:documentation>
- @(#)jsp_2_1.xsds 1.5 08/11/05
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- Copyright 2003-2005 Sun Microsystems, Inc.
- 4150 Network Circle
- Santa Clara, California 95054
- U.S.A
- All rights reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- This is the XML Schema for the JSP 2.1 deployment descriptor
- types. The JSP 2.1 schema contains all the special
- structures and datatypes that are necessary to use JSP files
- from a web application.
-
- The contents of this schema is used by the web-app_2_5.xsd
- file to define JSP specific content.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:annotation>
- <xsd:documentation>
-
- The following conventions apply to all Java EE
- deployment descriptor elements unless indicated otherwise.
-
- - In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:include schemaLocation="javaee_5.xsd"/>
-
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="jsp-configType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jsp-configType is used to provide global configuration
- information for the JSP files in a web application. It has
- two subelements, taglib and jsp-property-group.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:element name="taglib"
- type="javaee:taglibType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- <xsd:element name="jsp-property-group"
- type="javaee:jsp-property-groupType"
- minOccurs="0"
- maxOccurs="unbounded"/>
- </xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="jsp-fileType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jsp-file element contains the full path to a JSP file
- within the web application beginning with a `/'.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:simpleContent>
- <xsd:restriction base="javaee:pathType"/>
- </xsd:simpleContent>
- </xsd:complexType>
-
-<!-- **************************************************** -->
-
- <xsd:complexType name="jsp-property-groupType">
- <xsd:annotation>
- <xsd:documentation>
-
- The jsp-property-groupType is used to group a number of
- files so they can be given global property information.
- All files so described are deemed to be JSP files. The
- following additional properties can be described:
-
- - Control whether EL is ignored.
- - Control whether scripting elements are invalid.
- - Indicate pageEncoding information.
- - Indicate that a resource is a JSP document (XML).
- - Prelude and Coda automatic includes.
- - Control whether the character sequence #{ is allowed
- when used as a String literal.
- - Control whether template text containing only
- whitespaces must be removed from the response output.
-
- </xsd:documentation>
- </xsd:annotation>
-
- <xsd:sequence>
- <xsd:group ref="javaee:descriptionGroup"/>
- <xsd:element name="url-pattern"
- type="javaee:url-patternType"
- maxOccurs="unbounded"/>
- <xsd:element name="el-ignored"
- type="javaee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Can be used to easily set the isELIgnored
- property of a group of JSP pages. By default, the
- EL evaluation is enabled for Web Applications using
- a Servlet 2.4 or greater web.xml, and disabled
- otherwise.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="page-encoding"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- The valid values of page-encoding are those of the
- pageEncoding page directive. It is a
- translation-time error to name different encodings
- in the pageEncoding attribute of the page directive
- of a JSP page and in a JSP configuration element
- matching the page. It is also a translation-time
- error to name different encodings in the prolog
- or text declaration of a document in XML syntax and
- in a JSP configuration element matching the document.
- It is legal to name the same encoding through
- mulitple mechanisms.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="scripting-invalid"
- type="javaee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- Can be used to easily disable scripting in a
- group of JSP pages. By default, scripting is
- enabled.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="is-xml"
- type="javaee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
-
- If true, denotes that the group of resources
- that match the URL pattern are JSP documents,
- and thus must be interpreted as XML documents.
- If false, the resources are assumed to not
- be JSP documents, unless there is another
- property group that indicates otherwise.
-
- </xsd:documentation>
- </xsd:annotation>
- </xsd:element>
- <xsd:element name="include-prelude"
- type="javaee:pathType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
-
- The include-prelude element is a context-relative
- path that must correspond to an element in the
- Web Application. When the element is present,
- the given path will be automatically included (as
- in an include directive) at the beginning of each
- JSP page in this jsp-property-group.